private Amazon.SageMaker.Model.UpdateWorkteamResponse CallAWSServiceOperation(IAmazonSageMaker client, Amazon.SageMaker.Model.UpdateWorkteamRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon SageMaker Service", "UpdateWorkteam");
     try
     {
         #if DESKTOP
         return(client.UpdateWorkteam(request));
         #elif CORECLR
         return(client.UpdateWorkteamAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.SageMaker.Model.UpdateWorkteamRequest();

            if (cmdletContext.Description != null)
            {
                request.Description = cmdletContext.Description;
            }
            if (cmdletContext.MemberDefinition != null)
            {
                request.MemberDefinitions = cmdletContext.MemberDefinition;
            }

            // populate NotificationConfiguration
            var requestNotificationConfigurationIsNull = true;

            request.NotificationConfiguration = new Amazon.SageMaker.Model.NotificationConfiguration();
            System.String requestNotificationConfiguration_notificationConfiguration_NotificationTopicArn = null;
            if (cmdletContext.NotificationConfiguration_NotificationTopicArn != null)
            {
                requestNotificationConfiguration_notificationConfiguration_NotificationTopicArn = cmdletContext.NotificationConfiguration_NotificationTopicArn;
            }
            if (requestNotificationConfiguration_notificationConfiguration_NotificationTopicArn != null)
            {
                request.NotificationConfiguration.NotificationTopicArn = requestNotificationConfiguration_notificationConfiguration_NotificationTopicArn;
                requestNotificationConfigurationIsNull = false;
            }
            // determine if request.NotificationConfiguration should be set to null
            if (requestNotificationConfigurationIsNull)
            {
                request.NotificationConfiguration = null;
            }
            if (cmdletContext.WorkteamName != null)
            {
                request.WorkteamName = cmdletContext.WorkteamName;
            }

            CmdletOutput output;

            // issue call
            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);

            try
            {
                var    response       = CallAWSServiceOperation(client, request);
                object pipelineOutput = null;
                pipelineOutput = cmdletContext.Select(response, this);
                output         = new CmdletOutput
                {
                    PipelineOutput  = pipelineOutput,
                    ServiceResponse = response
                };
            }
            catch (Exception e)
            {
                output = new CmdletOutput {
                    ErrorResponse = e
                };
            }

            return(output);
        }