private ProgressEvent updateQuickConnectName()

in aws-connect-quickconnect/src/main/java/software/amazon/connect/quickconnect/UpdateHandler.java [57:79]


    private ProgressEvent<ResourceModel, CallbackContext> updateQuickConnectName(final AmazonWebServicesClientProxy proxy,
                                                                                 final ProxyClient<ConnectClient> proxyClient,
                                                                                 final ResourceModel desiredStateModel,
                                                                                 final ResourceModel previousStateModel,
                                                                                 final ProgressEvent<ResourceModel, CallbackContext> progress,
                                                                                 final CallbackContext context,
                                                                                 final Logger logger) {

        final boolean updateQuickConnectName = !StringUtils.equals(desiredStateModel.getName(), previousStateModel.getName());
        final boolean updateQuickConnectDescription = !StringUtils.equals(desiredStateModel.getDescription(), previousStateModel.getDescription());

        if (updateQuickConnectName || updateQuickConnectDescription) {
            logger.log(String.format("Calling UpdateQuickConnectName API for QuickConnect:%s", desiredStateModel.getQuickConnectArn()));
            return proxy.initiate("connect::updateQuickConnectName", proxyClient, desiredStateModel, context)
                    .translateToServiceRequest(UpdateHandler::translateToUpdateQuickConnectNameRequest)
                    .makeServiceCall((req, clientProxy) -> invoke(req, clientProxy, clientProxy.client()::updateQuickConnectName, logger))
                    .progress();
        } else {
            logger.log(String.format("QuickConnect name and description fields are unchanged from in the update operation, " +
                    "skipping UpdateQuickConnectName API call for QuickConnect:%s", desiredStateModel.getQuickConnectArn()));
            return progress;
        }
    }