private Amazon.SageMaker.Model.CreateFeatureGroupResponse CallAWSServiceOperation(IAmazonSageMaker client, Amazon.SageMaker.Model.CreateFeatureGroupRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon SageMaker Service", "CreateFeatureGroup");
     try
     {
         #if DESKTOP
         return(client.CreateFeatureGroup(request));
         #elif CORECLR
         return(client.CreateFeatureGroupAsync(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.CreateFeatureGroupRequest();

            if (cmdletContext.Description != null)
            {
                request.Description = cmdletContext.Description;
            }
            if (cmdletContext.EventTimeFeatureName != null)
            {
                request.EventTimeFeatureName = cmdletContext.EventTimeFeatureName;
            }
            if (cmdletContext.FeatureDefinition != null)
            {
                request.FeatureDefinitions = cmdletContext.FeatureDefinition;
            }
            if (cmdletContext.FeatureGroupName != null)
            {
                request.FeatureGroupName = cmdletContext.FeatureGroupName;
            }

            // populate OfflineStoreConfig
            var requestOfflineStoreConfigIsNull = true;

            request.OfflineStoreConfig = new Amazon.SageMaker.Model.OfflineStoreConfig();
            System.Boolean?requestOfflineStoreConfig_offlineStoreConfig_DisableGlueTableCreation = null;
            if (cmdletContext.OfflineStoreConfig_DisableGlueTableCreation != null)
            {
                requestOfflineStoreConfig_offlineStoreConfig_DisableGlueTableCreation = cmdletContext.OfflineStoreConfig_DisableGlueTableCreation.Value;
            }
            if (requestOfflineStoreConfig_offlineStoreConfig_DisableGlueTableCreation != null)
            {
                request.OfflineStoreConfig.DisableGlueTableCreation = requestOfflineStoreConfig_offlineStoreConfig_DisableGlueTableCreation.Value;
                requestOfflineStoreConfigIsNull = false;
            }
            Amazon.SageMaker.Model.DataCatalogConfig requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig = null;

            // populate DataCatalogConfig
            var requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfigIsNull = true;

            requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig = new Amazon.SageMaker.Model.DataCatalogConfig();
            System.String requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Catalog = null;
            if (cmdletContext.DataCatalogConfig_Catalog != null)
            {
                requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Catalog = cmdletContext.DataCatalogConfig_Catalog;
            }
            if (requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Catalog != null)
            {
                requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig.Catalog = requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Catalog;
                requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfigIsNull   = false;
            }
            System.String requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Database = null;
            if (cmdletContext.DataCatalogConfig_Database != null)
            {
                requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Database = cmdletContext.DataCatalogConfig_Database;
            }
            if (requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Database != null)
            {
                requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig.Database = requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Database;
                requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfigIsNull    = false;
            }
            System.String requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_TableName = null;
            if (cmdletContext.DataCatalogConfig_TableName != null)
            {
                requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_TableName = cmdletContext.DataCatalogConfig_TableName;
            }
            if (requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_TableName != null)
            {
                requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig.TableName = requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_TableName;
                requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfigIsNull     = false;
            }
            // determine if requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig should be set to null
            if (requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfigIsNull)
            {
                requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig = null;
            }
            if (requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig != null)
            {
                request.OfflineStoreConfig.DataCatalogConfig = requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig;
                requestOfflineStoreConfigIsNull = false;
            }
            Amazon.SageMaker.Model.S3StorageConfig requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig = null;

            // populate S3StorageConfig
            var requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfigIsNull = true;

            requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig = new Amazon.SageMaker.Model.S3StorageConfig();
            System.String requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_KmsKeyId = null;
            if (cmdletContext.S3StorageConfig_KmsKeyId != null)
            {
                requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_KmsKeyId = cmdletContext.S3StorageConfig_KmsKeyId;
            }
            if (requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_KmsKeyId != null)
            {
                requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig.KmsKeyId = requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_KmsKeyId;
                requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfigIsNull    = false;
            }
            System.String requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_ResolvedOutputS3Uri = null;
            if (cmdletContext.S3StorageConfig_ResolvedOutputS3Uri != null)
            {
                requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_ResolvedOutputS3Uri = cmdletContext.S3StorageConfig_ResolvedOutputS3Uri;
            }
            if (requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_ResolvedOutputS3Uri != null)
            {
                requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig.ResolvedOutputS3Uri = requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_ResolvedOutputS3Uri;
                requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfigIsNull = false;
            }
            System.String requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_S3Uri = null;
            if (cmdletContext.S3StorageConfig_S3Uri != null)
            {
                requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_S3Uri = cmdletContext.S3StorageConfig_S3Uri;
            }
            if (requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_S3Uri != null)
            {
                requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig.S3Uri = requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_S3Uri;
                requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfigIsNull = false;
            }
            // determine if requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig should be set to null
            if (requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfigIsNull)
            {
                requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig = null;
            }
            if (requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig != null)
            {
                request.OfflineStoreConfig.S3StorageConfig = requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig;
                requestOfflineStoreConfigIsNull            = false;
            }
            // determine if request.OfflineStoreConfig should be set to null
            if (requestOfflineStoreConfigIsNull)
            {
                request.OfflineStoreConfig = null;
            }

            // populate OnlineStoreConfig
            var requestOnlineStoreConfigIsNull = true;

            request.OnlineStoreConfig = new Amazon.SageMaker.Model.OnlineStoreConfig();
            System.Boolean?requestOnlineStoreConfig_onlineStoreConfig_EnableOnlineStore = null;
            if (cmdletContext.OnlineStoreConfig_EnableOnlineStore != null)
            {
                requestOnlineStoreConfig_onlineStoreConfig_EnableOnlineStore = cmdletContext.OnlineStoreConfig_EnableOnlineStore.Value;
            }
            if (requestOnlineStoreConfig_onlineStoreConfig_EnableOnlineStore != null)
            {
                request.OnlineStoreConfig.EnableOnlineStore = requestOnlineStoreConfig_onlineStoreConfig_EnableOnlineStore.Value;
                requestOnlineStoreConfigIsNull = false;
            }
            Amazon.SageMaker.Model.OnlineStoreSecurityConfig requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig = null;

            // populate SecurityConfig
            var requestOnlineStoreConfig_onlineStoreConfig_SecurityConfigIsNull = true;

            requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig = new Amazon.SageMaker.Model.OnlineStoreSecurityConfig();
            System.String requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig_securityConfig_KmsKeyId = null;
            if (cmdletContext.SecurityConfig_KmsKeyId != null)
            {
                requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig_securityConfig_KmsKeyId = cmdletContext.SecurityConfig_KmsKeyId;
            }
            if (requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig_securityConfig_KmsKeyId != null)
            {
                requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig.KmsKeyId = requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig_securityConfig_KmsKeyId;
                requestOnlineStoreConfig_onlineStoreConfig_SecurityConfigIsNull    = false;
            }
            // determine if requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig should be set to null
            if (requestOnlineStoreConfig_onlineStoreConfig_SecurityConfigIsNull)
            {
                requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig = null;
            }
            if (requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig != null)
            {
                request.OnlineStoreConfig.SecurityConfig = requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig;
                requestOnlineStoreConfigIsNull           = false;
            }
            // determine if request.OnlineStoreConfig should be set to null
            if (requestOnlineStoreConfigIsNull)
            {
                request.OnlineStoreConfig = null;
            }
            if (cmdletContext.RecordIdentifierFeatureName != null)
            {
                request.RecordIdentifierFeatureName = cmdletContext.RecordIdentifierFeatureName;
            }
            if (cmdletContext.RoleArn != null)
            {
                request.RoleArn = cmdletContext.RoleArn;
            }
            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);
        }