private Amazon.LookoutEquipment.Model.CreateInferenceSchedulerResponse CallAWSServiceOperation(IAmazonLookoutEquipment client, Amazon.LookoutEquipment.Model.CreateInferenceSchedulerRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Lookout for Equipment", "CreateInferenceScheduler");
     try
     {
         #if DESKTOP
         return(client.CreateInferenceScheduler(request));
         #elif CORECLR
         return(client.CreateInferenceSchedulerAsync(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.LookoutEquipment.Model.CreateInferenceSchedulerRequest();

            if (cmdletContext.ClientToken != null)
            {
                request.ClientToken = cmdletContext.ClientToken;
            }
            if (cmdletContext.DataDelayOffsetInMinute != null)
            {
                request.DataDelayOffsetInMinutes = cmdletContext.DataDelayOffsetInMinute.Value;
            }

            // populate DataInputConfiguration
            var requestDataInputConfigurationIsNull = true;

            request.DataInputConfiguration = new Amazon.LookoutEquipment.Model.InferenceInputConfiguration();
            System.String requestDataInputConfiguration_dataInputConfiguration_InputTimeZoneOffset = null;
            if (cmdletContext.DataInputConfiguration_InputTimeZoneOffset != null)
            {
                requestDataInputConfiguration_dataInputConfiguration_InputTimeZoneOffset = cmdletContext.DataInputConfiguration_InputTimeZoneOffset;
            }
            if (requestDataInputConfiguration_dataInputConfiguration_InputTimeZoneOffset != null)
            {
                request.DataInputConfiguration.InputTimeZoneOffset = requestDataInputConfiguration_dataInputConfiguration_InputTimeZoneOffset;
                requestDataInputConfigurationIsNull = false;
            }
            Amazon.LookoutEquipment.Model.InferenceInputNameConfiguration requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration = null;

            // populate InferenceInputNameConfiguration
            var requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfigurationIsNull = true;

            requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration = new Amazon.LookoutEquipment.Model.InferenceInputNameConfiguration();
            System.String requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration_inferenceInputNameConfiguration_ComponentTimestampDelimiter = null;
            if (cmdletContext.InferenceInputNameConfiguration_ComponentTimestampDelimiter != null)
            {
                requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration_inferenceInputNameConfiguration_ComponentTimestampDelimiter = cmdletContext.InferenceInputNameConfiguration_ComponentTimestampDelimiter;
            }
            if (requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration_inferenceInputNameConfiguration_ComponentTimestampDelimiter != null)
            {
                requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration.ComponentTimestampDelimiter = requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration_inferenceInputNameConfiguration_ComponentTimestampDelimiter;
                requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfigurationIsNull = false;
            }
            System.String requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration_inferenceInputNameConfiguration_TimestampFormat = null;
            if (cmdletContext.InferenceInputNameConfiguration_TimestampFormat != null)
            {
                requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration_inferenceInputNameConfiguration_TimestampFormat = cmdletContext.InferenceInputNameConfiguration_TimestampFormat;
            }
            if (requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration_inferenceInputNameConfiguration_TimestampFormat != null)
            {
                requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration.TimestampFormat = requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration_inferenceInputNameConfiguration_TimestampFormat;
                requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfigurationIsNull           = false;
            }
            // determine if requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration should be set to null
            if (requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfigurationIsNull)
            {
                requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration = null;
            }
            if (requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration != null)
            {
                request.DataInputConfiguration.InferenceInputNameConfiguration = requestDataInputConfiguration_dataInputConfiguration_InferenceInputNameConfiguration;
                requestDataInputConfigurationIsNull = false;
            }
            Amazon.LookoutEquipment.Model.InferenceS3InputConfiguration requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration = null;

            // populate S3InputConfiguration
            var requestDataInputConfiguration_dataInputConfiguration_S3InputConfigurationIsNull = true;

            requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration = new Amazon.LookoutEquipment.Model.InferenceS3InputConfiguration();
            System.String requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration_s3InputConfiguration_Bucket = null;
            if (cmdletContext.S3InputConfiguration_Bucket != null)
            {
                requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration_s3InputConfiguration_Bucket = cmdletContext.S3InputConfiguration_Bucket;
            }
            if (requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration_s3InputConfiguration_Bucket != null)
            {
                requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration.Bucket = requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration_s3InputConfiguration_Bucket;
                requestDataInputConfiguration_dataInputConfiguration_S3InputConfigurationIsNull  = false;
            }
            System.String requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration_s3InputConfiguration_Prefix = null;
            if (cmdletContext.S3InputConfiguration_Prefix != null)
            {
                requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration_s3InputConfiguration_Prefix = cmdletContext.S3InputConfiguration_Prefix;
            }
            if (requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration_s3InputConfiguration_Prefix != null)
            {
                requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration.Prefix = requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration_s3InputConfiguration_Prefix;
                requestDataInputConfiguration_dataInputConfiguration_S3InputConfigurationIsNull  = false;
            }
            // determine if requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration should be set to null
            if (requestDataInputConfiguration_dataInputConfiguration_S3InputConfigurationIsNull)
            {
                requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration = null;
            }
            if (requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration != null)
            {
                request.DataInputConfiguration.S3InputConfiguration = requestDataInputConfiguration_dataInputConfiguration_S3InputConfiguration;
                requestDataInputConfigurationIsNull = false;
            }
            // determine if request.DataInputConfiguration should be set to null
            if (requestDataInputConfigurationIsNull)
            {
                request.DataInputConfiguration = null;
            }

            // populate DataOutputConfiguration
            var requestDataOutputConfigurationIsNull = true;

            request.DataOutputConfiguration = new Amazon.LookoutEquipment.Model.InferenceOutputConfiguration();
            System.String requestDataOutputConfiguration_dataOutputConfiguration_KmsKeyId = null;
            if (cmdletContext.DataOutputConfiguration_KmsKeyId != null)
            {
                requestDataOutputConfiguration_dataOutputConfiguration_KmsKeyId = cmdletContext.DataOutputConfiguration_KmsKeyId;
            }
            if (requestDataOutputConfiguration_dataOutputConfiguration_KmsKeyId != null)
            {
                request.DataOutputConfiguration.KmsKeyId = requestDataOutputConfiguration_dataOutputConfiguration_KmsKeyId;
                requestDataOutputConfigurationIsNull     = false;
            }
            Amazon.LookoutEquipment.Model.InferenceS3OutputConfiguration requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration = null;

            // populate S3OutputConfiguration
            var requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfigurationIsNull = true;

            requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration = new Amazon.LookoutEquipment.Model.InferenceS3OutputConfiguration();
            System.String requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration_s3OutputConfiguration_Bucket = null;
            if (cmdletContext.S3OutputConfiguration_Bucket != null)
            {
                requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration_s3OutputConfiguration_Bucket = cmdletContext.S3OutputConfiguration_Bucket;
            }
            if (requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration_s3OutputConfiguration_Bucket != null)
            {
                requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration.Bucket = requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration_s3OutputConfiguration_Bucket;
                requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfigurationIsNull  = false;
            }
            System.String requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration_s3OutputConfiguration_Prefix = null;
            if (cmdletContext.S3OutputConfiguration_Prefix != null)
            {
                requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration_s3OutputConfiguration_Prefix = cmdletContext.S3OutputConfiguration_Prefix;
            }
            if (requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration_s3OutputConfiguration_Prefix != null)
            {
                requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration.Prefix = requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration_s3OutputConfiguration_Prefix;
                requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfigurationIsNull  = false;
            }
            // determine if requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration should be set to null
            if (requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfigurationIsNull)
            {
                requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration = null;
            }
            if (requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration != null)
            {
                request.DataOutputConfiguration.S3OutputConfiguration = requestDataOutputConfiguration_dataOutputConfiguration_S3OutputConfiguration;
                requestDataOutputConfigurationIsNull = false;
            }
            // determine if request.DataOutputConfiguration should be set to null
            if (requestDataOutputConfigurationIsNull)
            {
                request.DataOutputConfiguration = null;
            }
            if (cmdletContext.DataUploadFrequency != null)
            {
                request.DataUploadFrequency = cmdletContext.DataUploadFrequency;
            }
            if (cmdletContext.InferenceSchedulerName != null)
            {
                request.InferenceSchedulerName = cmdletContext.InferenceSchedulerName;
            }
            if (cmdletContext.ModelName != null)
            {
                request.ModelName = cmdletContext.ModelName;
            }
            if (cmdletContext.RoleArn != null)
            {
                request.RoleArn = cmdletContext.RoleArn;
            }
            if (cmdletContext.ServerSideKmsKeyId != null)
            {
                request.ServerSideKmsKeyId = cmdletContext.ServerSideKmsKeyId;
            }
            if (cmdletContext.Tag != null)
            {
                request.Tags = cmdletContext.Tag;
            }

            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);
        }