private Amazon.FinSpaceData.Model.UpdateDatasetResponse CallAWSServiceOperation(IAmazonFinSpaceData client, Amazon.FinSpaceData.Model.UpdateDatasetRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "FinSpace Public API", "UpdateDataset");
     try
     {
         #if DESKTOP
         return(client.UpdateDataset(request));
         #elif CORECLR
         return(client.UpdateDatasetAsync(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.FinSpaceData.Model.UpdateDatasetRequest();

            if (cmdletContext.Alias != null)
            {
                request.Alias = cmdletContext.Alias;
            }
            if (cmdletContext.ClientToken != null)
            {
                request.ClientToken = cmdletContext.ClientToken;
            }
            if (cmdletContext.DatasetDescription != null)
            {
                request.DatasetDescription = cmdletContext.DatasetDescription;
            }
            if (cmdletContext.DatasetId != null)
            {
                request.DatasetId = cmdletContext.DatasetId;
            }
            if (cmdletContext.DatasetTitle != null)
            {
                request.DatasetTitle = cmdletContext.DatasetTitle;
            }
            if (cmdletContext.Kind != null)
            {
                request.Kind = cmdletContext.Kind;
            }

            // populate SchemaDefinition
            var requestSchemaDefinitionIsNull = true;

            request.SchemaDefinition = new Amazon.FinSpaceData.Model.SchemaUnion();
            Amazon.FinSpaceData.Model.SchemaDefinition requestSchemaDefinition_schemaDefinition_TabularSchemaConfig = null;

            // populate TabularSchemaConfig
            var requestSchemaDefinition_schemaDefinition_TabularSchemaConfigIsNull = true;

            requestSchemaDefinition_schemaDefinition_TabularSchemaConfig = new Amazon.FinSpaceData.Model.SchemaDefinition();
            List <Amazon.FinSpaceData.Model.ColumnDefinition> requestSchemaDefinition_schemaDefinition_TabularSchemaConfig_tabularSchemaConfig_Column = null;

            if (cmdletContext.TabularSchemaConfig_Column != null)
            {
                requestSchemaDefinition_schemaDefinition_TabularSchemaConfig_tabularSchemaConfig_Column = cmdletContext.TabularSchemaConfig_Column;
            }
            if (requestSchemaDefinition_schemaDefinition_TabularSchemaConfig_tabularSchemaConfig_Column != null)
            {
                requestSchemaDefinition_schemaDefinition_TabularSchemaConfig.Columns = requestSchemaDefinition_schemaDefinition_TabularSchemaConfig_tabularSchemaConfig_Column;
                requestSchemaDefinition_schemaDefinition_TabularSchemaConfigIsNull   = false;
            }
            List <System.String> requestSchemaDefinition_schemaDefinition_TabularSchemaConfig_tabularSchemaConfig_PrimaryKeyColumn = null;

            if (cmdletContext.TabularSchemaConfig_PrimaryKeyColumn != null)
            {
                requestSchemaDefinition_schemaDefinition_TabularSchemaConfig_tabularSchemaConfig_PrimaryKeyColumn = cmdletContext.TabularSchemaConfig_PrimaryKeyColumn;
            }
            if (requestSchemaDefinition_schemaDefinition_TabularSchemaConfig_tabularSchemaConfig_PrimaryKeyColumn != null)
            {
                requestSchemaDefinition_schemaDefinition_TabularSchemaConfig.PrimaryKeyColumns = requestSchemaDefinition_schemaDefinition_TabularSchemaConfig_tabularSchemaConfig_PrimaryKeyColumn;
                requestSchemaDefinition_schemaDefinition_TabularSchemaConfigIsNull             = false;
            }
            // determine if requestSchemaDefinition_schemaDefinition_TabularSchemaConfig should be set to null
            if (requestSchemaDefinition_schemaDefinition_TabularSchemaConfigIsNull)
            {
                requestSchemaDefinition_schemaDefinition_TabularSchemaConfig = null;
            }
            if (requestSchemaDefinition_schemaDefinition_TabularSchemaConfig != null)
            {
                request.SchemaDefinition.TabularSchemaConfig = requestSchemaDefinition_schemaDefinition_TabularSchemaConfig;
                requestSchemaDefinitionIsNull = false;
            }
            // determine if request.SchemaDefinition should be set to null
            if (requestSchemaDefinitionIsNull)
            {
                request.SchemaDefinition = null;
            }

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