// Code generated by smithy-go-codegen DO NOT EDIT. package fms import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/fms/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_deserializeOpAssociateAdminAccount struct { } func (*awsAwsjson11_deserializeOpAssociateAdminAccount) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAssociateAdminAccount) 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_deserializeOpErrorAssociateAdminAccount(response, &metadata) } output := &AssociateAdminAccountOutput{} 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_deserializeOpErrorAssociateAdminAccount(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteAppsList struct { } func (*awsAwsjson11_deserializeOpDeleteAppsList) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteAppsList) 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_deserializeOpErrorDeleteAppsList(response, &metadata) } output := &DeleteAppsListOutput{} 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_deserializeOpErrorDeleteAppsList(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteNotificationChannel struct { } func (*awsAwsjson11_deserializeOpDeleteNotificationChannel) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteNotificationChannel) 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_deserializeOpErrorDeleteNotificationChannel(response, &metadata) } output := &DeleteNotificationChannelOutput{} 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_deserializeOpErrorDeleteNotificationChannel(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeletePolicy struct { } func (*awsAwsjson11_deserializeOpDeletePolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeletePolicy) 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_deserializeOpErrorDeletePolicy(response, &metadata) } output := &DeletePolicyOutput{} 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_deserializeOpErrorDeletePolicy(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteProtocolsList struct { } func (*awsAwsjson11_deserializeOpDeleteProtocolsList) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteProtocolsList) 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_deserializeOpErrorDeleteProtocolsList(response, &metadata) } output := &DeleteProtocolsListOutput{} 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_deserializeOpErrorDeleteProtocolsList(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDisassociateAdminAccount struct { } func (*awsAwsjson11_deserializeOpDisassociateAdminAccount) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDisassociateAdminAccount) 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_deserializeOpErrorDisassociateAdminAccount(response, &metadata) } output := &DisassociateAdminAccountOutput{} 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_deserializeOpErrorDisassociateAdminAccount(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetAdminAccount struct { } func (*awsAwsjson11_deserializeOpGetAdminAccount) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetAdminAccount) 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_deserializeOpErrorGetAdminAccount(response, &metadata) } output := &GetAdminAccountOutput{} 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_deserializeOpDocumentGetAdminAccountOutput(&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_deserializeOpErrorGetAdminAccount(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetAppsList struct { } func (*awsAwsjson11_deserializeOpGetAppsList) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetAppsList) 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_deserializeOpErrorGetAppsList(response, &metadata) } output := &GetAppsListOutput{} 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_deserializeOpDocumentGetAppsListOutput(&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_deserializeOpErrorGetAppsList(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetComplianceDetail struct { } func (*awsAwsjson11_deserializeOpGetComplianceDetail) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetComplianceDetail) 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_deserializeOpErrorGetComplianceDetail(response, &metadata) } output := &GetComplianceDetailOutput{} 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_deserializeOpDocumentGetComplianceDetailOutput(&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_deserializeOpErrorGetComplianceDetail(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetNotificationChannel struct { } func (*awsAwsjson11_deserializeOpGetNotificationChannel) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetNotificationChannel) 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_deserializeOpErrorGetNotificationChannel(response, &metadata) } output := &GetNotificationChannelOutput{} 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_deserializeOpDocumentGetNotificationChannelOutput(&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_deserializeOpErrorGetNotificationChannel(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetPolicy struct { } func (*awsAwsjson11_deserializeOpGetPolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetPolicy) 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_deserializeOpErrorGetPolicy(response, &metadata) } output := &GetPolicyOutput{} 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_deserializeOpDocumentGetPolicyOutput(&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_deserializeOpErrorGetPolicy(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("InvalidTypeException", errorCode): return awsAwsjson11_deserializeErrorInvalidTypeException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetProtectionStatus struct { } func (*awsAwsjson11_deserializeOpGetProtectionStatus) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetProtectionStatus) 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_deserializeOpErrorGetProtectionStatus(response, &metadata) } output := &GetProtectionStatusOutput{} 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_deserializeOpDocumentGetProtectionStatusOutput(&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_deserializeOpErrorGetProtectionStatus(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetProtocolsList struct { } func (*awsAwsjson11_deserializeOpGetProtocolsList) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetProtocolsList) 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_deserializeOpErrorGetProtocolsList(response, &metadata) } output := &GetProtocolsListOutput{} 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_deserializeOpDocumentGetProtocolsListOutput(&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_deserializeOpErrorGetProtocolsList(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpGetViolationDetails struct { } func (*awsAwsjson11_deserializeOpGetViolationDetails) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpGetViolationDetails) 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_deserializeOpErrorGetViolationDetails(response, &metadata) } output := &GetViolationDetailsOutput{} 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_deserializeOpDocumentGetViolationDetailsOutput(&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_deserializeOpErrorGetViolationDetails(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListAppsLists struct { } func (*awsAwsjson11_deserializeOpListAppsLists) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListAppsLists) 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_deserializeOpErrorListAppsLists(response, &metadata) } output := &ListAppsListsOutput{} 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_deserializeOpDocumentListAppsListsOutput(&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_deserializeOpErrorListAppsLists(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListComplianceStatus struct { } func (*awsAwsjson11_deserializeOpListComplianceStatus) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListComplianceStatus) 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_deserializeOpErrorListComplianceStatus(response, &metadata) } output := &ListComplianceStatusOutput{} 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_deserializeOpDocumentListComplianceStatusOutput(&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_deserializeOpErrorListComplianceStatus(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListMemberAccounts struct { } func (*awsAwsjson11_deserializeOpListMemberAccounts) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListMemberAccounts) 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_deserializeOpErrorListMemberAccounts(response, &metadata) } output := &ListMemberAccountsOutput{} 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_deserializeOpDocumentListMemberAccountsOutput(&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_deserializeOpErrorListMemberAccounts(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListPolicies struct { } func (*awsAwsjson11_deserializeOpListPolicies) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListPolicies) 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_deserializeOpErrorListPolicies(response, &metadata) } output := &ListPoliciesOutput{} 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_deserializeOpDocumentListPoliciesOutput(&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_deserializeOpErrorListPolicies(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListProtocolsLists struct { } func (*awsAwsjson11_deserializeOpListProtocolsLists) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListProtocolsLists) 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_deserializeOpErrorListProtocolsLists(response, &metadata) } output := &ListProtocolsListsOutput{} 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_deserializeOpDocumentListProtocolsListsOutput(&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_deserializeOpErrorListProtocolsLists(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutAppsList struct { } func (*awsAwsjson11_deserializeOpPutAppsList) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutAppsList) 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_deserializeOpErrorPutAppsList(response, &metadata) } output := &PutAppsListOutput{} 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_deserializeOpDocumentPutAppsListOutput(&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_deserializeOpErrorPutAppsList(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutNotificationChannel struct { } func (*awsAwsjson11_deserializeOpPutNotificationChannel) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutNotificationChannel) 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_deserializeOpErrorPutNotificationChannel(response, &metadata) } output := &PutNotificationChannelOutput{} 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_deserializeOpErrorPutNotificationChannel(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutPolicy struct { } func (*awsAwsjson11_deserializeOpPutPolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutPolicy) 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_deserializeOpErrorPutPolicy(response, &metadata) } output := &PutPolicyOutput{} 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_deserializeOpDocumentPutPolicyOutput(&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_deserializeOpErrorPutPolicy(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("InvalidTypeException", errorCode): return awsAwsjson11_deserializeErrorInvalidTypeException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpPutProtocolsList struct { } func (*awsAwsjson11_deserializeOpPutProtocolsList) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpPutProtocolsList) 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_deserializeOpErrorPutProtocolsList(response, &metadata) } output := &PutProtocolsListOutput{} 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_deserializeOpDocumentPutProtocolsListOutput(&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_deserializeOpErrorPutProtocolsList(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(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("InternalErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalErrorException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson11_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsAwsjson11_deserializeErrorInternalErrorException(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.InternalErrorException{} err := awsAwsjson11_deserializeDocumentInternalErrorException(&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_deserializeErrorInvalidInputException(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.InvalidInputException{} err := awsAwsjson11_deserializeDocumentInvalidInputException(&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_deserializeErrorInvalidOperationException(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.InvalidOperationException{} err := awsAwsjson11_deserializeDocumentInvalidOperationException(&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_deserializeErrorInvalidTypeException(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.InvalidTypeException{} err := awsAwsjson11_deserializeDocumentInvalidTypeException(&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_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_deserializeDocumentApp(v **types.App, 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.App if *v == nil { sv = &types.App{} } else { sv = *v } for key, value := range shape { switch key { case "AppName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.AppName = ptr.String(jtv) } case "Port": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected IPPortNumber to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Port = ptr.Int64(i64) } case "Protocol": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Protocol to be of type string, got %T instead", value) } sv.Protocol = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAppsList(v *[]types.App, 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.App if *v == nil { cv = []types.App{} } else { cv = *v } for _, value := range shape { var col types.App destAddr := &col if err := awsAwsjson11_deserializeDocumentApp(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentAppsListData(v **types.AppsListData, 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.AppsListData if *v == nil { sv = &types.AppsListData{} } else { sv = *v } for key, value := range shape { switch key { case "AppsList": if err := awsAwsjson11_deserializeDocumentAppsList(&sv.AppsList, value); err != nil { return err } case "CreateTime": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected TimeStamp to be json.Number, got %T instead", value) } f64, err := jtv.Float64() if err != nil { return err } sv.CreateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) } case "LastUpdateTime": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected TimeStamp to be json.Number, got %T instead", value) } f64, err := jtv.Float64() if err != nil { return err } sv.LastUpdateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) } case "ListId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ListId to be of type string, got %T instead", value) } sv.ListId = ptr.String(jtv) } case "ListName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ListName = ptr.String(jtv) } case "ListUpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.ListUpdateToken = ptr.String(jtv) } case "PreviousAppsList": if err := awsAwsjson11_deserializeDocumentPreviousAppsList(&sv.PreviousAppsList, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAppsListDataSummary(v **types.AppsListDataSummary, 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.AppsListDataSummary if *v == nil { sv = &types.AppsListDataSummary{} } else { sv = *v } for key, value := range shape { switch key { case "AppsList": if err := awsAwsjson11_deserializeDocumentAppsList(&sv.AppsList, value); err != nil { return err } case "ListArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.ListArn = ptr.String(jtv) } case "ListId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ListId to be of type string, got %T instead", value) } sv.ListId = ptr.String(jtv) } case "ListName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ListName = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAppsListsData(v *[]types.AppsListDataSummary, 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.AppsListDataSummary if *v == nil { cv = []types.AppsListDataSummary{} } else { cv = *v } for _, value := range shape { var col types.AppsListDataSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentAppsListDataSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentAwsEc2InstanceViolation(v **types.AwsEc2InstanceViolation, 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.AwsEc2InstanceViolation if *v == nil { sv = &types.AwsEc2InstanceViolation{} } else { sv = *v } for key, value := range shape { switch key { case "AwsEc2NetworkInterfaceViolations": if err := awsAwsjson11_deserializeDocumentAwsEc2NetworkInterfaceViolations(&sv.AwsEc2NetworkInterfaceViolations, value); err != nil { return err } case "ViolationTarget": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ViolationTarget to be of type string, got %T instead", value) } sv.ViolationTarget = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAwsEc2NetworkInterfaceViolation(v **types.AwsEc2NetworkInterfaceViolation, 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.AwsEc2NetworkInterfaceViolation if *v == nil { sv = &types.AwsEc2NetworkInterfaceViolation{} } else { sv = *v } for key, value := range shape { switch key { case "ViolatingSecurityGroups": if err := awsAwsjson11_deserializeDocumentResourceIdList(&sv.ViolatingSecurityGroups, value); err != nil { return err } case "ViolationTarget": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ViolationTarget to be of type string, got %T instead", value) } sv.ViolationTarget = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentAwsEc2NetworkInterfaceViolations(v *[]types.AwsEc2NetworkInterfaceViolation, 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.AwsEc2NetworkInterfaceViolation if *v == nil { cv = []types.AwsEc2NetworkInterfaceViolation{} } else { cv = *v } for _, value := range shape { var col types.AwsEc2NetworkInterfaceViolation destAddr := &col if err := awsAwsjson11_deserializeDocumentAwsEc2NetworkInterfaceViolation(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentAwsVPCSecurityGroupViolation(v **types.AwsVPCSecurityGroupViolation, 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.AwsVPCSecurityGroupViolation if *v == nil { sv = &types.AwsVPCSecurityGroupViolation{} } else { sv = *v } for key, value := range shape { switch key { case "PartialMatches": if err := awsAwsjson11_deserializeDocumentPartialMatches(&sv.PartialMatches, value); err != nil { return err } case "PossibleSecurityGroupRemediationActions": if err := awsAwsjson11_deserializeDocumentSecurityGroupRemediationActions(&sv.PossibleSecurityGroupRemediationActions, value); err != nil { return err } case "ViolationTarget": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ViolationTarget to be of type string, got %T instead", value) } sv.ViolationTarget = ptr.String(jtv) } case "ViolationTargetDescription": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected LengthBoundedString to be of type string, got %T instead", value) } sv.ViolationTargetDescription = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentComplianceViolator(v **types.ComplianceViolator, 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.ComplianceViolator if *v == nil { sv = &types.ComplianceViolator{} } else { sv = *v } for key, value := range shape { switch key { case "ResourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } case "ResourceType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) } sv.ResourceType = ptr.String(jtv) } case "ViolationReason": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ViolationReason to be of type string, got %T instead", value) } sv.ViolationReason = types.ViolationReason(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentComplianceViolators(v *[]types.ComplianceViolator, 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.ComplianceViolator if *v == nil { cv = []types.ComplianceViolator{} } else { cv = *v } for _, value := range shape { var col types.ComplianceViolator destAddr := &col if err := awsAwsjson11_deserializeDocumentComplianceViolator(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentCustomerPolicyScopeIdList(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 CustomerPolicyScopeId to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentCustomerPolicyScopeMap(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 mapVar := parsedVal if err := awsAwsjson11_deserializeDocumentCustomerPolicyScopeIdList(&mapVar, value); err != nil { return err } parsedVal = mapVar mv[key] = parsedVal } *v = mv return nil } func awsAwsjson11_deserializeDocumentEvaluationResult(v **types.EvaluationResult, 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.EvaluationResult if *v == nil { sv = &types.EvaluationResult{} } else { sv = *v } for key, value := range shape { switch key { case "ComplianceStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PolicyComplianceStatusType to be of type string, got %T instead", value) } sv.ComplianceStatus = types.PolicyComplianceStatusType(jtv) } case "EvaluationLimitExceeded": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.EvaluationLimitExceeded = jtv } case "ViolatorCount": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ResourceCount to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ViolatorCount = i64 } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentEvaluationResults(v *[]types.EvaluationResult, 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.EvaluationResult if *v == nil { cv = []types.EvaluationResult{} } else { cv = *v } for _, value := range shape { var col types.EvaluationResult destAddr := &col if err := awsAwsjson11_deserializeDocumentEvaluationResult(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentInternalErrorException(v **types.InternalErrorException, 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.InternalErrorException if *v == nil { sv = &types.InternalErrorException{} } 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 ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidInputException(v **types.InvalidInputException, 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.InvalidInputException if *v == nil { sv = &types.InvalidInputException{} } 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 ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidOperationException(v **types.InvalidOperationException, 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.InvalidOperationException if *v == nil { sv = &types.InvalidOperationException{} } 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 ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidTypeException(v **types.InvalidTypeException, 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.InvalidTypeException if *v == nil { sv = &types.InvalidTypeException{} } 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 ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentIssueInfoMap(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 DetailedInfo to be of type string, got %T instead", value) } parsedVal = jtv } mv[key] = parsedVal } *v = mv 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 ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentMemberAccounts(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 AWSAccountId to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentNetworkFirewallActionList(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 NetworkFirewallAction to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentNetworkFirewallMissingExpectedRTViolation(v **types.NetworkFirewallMissingExpectedRTViolation, 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.NetworkFirewallMissingExpectedRTViolation if *v == nil { sv = &types.NetworkFirewallMissingExpectedRTViolation{} } else { sv = *v } for key, value := range shape { switch key { case "AvailabilityZone": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected LengthBoundedString to be of type string, got %T instead", value) } sv.AvailabilityZone = ptr.String(jtv) } case "CurrentRouteTable": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.CurrentRouteTable = ptr.String(jtv) } case "ExpectedRouteTable": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.ExpectedRouteTable = ptr.String(jtv) } case "ViolationTarget": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ViolationTarget to be of type string, got %T instead", value) } sv.ViolationTarget = ptr.String(jtv) } case "VPC": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.VPC = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentNetworkFirewallMissingFirewallViolation(v **types.NetworkFirewallMissingFirewallViolation, 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.NetworkFirewallMissingFirewallViolation if *v == nil { sv = &types.NetworkFirewallMissingFirewallViolation{} } else { sv = *v } for key, value := range shape { switch key { case "AvailabilityZone": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected LengthBoundedString to be of type string, got %T instead", value) } sv.AvailabilityZone = ptr.String(jtv) } case "TargetViolationReason": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TargetViolationReason to be of type string, got %T instead", value) } sv.TargetViolationReason = ptr.String(jtv) } case "ViolationTarget": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ViolationTarget to be of type string, got %T instead", value) } sv.ViolationTarget = ptr.String(jtv) } case "VPC": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.VPC = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentNetworkFirewallMissingSubnetViolation(v **types.NetworkFirewallMissingSubnetViolation, 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.NetworkFirewallMissingSubnetViolation if *v == nil { sv = &types.NetworkFirewallMissingSubnetViolation{} } else { sv = *v } for key, value := range shape { switch key { case "AvailabilityZone": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected LengthBoundedString to be of type string, got %T instead", value) } sv.AvailabilityZone = ptr.String(jtv) } case "TargetViolationReason": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TargetViolationReason to be of type string, got %T instead", value) } sv.TargetViolationReason = ptr.String(jtv) } case "ViolationTarget": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ViolationTarget to be of type string, got %T instead", value) } sv.ViolationTarget = ptr.String(jtv) } case "VPC": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.VPC = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentNetworkFirewallPolicyDescription(v **types.NetworkFirewallPolicyDescription, 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.NetworkFirewallPolicyDescription if *v == nil { sv = &types.NetworkFirewallPolicyDescription{} } else { sv = *v } for key, value := range shape { switch key { case "StatefulRuleGroups": if err := awsAwsjson11_deserializeDocumentStatefulRuleGroupList(&sv.StatefulRuleGroups, value); err != nil { return err } case "StatelessCustomActions": if err := awsAwsjson11_deserializeDocumentNetworkFirewallActionList(&sv.StatelessCustomActions, value); err != nil { return err } case "StatelessDefaultActions": if err := awsAwsjson11_deserializeDocumentNetworkFirewallActionList(&sv.StatelessDefaultActions, value); err != nil { return err } case "StatelessFragmentDefaultActions": if err := awsAwsjson11_deserializeDocumentNetworkFirewallActionList(&sv.StatelessFragmentDefaultActions, value); err != nil { return err } case "StatelessRuleGroups": if err := awsAwsjson11_deserializeDocumentStatelessRuleGroupList(&sv.StatelessRuleGroups, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentNetworkFirewallPolicyModifiedViolation(v **types.NetworkFirewallPolicyModifiedViolation, 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.NetworkFirewallPolicyModifiedViolation if *v == nil { sv = &types.NetworkFirewallPolicyModifiedViolation{} } else { sv = *v } for key, value := range shape { switch key { case "CurrentPolicyDescription": if err := awsAwsjson11_deserializeDocumentNetworkFirewallPolicyDescription(&sv.CurrentPolicyDescription, value); err != nil { return err } case "ExpectedPolicyDescription": if err := awsAwsjson11_deserializeDocumentNetworkFirewallPolicyDescription(&sv.ExpectedPolicyDescription, value); err != nil { return err } case "ViolationTarget": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ViolationTarget to be of type string, got %T instead", value) } sv.ViolationTarget = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPartialMatch(v **types.PartialMatch, 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.PartialMatch if *v == nil { sv = &types.PartialMatch{} } else { sv = *v } for key, value := range shape { switch key { case "Reference": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ReferenceRule to be of type string, got %T instead", value) } sv.Reference = ptr.String(jtv) } case "TargetViolationReasons": if err := awsAwsjson11_deserializeDocumentTargetViolationReasons(&sv.TargetViolationReasons, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPartialMatches(v *[]types.PartialMatch, 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.PartialMatch if *v == nil { cv = []types.PartialMatch{} } else { cv = *v } for _, value := range shape { var col types.PartialMatch destAddr := &col if err := awsAwsjson11_deserializeDocumentPartialMatch(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentPolicy(v **types.Policy, 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.Policy if *v == nil { sv = &types.Policy{} } else { sv = *v } for key, value := range shape { switch key { case "ExcludeMap": if err := awsAwsjson11_deserializeDocumentCustomerPolicyScopeMap(&sv.ExcludeMap, value); err != nil { return err } case "ExcludeResourceTags": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.ExcludeResourceTags = jtv } case "IncludeMap": if err := awsAwsjson11_deserializeDocumentCustomerPolicyScopeMap(&sv.IncludeMap, value); err != nil { return err } case "PolicyId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PolicyId to be of type string, got %T instead", value) } sv.PolicyId = ptr.String(jtv) } case "PolicyName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.PolicyName = ptr.String(jtv) } case "PolicyUpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PolicyUpdateToken to be of type string, got %T instead", value) } sv.PolicyUpdateToken = ptr.String(jtv) } case "RemediationEnabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.RemediationEnabled = jtv } case "ResourceTags": if err := awsAwsjson11_deserializeDocumentResourceTags(&sv.ResourceTags, value); err != nil { return err } case "ResourceType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) } sv.ResourceType = ptr.String(jtv) } case "ResourceTypeList": if err := awsAwsjson11_deserializeDocumentResourceTypeList(&sv.ResourceTypeList, value); err != nil { return err } case "SecurityServicePolicyData": if err := awsAwsjson11_deserializeDocumentSecurityServicePolicyData(&sv.SecurityServicePolicyData, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPolicyComplianceDetail(v **types.PolicyComplianceDetail, 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.PolicyComplianceDetail if *v == nil { sv = &types.PolicyComplianceDetail{} } else { sv = *v } for key, value := range shape { switch key { case "EvaluationLimitExceeded": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.EvaluationLimitExceeded = jtv } case "ExpiredAt": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected TimeStamp to be json.Number, got %T instead", value) } f64, err := jtv.Float64() if err != nil { return err } sv.ExpiredAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) } case "IssueInfoMap": if err := awsAwsjson11_deserializeDocumentIssueInfoMap(&sv.IssueInfoMap, value); err != nil { return err } case "MemberAccount": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AWSAccountId to be of type string, got %T instead", value) } sv.MemberAccount = ptr.String(jtv) } case "PolicyId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PolicyId to be of type string, got %T instead", value) } sv.PolicyId = ptr.String(jtv) } case "PolicyOwner": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AWSAccountId to be of type string, got %T instead", value) } sv.PolicyOwner = ptr.String(jtv) } case "Violators": if err := awsAwsjson11_deserializeDocumentComplianceViolators(&sv.Violators, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPolicyComplianceStatus(v **types.PolicyComplianceStatus, 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.PolicyComplianceStatus if *v == nil { sv = &types.PolicyComplianceStatus{} } else { sv = *v } for key, value := range shape { switch key { case "EvaluationResults": if err := awsAwsjson11_deserializeDocumentEvaluationResults(&sv.EvaluationResults, value); err != nil { return err } case "IssueInfoMap": if err := awsAwsjson11_deserializeDocumentIssueInfoMap(&sv.IssueInfoMap, value); err != nil { return err } case "LastUpdated": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected TimeStamp to be json.Number, got %T instead", value) } f64, err := jtv.Float64() if err != nil { return err } sv.LastUpdated = ptr.Time(smithytime.ParseEpochSeconds(f64)) } case "MemberAccount": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AWSAccountId to be of type string, got %T instead", value) } sv.MemberAccount = ptr.String(jtv) } case "PolicyId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PolicyId to be of type string, got %T instead", value) } sv.PolicyId = ptr.String(jtv) } case "PolicyName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.PolicyName = ptr.String(jtv) } case "PolicyOwner": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AWSAccountId to be of type string, got %T instead", value) } sv.PolicyOwner = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPolicyComplianceStatusList(v *[]types.PolicyComplianceStatus, 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.PolicyComplianceStatus if *v == nil { cv = []types.PolicyComplianceStatus{} } else { cv = *v } for _, value := range shape { var col types.PolicyComplianceStatus destAddr := &col if err := awsAwsjson11_deserializeDocumentPolicyComplianceStatus(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentPolicySummary(v **types.PolicySummary, 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.PolicySummary if *v == nil { sv = &types.PolicySummary{} } else { sv = *v } for key, value := range shape { switch key { case "PolicyArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.PolicyArn = ptr.String(jtv) } case "PolicyId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PolicyId to be of type string, got %T instead", value) } sv.PolicyId = ptr.String(jtv) } case "PolicyName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.PolicyName = ptr.String(jtv) } case "RemediationEnabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.RemediationEnabled = jtv } case "ResourceType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) } sv.ResourceType = ptr.String(jtv) } case "SecurityServiceType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SecurityServiceType to be of type string, got %T instead", value) } sv.SecurityServiceType = types.SecurityServiceType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPolicySummaryList(v *[]types.PolicySummary, 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.PolicySummary if *v == nil { cv = []types.PolicySummary{} } else { cv = *v } for _, value := range shape { var col types.PolicySummary destAddr := &col if err := awsAwsjson11_deserializeDocumentPolicySummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentPreviousAppsList(v *map[string][]types.App, 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.App if *v == nil { mv = map[string][]types.App{} } else { mv = *v } for key, value := range shape { var parsedVal []types.App mapVar := parsedVal if err := awsAwsjson11_deserializeDocumentAppsList(&mapVar, value); err != nil { return err } parsedVal = mapVar mv[key] = parsedVal } *v = mv return nil } func awsAwsjson11_deserializeDocumentPreviousProtocolsList(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 mapVar := parsedVal if err := awsAwsjson11_deserializeDocumentProtocolsList(&mapVar, value); err != nil { return err } parsedVal = mapVar mv[key] = parsedVal } *v = mv return nil } func awsAwsjson11_deserializeDocumentProtocolsList(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 Protocol to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentProtocolsListData(v **types.ProtocolsListData, 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.ProtocolsListData if *v == nil { sv = &types.ProtocolsListData{} } else { sv = *v } for key, value := range shape { switch key { case "CreateTime": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected TimeStamp to be json.Number, got %T instead", value) } f64, err := jtv.Float64() if err != nil { return err } sv.CreateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) } case "LastUpdateTime": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected TimeStamp to be json.Number, got %T instead", value) } f64, err := jtv.Float64() if err != nil { return err } sv.LastUpdateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) } case "ListId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ListId to be of type string, got %T instead", value) } sv.ListId = ptr.String(jtv) } case "ListName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ListName = ptr.String(jtv) } case "ListUpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.ListUpdateToken = ptr.String(jtv) } case "PreviousProtocolsList": if err := awsAwsjson11_deserializeDocumentPreviousProtocolsList(&sv.PreviousProtocolsList, value); err != nil { return err } case "ProtocolsList": if err := awsAwsjson11_deserializeDocumentProtocolsList(&sv.ProtocolsList, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentProtocolsListDataSummary(v **types.ProtocolsListDataSummary, 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.ProtocolsListDataSummary if *v == nil { sv = &types.ProtocolsListDataSummary{} } else { sv = *v } for key, value := range shape { switch key { case "ListArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.ListArn = ptr.String(jtv) } case "ListId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ListId to be of type string, got %T instead", value) } sv.ListId = ptr.String(jtv) } case "ListName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.ListName = ptr.String(jtv) } case "ProtocolsList": if err := awsAwsjson11_deserializeDocumentProtocolsList(&sv.ProtocolsList, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentProtocolsListsData(v *[]types.ProtocolsListDataSummary, 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.ProtocolsListDataSummary if *v == nil { cv = []types.ProtocolsListDataSummary{} } else { cv = *v } for _, value := range shape { var col types.ProtocolsListDataSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentProtocolsListDataSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentResourceIdList(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 ResourceId to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv 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 ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentResourceTag(v **types.ResourceTag, 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.ResourceTag if *v == nil { sv = &types.ResourceTag{} } 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 ResourceTagKey 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 ResourceTagValue to be of type string, got %T instead", value) } sv.Value = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentResourceTags(v *[]types.ResourceTag, 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.ResourceTag if *v == nil { cv = []types.ResourceTag{} } else { cv = *v } for _, value := range shape { var col types.ResourceTag destAddr := &col if err := awsAwsjson11_deserializeDocumentResourceTag(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentResourceTypeList(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 ResourceType to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentResourceViolation(v **types.ResourceViolation, 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.ResourceViolation if *v == nil { sv = &types.ResourceViolation{} } else { sv = *v } for key, value := range shape { switch key { case "AwsEc2InstanceViolation": if err := awsAwsjson11_deserializeDocumentAwsEc2InstanceViolation(&sv.AwsEc2InstanceViolation, value); err != nil { return err } case "AwsEc2NetworkInterfaceViolation": if err := awsAwsjson11_deserializeDocumentAwsEc2NetworkInterfaceViolation(&sv.AwsEc2NetworkInterfaceViolation, value); err != nil { return err } case "AwsVPCSecurityGroupViolation": if err := awsAwsjson11_deserializeDocumentAwsVPCSecurityGroupViolation(&sv.AwsVPCSecurityGroupViolation, value); err != nil { return err } case "NetworkFirewallMissingExpectedRTViolation": if err := awsAwsjson11_deserializeDocumentNetworkFirewallMissingExpectedRTViolation(&sv.NetworkFirewallMissingExpectedRTViolation, value); err != nil { return err } case "NetworkFirewallMissingFirewallViolation": if err := awsAwsjson11_deserializeDocumentNetworkFirewallMissingFirewallViolation(&sv.NetworkFirewallMissingFirewallViolation, value); err != nil { return err } case "NetworkFirewallMissingSubnetViolation": if err := awsAwsjson11_deserializeDocumentNetworkFirewallMissingSubnetViolation(&sv.NetworkFirewallMissingSubnetViolation, value); err != nil { return err } case "NetworkFirewallPolicyModifiedViolation": if err := awsAwsjson11_deserializeDocumentNetworkFirewallPolicyModifiedViolation(&sv.NetworkFirewallPolicyModifiedViolation, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentResourceViolations(v *[]types.ResourceViolation, 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.ResourceViolation if *v == nil { cv = []types.ResourceViolation{} } else { cv = *v } for _, value := range shape { var col types.ResourceViolation destAddr := &col if err := awsAwsjson11_deserializeDocumentResourceViolation(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentSecurityGroupRemediationAction(v **types.SecurityGroupRemediationAction, 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.SecurityGroupRemediationAction if *v == nil { sv = &types.SecurityGroupRemediationAction{} } 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 RemediationActionDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "IsDefaultAction": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.IsDefaultAction = jtv } case "RemediationActionType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RemediationActionType to be of type string, got %T instead", value) } sv.RemediationActionType = types.RemediationActionType(jtv) } case "RemediationResult": if err := awsAwsjson11_deserializeDocumentSecurityGroupRuleDescription(&sv.RemediationResult, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSecurityGroupRemediationActions(v *[]types.SecurityGroupRemediationAction, 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.SecurityGroupRemediationAction if *v == nil { cv = []types.SecurityGroupRemediationAction{} } else { cv = *v } for _, value := range shape { var col types.SecurityGroupRemediationAction destAddr := &col if err := awsAwsjson11_deserializeDocumentSecurityGroupRemediationAction(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentSecurityGroupRuleDescription(v **types.SecurityGroupRuleDescription, 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.SecurityGroupRuleDescription if *v == nil { sv = &types.SecurityGroupRuleDescription{} } else { sv = *v } for key, value := range shape { switch key { case "FromPort": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected IPPortNumber to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.FromPort = ptr.Int64(i64) } case "IPV4Range": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CIDR to be of type string, got %T instead", value) } sv.IPV4Range = ptr.String(jtv) } case "IPV6Range": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CIDR to be of type string, got %T instead", value) } sv.IPV6Range = ptr.String(jtv) } case "PrefixListId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.PrefixListId = ptr.String(jtv) } case "Protocol": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected LengthBoundedString to be of type string, got %T instead", value) } sv.Protocol = ptr.String(jtv) } case "ToPort": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected IPPortNumber to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ToPort = ptr.Int64(i64) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSecurityServicePolicyData(v **types.SecurityServicePolicyData, 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.SecurityServicePolicyData if *v == nil { sv = &types.SecurityServicePolicyData{} } else { sv = *v } for key, value := range shape { switch key { case "ManagedServiceData": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ManagedServiceData to be of type string, got %T instead", value) } sv.ManagedServiceData = ptr.String(jtv) } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SecurityServiceType to be of type string, got %T instead", value) } sv.Type = types.SecurityServiceType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentStatefulRuleGroup(v **types.StatefulRuleGroup, 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.StatefulRuleGroup if *v == nil { sv = &types.StatefulRuleGroup{} } else { sv = *v } for key, value := range shape { switch key { case "ResourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } case "RuleGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NetworkFirewallResourceName to be of type string, got %T instead", value) } sv.RuleGroupName = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentStatefulRuleGroupList(v *[]types.StatefulRuleGroup, 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.StatefulRuleGroup if *v == nil { cv = []types.StatefulRuleGroup{} } else { cv = *v } for _, value := range shape { var col types.StatefulRuleGroup destAddr := &col if err := awsAwsjson11_deserializeDocumentStatefulRuleGroup(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentStatelessRuleGroup(v **types.StatelessRuleGroup, 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.StatelessRuleGroup if *v == nil { sv = &types.StatelessRuleGroup{} } else { sv = *v } for key, value := range shape { switch key { case "Priority": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected StatelessRuleGroupPriority to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Priority = int32(i64) } case "ResourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } case "RuleGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NetworkFirewallResourceName to be of type string, got %T instead", value) } sv.RuleGroupName = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentStatelessRuleGroupList(v *[]types.StatelessRuleGroup, 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.StatelessRuleGroup if *v == nil { cv = []types.StatelessRuleGroup{} } else { cv = *v } for _, value := range shape { var col types.StatelessRuleGroup destAddr := &col if err := awsAwsjson11_deserializeDocumentStatelessRuleGroup(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv 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_deserializeDocumentTargetViolationReasons(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 TargetViolationReason to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentViolationDetail(v **types.ViolationDetail, 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.ViolationDetail if *v == nil { sv = &types.ViolationDetail{} } else { sv = *v } for key, value := range shape { switch key { case "MemberAccount": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AWSAccountId to be of type string, got %T instead", value) } sv.MemberAccount = ptr.String(jtv) } case "PolicyId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PolicyId to be of type string, got %T instead", value) } sv.PolicyId = ptr.String(jtv) } case "ResourceDescription": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected LengthBoundedString to be of type string, got %T instead", value) } sv.ResourceDescription = ptr.String(jtv) } case "ResourceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } case "ResourceTags": if err := awsAwsjson11_deserializeDocumentTagList(&sv.ResourceTags, value); err != nil { return err } case "ResourceType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) } sv.ResourceType = ptr.String(jtv) } case "ResourceViolations": if err := awsAwsjson11_deserializeDocumentResourceViolations(&sv.ResourceViolations, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetAdminAccountOutput(v **GetAdminAccountOutput, 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 *GetAdminAccountOutput if *v == nil { sv = &GetAdminAccountOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AdminAccount": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AWSAccountId to be of type string, got %T instead", value) } sv.AdminAccount = ptr.String(jtv) } case "RoleStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AccountRoleStatus to be of type string, got %T instead", value) } sv.RoleStatus = types.AccountRoleStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetAppsListOutput(v **GetAppsListOutput, 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 *GetAppsListOutput if *v == nil { sv = &GetAppsListOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AppsList": if err := awsAwsjson11_deserializeDocumentAppsListData(&sv.AppsList, value); err != nil { return err } case "AppsListArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.AppsListArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetComplianceDetailOutput(v **GetComplianceDetailOutput, 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 *GetComplianceDetailOutput if *v == nil { sv = &GetComplianceDetailOutput{} } else { sv = *v } for key, value := range shape { switch key { case "PolicyComplianceDetail": if err := awsAwsjson11_deserializeDocumentPolicyComplianceDetail(&sv.PolicyComplianceDetail, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetNotificationChannelOutput(v **GetNotificationChannelOutput, 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 *GetNotificationChannelOutput if *v == nil { sv = &GetNotificationChannelOutput{} } else { sv = *v } for key, value := range shape { switch key { case "SnsRoleName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.SnsRoleName = ptr.String(jtv) } case "SnsTopicArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.SnsTopicArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetPolicyOutput(v **GetPolicyOutput, 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 *GetPolicyOutput if *v == nil { sv = &GetPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Policy": if err := awsAwsjson11_deserializeDocumentPolicy(&sv.Policy, value); err != nil { return err } case "PolicyArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.PolicyArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetProtectionStatusOutput(v **GetProtectionStatusOutput, 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 *GetProtectionStatusOutput if *v == nil { sv = &GetProtectionStatusOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AdminAccountId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AWSAccountId to be of type string, got %T instead", value) } sv.AdminAccountId = ptr.String(jtv) } case "Data": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ProtectionData to be of type string, got %T instead", value) } sv.Data = ptr.String(jtv) } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "ServiceType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SecurityServiceType to be of type string, got %T instead", value) } sv.ServiceType = types.SecurityServiceType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetProtocolsListOutput(v **GetProtocolsListOutput, 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 *GetProtocolsListOutput if *v == nil { sv = &GetProtocolsListOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ProtocolsList": if err := awsAwsjson11_deserializeDocumentProtocolsListData(&sv.ProtocolsList, value); err != nil { return err } case "ProtocolsListArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.ProtocolsListArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentGetViolationDetailsOutput(v **GetViolationDetailsOutput, 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 *GetViolationDetailsOutput if *v == nil { sv = &GetViolationDetailsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ViolationDetail": if err := awsAwsjson11_deserializeDocumentViolationDetail(&sv.ViolationDetail, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListAppsListsOutput(v **ListAppsListsOutput, 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 *ListAppsListsOutput if *v == nil { sv = &ListAppsListsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AppsLists": if err := awsAwsjson11_deserializeDocumentAppsListsData(&sv.AppsLists, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListComplianceStatusOutput(v **ListComplianceStatusOutput, 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 *ListComplianceStatusOutput if *v == nil { sv = &ListComplianceStatusOutput{} } 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 PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "PolicyComplianceStatusList": if err := awsAwsjson11_deserializeDocumentPolicyComplianceStatusList(&sv.PolicyComplianceStatusList, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListMemberAccountsOutput(v **ListMemberAccountsOutput, 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 *ListMemberAccountsOutput if *v == nil { sv = &ListMemberAccountsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "MemberAccounts": if err := awsAwsjson11_deserializeDocumentMemberAccounts(&sv.MemberAccounts, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListPoliciesOutput(v **ListPoliciesOutput, 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 *ListPoliciesOutput if *v == nil { sv = &ListPoliciesOutput{} } 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 PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "PolicyList": if err := awsAwsjson11_deserializeDocumentPolicySummaryList(&sv.PolicyList, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListProtocolsListsOutput(v **ListProtocolsListsOutput, 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 *ListProtocolsListsOutput if *v == nil { sv = &ListProtocolsListsOutput{} } 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 PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "ProtocolsLists": if err := awsAwsjson11_deserializeDocumentProtocolsListsData(&sv.ProtocolsLists, 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 "TagList": if err := awsAwsjson11_deserializeDocumentTagList(&sv.TagList, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPutAppsListOutput(v **PutAppsListOutput, 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 *PutAppsListOutput if *v == nil { sv = &PutAppsListOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AppsList": if err := awsAwsjson11_deserializeDocumentAppsListData(&sv.AppsList, value); err != nil { return err } case "AppsListArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.AppsListArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPutPolicyOutput(v **PutPolicyOutput, 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 *PutPolicyOutput if *v == nil { sv = &PutPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Policy": if err := awsAwsjson11_deserializeDocumentPolicy(&sv.Policy, value); err != nil { return err } case "PolicyArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.PolicyArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentPutProtocolsListOutput(v **PutProtocolsListOutput, 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 *PutProtocolsListOutput if *v == nil { sv = &PutProtocolsListOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ProtocolsList": if err := awsAwsjson11_deserializeDocumentProtocolsListData(&sv.ProtocolsList, value); err != nil { return err } case "ProtocolsListArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.ProtocolsListArn = 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 }