private Amazon.Pinpoint.Model.RemoveAttributesResponse CallAWSServiceOperation(IAmazonPinpoint client, Amazon.Pinpoint.Model.RemoveAttributesRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Pinpoint", "RemoveAttributes");
     try
     {
         #if DESKTOP
         return(client.RemoveAttributes(request));
         #elif CORECLR
         return(client.RemoveAttributesAsync(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.Pinpoint.Model.RemoveAttributesRequest();

            if (cmdletContext.ApplicationId != null)
            {
                request.ApplicationId = cmdletContext.ApplicationId;
            }
            if (cmdletContext.AttributeType != null)
            {
                request.AttributeType = cmdletContext.AttributeType;
            }

            // populate UpdateAttributesRequest
            var requestUpdateAttributesRequestIsNull = true;

            request.UpdateAttributesRequest = new Amazon.Pinpoint.Model.UpdateAttributesRequest();
            List <System.String> requestUpdateAttributesRequest_updateAttributesRequest_Blacklist = null;

            if (cmdletContext.UpdateAttributesRequest_Blacklist != null)
            {
                requestUpdateAttributesRequest_updateAttributesRequest_Blacklist = cmdletContext.UpdateAttributesRequest_Blacklist;
            }
            if (requestUpdateAttributesRequest_updateAttributesRequest_Blacklist != null)
            {
                request.UpdateAttributesRequest.Blacklist = requestUpdateAttributesRequest_updateAttributesRequest_Blacklist;
                requestUpdateAttributesRequestIsNull      = false;
            }
            // determine if request.UpdateAttributesRequest should be set to null
            if (requestUpdateAttributesRequestIsNull)
            {
                request.UpdateAttributesRequest = 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);
        }