// Code generated by smithy-go-codegen DO NOT EDIT. package codepipeline import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/codepipeline/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "io/ioutil" "strings" ) type awsAwsjson11_deserializeOpAcknowledgeJob struct { } func (*awsAwsjson11_deserializeOpAcknowledgeJob) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAcknowledgeJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorAcknowledgeJob(response, &metadata) } output := &AcknowledgeJobOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentAcknowledgeJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorAcknowledgeJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidNonceException", errorCode): return awsAwsjson11_deserializeErrorInvalidNonceException(response, errorBody) case strings.EqualFold("JobNotFoundException", errorCode): return awsAwsjson11_deserializeErrorJobNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpAcknowledgeThirdPartyJob struct { } func (*awsAwsjson11_deserializeOpAcknowledgeThirdPartyJob) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAcknowledgeThirdPartyJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorAcknowledgeThirdPartyJob(response, &metadata) } output := &AcknowledgeThirdPartyJobOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentAcknowledgeThirdPartyJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorAcknowledgeThirdPartyJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidClientTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidClientTokenException(response, errorBody) case strings.EqualFold("InvalidNonceException", errorCode): return awsAwsjson11_deserializeErrorInvalidNonceException(response, errorBody) case strings.EqualFold("JobNotFoundException", errorCode): return awsAwsjson11_deserializeErrorJobNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateCustomActionType struct { } func (*awsAwsjson11_deserializeOpCreateCustomActionType) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateCustomActionType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateCustomActionType(response, &metadata) } output := &CreateCustomActionTypeOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateCustomActionTypeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateCustomActionType(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidTagsException", errorCode): return awsAwsjson11_deserializeErrorInvalidTagsException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("TooManyTagsException", errorCode): return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreatePipeline struct { } func (*awsAwsjson11_deserializeOpCreatePipeline) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreatePipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreatePipeline(response, &metadata) } output := &CreatePipelineOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreatePipelineOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreatePipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidActionDeclarationException", errorCode): return awsAwsjson11_deserializeErrorInvalidActionDeclarationException(response, errorBody) case strings.EqualFold("InvalidBlockerDeclarationException", errorCode): return awsAwsjson11_deserializeErrorInvalidBlockerDeclarationException(response, errorBody) case strings.EqualFold("InvalidStageDeclarationException", errorCode): return awsAwsjson11_deserializeErrorInvalidStageDeclarationException(response, errorBody) case strings.EqualFold("InvalidStructureException", errorCode): return awsAwsjson11_deserializeErrorInvalidStructureException(response, errorBody) case strings.EqualFold("InvalidTagsException", errorCode): return awsAwsjson11_deserializeErrorInvalidTagsException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("PipelineNameInUseException", errorCode): return awsAwsjson11_deserializeErrorPipelineNameInUseException(response, errorBody) case strings.EqualFold("TooManyTagsException", errorCode): return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteCustomActionType struct { } func (*awsAwsjson11_deserializeOpDeleteCustomActionType) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteCustomActionType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteCustomActionType(response, &metadata) } output := &DeleteCustomActionTypeOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteCustomActionType(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeletePipeline struct { } func (*awsAwsjson11_deserializeOpDeletePipeline) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeletePipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeletePipeline(response, &metadata) } output := &DeletePipelineOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeletePipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteWebhook struct { } func (*awsAwsjson11_deserializeOpDeleteWebhook) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteWebhook) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteWebhook(response, &metadata) } output := &DeleteWebhookOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteWebhookOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteWebhook(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeregisterWebhookWithThirdParty struct { } func (*awsAwsjson11_deserializeOpDeregisterWebhookWithThirdParty) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeregisterWebhookWithThirdParty) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeregisterWebhookWithThirdParty(response, &metadata) } output := &DeregisterWebhookWithThirdPartyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeregisterWebhookWithThirdPartyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeregisterWebhookWithThirdParty(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) case strings.EqualFold("WebhookNotFoundException", errorCode): return awsAwsjson11_deserializeErrorWebhookNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDisableStageTransition struct { } func (*awsAwsjson11_deserializeOpDisableStageTransition) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDisableStageTransition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDisableStageTransition(response, &metadata) } output := &DisableStageTransitionOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDisableStageTransition(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("StageNotFoundException", errorCode): return awsAwsjson11_deserializeErrorStageNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpEnableStageTransition struct { } func (*awsAwsjson11_deserializeOpEnableStageTransition) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpEnableStageTransition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorEnableStageTransition(response, &metadata) } output := &EnableStageTransitionOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorEnableStageTransition(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("StageNotFoundException", errorCode): return awsAwsjson11_deserializeErrorStageNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetActionType struct { } func (*awsAwsjson11_deserializeOpGetActionType) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetActionType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetActionType(response, &metadata) } output := &GetActionTypeOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetActionTypeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetActionType(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ActionTypeNotFoundException", errorCode): return awsAwsjson11_deserializeErrorActionTypeNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetJobDetails struct { } func (*awsAwsjson11_deserializeOpGetJobDetails) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetJobDetails) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetJobDetails(response, &metadata) } output := &GetJobDetailsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetJobDetailsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetJobDetails(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("JobNotFoundException", errorCode): return awsAwsjson11_deserializeErrorJobNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetPipeline struct { } func (*awsAwsjson11_deserializeOpGetPipeline) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetPipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetPipeline(response, &metadata) } output := &GetPipelineOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetPipelineOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetPipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("PipelineVersionNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineVersionNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetPipelineExecution struct { } func (*awsAwsjson11_deserializeOpGetPipelineExecution) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetPipelineExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetPipelineExecution(response, &metadata) } output := &GetPipelineExecutionOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetPipelineExecutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetPipelineExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("PipelineExecutionNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineExecutionNotFoundException(response, errorBody) case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetPipelineState struct { } func (*awsAwsjson11_deserializeOpGetPipelineState) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetPipelineState) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetPipelineState(response, &metadata) } output := &GetPipelineStateOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetPipelineStateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetPipelineState(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetThirdPartyJobDetails struct { } func (*awsAwsjson11_deserializeOpGetThirdPartyJobDetails) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetThirdPartyJobDetails) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorGetThirdPartyJobDetails(response, &metadata) } output := &GetThirdPartyJobDetailsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentGetThirdPartyJobDetailsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorGetThirdPartyJobDetails(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidClientTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidClientTokenException(response, errorBody) case strings.EqualFold("InvalidJobException", errorCode): return awsAwsjson11_deserializeErrorInvalidJobException(response, errorBody) case strings.EqualFold("JobNotFoundException", errorCode): return awsAwsjson11_deserializeErrorJobNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListActionExecutions struct { } func (*awsAwsjson11_deserializeOpListActionExecutions) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListActionExecutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListActionExecutions(response, &metadata) } output := &ListActionExecutionsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListActionExecutionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListActionExecutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("PipelineExecutionNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineExecutionNotFoundException(response, errorBody) case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListActionTypes struct { } func (*awsAwsjson11_deserializeOpListActionTypes) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListActionTypes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListActionTypes(response, &metadata) } output := &ListActionTypesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListActionTypesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListActionTypes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListPipelineExecutions struct { } func (*awsAwsjson11_deserializeOpListPipelineExecutions) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListPipelineExecutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListPipelineExecutions(response, &metadata) } output := &ListPipelineExecutionsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListPipelineExecutionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListPipelineExecutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListPipelines struct { } func (*awsAwsjson11_deserializeOpListPipelines) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListPipelines) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListPipelines(response, &metadata) } output := &ListPipelinesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListPipelinesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListPipelines(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListTagsForResource struct { } func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) } output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidArnException", errorCode): return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody) case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListWebhooks struct { } func (*awsAwsjson11_deserializeOpListWebhooks) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListWebhooks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListWebhooks(response, &metadata) } output := &ListWebhooksOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListWebhooksOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListWebhooks(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPollForJobs struct { } func (*awsAwsjson11_deserializeOpPollForJobs) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPollForJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorPollForJobs(response, &metadata) } output := &PollForJobsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentPollForJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPollForJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ActionTypeNotFoundException", errorCode): return awsAwsjson11_deserializeErrorActionTypeNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPollForThirdPartyJobs struct { } func (*awsAwsjson11_deserializeOpPollForThirdPartyJobs) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPollForThirdPartyJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorPollForThirdPartyJobs(response, &metadata) } output := &PollForThirdPartyJobsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentPollForThirdPartyJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPollForThirdPartyJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ActionTypeNotFoundException", errorCode): return awsAwsjson11_deserializeErrorActionTypeNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutActionRevision struct { } func (*awsAwsjson11_deserializeOpPutActionRevision) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutActionRevision) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorPutActionRevision(response, &metadata) } output := &PutActionRevisionOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentPutActionRevisionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPutActionRevision(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ActionNotFoundException", errorCode): return awsAwsjson11_deserializeErrorActionNotFoundException(response, errorBody) case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("StageNotFoundException", errorCode): return awsAwsjson11_deserializeErrorStageNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutApprovalResult struct { } func (*awsAwsjson11_deserializeOpPutApprovalResult) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutApprovalResult) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorPutApprovalResult(response, &metadata) } output := &PutApprovalResultOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentPutApprovalResultOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPutApprovalResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ActionNotFoundException", errorCode): return awsAwsjson11_deserializeErrorActionNotFoundException(response, errorBody) case strings.EqualFold("ApprovalAlreadyCompletedException", errorCode): return awsAwsjson11_deserializeErrorApprovalAlreadyCompletedException(response, errorBody) case strings.EqualFold("InvalidApprovalTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidApprovalTokenException(response, errorBody) case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("StageNotFoundException", errorCode): return awsAwsjson11_deserializeErrorStageNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutJobFailureResult struct { } func (*awsAwsjson11_deserializeOpPutJobFailureResult) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutJobFailureResult) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorPutJobFailureResult(response, &metadata) } output := &PutJobFailureResultOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPutJobFailureResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidJobStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidJobStateException(response, errorBody) case strings.EqualFold("JobNotFoundException", errorCode): return awsAwsjson11_deserializeErrorJobNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutJobSuccessResult struct { } func (*awsAwsjson11_deserializeOpPutJobSuccessResult) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutJobSuccessResult) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorPutJobSuccessResult(response, &metadata) } output := &PutJobSuccessResultOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPutJobSuccessResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidJobStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidJobStateException(response, errorBody) case strings.EqualFold("JobNotFoundException", errorCode): return awsAwsjson11_deserializeErrorJobNotFoundException(response, errorBody) case strings.EqualFold("OutputVariablesSizeExceededException", errorCode): return awsAwsjson11_deserializeErrorOutputVariablesSizeExceededException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutThirdPartyJobFailureResult struct { } func (*awsAwsjson11_deserializeOpPutThirdPartyJobFailureResult) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutThirdPartyJobFailureResult) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorPutThirdPartyJobFailureResult(response, &metadata) } output := &PutThirdPartyJobFailureResultOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPutThirdPartyJobFailureResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidClientTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidClientTokenException(response, errorBody) case strings.EqualFold("InvalidJobStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidJobStateException(response, errorBody) case strings.EqualFold("JobNotFoundException", errorCode): return awsAwsjson11_deserializeErrorJobNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutThirdPartyJobSuccessResult struct { } func (*awsAwsjson11_deserializeOpPutThirdPartyJobSuccessResult) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutThirdPartyJobSuccessResult) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorPutThirdPartyJobSuccessResult(response, &metadata) } output := &PutThirdPartyJobSuccessResultOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPutThirdPartyJobSuccessResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidClientTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidClientTokenException(response, errorBody) case strings.EqualFold("InvalidJobStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidJobStateException(response, errorBody) case strings.EqualFold("JobNotFoundException", errorCode): return awsAwsjson11_deserializeErrorJobNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutWebhook struct { } func (*awsAwsjson11_deserializeOpPutWebhook) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutWebhook) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorPutWebhook(response, &metadata) } output := &PutWebhookOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentPutWebhookOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorPutWebhook(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidTagsException", errorCode): return awsAwsjson11_deserializeErrorInvalidTagsException(response, errorBody) case strings.EqualFold("InvalidWebhookAuthenticationParametersException", errorCode): return awsAwsjson11_deserializeErrorInvalidWebhookAuthenticationParametersException(response, errorBody) case strings.EqualFold("InvalidWebhookFilterPatternException", errorCode): return awsAwsjson11_deserializeErrorInvalidWebhookFilterPatternException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("TooManyTagsException", errorCode): return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpRegisterWebhookWithThirdParty struct { } func (*awsAwsjson11_deserializeOpRegisterWebhookWithThirdParty) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpRegisterWebhookWithThirdParty) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorRegisterWebhookWithThirdParty(response, &metadata) } output := &RegisterWebhookWithThirdPartyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentRegisterWebhookWithThirdPartyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorRegisterWebhookWithThirdParty(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) case strings.EqualFold("WebhookNotFoundException", errorCode): return awsAwsjson11_deserializeErrorWebhookNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpRetryStageExecution struct { } func (*awsAwsjson11_deserializeOpRetryStageExecution) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpRetryStageExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorRetryStageExecution(response, &metadata) } output := &RetryStageExecutionOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentRetryStageExecutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorRetryStageExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ConflictException", errorCode): return awsAwsjson11_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("NotLatestPipelineExecutionException", errorCode): return awsAwsjson11_deserializeErrorNotLatestPipelineExecutionException(response, errorBody) case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("StageNotFoundException", errorCode): return awsAwsjson11_deserializeErrorStageNotFoundException(response, errorBody) case strings.EqualFold("StageNotRetryableException", errorCode): return awsAwsjson11_deserializeErrorStageNotRetryableException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpStartPipelineExecution struct { } func (*awsAwsjson11_deserializeOpStartPipelineExecution) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpStartPipelineExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorStartPipelineExecution(response, &metadata) } output := &StartPipelineExecutionOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentStartPipelineExecutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorStartPipelineExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ConflictException", errorCode): return awsAwsjson11_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpStopPipelineExecution struct { } func (*awsAwsjson11_deserializeOpStopPipelineExecution) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpStopPipelineExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorStopPipelineExecution(response, &metadata) } output := &StopPipelineExecutionOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentStopPipelineExecutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorStopPipelineExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ConflictException", errorCode): return awsAwsjson11_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("DuplicatedStopRequestException", errorCode): return awsAwsjson11_deserializeErrorDuplicatedStopRequestException(response, errorBody) case strings.EqualFold("PipelineExecutionNotStoppableException", errorCode): return awsAwsjson11_deserializeErrorPipelineExecutionNotStoppableException(response, errorBody) case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpTagResource struct { } func (*awsAwsjson11_deserializeOpTagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) } output := &TagResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArnException", errorCode): return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody) case strings.EqualFold("InvalidTagsException", errorCode): return awsAwsjson11_deserializeErrorInvalidTagsException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TooManyTagsException", errorCode): return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUntagResource struct { } func (*awsAwsjson11_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) } output := &UntagResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArnException", errorCode): return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody) case strings.EqualFold("InvalidTagsException", errorCode): return awsAwsjson11_deserializeErrorInvalidTagsException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateActionType struct { } func (*awsAwsjson11_deserializeOpUpdateActionType) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateActionType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateActionType(response, &metadata) } output := &UpdateActionTypeOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateActionType(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ActionTypeNotFoundException", errorCode): return awsAwsjson11_deserializeErrorActionTypeNotFoundException(response, errorBody) case strings.EqualFold("RequestFailedException", errorCode): return awsAwsjson11_deserializeErrorRequestFailedException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdatePipeline struct { } func (*awsAwsjson11_deserializeOpUpdatePipeline) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdatePipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdatePipeline(response, &metadata) } output := &UpdatePipelineOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdatePipelineOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdatePipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode code := response.Header.Get("X-Amzn-ErrorType") if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(code) != 0 { errorCode = restjson.SanitizeErrorCode(code) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InvalidActionDeclarationException", errorCode): return awsAwsjson11_deserializeErrorInvalidActionDeclarationException(response, errorBody) case strings.EqualFold("InvalidBlockerDeclarationException", errorCode): return awsAwsjson11_deserializeErrorInvalidBlockerDeclarationException(response, errorBody) case strings.EqualFold("InvalidStageDeclarationException", errorCode): return awsAwsjson11_deserializeErrorInvalidStageDeclarationException(response, errorBody) case strings.EqualFold("InvalidStructureException", errorCode): return awsAwsjson11_deserializeErrorInvalidStructureException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsAwsjson11_deserializeErrorActionNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ActionNotFoundException{} err := awsAwsjson11_deserializeDocumentActionNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorActionTypeNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ActionTypeNotFoundException{} err := awsAwsjson11_deserializeDocumentActionTypeNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorApprovalAlreadyCompletedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ApprovalAlreadyCompletedException{} err := awsAwsjson11_deserializeDocumentApprovalAlreadyCompletedException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorConcurrentModificationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ConcurrentModificationException{} err := awsAwsjson11_deserializeDocumentConcurrentModificationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ConflictException{} err := awsAwsjson11_deserializeDocumentConflictException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorDuplicatedStopRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.DuplicatedStopRequestException{} err := awsAwsjson11_deserializeDocumentDuplicatedStopRequestException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidActionDeclarationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidActionDeclarationException{} err := awsAwsjson11_deserializeDocumentInvalidActionDeclarationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidApprovalTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidApprovalTokenException{} err := awsAwsjson11_deserializeDocumentInvalidApprovalTokenException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidArnException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidArnException{} err := awsAwsjson11_deserializeDocumentInvalidArnException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidBlockerDeclarationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidBlockerDeclarationException{} err := awsAwsjson11_deserializeDocumentInvalidBlockerDeclarationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidClientTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidClientTokenException{} err := awsAwsjson11_deserializeDocumentInvalidClientTokenException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidJobException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidJobException{} err := awsAwsjson11_deserializeDocumentInvalidJobException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidJobStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidJobStateException{} err := awsAwsjson11_deserializeDocumentInvalidJobStateException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidNextTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidNextTokenException{} err := awsAwsjson11_deserializeDocumentInvalidNextTokenException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidNonceException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidNonceException{} err := awsAwsjson11_deserializeDocumentInvalidNonceException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidStageDeclarationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidStageDeclarationException{} err := awsAwsjson11_deserializeDocumentInvalidStageDeclarationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidStructureException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidStructureException{} err := awsAwsjson11_deserializeDocumentInvalidStructureException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidTagsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidTagsException{} err := awsAwsjson11_deserializeDocumentInvalidTagsException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidWebhookAuthenticationParametersException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidWebhookAuthenticationParametersException{} err := awsAwsjson11_deserializeDocumentInvalidWebhookAuthenticationParametersException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidWebhookFilterPatternException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidWebhookFilterPatternException{} err := awsAwsjson11_deserializeDocumentInvalidWebhookFilterPatternException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorJobNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.JobNotFoundException{} err := awsAwsjson11_deserializeDocumentJobNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.LimitExceededException{} err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorNotLatestPipelineExecutionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.NotLatestPipelineExecutionException{} err := awsAwsjson11_deserializeDocumentNotLatestPipelineExecutionException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorOutputVariablesSizeExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.OutputVariablesSizeExceededException{} err := awsAwsjson11_deserializeDocumentOutputVariablesSizeExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorPipelineExecutionNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.PipelineExecutionNotFoundException{} err := awsAwsjson11_deserializeDocumentPipelineExecutionNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorPipelineExecutionNotStoppableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.PipelineExecutionNotStoppableException{} err := awsAwsjson11_deserializeDocumentPipelineExecutionNotStoppableException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorPipelineNameInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.PipelineNameInUseException{} err := awsAwsjson11_deserializeDocumentPipelineNameInUseException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorPipelineNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.PipelineNotFoundException{} err := awsAwsjson11_deserializeDocumentPipelineNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorPipelineVersionNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.PipelineVersionNotFoundException{} err := awsAwsjson11_deserializeDocumentPipelineVersionNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorRequestFailedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.RequestFailedException{} err := awsAwsjson11_deserializeDocumentRequestFailedException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ResourceNotFoundException{} err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorStageNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.StageNotFoundException{} err := awsAwsjson11_deserializeDocumentStageNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorStageNotRetryableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.StageNotRetryableException{} err := awsAwsjson11_deserializeDocumentStageNotRetryableException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorTooManyTagsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.TooManyTagsException{} err := awsAwsjson11_deserializeDocumentTooManyTagsException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ValidationException{} err := awsAwsjson11_deserializeDocumentValidationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorWebhookNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.WebhookNotFoundException{} err := awsAwsjson11_deserializeDocumentWebhookNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeDocumentActionConfiguration(v **types.ActionConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionConfiguration if *v == nil { sv = &types.ActionConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "configuration": if err := awsAwsjson11_deserializeDocumentActionConfigurationMap(&sv.Configuration, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionConfigurationMap(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]string if *v == nil { mv = map[string]string{} } else { mv = *v } for key, value := range shape { var parsedVal string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionConfigurationValue to be of type string, got %T instead", value) } parsedVal = jtv } mv[key] = parsedVal } *v = mv return nil } func awsAwsjson11_deserializeDocumentActionConfigurationProperty(v **types.ActionConfigurationProperty, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionConfigurationProperty if *v == nil { sv = &types.ActionConfigurationProperty{} } else { sv = *v } for key, value := range shape { switch key { case "description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "key": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.Key = jtv } case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionConfigurationKey to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "queryable": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.Queryable = jtv } case "required": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.Required = jtv } case "secret": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.Secret = jtv } case "type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionConfigurationPropertyType to be of type string, got %T instead", value) } sv.Type = types.ActionConfigurationPropertyType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionConfigurationPropertyList(v *[]types.ActionConfigurationProperty, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ActionConfigurationProperty if *v == nil { cv = []types.ActionConfigurationProperty{} } else { cv = *v } for _, value := range shape { var col types.ActionConfigurationProperty destAddr := &col if err := awsAwsjson11_deserializeDocumentActionConfigurationProperty(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentActionContext(v **types.ActionContext, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionContext if *v == nil { sv = &types.ActionContext{} } else { sv = *v } for key, value := range shape { switch key { case "actionExecutionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionExecutionId to be of type string, got %T instead", value) } sv.ActionExecutionId = ptr.String(jtv) } case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionDeclaration(v **types.ActionDeclaration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionDeclaration if *v == nil { sv = &types.ActionDeclaration{} } else { sv = *v } for key, value := range shape { switch key { case "actionTypeId": if err := awsAwsjson11_deserializeDocumentActionTypeId(&sv.ActionTypeId, value); err != nil { return err } case "configuration": if err := awsAwsjson11_deserializeDocumentActionConfigurationMap(&sv.Configuration, value); err != nil { return err } case "inputArtifacts": if err := awsAwsjson11_deserializeDocumentInputArtifactList(&sv.InputArtifacts, value); err != nil { return err } case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "namespace": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionNamespace to be of type string, got %T instead", value) } sv.Namespace = ptr.String(jtv) } case "outputArtifacts": if err := awsAwsjson11_deserializeDocumentOutputArtifactList(&sv.OutputArtifacts, value); err != nil { return err } case "region": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AWSRegionName to be of type string, got %T instead", value) } sv.Region = ptr.String(jtv) } case "roleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) } sv.RoleArn = ptr.String(jtv) } case "runOrder": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ActionRunOrder to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.RunOrder = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionExecution(v **types.ActionExecution, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionExecution if *v == nil { sv = &types.ActionExecution{} } else { sv = *v } for key, value := range shape { switch key { case "actionExecutionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionExecutionId to be of type string, got %T instead", value) } sv.ActionExecutionId = ptr.String(jtv) } case "errorDetails": if err := awsAwsjson11_deserializeDocumentErrorDetails(&sv.ErrorDetails, value); err != nil { return err } case "externalExecutionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ExecutionId to be of type string, got %T instead", value) } sv.ExternalExecutionId = ptr.String(jtv) } case "externalExecutionUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Url to be of type string, got %T instead", value) } sv.ExternalExecutionUrl = ptr.String(jtv) } case "lastStatusChange": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastStatusChange = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "lastUpdatedBy": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected LastUpdatedBy to be of type string, got %T instead", value) } sv.LastUpdatedBy = ptr.String(jtv) } case "percentComplete": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Percentage to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.PercentComplete = ptr.Int32(int32(i64)) } case "status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionExecutionStatus to be of type string, got %T instead", value) } sv.Status = types.ActionExecutionStatus(jtv) } case "summary": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ExecutionSummary to be of type string, got %T instead", value) } sv.Summary = ptr.String(jtv) } case "token": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionExecutionToken to be of type string, got %T instead", value) } sv.Token = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionExecutionDetail(v **types.ActionExecutionDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionExecutionDetail if *v == nil { sv = &types.ActionExecutionDetail{} } else { sv = *v } for key, value := range shape { switch key { case "actionExecutionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionExecutionId to be of type string, got %T instead", value) } sv.ActionExecutionId = ptr.String(jtv) } case "actionName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionName to be of type string, got %T instead", value) } sv.ActionName = ptr.String(jtv) } case "input": if err := awsAwsjson11_deserializeDocumentActionExecutionInput(&sv.Input, value); err != nil { return err } case "lastUpdateTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastUpdateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "output": if err := awsAwsjson11_deserializeDocumentActionExecutionOutput(&sv.Output, value); err != nil { return err } case "pipelineExecutionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineExecutionId to be of type string, got %T instead", value) } sv.PipelineExecutionId = ptr.String(jtv) } case "pipelineVersion": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PipelineVersion to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.PipelineVersion = ptr.Int32(int32(i64)) } case "stageName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StageName to be of type string, got %T instead", value) } sv.StageName = ptr.String(jtv) } case "startTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionExecutionStatus to be of type string, got %T instead", value) } sv.Status = types.ActionExecutionStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionExecutionDetailList(v *[]types.ActionExecutionDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ActionExecutionDetail if *v == nil { cv = []types.ActionExecutionDetail{} } else { cv = *v } for _, value := range shape { var col types.ActionExecutionDetail destAddr := &col if err := awsAwsjson11_deserializeDocumentActionExecutionDetail(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentActionExecutionInput(v **types.ActionExecutionInput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionExecutionInput if *v == nil { sv = &types.ActionExecutionInput{} } else { sv = *v } for key, value := range shape { switch key { case "actionTypeId": if err := awsAwsjson11_deserializeDocumentActionTypeId(&sv.ActionTypeId, value); err != nil { return err } case "configuration": if err := awsAwsjson11_deserializeDocumentActionConfigurationMap(&sv.Configuration, value); err != nil { return err } case "inputArtifacts": if err := awsAwsjson11_deserializeDocumentArtifactDetailList(&sv.InputArtifacts, value); err != nil { return err } case "namespace": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionNamespace to be of type string, got %T instead", value) } sv.Namespace = ptr.String(jtv) } case "region": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AWSRegionName to be of type string, got %T instead", value) } sv.Region = ptr.String(jtv) } case "resolvedConfiguration": if err := awsAwsjson11_deserializeDocumentResolvedActionConfigurationMap(&sv.ResolvedConfiguration, value); err != nil { return err } case "roleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) } sv.RoleArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionExecutionOutput(v **types.ActionExecutionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionExecutionOutput if *v == nil { sv = &types.ActionExecutionOutput{} } else { sv = *v } for key, value := range shape { switch key { case "executionResult": if err := awsAwsjson11_deserializeDocumentActionExecutionResult(&sv.ExecutionResult, value); err != nil { return err } case "outputArtifacts": if err := awsAwsjson11_deserializeDocumentArtifactDetailList(&sv.OutputArtifacts, value); err != nil { return err } case "outputVariables": if err := awsAwsjson11_deserializeDocumentOutputVariablesMap(&sv.OutputVariables, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionExecutionResult(v **types.ActionExecutionResult, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionExecutionResult if *v == nil { sv = &types.ActionExecutionResult{} } else { sv = *v } for key, value := range shape { switch key { case "externalExecutionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ExternalExecutionId to be of type string, got %T instead", value) } sv.ExternalExecutionId = ptr.String(jtv) } case "externalExecutionSummary": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ExternalExecutionSummary to be of type string, got %T instead", value) } sv.ExternalExecutionSummary = ptr.String(jtv) } case "externalExecutionUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Url to be of type string, got %T instead", value) } sv.ExternalExecutionUrl = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionNotFoundException(v **types.ActionNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionNotFoundException if *v == nil { sv = &types.ActionNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionRevision(v **types.ActionRevision, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionRevision if *v == nil { sv = &types.ActionRevision{} } else { sv = *v } for key, value := range shape { switch key { case "created": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.Created = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "revisionChangeId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RevisionChangeIdentifier to be of type string, got %T instead", value) } sv.RevisionChangeId = ptr.String(jtv) } case "revisionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Revision to be of type string, got %T instead", value) } sv.RevisionId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionState(v **types.ActionState, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionState if *v == nil { sv = &types.ActionState{} } else { sv = *v } for key, value := range shape { switch key { case "actionName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionName to be of type string, got %T instead", value) } sv.ActionName = ptr.String(jtv) } case "currentRevision": if err := awsAwsjson11_deserializeDocumentActionRevision(&sv.CurrentRevision, value); err != nil { return err } case "entityUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Url to be of type string, got %T instead", value) } sv.EntityUrl = ptr.String(jtv) } case "latestExecution": if err := awsAwsjson11_deserializeDocumentActionExecution(&sv.LatestExecution, value); err != nil { return err } case "revisionUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Url to be of type string, got %T instead", value) } sv.RevisionUrl = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionStateList(v *[]types.ActionState, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ActionState if *v == nil { cv = []types.ActionState{} } else { cv = *v } for _, value := range shape { var col types.ActionState destAddr := &col if err := awsAwsjson11_deserializeDocumentActionState(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentActionType(v **types.ActionType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionType if *v == nil { sv = &types.ActionType{} } else { sv = *v } for key, value := range shape { switch key { case "actionConfigurationProperties": if err := awsAwsjson11_deserializeDocumentActionConfigurationPropertyList(&sv.ActionConfigurationProperties, value); err != nil { return err } case "id": if err := awsAwsjson11_deserializeDocumentActionTypeId(&sv.Id, value); err != nil { return err } case "inputArtifactDetails": if err := awsAwsjson11_deserializeDocumentArtifactDetails(&sv.InputArtifactDetails, value); err != nil { return err } case "outputArtifactDetails": if err := awsAwsjson11_deserializeDocumentArtifactDetails(&sv.OutputArtifactDetails, value); err != nil { return err } case "settings": if err := awsAwsjson11_deserializeDocumentActionTypeSettings(&sv.Settings, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionTypeArtifactDetails(v **types.ActionTypeArtifactDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionTypeArtifactDetails if *v == nil { sv = &types.ActionTypeArtifactDetails{} } else { sv = *v } for key, value := range shape { switch key { case "maximumCount": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected MaximumActionTypeArtifactCount to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.MaximumCount = int32(i64) } case "minimumCount": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected MinimumActionTypeArtifactCount to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.MinimumCount = int32(i64) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionTypeDeclaration(v **types.ActionTypeDeclaration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionTypeDeclaration if *v == nil { sv = &types.ActionTypeDeclaration{} } else { sv = *v } for key, value := range shape { switch key { case "description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionTypeDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "executor": if err := awsAwsjson11_deserializeDocumentActionTypeExecutor(&sv.Executor, value); err != nil { return err } case "id": if err := awsAwsjson11_deserializeDocumentActionTypeIdentifier(&sv.Id, value); err != nil { return err } case "inputArtifactDetails": if err := awsAwsjson11_deserializeDocumentActionTypeArtifactDetails(&sv.InputArtifactDetails, value); err != nil { return err } case "outputArtifactDetails": if err := awsAwsjson11_deserializeDocumentActionTypeArtifactDetails(&sv.OutputArtifactDetails, value); err != nil { return err } case "permissions": if err := awsAwsjson11_deserializeDocumentActionTypePermissions(&sv.Permissions, value); err != nil { return err } case "properties": if err := awsAwsjson11_deserializeDocumentActionTypeProperties(&sv.Properties, value); err != nil { return err } case "urls": if err := awsAwsjson11_deserializeDocumentActionTypeUrls(&sv.Urls, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionTypeExecutor(v **types.ActionTypeExecutor, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionTypeExecutor if *v == nil { sv = &types.ActionTypeExecutor{} } else { sv = *v } for key, value := range shape { switch key { case "configuration": if err := awsAwsjson11_deserializeDocumentExecutorConfiguration(&sv.Configuration, value); err != nil { return err } case "jobTimeout": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected JobTimeout to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.JobTimeout = ptr.Int32(int32(i64)) } case "policyStatementsTemplate": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PolicyStatementsTemplate to be of type string, got %T instead", value) } sv.PolicyStatementsTemplate = ptr.String(jtv) } case "type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ExecutorType to be of type string, got %T instead", value) } sv.Type = types.ExecutorType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionTypeId(v **types.ActionTypeId, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionTypeId if *v == nil { sv = &types.ActionTypeId{} } else { sv = *v } for key, value := range shape { switch key { case "category": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionCategory to be of type string, got %T instead", value) } sv.Category = types.ActionCategory(jtv) } case "owner": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionOwner to be of type string, got %T instead", value) } sv.Owner = types.ActionOwner(jtv) } case "provider": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionProvider to be of type string, got %T instead", value) } sv.Provider = ptr.String(jtv) } case "version": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Version to be of type string, got %T instead", value) } sv.Version = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionTypeIdentifier(v **types.ActionTypeIdentifier, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionTypeIdentifier if *v == nil { sv = &types.ActionTypeIdentifier{} } else { sv = *v } for key, value := range shape { switch key { case "category": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionCategory to be of type string, got %T instead", value) } sv.Category = types.ActionCategory(jtv) } case "owner": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionTypeOwner to be of type string, got %T instead", value) } sv.Owner = ptr.String(jtv) } case "provider": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionProvider to be of type string, got %T instead", value) } sv.Provider = ptr.String(jtv) } case "version": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Version to be of type string, got %T instead", value) } sv.Version = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionTypeList(v *[]types.ActionType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ActionType if *v == nil { cv = []types.ActionType{} } else { cv = *v } for _, value := range shape { var col types.ActionType destAddr := &col if err := awsAwsjson11_deserializeDocumentActionType(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentActionTypeNotFoundException(v **types.ActionTypeNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionTypeNotFoundException if *v == nil { sv = &types.ActionTypeNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionTypePermissions(v **types.ActionTypePermissions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionTypePermissions if *v == nil { sv = &types.ActionTypePermissions{} } else { sv = *v } for key, value := range shape { switch key { case "allowedAccounts": if err := awsAwsjson11_deserializeDocumentAllowedAccounts(&sv.AllowedAccounts, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionTypeProperties(v *[]types.ActionTypeProperty, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ActionTypeProperty if *v == nil { cv = []types.ActionTypeProperty{} } else { cv = *v } for _, value := range shape { var col types.ActionTypeProperty destAddr := &col if err := awsAwsjson11_deserializeDocumentActionTypeProperty(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentActionTypeProperty(v **types.ActionTypeProperty, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionTypeProperty if *v == nil { sv = &types.ActionTypeProperty{} } else { sv = *v } for key, value := range shape { switch key { case "description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PropertyDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "key": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.Key = jtv } case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionConfigurationKey to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "noEcho": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.NoEcho = jtv } case "optional": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.Optional = jtv } case "queryable": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.Queryable = jtv } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionTypeSettings(v **types.ActionTypeSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionTypeSettings if *v == nil { sv = &types.ActionTypeSettings{} } else { sv = *v } for key, value := range shape { switch key { case "entityUrlTemplate": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UrlTemplate to be of type string, got %T instead", value) } sv.EntityUrlTemplate = ptr.String(jtv) } case "executionUrlTemplate": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UrlTemplate to be of type string, got %T instead", value) } sv.ExecutionUrlTemplate = ptr.String(jtv) } case "revisionUrlTemplate": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UrlTemplate to be of type string, got %T instead", value) } sv.RevisionUrlTemplate = ptr.String(jtv) } case "thirdPartyConfigurationUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Url to be of type string, got %T instead", value) } sv.ThirdPartyConfigurationUrl = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentActionTypeUrls(v **types.ActionTypeUrls, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionTypeUrls if *v == nil { sv = &types.ActionTypeUrls{} } else { sv = *v } for key, value := range shape { switch key { case "configurationUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Url to be of type string, got %T instead", value) } sv.ConfigurationUrl = ptr.String(jtv) } case "entityUrlTemplate": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UrlTemplate to be of type string, got %T instead", value) } sv.EntityUrlTemplate = ptr.String(jtv) } case "executionUrlTemplate": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UrlTemplate to be of type string, got %T instead", value) } sv.ExecutionUrlTemplate = ptr.String(jtv) } case "revisionUrlTemplate": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UrlTemplate to be of type string, got %T instead", value) } sv.RevisionUrlTemplate = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAllowedAccounts(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AllowedAccount to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentApprovalAlreadyCompletedException(v **types.ApprovalAlreadyCompletedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ApprovalAlreadyCompletedException if *v == nil { sv = &types.ApprovalAlreadyCompletedException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentArtifact(v **types.Artifact, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Artifact if *v == nil { sv = &types.Artifact{} } else { sv = *v } for key, value := range shape { switch key { case "location": if err := awsAwsjson11_deserializeDocumentArtifactLocation(&sv.Location, value); err != nil { return err } case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ArtifactName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "revision": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Revision to be of type string, got %T instead", value) } sv.Revision = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentArtifactDetail(v **types.ArtifactDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ArtifactDetail if *v == nil { sv = &types.ArtifactDetail{} } else { sv = *v } for key, value := range shape { switch key { case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ArtifactName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "s3location": if err := awsAwsjson11_deserializeDocumentS3Location(&sv.S3location, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentArtifactDetailList(v *[]types.ArtifactDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ArtifactDetail if *v == nil { cv = []types.ArtifactDetail{} } else { cv = *v } for _, value := range shape { var col types.ArtifactDetail destAddr := &col if err := awsAwsjson11_deserializeDocumentArtifactDetail(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentArtifactDetails(v **types.ArtifactDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ArtifactDetails if *v == nil { sv = &types.ArtifactDetails{} } else { sv = *v } for key, value := range shape { switch key { case "maximumCount": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected MaximumArtifactCount to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.MaximumCount = int32(i64) } case "minimumCount": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected MinimumArtifactCount to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.MinimumCount = int32(i64) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentArtifactList(v *[]types.Artifact, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Artifact if *v == nil { cv = []types.Artifact{} } else { cv = *v } for _, value := range shape { var col types.Artifact destAddr := &col if err := awsAwsjson11_deserializeDocumentArtifact(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentArtifactLocation(v **types.ArtifactLocation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ArtifactLocation if *v == nil { sv = &types.ArtifactLocation{} } else { sv = *v } for key, value := range shape { switch key { case "s3Location": if err := awsAwsjson11_deserializeDocumentS3ArtifactLocation(&sv.S3Location, value); err != nil { return err } case "type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ArtifactLocationType to be of type string, got %T instead", value) } sv.Type = types.ArtifactLocationType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentArtifactRevision(v **types.ArtifactRevision, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ArtifactRevision if *v == nil { sv = &types.ArtifactRevision{} } else { sv = *v } for key, value := range shape { switch key { case "created": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.Created = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ArtifactName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "revisionChangeIdentifier": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RevisionChangeIdentifier to be of type string, got %T instead", value) } sv.RevisionChangeIdentifier = ptr.String(jtv) } case "revisionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Revision to be of type string, got %T instead", value) } sv.RevisionId = ptr.String(jtv) } case "revisionSummary": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RevisionSummary to be of type string, got %T instead", value) } sv.RevisionSummary = ptr.String(jtv) } case "revisionUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Url to be of type string, got %T instead", value) } sv.RevisionUrl = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentArtifactRevisionList(v *[]types.ArtifactRevision, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ArtifactRevision if *v == nil { cv = []types.ArtifactRevision{} } else { cv = *v } for _, value := range shape { var col types.ArtifactRevision destAddr := &col if err := awsAwsjson11_deserializeDocumentArtifactRevision(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentArtifactStore(v **types.ArtifactStore, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ArtifactStore if *v == nil { sv = &types.ArtifactStore{} } else { sv = *v } for key, value := range shape { switch key { case "encryptionKey": if err := awsAwsjson11_deserializeDocumentEncryptionKey(&sv.EncryptionKey, value); err != nil { return err } case "location": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ArtifactStoreLocation to be of type string, got %T instead", value) } sv.Location = ptr.String(jtv) } case "type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ArtifactStoreType to be of type string, got %T instead", value) } sv.Type = types.ArtifactStoreType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentArtifactStoreMap(v *map[string]types.ArtifactStore, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]types.ArtifactStore if *v == nil { mv = map[string]types.ArtifactStore{} } else { mv = *v } for key, value := range shape { var parsedVal types.ArtifactStore mapVar := parsedVal destAddr := &mapVar if err := awsAwsjson11_deserializeDocumentArtifactStore(&destAddr, value); err != nil { return err } parsedVal = *destAddr mv[key] = parsedVal } *v = mv return nil } func awsAwsjson11_deserializeDocumentAWSSessionCredentials(v **types.AWSSessionCredentials, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.AWSSessionCredentials if *v == nil { sv = &types.AWSSessionCredentials{} } else { sv = *v } for key, value := range shape { switch key { case "accessKeyId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccessKeyId to be of type string, got %T instead", value) } sv.AccessKeyId = ptr.String(jtv) } case "secretAccessKey": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SecretAccessKey to be of type string, got %T instead", value) } sv.SecretAccessKey = ptr.String(jtv) } case "sessionToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SessionToken to be of type string, got %T instead", value) } sv.SessionToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentBlockerDeclaration(v **types.BlockerDeclaration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.BlockerDeclaration if *v == nil { sv = &types.BlockerDeclaration{} } else { sv = *v } for key, value := range shape { switch key { case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected BlockerName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected BlockerType to be of type string, got %T instead", value) } sv.Type = types.BlockerType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentConcurrentModificationException(v **types.ConcurrentModificationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ConcurrentModificationException if *v == nil { sv = &types.ConcurrentModificationException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ConflictException if *v == nil { sv = &types.ConflictException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentDuplicatedStopRequestException(v **types.DuplicatedStopRequestException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.DuplicatedStopRequestException if *v == nil { sv = &types.DuplicatedStopRequestException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentEncryptionKey(v **types.EncryptionKey, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EncryptionKey if *v == nil { sv = &types.EncryptionKey{} } else { sv = *v } for key, value := range shape { switch key { case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EncryptionKeyId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EncryptionKeyType to be of type string, got %T instead", value) } sv.Type = types.EncryptionKeyType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentErrorDetails(v **types.ErrorDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ErrorDetails if *v == nil { sv = &types.ErrorDetails{} } else { sv = *v } for key, value := range shape { switch key { case "code": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Code to be of type string, got %T instead", value) } sv.Code = ptr.String(jtv) } case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentExecutionTrigger(v **types.ExecutionTrigger, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ExecutionTrigger if *v == nil { sv = &types.ExecutionTrigger{} } else { sv = *v } for key, value := range shape { switch key { case "triggerDetail": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TriggerDetail to be of type string, got %T instead", value) } sv.TriggerDetail = ptr.String(jtv) } case "triggerType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TriggerType to be of type string, got %T instead", value) } sv.TriggerType = types.TriggerType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentExecutorConfiguration(v **types.ExecutorConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ExecutorConfiguration if *v == nil { sv = &types.ExecutorConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "jobWorkerExecutorConfiguration": if err := awsAwsjson11_deserializeDocumentJobWorkerExecutorConfiguration(&sv.JobWorkerExecutorConfiguration, value); err != nil { return err } case "lambdaExecutorConfiguration": if err := awsAwsjson11_deserializeDocumentLambdaExecutorConfiguration(&sv.LambdaExecutorConfiguration, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInputArtifact(v **types.InputArtifact, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InputArtifact if *v == nil { sv = &types.InputArtifact{} } else { sv = *v } for key, value := range shape { switch key { case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ArtifactName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInputArtifactList(v *[]types.InputArtifact, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.InputArtifact if *v == nil { cv = []types.InputArtifact{} } else { cv = *v } for _, value := range shape { var col types.InputArtifact destAddr := &col if err := awsAwsjson11_deserializeDocumentInputArtifact(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentInvalidActionDeclarationException(v **types.InvalidActionDeclarationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidActionDeclarationException if *v == nil { sv = &types.InvalidActionDeclarationException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidApprovalTokenException(v **types.InvalidApprovalTokenException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidApprovalTokenException if *v == nil { sv = &types.InvalidApprovalTokenException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidArnException(v **types.InvalidArnException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidArnException if *v == nil { sv = &types.InvalidArnException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidBlockerDeclarationException(v **types.InvalidBlockerDeclarationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidBlockerDeclarationException if *v == nil { sv = &types.InvalidBlockerDeclarationException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidClientTokenException(v **types.InvalidClientTokenException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidClientTokenException if *v == nil { sv = &types.InvalidClientTokenException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidJobException(v **types.InvalidJobException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidJobException if *v == nil { sv = &types.InvalidJobException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidJobStateException(v **types.InvalidJobStateException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidJobStateException if *v == nil { sv = &types.InvalidJobStateException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidNextTokenException(v **types.InvalidNextTokenException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidNextTokenException if *v == nil { sv = &types.InvalidNextTokenException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidNonceException(v **types.InvalidNonceException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidNonceException if *v == nil { sv = &types.InvalidNonceException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidStageDeclarationException(v **types.InvalidStageDeclarationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidStageDeclarationException if *v == nil { sv = &types.InvalidStageDeclarationException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidStructureException(v **types.InvalidStructureException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidStructureException if *v == nil { sv = &types.InvalidStructureException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidTagsException(v **types.InvalidTagsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidTagsException if *v == nil { sv = &types.InvalidTagsException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidWebhookAuthenticationParametersException(v **types.InvalidWebhookAuthenticationParametersException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidWebhookAuthenticationParametersException if *v == nil { sv = &types.InvalidWebhookAuthenticationParametersException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidWebhookFilterPatternException(v **types.InvalidWebhookFilterPatternException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidWebhookFilterPatternException if *v == nil { sv = &types.InvalidWebhookFilterPatternException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentJob(v **types.Job, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Job if *v == nil { sv = &types.Job{} } else { sv = *v } for key, value := range shape { switch key { case "accountId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) } sv.AccountId = ptr.String(jtv) } case "data": if err := awsAwsjson11_deserializeDocumentJobData(&sv.Data, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected JobId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "nonce": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Nonce to be of type string, got %T instead", value) } sv.Nonce = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentJobData(v **types.JobData, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.JobData if *v == nil { sv = &types.JobData{} } else { sv = *v } for key, value := range shape { switch key { case "actionConfiguration": if err := awsAwsjson11_deserializeDocumentActionConfiguration(&sv.ActionConfiguration, value); err != nil { return err } case "actionTypeId": if err := awsAwsjson11_deserializeDocumentActionTypeId(&sv.ActionTypeId, value); err != nil { return err } case "artifactCredentials": if err := awsAwsjson11_deserializeDocumentAWSSessionCredentials(&sv.ArtifactCredentials, value); err != nil { return err } case "continuationToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ContinuationToken to be of type string, got %T instead", value) } sv.ContinuationToken = ptr.String(jtv) } case "encryptionKey": if err := awsAwsjson11_deserializeDocumentEncryptionKey(&sv.EncryptionKey, value); err != nil { return err } case "inputArtifacts": if err := awsAwsjson11_deserializeDocumentArtifactList(&sv.InputArtifacts, value); err != nil { return err } case "outputArtifacts": if err := awsAwsjson11_deserializeDocumentArtifactList(&sv.OutputArtifacts, value); err != nil { return err } case "pipelineContext": if err := awsAwsjson11_deserializeDocumentPipelineContext(&sv.PipelineContext, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentJobDetails(v **types.JobDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.JobDetails if *v == nil { sv = &types.JobDetails{} } else { sv = *v } for key, value := range shape { switch key { case "accountId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) } sv.AccountId = ptr.String(jtv) } case "data": if err := awsAwsjson11_deserializeDocumentJobData(&sv.Data, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected JobId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentJobList(v *[]types.Job, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Job if *v == nil { cv = []types.Job{} } else { cv = *v } for _, value := range shape { var col types.Job destAddr := &col if err := awsAwsjson11_deserializeDocumentJob(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentJobNotFoundException(v **types.JobNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.JobNotFoundException if *v == nil { sv = &types.JobNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentJobWorkerExecutorConfiguration(v **types.JobWorkerExecutorConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.JobWorkerExecutorConfiguration if *v == nil { sv = &types.JobWorkerExecutorConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "pollingAccounts": if err := awsAwsjson11_deserializeDocumentPollingAccountList(&sv.PollingAccounts, value); err != nil { return err } case "pollingServicePrincipals": if err := awsAwsjson11_deserializeDocumentPollingServicePrincipalList(&sv.PollingServicePrincipals, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentLambdaExecutorConfiguration(v **types.LambdaExecutorConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.LambdaExecutorConfiguration if *v == nil { sv = &types.LambdaExecutorConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "lambdaFunctionArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected LambdaFunctionArn to be of type string, got %T instead", value) } sv.LambdaFunctionArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.LimitExceededException if *v == nil { sv = &types.LimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentListWebhookItem(v **types.ListWebhookItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ListWebhookItem if *v == nil { sv = &types.ListWebhookItem{} } else { sv = *v } for key, value := range shape { switch key { case "arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WebhookArn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "definition": if err := awsAwsjson11_deserializeDocumentWebhookDefinition(&sv.Definition, value); err != nil { return err } case "errorCode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WebhookErrorCode to be of type string, got %T instead", value) } sv.ErrorCode = ptr.String(jtv) } case "errorMessage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WebhookErrorMessage to be of type string, got %T instead", value) } sv.ErrorMessage = ptr.String(jtv) } case "lastTriggered": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastTriggered = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected WebhookLastTriggered to be a JSON Number, got %T instead", value) } } case "tags": if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } case "url": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WebhookUrl to be of type string, got %T instead", value) } sv.Url = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentNotLatestPipelineExecutionException(v **types.NotLatestPipelineExecutionException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.NotLatestPipelineExecutionException if *v == nil { sv = &types.NotLatestPipelineExecutionException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentOutputArtifact(v **types.OutputArtifact, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.OutputArtifact if *v == nil { sv = &types.OutputArtifact{} } else { sv = *v } for key, value := range shape { switch key { case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ArtifactName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentOutputArtifactList(v *[]types.OutputArtifact, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.OutputArtifact if *v == nil { cv = []types.OutputArtifact{} } else { cv = *v } for _, value := range shape { var col types.OutputArtifact destAddr := &col if err := awsAwsjson11_deserializeDocumentOutputArtifact(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentOutputVariablesMap(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]string if *v == nil { mv = map[string]string{} } else { mv = *v } for key, value := range shape { var parsedVal string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected OutputVariablesValue to be of type string, got %T instead", value) } parsedVal = jtv } mv[key] = parsedVal } *v = mv return nil } func awsAwsjson11_deserializeDocumentOutputVariablesSizeExceededException(v **types.OutputVariablesSizeExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.OutputVariablesSizeExceededException if *v == nil { sv = &types.OutputVariablesSizeExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPipelineContext(v **types.PipelineContext, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PipelineContext if *v == nil { sv = &types.PipelineContext{} } else { sv = *v } for key, value := range shape { switch key { case "action": if err := awsAwsjson11_deserializeDocumentActionContext(&sv.Action, value); err != nil { return err } case "pipelineArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineArn to be of type string, got %T instead", value) } sv.PipelineArn = ptr.String(jtv) } case "pipelineExecutionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineExecutionId to be of type string, got %T instead", value) } sv.PipelineExecutionId = ptr.String(jtv) } case "pipelineName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineName to be of type string, got %T instead", value) } sv.PipelineName = ptr.String(jtv) } case "stage": if err := awsAwsjson11_deserializeDocumentStageContext(&sv.Stage, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPipelineDeclaration(v **types.PipelineDeclaration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PipelineDeclaration if *v == nil { sv = &types.PipelineDeclaration{} } else { sv = *v } for key, value := range shape { switch key { case "artifactStore": if err := awsAwsjson11_deserializeDocumentArtifactStore(&sv.ArtifactStore, value); err != nil { return err } case "artifactStores": if err := awsAwsjson11_deserializeDocumentArtifactStoreMap(&sv.ArtifactStores, value); err != nil { return err } case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "roleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) } sv.RoleArn = ptr.String(jtv) } case "stages": if err := awsAwsjson11_deserializeDocumentPipelineStageDeclarationList(&sv.Stages, value); err != nil { return err } case "version": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PipelineVersion to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Version = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPipelineExecution(v **types.PipelineExecution, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PipelineExecution if *v == nil { sv = &types.PipelineExecution{} } else { sv = *v } for key, value := range shape { switch key { case "artifactRevisions": if err := awsAwsjson11_deserializeDocumentArtifactRevisionList(&sv.ArtifactRevisions, value); err != nil { return err } case "pipelineExecutionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineExecutionId to be of type string, got %T instead", value) } sv.PipelineExecutionId = ptr.String(jtv) } case "pipelineName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineName to be of type string, got %T instead", value) } sv.PipelineName = ptr.String(jtv) } case "pipelineVersion": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PipelineVersion to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.PipelineVersion = ptr.Int32(int32(i64)) } case "status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineExecutionStatus to be of type string, got %T instead", value) } sv.Status = types.PipelineExecutionStatus(jtv) } case "statusSummary": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineExecutionStatusSummary to be of type string, got %T instead", value) } sv.StatusSummary = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPipelineExecutionNotFoundException(v **types.PipelineExecutionNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PipelineExecutionNotFoundException if *v == nil { sv = &types.PipelineExecutionNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPipelineExecutionNotStoppableException(v **types.PipelineExecutionNotStoppableException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PipelineExecutionNotStoppableException if *v == nil { sv = &types.PipelineExecutionNotStoppableException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPipelineExecutionSummary(v **types.PipelineExecutionSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PipelineExecutionSummary if *v == nil { sv = &types.PipelineExecutionSummary{} } else { sv = *v } for key, value := range shape { switch key { case "lastUpdateTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastUpdateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "pipelineExecutionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineExecutionId to be of type string, got %T instead", value) } sv.PipelineExecutionId = ptr.String(jtv) } case "sourceRevisions": if err := awsAwsjson11_deserializeDocumentSourceRevisionList(&sv.SourceRevisions, value); err != nil { return err } case "startTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineExecutionStatus to be of type string, got %T instead", value) } sv.Status = types.PipelineExecutionStatus(jtv) } case "stopTrigger": if err := awsAwsjson11_deserializeDocumentStopExecutionTrigger(&sv.StopTrigger, value); err != nil { return err } case "trigger": if err := awsAwsjson11_deserializeDocumentExecutionTrigger(&sv.Trigger, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPipelineExecutionSummaryList(v *[]types.PipelineExecutionSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.PipelineExecutionSummary if *v == nil { cv = []types.PipelineExecutionSummary{} } else { cv = *v } for _, value := range shape { var col types.PipelineExecutionSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentPipelineExecutionSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentPipelineList(v *[]types.PipelineSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.PipelineSummary if *v == nil { cv = []types.PipelineSummary{} } else { cv = *v } for _, value := range shape { var col types.PipelineSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentPipelineSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentPipelineMetadata(v **types.PipelineMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PipelineMetadata if *v == nil { sv = &types.PipelineMetadata{} } else { sv = *v } for key, value := range shape { switch key { case "created": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.Created = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "pipelineArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineArn to be of type string, got %T instead", value) } sv.PipelineArn = ptr.String(jtv) } case "updated": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.Updated = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPipelineNameInUseException(v **types.PipelineNameInUseException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PipelineNameInUseException if *v == nil { sv = &types.PipelineNameInUseException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPipelineNotFoundException(v **types.PipelineNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PipelineNotFoundException if *v == nil { sv = &types.PipelineNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPipelineStageDeclarationList(v *[]types.StageDeclaration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.StageDeclaration if *v == nil { cv = []types.StageDeclaration{} } else { cv = *v } for _, value := range shape { var col types.StageDeclaration destAddr := &col if err := awsAwsjson11_deserializeDocumentStageDeclaration(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentPipelineSummary(v **types.PipelineSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PipelineSummary if *v == nil { sv = &types.PipelineSummary{} } else { sv = *v } for key, value := range shape { switch key { case "created": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.Created = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "updated": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.Updated = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "version": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PipelineVersion to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Version = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPipelineVersionNotFoundException(v **types.PipelineVersionNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PipelineVersionNotFoundException if *v == nil { sv = &types.PipelineVersionNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPollingAccountList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentPollingServicePrincipalList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ServicePrincipal to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentRequestFailedException(v **types.RequestFailedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RequestFailedException if *v == nil { sv = &types.RequestFailedException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentResolvedActionConfigurationMap(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]string if *v == nil { mv = map[string]string{} } else { mv = *v } for key, value := range shape { var parsedVal string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } parsedVal = jtv } mv[key] = parsedVal } *v = mv return nil } func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ResourceNotFoundException if *v == nil { sv = &types.ResourceNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentS3ArtifactLocation(v **types.S3ArtifactLocation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.S3ArtifactLocation if *v == nil { sv = &types.S3ArtifactLocation{} } else { sv = *v } for key, value := range shape { switch key { case "bucketName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) } sv.BucketName = ptr.String(jtv) } case "objectKey": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected S3ObjectKey to be of type string, got %T instead", value) } sv.ObjectKey = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentS3Location(v **types.S3Location, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.S3Location if *v == nil { sv = &types.S3Location{} } else { sv = *v } for key, value := range shape { switch key { case "bucket": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected S3Bucket to be of type string, got %T instead", value) } sv.Bucket = ptr.String(jtv) } case "key": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected S3Key to be of type string, got %T instead", value) } sv.Key = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSourceRevision(v **types.SourceRevision, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SourceRevision if *v == nil { sv = &types.SourceRevision{} } else { sv = *v } for key, value := range shape { switch key { case "actionName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionName to be of type string, got %T instead", value) } sv.ActionName = ptr.String(jtv) } case "revisionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Revision to be of type string, got %T instead", value) } sv.RevisionId = ptr.String(jtv) } case "revisionSummary": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RevisionSummary to be of type string, got %T instead", value) } sv.RevisionSummary = ptr.String(jtv) } case "revisionUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Url to be of type string, got %T instead", value) } sv.RevisionUrl = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSourceRevisionList(v *[]types.SourceRevision, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.SourceRevision if *v == nil { cv = []types.SourceRevision{} } else { cv = *v } for _, value := range shape { var col types.SourceRevision destAddr := &col if err := awsAwsjson11_deserializeDocumentSourceRevision(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentStageActionDeclarationList(v *[]types.ActionDeclaration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ActionDeclaration if *v == nil { cv = []types.ActionDeclaration{} } else { cv = *v } for _, value := range shape { var col types.ActionDeclaration destAddr := &col if err := awsAwsjson11_deserializeDocumentActionDeclaration(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentStageBlockerDeclarationList(v *[]types.BlockerDeclaration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.BlockerDeclaration if *v == nil { cv = []types.BlockerDeclaration{} } else { cv = *v } for _, value := range shape { var col types.BlockerDeclaration destAddr := &col if err := awsAwsjson11_deserializeDocumentBlockerDeclaration(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentStageContext(v **types.StageContext, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StageContext if *v == nil { sv = &types.StageContext{} } else { sv = *v } for key, value := range shape { switch key { case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StageName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentStageDeclaration(v **types.StageDeclaration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StageDeclaration if *v == nil { sv = &types.StageDeclaration{} } else { sv = *v } for key, value := range shape { switch key { case "actions": if err := awsAwsjson11_deserializeDocumentStageActionDeclarationList(&sv.Actions, value); err != nil { return err } case "blockers": if err := awsAwsjson11_deserializeDocumentStageBlockerDeclarationList(&sv.Blockers, value); err != nil { return err } case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StageName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentStageExecution(v **types.StageExecution, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StageExecution if *v == nil { sv = &types.StageExecution{} } else { sv = *v } for key, value := range shape { switch key { case "pipelineExecutionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineExecutionId to be of type string, got %T instead", value) } sv.PipelineExecutionId = ptr.String(jtv) } case "status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StageExecutionStatus to be of type string, got %T instead", value) } sv.Status = types.StageExecutionStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentStageNotFoundException(v **types.StageNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StageNotFoundException if *v == nil { sv = &types.StageNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentStageNotRetryableException(v **types.StageNotRetryableException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StageNotRetryableException if *v == nil { sv = &types.StageNotRetryableException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentStageState(v **types.StageState, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StageState if *v == nil { sv = &types.StageState{} } else { sv = *v } for key, value := range shape { switch key { case "actionStates": if err := awsAwsjson11_deserializeDocumentActionStateList(&sv.ActionStates, value); err != nil { return err } case "inboundExecution": if err := awsAwsjson11_deserializeDocumentStageExecution(&sv.InboundExecution, value); err != nil { return err } case "inboundTransitionState": if err := awsAwsjson11_deserializeDocumentTransitionState(&sv.InboundTransitionState, value); err != nil { return err } case "latestExecution": if err := awsAwsjson11_deserializeDocumentStageExecution(&sv.LatestExecution, value); err != nil { return err } case "stageName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StageName to be of type string, got %T instead", value) } sv.StageName = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentStageStateList(v *[]types.StageState, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.StageState if *v == nil { cv = []types.StageState{} } else { cv = *v } for _, value := range shape { var col types.StageState destAddr := &col if err := awsAwsjson11_deserializeDocumentStageState(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentStopExecutionTrigger(v **types.StopExecutionTrigger, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StopExecutionTrigger if *v == nil { sv = &types.StopExecutionTrigger{} } else { sv = *v } for key, value := range shape { switch key { case "reason": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StopPipelineExecutionReason to be of type string, got %T instead", value) } sv.Reason = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Tag if *v == nil { sv = &types.Tag{} } else { sv = *v } for key, value := range shape { switch key { case "key": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) } sv.Key = ptr.String(jtv) } case "value": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) } sv.Value = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Tag if *v == nil { cv = []types.Tag{} } else { cv = *v } for _, value := range shape { var col types.Tag destAddr := &col if err := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentThirdPartyJob(v **types.ThirdPartyJob, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ThirdPartyJob if *v == nil { sv = &types.ThirdPartyJob{} } else { sv = *v } for key, value := range shape { switch key { case "clientId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ClientId to be of type string, got %T instead", value) } sv.ClientId = ptr.String(jtv) } case "jobId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected JobId to be of type string, got %T instead", value) } sv.JobId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentThirdPartyJobData(v **types.ThirdPartyJobData, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ThirdPartyJobData if *v == nil { sv = &types.ThirdPartyJobData{} } else { sv = *v } for key, value := range shape { switch key { case "actionConfiguration": if err := awsAwsjson11_deserializeDocumentActionConfiguration(&sv.ActionConfiguration, value); err != nil { return err } case "actionTypeId": if err := awsAwsjson11_deserializeDocumentActionTypeId(&sv.ActionTypeId, value); err != nil { return err } case "artifactCredentials": if err := awsAwsjson11_deserializeDocumentAWSSessionCredentials(&sv.ArtifactCredentials, value); err != nil { return err } case "continuationToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ContinuationToken to be of type string, got %T instead", value) } sv.ContinuationToken = ptr.String(jtv) } case "encryptionKey": if err := awsAwsjson11_deserializeDocumentEncryptionKey(&sv.EncryptionKey, value); err != nil { return err } case "inputArtifacts": if err := awsAwsjson11_deserializeDocumentArtifactList(&sv.InputArtifacts, value); err != nil { return err } case "outputArtifacts": if err := awsAwsjson11_deserializeDocumentArtifactList(&sv.OutputArtifacts, value); err != nil { return err } case "pipelineContext": if err := awsAwsjson11_deserializeDocumentPipelineContext(&sv.PipelineContext, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentThirdPartyJobDetails(v **types.ThirdPartyJobDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ThirdPartyJobDetails if *v == nil { sv = &types.ThirdPartyJobDetails{} } else { sv = *v } for key, value := range shape { switch key { case "data": if err := awsAwsjson11_deserializeDocumentThirdPartyJobData(&sv.Data, value); err != nil { return err } case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ThirdPartyJobId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } case "nonce": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Nonce to be of type string, got %T instead", value) } sv.Nonce = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentThirdPartyJobList(v *[]types.ThirdPartyJob, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ThirdPartyJob if *v == nil { cv = []types.ThirdPartyJob{} } else { cv = *v } for _, value := range shape { var col types.ThirdPartyJob destAddr := &col if err := awsAwsjson11_deserializeDocumentThirdPartyJob(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentTooManyTagsException(v **types.TooManyTagsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.TooManyTagsException if *v == nil { sv = &types.TooManyTagsException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentTransitionState(v **types.TransitionState, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.TransitionState if *v == nil { sv = &types.TransitionState{} } else { sv = *v } for key, value := range shape { switch key { case "disabledReason": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DisabledReason to be of type string, got %T instead", value) } sv.DisabledReason = ptr.String(jtv) } case "enabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Enabled to be of type *bool, got %T instead", value) } sv.Enabled = jtv } case "lastChangedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastChangedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected LastChangedAt to be a JSON Number, got %T instead", value) } } case "lastChangedBy": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected LastChangedBy to be of type string, got %T instead", value) } sv.LastChangedBy = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ValidationException if *v == nil { sv = &types.ValidationException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Message to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWebhookAuthConfiguration(v **types.WebhookAuthConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WebhookAuthConfiguration if *v == nil { sv = &types.WebhookAuthConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "AllowedIPRange": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WebhookAuthConfigurationAllowedIPRange to be of type string, got %T instead", value) } sv.AllowedIPRange = ptr.String(jtv) } case "SecretToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WebhookAuthConfigurationSecretToken to be of type string, got %T instead", value) } sv.SecretToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWebhookDefinition(v **types.WebhookDefinition, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WebhookDefinition if *v == nil { sv = &types.WebhookDefinition{} } else { sv = *v } for key, value := range shape { switch key { case "authentication": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WebhookAuthenticationType to be of type string, got %T instead", value) } sv.Authentication = types.WebhookAuthenticationType(jtv) } case "authenticationConfiguration": if err := awsAwsjson11_deserializeDocumentWebhookAuthConfiguration(&sv.AuthenticationConfiguration, value); err != nil { return err } case "filters": if err := awsAwsjson11_deserializeDocumentWebhookFilters(&sv.Filters, value); err != nil { return err } case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected WebhookName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "targetAction": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionName to be of type string, got %T instead", value) } sv.TargetAction = ptr.String(jtv) } case "targetPipeline": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineName to be of type string, got %T instead", value) } sv.TargetPipeline = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWebhookFilterRule(v **types.WebhookFilterRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WebhookFilterRule if *v == nil { sv = &types.WebhookFilterRule{} } else { sv = *v } for key, value := range shape { switch key { case "jsonPath": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected JsonPath to be of type string, got %T instead", value) } sv.JsonPath = ptr.String(jtv) } case "matchEquals": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MatchEquals to be of type string, got %T instead", value) } sv.MatchEquals = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentWebhookFilters(v *[]types.WebhookFilterRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.WebhookFilterRule if *v == nil { cv = []types.WebhookFilterRule{} } else { cv = *v } for _, value := range shape { var col types.WebhookFilterRule destAddr := &col if err := awsAwsjson11_deserializeDocumentWebhookFilterRule(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentWebhookList(v *[]types.ListWebhookItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ListWebhookItem if *v == nil { cv = []types.ListWebhookItem{} } else { cv = *v } for _, value := range shape { var col types.ListWebhookItem destAddr := &col if err := awsAwsjson11_deserializeDocumentListWebhookItem(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentWebhookNotFoundException(v **types.WebhookNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.WebhookNotFoundException if *v == nil { sv = &types.WebhookNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentAcknowledgeJobOutput(v **AcknowledgeJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *AcknowledgeJobOutput if *v == nil { sv = &AcknowledgeJobOutput{} } else { sv = *v } for key, value := range shape { switch key { case "status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value) } sv.Status = types.JobStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentAcknowledgeThirdPartyJobOutput(v **AcknowledgeThirdPartyJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *AcknowledgeThirdPartyJobOutput if *v == nil { sv = &AcknowledgeThirdPartyJobOutput{} } else { sv = *v } for key, value := range shape { switch key { case "status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value) } sv.Status = types.JobStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateCustomActionTypeOutput(v **CreateCustomActionTypeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateCustomActionTypeOutput if *v == nil { sv = &CreateCustomActionTypeOutput{} } else { sv = *v } for key, value := range shape { switch key { case "actionType": if err := awsAwsjson11_deserializeDocumentActionType(&sv.ActionType, value); err != nil { return err } case "tags": if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreatePipelineOutput(v **CreatePipelineOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreatePipelineOutput if *v == nil { sv = &CreatePipelineOutput{} } else { sv = *v } for key, value := range shape { switch key { case "pipeline": if err := awsAwsjson11_deserializeDocumentPipelineDeclaration(&sv.Pipeline, value); err != nil { return err } case "tags": if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteWebhookOutput(v **DeleteWebhookOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteWebhookOutput if *v == nil { sv = &DeleteWebhookOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeregisterWebhookWithThirdPartyOutput(v **DeregisterWebhookWithThirdPartyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeregisterWebhookWithThirdPartyOutput if *v == nil { sv = &DeregisterWebhookWithThirdPartyOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetActionTypeOutput(v **GetActionTypeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetActionTypeOutput if *v == nil { sv = &GetActionTypeOutput{} } else { sv = *v } for key, value := range shape { switch key { case "actionType": if err := awsAwsjson11_deserializeDocumentActionTypeDeclaration(&sv.ActionType, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetJobDetailsOutput(v **GetJobDetailsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetJobDetailsOutput if *v == nil { sv = &GetJobDetailsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "jobDetails": if err := awsAwsjson11_deserializeDocumentJobDetails(&sv.JobDetails, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetPipelineExecutionOutput(v **GetPipelineExecutionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetPipelineExecutionOutput if *v == nil { sv = &GetPipelineExecutionOutput{} } else { sv = *v } for key, value := range shape { switch key { case "pipelineExecution": if err := awsAwsjson11_deserializeDocumentPipelineExecution(&sv.PipelineExecution, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetPipelineOutput(v **GetPipelineOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetPipelineOutput if *v == nil { sv = &GetPipelineOutput{} } else { sv = *v } for key, value := range shape { switch key { case "metadata": if err := awsAwsjson11_deserializeDocumentPipelineMetadata(&sv.Metadata, value); err != nil { return err } case "pipeline": if err := awsAwsjson11_deserializeDocumentPipelineDeclaration(&sv.Pipeline, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetPipelineStateOutput(v **GetPipelineStateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetPipelineStateOutput if *v == nil { sv = &GetPipelineStateOutput{} } else { sv = *v } for key, value := range shape { switch key { case "created": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.Created = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "pipelineName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineName to be of type string, got %T instead", value) } sv.PipelineName = ptr.String(jtv) } case "pipelineVersion": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PipelineVersion to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.PipelineVersion = ptr.Int32(int32(i64)) } case "stageStates": if err := awsAwsjson11_deserializeDocumentStageStateList(&sv.StageStates, value); err != nil { return err } case "updated": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.Updated = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetThirdPartyJobDetailsOutput(v **GetThirdPartyJobDetailsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *GetThirdPartyJobDetailsOutput if *v == nil { sv = &GetThirdPartyJobDetailsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "jobDetails": if err := awsAwsjson11_deserializeDocumentThirdPartyJobDetails(&sv.JobDetails, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListActionExecutionsOutput(v **ListActionExecutionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListActionExecutionsOutput if *v == nil { sv = &ListActionExecutionsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "actionExecutionDetails": if err := awsAwsjson11_deserializeDocumentActionExecutionDetailList(&sv.ActionExecutionDetails, value); err != nil { return err } case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListActionTypesOutput(v **ListActionTypesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListActionTypesOutput if *v == nil { sv = &ListActionTypesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "actionTypes": if err := awsAwsjson11_deserializeDocumentActionTypeList(&sv.ActionTypes, value); err != nil { return err } case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListPipelineExecutionsOutput(v **ListPipelineExecutionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListPipelineExecutionsOutput if *v == nil { sv = &ListPipelineExecutionsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "pipelineExecutionSummaries": if err := awsAwsjson11_deserializeDocumentPipelineExecutionSummaryList(&sv.PipelineExecutionSummaries, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListPipelinesOutput(v **ListPipelinesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListPipelinesOutput if *v == nil { sv = &ListPipelinesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "pipelines": if err := awsAwsjson11_deserializeDocumentPipelineList(&sv.Pipelines, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListTagsForResourceOutput if *v == nil { sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "tags": if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListWebhooksOutput(v **ListWebhooksOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListWebhooksOutput if *v == nil { sv = &ListWebhooksOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "webhooks": if err := awsAwsjson11_deserializeDocumentWebhookList(&sv.Webhooks, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPollForJobsOutput(v **PollForJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *PollForJobsOutput if *v == nil { sv = &PollForJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "jobs": if err := awsAwsjson11_deserializeDocumentJobList(&sv.Jobs, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPollForThirdPartyJobsOutput(v **PollForThirdPartyJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *PollForThirdPartyJobsOutput if *v == nil { sv = &PollForThirdPartyJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "jobs": if err := awsAwsjson11_deserializeDocumentThirdPartyJobList(&sv.Jobs, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPutActionRevisionOutput(v **PutActionRevisionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *PutActionRevisionOutput if *v == nil { sv = &PutActionRevisionOutput{} } else { sv = *v } for key, value := range shape { switch key { case "newRevision": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.NewRevision = jtv } case "pipelineExecutionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineExecutionId to be of type string, got %T instead", value) } sv.PipelineExecutionId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPutApprovalResultOutput(v **PutApprovalResultOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *PutApprovalResultOutput if *v == nil { sv = &PutApprovalResultOutput{} } else { sv = *v } for key, value := range shape { switch key { case "approvedAt": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ApprovedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPutWebhookOutput(v **PutWebhookOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *PutWebhookOutput if *v == nil { sv = &PutWebhookOutput{} } else { sv = *v } for key, value := range shape { switch key { case "webhook": if err := awsAwsjson11_deserializeDocumentListWebhookItem(&sv.Webhook, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentRegisterWebhookWithThirdPartyOutput(v **RegisterWebhookWithThirdPartyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *RegisterWebhookWithThirdPartyOutput if *v == nil { sv = &RegisterWebhookWithThirdPartyOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentRetryStageExecutionOutput(v **RetryStageExecutionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *RetryStageExecutionOutput if *v == nil { sv = &RetryStageExecutionOutput{} } else { sv = *v } for key, value := range shape { switch key { case "pipelineExecutionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineExecutionId to be of type string, got %T instead", value) } sv.PipelineExecutionId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentStartPipelineExecutionOutput(v **StartPipelineExecutionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *StartPipelineExecutionOutput if *v == nil { sv = &StartPipelineExecutionOutput{} } else { sv = *v } for key, value := range shape { switch key { case "pipelineExecutionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineExecutionId to be of type string, got %T instead", value) } sv.PipelineExecutionId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentStopPipelineExecutionOutput(v **StopPipelineExecutionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *StopPipelineExecutionOutput if *v == nil { sv = &StopPipelineExecutionOutput{} } else { sv = *v } for key, value := range shape { switch key { case "pipelineExecutionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PipelineExecutionId to be of type string, got %T instead", value) } sv.PipelineExecutionId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *TagResourceOutput if *v == nil { sv = &TagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UntagResourceOutput if *v == nil { sv = &UntagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdatePipelineOutput(v **UpdatePipelineOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdatePipelineOutput if *v == nil { sv = &UpdatePipelineOutput{} } else { sv = *v } for key, value := range shape { switch key { case "pipeline": if err := awsAwsjson11_deserializeDocumentPipelineDeclaration(&sv.Pipeline, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil }