Container for the parameters to the PutJobFailureResult operation. Represents the failure of a job as returned to the pipeline by a job worker. Only used for custom actions.
Inheritance: AmazonCodePipelineRequest
        /// <summary>
        /// Represents the failure of a job as returned to the pipeline by a job worker. Only
        /// used for custom actions.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the PutJobFailureResult service method.</param>
        /// 
        /// <returns>The response from the PutJobFailureResult service method, as returned by CodePipeline.</returns>
        /// <exception cref="Amazon.CodePipeline.Model.InvalidJobStateException">
        /// The specified job state was specified in an invalid format.
        /// </exception>
        /// <exception cref="Amazon.CodePipeline.Model.JobNotFoundException">
        /// The specified job was specified in an invalid format or cannot be found.
        /// </exception>
        /// <exception cref="Amazon.CodePipeline.Model.ValidationException">
        /// The validation was specified in an invalid format.
        /// </exception>
        public PutJobFailureResultResponse PutJobFailureResult(PutJobFailureResultRequest request)
        {
            var marshaller = new PutJobFailureResultRequestMarshaller();
            var unmarshaller = PutJobFailureResultResponseUnmarshaller.Instance;

            return Invoke<PutJobFailureResultRequest,PutJobFailureResultResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the PutJobFailureResult operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the PutJobFailureResult operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task<PutJobFailureResultResponse> PutJobFailureResultAsync(PutJobFailureResultRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new PutJobFailureResultRequestMarshaller();
            var unmarshaller = PutJobFailureResultResponseUnmarshaller.Instance;

            return InvokeAsync<PutJobFailureResultRequest,PutJobFailureResultResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
 /// <summary>
 /// Represents the failure of a job as returned to the pipeline by a job worker. Only
 /// used for custom actions.
 /// </summary>
 /// <param name="jobId">The unique system-generated ID of the job that failed. This is the same ID returned from PollForJobs.</param>
 /// <param name="failureDetails">The details about the failure of a job. </param>
 /// 
 /// <returns>The response from the PutJobFailureResult service method, as returned by CodePipeline.</returns>
 /// <exception cref="Amazon.CodePipeline.Model.InvalidJobStateException">
 /// The specified job state was specified in an invalid format.
 /// </exception>
 /// <exception cref="Amazon.CodePipeline.Model.JobNotFoundException">
 /// The specified job was specified in an invalid format or cannot be found.
 /// </exception>
 /// <exception cref="Amazon.CodePipeline.Model.ValidationException">
 /// The validation was specified in an invalid format.
 /// </exception>
 public PutJobFailureResultResponse PutJobFailureResult(string jobId, FailureDetails failureDetails)
 {
     var request = new PutJobFailureResultRequest();
     request.JobId = jobId;
     request.FailureDetails = failureDetails;
     return PutJobFailureResult(request);
 }
 /// <summary>
 /// Represents the failure of a job as returned to the pipeline by a job worker. Only
 /// used for custom actions.
 /// </summary>
 /// <param name="jobId">The unique system-generated ID of the job that failed. This is the same ID returned from PollForJobs.</param>
 /// <param name="failureDetails">The details about the failure of a job. </param>
 /// <param name="cancellationToken">
 ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
 /// </param>
 /// 
 /// <returns>The response from the PutJobFailureResult service method, as returned by CodePipeline.</returns>
 /// <exception cref="Amazon.CodePipeline.Model.InvalidJobStateException">
 /// The specified job state was specified in an invalid format.
 /// </exception>
 /// <exception cref="Amazon.CodePipeline.Model.JobNotFoundException">
 /// The specified job was specified in an invalid format or cannot be found.
 /// </exception>
 /// <exception cref="Amazon.CodePipeline.Model.ValidationException">
 /// The validation was specified in an invalid format.
 /// </exception>
 public Task<PutJobFailureResultResponse> PutJobFailureResultAsync(string jobId, FailureDetails failureDetails, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new PutJobFailureResultRequest();
     request.JobId = jobId;
     request.FailureDetails = failureDetails;
     return PutJobFailureResultAsync(request, cancellationToken);
 }
 private Amazon.CodePipeline.Model.PutJobFailureResultResponse CallAWSServiceOperation(IAmazonCodePipeline client, Amazon.CodePipeline.Model.PutJobFailureResultRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS CodePipeline", "PutJobFailureResult");
     try
     {
         #if DESKTOP
         return(client.PutJobFailureResult(request));
         #elif CORECLR
         return(client.PutJobFailureResultAsync(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.CodePipeline.Model.PutJobFailureResultRequest();


            // populate FailureDetails
            var requestFailureDetailsIsNull = true;

            request.FailureDetails = new Amazon.CodePipeline.Model.FailureDetails();
            System.String requestFailureDetails_failureDetails_ExternalExecutionId = null;
            if (cmdletContext.FailureDetails_ExternalExecutionId != null)
            {
                requestFailureDetails_failureDetails_ExternalExecutionId = cmdletContext.FailureDetails_ExternalExecutionId;
            }
            if (requestFailureDetails_failureDetails_ExternalExecutionId != null)
            {
                request.FailureDetails.ExternalExecutionId = requestFailureDetails_failureDetails_ExternalExecutionId;
                requestFailureDetailsIsNull = false;
            }
            System.String requestFailureDetails_failureDetails_Message = null;
            if (cmdletContext.FailureDetails_Message != null)
            {
                requestFailureDetails_failureDetails_Message = cmdletContext.FailureDetails_Message;
            }
            if (requestFailureDetails_failureDetails_Message != null)
            {
                request.FailureDetails.Message = requestFailureDetails_failureDetails_Message;
                requestFailureDetailsIsNull    = false;
            }
            Amazon.CodePipeline.FailureType requestFailureDetails_failureDetails_Type = null;
            if (cmdletContext.FailureDetails_Type != null)
            {
                requestFailureDetails_failureDetails_Type = cmdletContext.FailureDetails_Type;
            }
            if (requestFailureDetails_failureDetails_Type != null)
            {
                request.FailureDetails.Type = requestFailureDetails_failureDetails_Type;
                requestFailureDetailsIsNull = false;
            }
            // determine if request.FailureDetails should be set to null
            if (requestFailureDetailsIsNull)
            {
                request.FailureDetails = null;
            }
            if (cmdletContext.JobId != null)
            {
                request.JobId = cmdletContext.JobId;
            }

            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);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the PutJobFailureResult operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the PutJobFailureResult operation on AmazonCodePipelineClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndPutJobFailureResult
        ///         operation.</returns>
        public IAsyncResult BeginPutJobFailureResult(PutJobFailureResultRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new PutJobFailureResultRequestMarshaller();
            var unmarshaller = PutJobFailureResultResponseUnmarshaller.Instance;

            return BeginInvoke<PutJobFailureResultRequest>(request, marshaller, unmarshaller,
                callback, state);
        }