66922 lines
1.6 MiB
66922 lines
1.6 MiB
// Code generated by smithy-go-codegen DO NOT EDIT.
|
|
|
|
package sagemaker
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
"encoding/json"
|
|
"fmt"
|
|
"github.com/aws/aws-sdk-go-v2/aws/protocol/restjson"
|
|
"github.com/aws/aws-sdk-go-v2/service/sagemaker/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"
|
|
"math"
|
|
"strings"
|
|
)
|
|
|
|
type awsAwsjson11_deserializeOpAddAssociation struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpAddAssociation) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpAddAssociation) 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_deserializeOpErrorAddAssociation(response, &metadata)
|
|
}
|
|
output := &AddAssociationOutput{}
|
|
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_deserializeOpDocumentAddAssociationOutput(&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_deserializeOpErrorAddAssociation(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpAddTags struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpAddTags) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpAddTags) 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_deserializeOpErrorAddTags(response, &metadata)
|
|
}
|
|
output := &AddTagsOutput{}
|
|
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_deserializeOpDocumentAddTagsOutput(&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_deserializeOpErrorAddTags(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpAssociateTrialComponent struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpAssociateTrialComponent) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpAssociateTrialComponent) 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_deserializeOpErrorAssociateTrialComponent(response, &metadata)
|
|
}
|
|
output := &AssociateTrialComponentOutput{}
|
|
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_deserializeOpDocumentAssociateTrialComponentOutput(&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_deserializeOpErrorAssociateTrialComponent(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpBatchDescribeModelPackage struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpBatchDescribeModelPackage) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpBatchDescribeModelPackage) 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_deserializeOpErrorBatchDescribeModelPackage(response, &metadata)
|
|
}
|
|
output := &BatchDescribeModelPackageOutput{}
|
|
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_deserializeOpDocumentBatchDescribeModelPackageOutput(&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_deserializeOpErrorBatchDescribeModelPackage(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateAction struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateAction) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateAction) 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_deserializeOpErrorCreateAction(response, &metadata)
|
|
}
|
|
output := &CreateActionOutput{}
|
|
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_deserializeOpDocumentCreateActionOutput(&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_deserializeOpErrorCreateAction(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateAlgorithm struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateAlgorithm) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateAlgorithm) 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_deserializeOpErrorCreateAlgorithm(response, &metadata)
|
|
}
|
|
output := &CreateAlgorithmOutput{}
|
|
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_deserializeOpDocumentCreateAlgorithmOutput(&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_deserializeOpErrorCreateAlgorithm(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateApp struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateApp) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateApp) 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_deserializeOpErrorCreateApp(response, &metadata)
|
|
}
|
|
output := &CreateAppOutput{}
|
|
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_deserializeOpDocumentCreateAppOutput(&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_deserializeOpErrorCreateApp(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateAppImageConfig struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateAppImageConfig) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateAppImageConfig) 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_deserializeOpErrorCreateAppImageConfig(response, &metadata)
|
|
}
|
|
output := &CreateAppImageConfigOutput{}
|
|
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_deserializeOpDocumentCreateAppImageConfigOutput(&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_deserializeOpErrorCreateAppImageConfig(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateArtifact struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateArtifact) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateArtifact) 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_deserializeOpErrorCreateArtifact(response, &metadata)
|
|
}
|
|
output := &CreateArtifactOutput{}
|
|
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_deserializeOpDocumentCreateArtifactOutput(&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_deserializeOpErrorCreateArtifact(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateAutoMLJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateAutoMLJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateAutoMLJob) 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_deserializeOpErrorCreateAutoMLJob(response, &metadata)
|
|
}
|
|
output := &CreateAutoMLJobOutput{}
|
|
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_deserializeOpDocumentCreateAutoMLJobOutput(&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_deserializeOpErrorCreateAutoMLJob(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateCodeRepository struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateCodeRepository) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateCodeRepository) 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_deserializeOpErrorCreateCodeRepository(response, &metadata)
|
|
}
|
|
output := &CreateCodeRepositoryOutput{}
|
|
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_deserializeOpDocumentCreateCodeRepositoryOutput(&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_deserializeOpErrorCreateCodeRepository(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateCompilationJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateCompilationJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateCompilationJob) 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_deserializeOpErrorCreateCompilationJob(response, &metadata)
|
|
}
|
|
output := &CreateCompilationJobOutput{}
|
|
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_deserializeOpDocumentCreateCompilationJobOutput(&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_deserializeOpErrorCreateCompilationJob(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateContext struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateContext) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateContext) 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_deserializeOpErrorCreateContext(response, &metadata)
|
|
}
|
|
output := &CreateContextOutput{}
|
|
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_deserializeOpDocumentCreateContextOutput(&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_deserializeOpErrorCreateContext(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateDataQualityJobDefinition struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateDataQualityJobDefinition) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateDataQualityJobDefinition) 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_deserializeOpErrorCreateDataQualityJobDefinition(response, &metadata)
|
|
}
|
|
output := &CreateDataQualityJobDefinitionOutput{}
|
|
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_deserializeOpDocumentCreateDataQualityJobDefinitionOutput(&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_deserializeOpErrorCreateDataQualityJobDefinition(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateDeviceFleet struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateDeviceFleet) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateDeviceFleet) 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_deserializeOpErrorCreateDeviceFleet(response, &metadata)
|
|
}
|
|
output := &CreateDeviceFleetOutput{}
|
|
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_deserializeOpErrorCreateDeviceFleet(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateDomain struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateDomain) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateDomain) 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_deserializeOpErrorCreateDomain(response, &metadata)
|
|
}
|
|
output := &CreateDomainOutput{}
|
|
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_deserializeOpDocumentCreateDomainOutput(&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_deserializeOpErrorCreateDomain(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateEdgePackagingJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateEdgePackagingJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateEdgePackagingJob) 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_deserializeOpErrorCreateEdgePackagingJob(response, &metadata)
|
|
}
|
|
output := &CreateEdgePackagingJobOutput{}
|
|
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_deserializeOpErrorCreateEdgePackagingJob(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateEndpoint struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateEndpoint) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateEndpoint) 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_deserializeOpErrorCreateEndpoint(response, &metadata)
|
|
}
|
|
output := &CreateEndpointOutput{}
|
|
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_deserializeOpDocumentCreateEndpointOutput(&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_deserializeOpErrorCreateEndpoint(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateEndpointConfig struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateEndpointConfig) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateEndpointConfig) 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_deserializeOpErrorCreateEndpointConfig(response, &metadata)
|
|
}
|
|
output := &CreateEndpointConfigOutput{}
|
|
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_deserializeOpDocumentCreateEndpointConfigOutput(&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_deserializeOpErrorCreateEndpointConfig(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateExperiment struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateExperiment) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateExperiment) 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_deserializeOpErrorCreateExperiment(response, &metadata)
|
|
}
|
|
output := &CreateExperimentOutput{}
|
|
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_deserializeOpDocumentCreateExperimentOutput(&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_deserializeOpErrorCreateExperiment(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateFeatureGroup struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateFeatureGroup) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateFeatureGroup) 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_deserializeOpErrorCreateFeatureGroup(response, &metadata)
|
|
}
|
|
output := &CreateFeatureGroupOutput{}
|
|
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_deserializeOpDocumentCreateFeatureGroupOutput(&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_deserializeOpErrorCreateFeatureGroup(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateFlowDefinition struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateFlowDefinition) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateFlowDefinition) 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_deserializeOpErrorCreateFlowDefinition(response, &metadata)
|
|
}
|
|
output := &CreateFlowDefinitionOutput{}
|
|
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_deserializeOpDocumentCreateFlowDefinitionOutput(&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_deserializeOpErrorCreateFlowDefinition(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateHumanTaskUi struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateHumanTaskUi) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateHumanTaskUi) 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_deserializeOpErrorCreateHumanTaskUi(response, &metadata)
|
|
}
|
|
output := &CreateHumanTaskUiOutput{}
|
|
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_deserializeOpDocumentCreateHumanTaskUiOutput(&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_deserializeOpErrorCreateHumanTaskUi(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateHyperParameterTuningJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateHyperParameterTuningJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateHyperParameterTuningJob) 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_deserializeOpErrorCreateHyperParameterTuningJob(response, &metadata)
|
|
}
|
|
output := &CreateHyperParameterTuningJobOutput{}
|
|
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_deserializeOpDocumentCreateHyperParameterTuningJobOutput(&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_deserializeOpErrorCreateHyperParameterTuningJob(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateImage struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateImage) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateImage) 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_deserializeOpErrorCreateImage(response, &metadata)
|
|
}
|
|
output := &CreateImageOutput{}
|
|
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_deserializeOpDocumentCreateImageOutput(&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_deserializeOpErrorCreateImage(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateImageVersion struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateImageVersion) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateImageVersion) 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_deserializeOpErrorCreateImageVersion(response, &metadata)
|
|
}
|
|
output := &CreateImageVersionOutput{}
|
|
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_deserializeOpDocumentCreateImageVersionOutput(&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_deserializeOpErrorCreateImageVersion(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateLabelingJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateLabelingJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateLabelingJob) 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_deserializeOpErrorCreateLabelingJob(response, &metadata)
|
|
}
|
|
output := &CreateLabelingJobOutput{}
|
|
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_deserializeOpDocumentCreateLabelingJobOutput(&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_deserializeOpErrorCreateLabelingJob(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateModel struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateModel) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateModel) 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_deserializeOpErrorCreateModel(response, &metadata)
|
|
}
|
|
output := &CreateModelOutput{}
|
|
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_deserializeOpDocumentCreateModelOutput(&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_deserializeOpErrorCreateModel(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateModelBiasJobDefinition struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateModelBiasJobDefinition) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateModelBiasJobDefinition) 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_deserializeOpErrorCreateModelBiasJobDefinition(response, &metadata)
|
|
}
|
|
output := &CreateModelBiasJobDefinitionOutput{}
|
|
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_deserializeOpDocumentCreateModelBiasJobDefinitionOutput(&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_deserializeOpErrorCreateModelBiasJobDefinition(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateModelExplainabilityJobDefinition struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateModelExplainabilityJobDefinition) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateModelExplainabilityJobDefinition) 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_deserializeOpErrorCreateModelExplainabilityJobDefinition(response, &metadata)
|
|
}
|
|
output := &CreateModelExplainabilityJobDefinitionOutput{}
|
|
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_deserializeOpDocumentCreateModelExplainabilityJobDefinitionOutput(&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_deserializeOpErrorCreateModelExplainabilityJobDefinition(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateModelPackage struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateModelPackage) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateModelPackage) 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_deserializeOpErrorCreateModelPackage(response, &metadata)
|
|
}
|
|
output := &CreateModelPackageOutput{}
|
|
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_deserializeOpDocumentCreateModelPackageOutput(&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_deserializeOpErrorCreateModelPackage(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ConflictException", errorCode):
|
|
return awsAwsjson11_deserializeErrorConflictException(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateModelPackageGroup struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateModelPackageGroup) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateModelPackageGroup) 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_deserializeOpErrorCreateModelPackageGroup(response, &metadata)
|
|
}
|
|
output := &CreateModelPackageGroupOutput{}
|
|
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_deserializeOpDocumentCreateModelPackageGroupOutput(&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_deserializeOpErrorCreateModelPackageGroup(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateModelQualityJobDefinition struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateModelQualityJobDefinition) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateModelQualityJobDefinition) 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_deserializeOpErrorCreateModelQualityJobDefinition(response, &metadata)
|
|
}
|
|
output := &CreateModelQualityJobDefinitionOutput{}
|
|
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_deserializeOpDocumentCreateModelQualityJobDefinitionOutput(&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_deserializeOpErrorCreateModelQualityJobDefinition(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateMonitoringSchedule struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateMonitoringSchedule) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateMonitoringSchedule) 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_deserializeOpErrorCreateMonitoringSchedule(response, &metadata)
|
|
}
|
|
output := &CreateMonitoringScheduleOutput{}
|
|
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_deserializeOpDocumentCreateMonitoringScheduleOutput(&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_deserializeOpErrorCreateMonitoringSchedule(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateNotebookInstance struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateNotebookInstance) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateNotebookInstance) 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_deserializeOpErrorCreateNotebookInstance(response, &metadata)
|
|
}
|
|
output := &CreateNotebookInstanceOutput{}
|
|
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_deserializeOpDocumentCreateNotebookInstanceOutput(&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_deserializeOpErrorCreateNotebookInstance(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateNotebookInstanceLifecycleConfig struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateNotebookInstanceLifecycleConfig) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateNotebookInstanceLifecycleConfig) 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_deserializeOpErrorCreateNotebookInstanceLifecycleConfig(response, &metadata)
|
|
}
|
|
output := &CreateNotebookInstanceLifecycleConfigOutput{}
|
|
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_deserializeOpDocumentCreateNotebookInstanceLifecycleConfigOutput(&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_deserializeOpErrorCreateNotebookInstanceLifecycleConfig(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreatePipeline struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreatePipeline) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreatePipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
|
|
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
|
|
) {
|
|
out, metadata, err = next.HandleDeserialize(ctx, in)
|
|
if err != nil {
|
|
return out, metadata, err
|
|
}
|
|
|
|
response, ok := out.RawResponse.(*smithyhttp.Response)
|
|
if !ok {
|
|
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
|
|
}
|
|
|
|
if response.StatusCode < 200 || response.StatusCode >= 300 {
|
|
return out, metadata, awsAwsjson11_deserializeOpErrorCreatePipeline(response, &metadata)
|
|
}
|
|
output := &CreatePipelineOutput{}
|
|
out.Result = output
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(response.Body, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
var shape interface{}
|
|
if err := decoder.Decode(&shape); err != nil && err != io.EOF {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return out, metadata, err
|
|
}
|
|
|
|
err = awsAwsjson11_deserializeOpDocumentCreatePipelineOutput(&output, shape)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return out, metadata, err
|
|
}
|
|
|
|
return out, metadata, err
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpErrorCreatePipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreatePresignedDomainUrl struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreatePresignedDomainUrl) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreatePresignedDomainUrl) 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_deserializeOpErrorCreatePresignedDomainUrl(response, &metadata)
|
|
}
|
|
output := &CreatePresignedDomainUrlOutput{}
|
|
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_deserializeOpDocumentCreatePresignedDomainUrlOutput(&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_deserializeOpErrorCreatePresignedDomainUrl(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreatePresignedNotebookInstanceUrl struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreatePresignedNotebookInstanceUrl) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreatePresignedNotebookInstanceUrl) 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_deserializeOpErrorCreatePresignedNotebookInstanceUrl(response, &metadata)
|
|
}
|
|
output := &CreatePresignedNotebookInstanceUrlOutput{}
|
|
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_deserializeOpDocumentCreatePresignedNotebookInstanceUrlOutput(&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_deserializeOpErrorCreatePresignedNotebookInstanceUrl(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateProcessingJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateProcessingJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateProcessingJob) 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_deserializeOpErrorCreateProcessingJob(response, &metadata)
|
|
}
|
|
output := &CreateProcessingJobOutput{}
|
|
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_deserializeOpDocumentCreateProcessingJobOutput(&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_deserializeOpErrorCreateProcessingJob(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateProject struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateProject) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateProject) 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_deserializeOpErrorCreateProject(response, &metadata)
|
|
}
|
|
output := &CreateProjectOutput{}
|
|
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_deserializeOpDocumentCreateProjectOutput(&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_deserializeOpErrorCreateProject(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateStudioLifecycleConfig struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateStudioLifecycleConfig) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateStudioLifecycleConfig) 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_deserializeOpErrorCreateStudioLifecycleConfig(response, &metadata)
|
|
}
|
|
output := &CreateStudioLifecycleConfigOutput{}
|
|
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_deserializeOpDocumentCreateStudioLifecycleConfigOutput(&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_deserializeOpErrorCreateStudioLifecycleConfig(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateTrainingJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateTrainingJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateTrainingJob) 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_deserializeOpErrorCreateTrainingJob(response, &metadata)
|
|
}
|
|
output := &CreateTrainingJobOutput{}
|
|
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_deserializeOpDocumentCreateTrainingJobOutput(&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_deserializeOpErrorCreateTrainingJob(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateTransformJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateTransformJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateTransformJob) 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_deserializeOpErrorCreateTransformJob(response, &metadata)
|
|
}
|
|
output := &CreateTransformJobOutput{}
|
|
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_deserializeOpDocumentCreateTransformJobOutput(&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_deserializeOpErrorCreateTransformJob(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateTrial struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateTrial) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateTrial) 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_deserializeOpErrorCreateTrial(response, &metadata)
|
|
}
|
|
output := &CreateTrialOutput{}
|
|
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_deserializeOpDocumentCreateTrialOutput(&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_deserializeOpErrorCreateTrial(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateTrialComponent struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateTrialComponent) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateTrialComponent) 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_deserializeOpErrorCreateTrialComponent(response, &metadata)
|
|
}
|
|
output := &CreateTrialComponentOutput{}
|
|
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_deserializeOpDocumentCreateTrialComponentOutput(&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_deserializeOpErrorCreateTrialComponent(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateUserProfile struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateUserProfile) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateUserProfile) 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_deserializeOpErrorCreateUserProfile(response, &metadata)
|
|
}
|
|
output := &CreateUserProfileOutput{}
|
|
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_deserializeOpDocumentCreateUserProfileOutput(&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_deserializeOpErrorCreateUserProfile(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateWorkforce struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateWorkforce) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateWorkforce) 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_deserializeOpErrorCreateWorkforce(response, &metadata)
|
|
}
|
|
output := &CreateWorkforceOutput{}
|
|
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_deserializeOpDocumentCreateWorkforceOutput(&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_deserializeOpErrorCreateWorkforce(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpCreateWorkteam struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpCreateWorkteam) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpCreateWorkteam) 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_deserializeOpErrorCreateWorkteam(response, &metadata)
|
|
}
|
|
output := &CreateWorkteamOutput{}
|
|
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_deserializeOpDocumentCreateWorkteamOutput(&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_deserializeOpErrorCreateWorkteam(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteAction struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteAction) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteAction) 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_deserializeOpErrorDeleteAction(response, &metadata)
|
|
}
|
|
output := &DeleteActionOutput{}
|
|
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_deserializeOpDocumentDeleteActionOutput(&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_deserializeOpErrorDeleteAction(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteAlgorithm struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteAlgorithm) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteAlgorithm) 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_deserializeOpErrorDeleteAlgorithm(response, &metadata)
|
|
}
|
|
output := &DeleteAlgorithmOutput{}
|
|
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_deserializeOpErrorDeleteAlgorithm(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteApp struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteApp) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteApp) 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_deserializeOpErrorDeleteApp(response, &metadata)
|
|
}
|
|
output := &DeleteAppOutput{}
|
|
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_deserializeOpErrorDeleteApp(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteAppImageConfig struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteAppImageConfig) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteAppImageConfig) 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_deserializeOpErrorDeleteAppImageConfig(response, &metadata)
|
|
}
|
|
output := &DeleteAppImageConfigOutput{}
|
|
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_deserializeOpErrorDeleteAppImageConfig(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteArtifact struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteArtifact) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteArtifact) 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_deserializeOpErrorDeleteArtifact(response, &metadata)
|
|
}
|
|
output := &DeleteArtifactOutput{}
|
|
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_deserializeOpDocumentDeleteArtifactOutput(&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_deserializeOpErrorDeleteArtifact(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteAssociation struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteAssociation) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteAssociation) 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_deserializeOpErrorDeleteAssociation(response, &metadata)
|
|
}
|
|
output := &DeleteAssociationOutput{}
|
|
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_deserializeOpDocumentDeleteAssociationOutput(&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_deserializeOpErrorDeleteAssociation(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteCodeRepository struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteCodeRepository) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteCodeRepository) 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_deserializeOpErrorDeleteCodeRepository(response, &metadata)
|
|
}
|
|
output := &DeleteCodeRepositoryOutput{}
|
|
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_deserializeOpErrorDeleteCodeRepository(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteContext struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteContext) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteContext) 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_deserializeOpErrorDeleteContext(response, &metadata)
|
|
}
|
|
output := &DeleteContextOutput{}
|
|
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_deserializeOpDocumentDeleteContextOutput(&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_deserializeOpErrorDeleteContext(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteDataQualityJobDefinition struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteDataQualityJobDefinition) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteDataQualityJobDefinition) 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_deserializeOpErrorDeleteDataQualityJobDefinition(response, &metadata)
|
|
}
|
|
output := &DeleteDataQualityJobDefinitionOutput{}
|
|
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_deserializeOpErrorDeleteDataQualityJobDefinition(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteDeviceFleet struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteDeviceFleet) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteDeviceFleet) 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_deserializeOpErrorDeleteDeviceFleet(response, &metadata)
|
|
}
|
|
output := &DeleteDeviceFleetOutput{}
|
|
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_deserializeOpErrorDeleteDeviceFleet(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteDomain struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteDomain) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteDomain) 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_deserializeOpErrorDeleteDomain(response, &metadata)
|
|
}
|
|
output := &DeleteDomainOutput{}
|
|
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_deserializeOpErrorDeleteDomain(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteEndpoint struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteEndpoint) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteEndpoint) 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_deserializeOpErrorDeleteEndpoint(response, &metadata)
|
|
}
|
|
output := &DeleteEndpointOutput{}
|
|
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_deserializeOpErrorDeleteEndpoint(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteEndpointConfig struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteEndpointConfig) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteEndpointConfig) 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_deserializeOpErrorDeleteEndpointConfig(response, &metadata)
|
|
}
|
|
output := &DeleteEndpointConfigOutput{}
|
|
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_deserializeOpErrorDeleteEndpointConfig(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteExperiment struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteExperiment) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteExperiment) 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_deserializeOpErrorDeleteExperiment(response, &metadata)
|
|
}
|
|
output := &DeleteExperimentOutput{}
|
|
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_deserializeOpDocumentDeleteExperimentOutput(&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_deserializeOpErrorDeleteExperiment(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteFeatureGroup struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteFeatureGroup) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteFeatureGroup) 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_deserializeOpErrorDeleteFeatureGroup(response, &metadata)
|
|
}
|
|
output := &DeleteFeatureGroupOutput{}
|
|
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_deserializeOpErrorDeleteFeatureGroup(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteFlowDefinition struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteFlowDefinition) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteFlowDefinition) 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_deserializeOpErrorDeleteFlowDefinition(response, &metadata)
|
|
}
|
|
output := &DeleteFlowDefinitionOutput{}
|
|
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_deserializeOpDocumentDeleteFlowDefinitionOutput(&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_deserializeOpErrorDeleteFlowDefinition(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteHumanTaskUi struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteHumanTaskUi) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteHumanTaskUi) 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_deserializeOpErrorDeleteHumanTaskUi(response, &metadata)
|
|
}
|
|
output := &DeleteHumanTaskUiOutput{}
|
|
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_deserializeOpDocumentDeleteHumanTaskUiOutput(&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_deserializeOpErrorDeleteHumanTaskUi(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteImage struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteImage) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteImage) 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_deserializeOpErrorDeleteImage(response, &metadata)
|
|
}
|
|
output := &DeleteImageOutput{}
|
|
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_deserializeOpDocumentDeleteImageOutput(&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_deserializeOpErrorDeleteImage(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteImageVersion struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteImageVersion) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteImageVersion) 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_deserializeOpErrorDeleteImageVersion(response, &metadata)
|
|
}
|
|
output := &DeleteImageVersionOutput{}
|
|
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_deserializeOpDocumentDeleteImageVersionOutput(&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_deserializeOpErrorDeleteImageVersion(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteModel struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteModel) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteModel) 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_deserializeOpErrorDeleteModel(response, &metadata)
|
|
}
|
|
output := &DeleteModelOutput{}
|
|
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_deserializeOpErrorDeleteModel(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteModelBiasJobDefinition struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteModelBiasJobDefinition) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteModelBiasJobDefinition) 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_deserializeOpErrorDeleteModelBiasJobDefinition(response, &metadata)
|
|
}
|
|
output := &DeleteModelBiasJobDefinitionOutput{}
|
|
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_deserializeOpErrorDeleteModelBiasJobDefinition(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteModelExplainabilityJobDefinition struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteModelExplainabilityJobDefinition) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteModelExplainabilityJobDefinition) 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_deserializeOpErrorDeleteModelExplainabilityJobDefinition(response, &metadata)
|
|
}
|
|
output := &DeleteModelExplainabilityJobDefinitionOutput{}
|
|
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_deserializeOpErrorDeleteModelExplainabilityJobDefinition(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteModelPackage struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteModelPackage) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteModelPackage) 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_deserializeOpErrorDeleteModelPackage(response, &metadata)
|
|
}
|
|
output := &DeleteModelPackageOutput{}
|
|
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_deserializeOpErrorDeleteModelPackage(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ConflictException", errorCode):
|
|
return awsAwsjson11_deserializeErrorConflictException(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteModelPackageGroup struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteModelPackageGroup) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteModelPackageGroup) 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_deserializeOpErrorDeleteModelPackageGroup(response, &metadata)
|
|
}
|
|
output := &DeleteModelPackageGroupOutput{}
|
|
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_deserializeOpErrorDeleteModelPackageGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ConflictException", errorCode):
|
|
return awsAwsjson11_deserializeErrorConflictException(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteModelPackageGroupPolicy struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteModelPackageGroupPolicy) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteModelPackageGroupPolicy) 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_deserializeOpErrorDeleteModelPackageGroupPolicy(response, &metadata)
|
|
}
|
|
output := &DeleteModelPackageGroupPolicyOutput{}
|
|
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_deserializeOpErrorDeleteModelPackageGroupPolicy(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteModelQualityJobDefinition struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteModelQualityJobDefinition) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteModelQualityJobDefinition) 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_deserializeOpErrorDeleteModelQualityJobDefinition(response, &metadata)
|
|
}
|
|
output := &DeleteModelQualityJobDefinitionOutput{}
|
|
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_deserializeOpErrorDeleteModelQualityJobDefinition(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteMonitoringSchedule struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteMonitoringSchedule) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteMonitoringSchedule) 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_deserializeOpErrorDeleteMonitoringSchedule(response, &metadata)
|
|
}
|
|
output := &DeleteMonitoringScheduleOutput{}
|
|
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_deserializeOpErrorDeleteMonitoringSchedule(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteNotebookInstance struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteNotebookInstance) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteNotebookInstance) 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_deserializeOpErrorDeleteNotebookInstance(response, &metadata)
|
|
}
|
|
output := &DeleteNotebookInstanceOutput{}
|
|
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_deserializeOpErrorDeleteNotebookInstance(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteNotebookInstanceLifecycleConfig struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteNotebookInstanceLifecycleConfig) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteNotebookInstanceLifecycleConfig) 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_deserializeOpErrorDeleteNotebookInstanceLifecycleConfig(response, &metadata)
|
|
}
|
|
output := &DeleteNotebookInstanceLifecycleConfigOutput{}
|
|
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_deserializeOpErrorDeleteNotebookInstanceLifecycleConfig(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeletePipeline struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeletePipeline) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeletePipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
|
|
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
|
|
) {
|
|
out, metadata, err = next.HandleDeserialize(ctx, in)
|
|
if err != nil {
|
|
return out, metadata, err
|
|
}
|
|
|
|
response, ok := out.RawResponse.(*smithyhttp.Response)
|
|
if !ok {
|
|
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
|
|
}
|
|
|
|
if response.StatusCode < 200 || response.StatusCode >= 300 {
|
|
return out, metadata, awsAwsjson11_deserializeOpErrorDeletePipeline(response, &metadata)
|
|
}
|
|
output := &DeletePipelineOutput{}
|
|
out.Result = output
|
|
|
|
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_deserializeOpDocumentDeletePipelineOutput(&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_deserializeOpErrorDeletePipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteProject struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteProject) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteProject) 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_deserializeOpErrorDeleteProject(response, &metadata)
|
|
}
|
|
output := &DeleteProjectOutput{}
|
|
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_deserializeOpErrorDeleteProject(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ConflictException", errorCode):
|
|
return awsAwsjson11_deserializeErrorConflictException(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteStudioLifecycleConfig struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteStudioLifecycleConfig) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteStudioLifecycleConfig) 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_deserializeOpErrorDeleteStudioLifecycleConfig(response, &metadata)
|
|
}
|
|
output := &DeleteStudioLifecycleConfigOutput{}
|
|
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_deserializeOpErrorDeleteStudioLifecycleConfig(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteTags struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteTags) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteTags) 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_deserializeOpErrorDeleteTags(response, &metadata)
|
|
}
|
|
output := &DeleteTagsOutput{}
|
|
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_deserializeOpDocumentDeleteTagsOutput(&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_deserializeOpErrorDeleteTags(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteTrial struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteTrial) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteTrial) 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_deserializeOpErrorDeleteTrial(response, &metadata)
|
|
}
|
|
output := &DeleteTrialOutput{}
|
|
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_deserializeOpDocumentDeleteTrialOutput(&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_deserializeOpErrorDeleteTrial(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteTrialComponent struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteTrialComponent) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteTrialComponent) 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_deserializeOpErrorDeleteTrialComponent(response, &metadata)
|
|
}
|
|
output := &DeleteTrialComponentOutput{}
|
|
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_deserializeOpDocumentDeleteTrialComponentOutput(&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_deserializeOpErrorDeleteTrialComponent(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteUserProfile struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteUserProfile) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteUserProfile) 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_deserializeOpErrorDeleteUserProfile(response, &metadata)
|
|
}
|
|
output := &DeleteUserProfileOutput{}
|
|
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_deserializeOpErrorDeleteUserProfile(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteWorkforce struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteWorkforce) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteWorkforce) 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_deserializeOpErrorDeleteWorkforce(response, &metadata)
|
|
}
|
|
output := &DeleteWorkforceOutput{}
|
|
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_deserializeOpDocumentDeleteWorkforceOutput(&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_deserializeOpErrorDeleteWorkforce(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeleteWorkteam struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeleteWorkteam) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeleteWorkteam) 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_deserializeOpErrorDeleteWorkteam(response, &metadata)
|
|
}
|
|
output := &DeleteWorkteamOutput{}
|
|
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_deserializeOpDocumentDeleteWorkteamOutput(&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_deserializeOpErrorDeleteWorkteam(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDeregisterDevices struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDeregisterDevices) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDeregisterDevices) 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_deserializeOpErrorDeregisterDevices(response, &metadata)
|
|
}
|
|
output := &DeregisterDevicesOutput{}
|
|
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_deserializeOpErrorDeregisterDevices(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeAction struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeAction) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeAction) 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_deserializeOpErrorDescribeAction(response, &metadata)
|
|
}
|
|
output := &DescribeActionOutput{}
|
|
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_deserializeOpDocumentDescribeActionOutput(&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_deserializeOpErrorDescribeAction(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeAlgorithm struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeAlgorithm) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeAlgorithm) 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_deserializeOpErrorDescribeAlgorithm(response, &metadata)
|
|
}
|
|
output := &DescribeAlgorithmOutput{}
|
|
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_deserializeOpDocumentDescribeAlgorithmOutput(&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_deserializeOpErrorDescribeAlgorithm(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeApp struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeApp) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeApp) 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_deserializeOpErrorDescribeApp(response, &metadata)
|
|
}
|
|
output := &DescribeAppOutput{}
|
|
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_deserializeOpDocumentDescribeAppOutput(&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_deserializeOpErrorDescribeApp(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeAppImageConfig struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeAppImageConfig) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeAppImageConfig) 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_deserializeOpErrorDescribeAppImageConfig(response, &metadata)
|
|
}
|
|
output := &DescribeAppImageConfigOutput{}
|
|
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_deserializeOpDocumentDescribeAppImageConfigOutput(&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_deserializeOpErrorDescribeAppImageConfig(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeArtifact struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeArtifact) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeArtifact) 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_deserializeOpErrorDescribeArtifact(response, &metadata)
|
|
}
|
|
output := &DescribeArtifactOutput{}
|
|
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_deserializeOpDocumentDescribeArtifactOutput(&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_deserializeOpErrorDescribeArtifact(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeAutoMLJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeAutoMLJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeAutoMLJob) 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_deserializeOpErrorDescribeAutoMLJob(response, &metadata)
|
|
}
|
|
output := &DescribeAutoMLJobOutput{}
|
|
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_deserializeOpDocumentDescribeAutoMLJobOutput(&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_deserializeOpErrorDescribeAutoMLJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeCodeRepository struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeCodeRepository) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeCodeRepository) 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_deserializeOpErrorDescribeCodeRepository(response, &metadata)
|
|
}
|
|
output := &DescribeCodeRepositoryOutput{}
|
|
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_deserializeOpDocumentDescribeCodeRepositoryOutput(&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_deserializeOpErrorDescribeCodeRepository(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeCompilationJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeCompilationJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeCompilationJob) 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_deserializeOpErrorDescribeCompilationJob(response, &metadata)
|
|
}
|
|
output := &DescribeCompilationJobOutput{}
|
|
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_deserializeOpDocumentDescribeCompilationJobOutput(&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_deserializeOpErrorDescribeCompilationJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeContext struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeContext) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeContext) 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_deserializeOpErrorDescribeContext(response, &metadata)
|
|
}
|
|
output := &DescribeContextOutput{}
|
|
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_deserializeOpDocumentDescribeContextOutput(&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_deserializeOpErrorDescribeContext(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeDataQualityJobDefinition struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeDataQualityJobDefinition) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeDataQualityJobDefinition) 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_deserializeOpErrorDescribeDataQualityJobDefinition(response, &metadata)
|
|
}
|
|
output := &DescribeDataQualityJobDefinitionOutput{}
|
|
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_deserializeOpDocumentDescribeDataQualityJobDefinitionOutput(&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_deserializeOpErrorDescribeDataQualityJobDefinition(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeDevice struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeDevice) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeDevice) 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_deserializeOpErrorDescribeDevice(response, &metadata)
|
|
}
|
|
output := &DescribeDeviceOutput{}
|
|
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_deserializeOpDocumentDescribeDeviceOutput(&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_deserializeOpErrorDescribeDevice(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeDeviceFleet struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeDeviceFleet) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeDeviceFleet) 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_deserializeOpErrorDescribeDeviceFleet(response, &metadata)
|
|
}
|
|
output := &DescribeDeviceFleetOutput{}
|
|
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_deserializeOpDocumentDescribeDeviceFleetOutput(&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_deserializeOpErrorDescribeDeviceFleet(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeDomain struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeDomain) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeDomain) 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_deserializeOpErrorDescribeDomain(response, &metadata)
|
|
}
|
|
output := &DescribeDomainOutput{}
|
|
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_deserializeOpDocumentDescribeDomainOutput(&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_deserializeOpErrorDescribeDomain(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeEdgePackagingJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeEdgePackagingJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeEdgePackagingJob) 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_deserializeOpErrorDescribeEdgePackagingJob(response, &metadata)
|
|
}
|
|
output := &DescribeEdgePackagingJobOutput{}
|
|
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_deserializeOpDocumentDescribeEdgePackagingJobOutput(&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_deserializeOpErrorDescribeEdgePackagingJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeEndpoint struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeEndpoint) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeEndpoint) 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_deserializeOpErrorDescribeEndpoint(response, &metadata)
|
|
}
|
|
output := &DescribeEndpointOutput{}
|
|
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_deserializeOpDocumentDescribeEndpointOutput(&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_deserializeOpErrorDescribeEndpoint(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeEndpointConfig struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeEndpointConfig) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeEndpointConfig) 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_deserializeOpErrorDescribeEndpointConfig(response, &metadata)
|
|
}
|
|
output := &DescribeEndpointConfigOutput{}
|
|
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_deserializeOpDocumentDescribeEndpointConfigOutput(&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_deserializeOpErrorDescribeEndpointConfig(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeExperiment struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeExperiment) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeExperiment) 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_deserializeOpErrorDescribeExperiment(response, &metadata)
|
|
}
|
|
output := &DescribeExperimentOutput{}
|
|
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_deserializeOpDocumentDescribeExperimentOutput(&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_deserializeOpErrorDescribeExperiment(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeFeatureGroup struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeFeatureGroup) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeFeatureGroup) 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_deserializeOpErrorDescribeFeatureGroup(response, &metadata)
|
|
}
|
|
output := &DescribeFeatureGroupOutput{}
|
|
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_deserializeOpDocumentDescribeFeatureGroupOutput(&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_deserializeOpErrorDescribeFeatureGroup(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeFlowDefinition struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeFlowDefinition) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeFlowDefinition) 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_deserializeOpErrorDescribeFlowDefinition(response, &metadata)
|
|
}
|
|
output := &DescribeFlowDefinitionOutput{}
|
|
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_deserializeOpDocumentDescribeFlowDefinitionOutput(&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_deserializeOpErrorDescribeFlowDefinition(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeHumanTaskUi struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeHumanTaskUi) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeHumanTaskUi) 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_deserializeOpErrorDescribeHumanTaskUi(response, &metadata)
|
|
}
|
|
output := &DescribeHumanTaskUiOutput{}
|
|
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_deserializeOpDocumentDescribeHumanTaskUiOutput(&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_deserializeOpErrorDescribeHumanTaskUi(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeHyperParameterTuningJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeHyperParameterTuningJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeHyperParameterTuningJob) 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_deserializeOpErrorDescribeHyperParameterTuningJob(response, &metadata)
|
|
}
|
|
output := &DescribeHyperParameterTuningJobOutput{}
|
|
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_deserializeOpDocumentDescribeHyperParameterTuningJobOutput(&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_deserializeOpErrorDescribeHyperParameterTuningJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeImage struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeImage) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeImage) 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_deserializeOpErrorDescribeImage(response, &metadata)
|
|
}
|
|
output := &DescribeImageOutput{}
|
|
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_deserializeOpDocumentDescribeImageOutput(&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_deserializeOpErrorDescribeImage(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeImageVersion struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeImageVersion) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeImageVersion) 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_deserializeOpErrorDescribeImageVersion(response, &metadata)
|
|
}
|
|
output := &DescribeImageVersionOutput{}
|
|
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_deserializeOpDocumentDescribeImageVersionOutput(&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_deserializeOpErrorDescribeImageVersion(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeLabelingJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeLabelingJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeLabelingJob) 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_deserializeOpErrorDescribeLabelingJob(response, &metadata)
|
|
}
|
|
output := &DescribeLabelingJobOutput{}
|
|
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_deserializeOpDocumentDescribeLabelingJobOutput(&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_deserializeOpErrorDescribeLabelingJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeModel struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeModel) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeModel) 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_deserializeOpErrorDescribeModel(response, &metadata)
|
|
}
|
|
output := &DescribeModelOutput{}
|
|
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_deserializeOpDocumentDescribeModelOutput(&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_deserializeOpErrorDescribeModel(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeModelBiasJobDefinition struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeModelBiasJobDefinition) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeModelBiasJobDefinition) 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_deserializeOpErrorDescribeModelBiasJobDefinition(response, &metadata)
|
|
}
|
|
output := &DescribeModelBiasJobDefinitionOutput{}
|
|
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_deserializeOpDocumentDescribeModelBiasJobDefinitionOutput(&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_deserializeOpErrorDescribeModelBiasJobDefinition(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeModelExplainabilityJobDefinition struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeModelExplainabilityJobDefinition) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeModelExplainabilityJobDefinition) 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_deserializeOpErrorDescribeModelExplainabilityJobDefinition(response, &metadata)
|
|
}
|
|
output := &DescribeModelExplainabilityJobDefinitionOutput{}
|
|
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_deserializeOpDocumentDescribeModelExplainabilityJobDefinitionOutput(&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_deserializeOpErrorDescribeModelExplainabilityJobDefinition(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeModelPackage struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeModelPackage) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeModelPackage) 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_deserializeOpErrorDescribeModelPackage(response, &metadata)
|
|
}
|
|
output := &DescribeModelPackageOutput{}
|
|
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_deserializeOpDocumentDescribeModelPackageOutput(&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_deserializeOpErrorDescribeModelPackage(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeModelPackageGroup struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeModelPackageGroup) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeModelPackageGroup) 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_deserializeOpErrorDescribeModelPackageGroup(response, &metadata)
|
|
}
|
|
output := &DescribeModelPackageGroupOutput{}
|
|
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_deserializeOpDocumentDescribeModelPackageGroupOutput(&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_deserializeOpErrorDescribeModelPackageGroup(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeModelQualityJobDefinition struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeModelQualityJobDefinition) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeModelQualityJobDefinition) 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_deserializeOpErrorDescribeModelQualityJobDefinition(response, &metadata)
|
|
}
|
|
output := &DescribeModelQualityJobDefinitionOutput{}
|
|
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_deserializeOpDocumentDescribeModelQualityJobDefinitionOutput(&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_deserializeOpErrorDescribeModelQualityJobDefinition(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeMonitoringSchedule struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeMonitoringSchedule) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeMonitoringSchedule) 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_deserializeOpErrorDescribeMonitoringSchedule(response, &metadata)
|
|
}
|
|
output := &DescribeMonitoringScheduleOutput{}
|
|
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_deserializeOpDocumentDescribeMonitoringScheduleOutput(&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_deserializeOpErrorDescribeMonitoringSchedule(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeNotebookInstance struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeNotebookInstance) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeNotebookInstance) 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_deserializeOpErrorDescribeNotebookInstance(response, &metadata)
|
|
}
|
|
output := &DescribeNotebookInstanceOutput{}
|
|
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_deserializeOpDocumentDescribeNotebookInstanceOutput(&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_deserializeOpErrorDescribeNotebookInstance(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeNotebookInstanceLifecycleConfig struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeNotebookInstanceLifecycleConfig) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeNotebookInstanceLifecycleConfig) 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_deserializeOpErrorDescribeNotebookInstanceLifecycleConfig(response, &metadata)
|
|
}
|
|
output := &DescribeNotebookInstanceLifecycleConfigOutput{}
|
|
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_deserializeOpDocumentDescribeNotebookInstanceLifecycleConfigOutput(&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_deserializeOpErrorDescribeNotebookInstanceLifecycleConfig(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribePipeline struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribePipeline) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribePipeline) 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_deserializeOpErrorDescribePipeline(response, &metadata)
|
|
}
|
|
output := &DescribePipelineOutput{}
|
|
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_deserializeOpDocumentDescribePipelineOutput(&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_deserializeOpErrorDescribePipeline(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribePipelineDefinitionForExecution struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribePipelineDefinitionForExecution) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribePipelineDefinitionForExecution) 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_deserializeOpErrorDescribePipelineDefinitionForExecution(response, &metadata)
|
|
}
|
|
output := &DescribePipelineDefinitionForExecutionOutput{}
|
|
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_deserializeOpDocumentDescribePipelineDefinitionForExecutionOutput(&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_deserializeOpErrorDescribePipelineDefinitionForExecution(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribePipelineExecution struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribePipelineExecution) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribePipelineExecution) 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_deserializeOpErrorDescribePipelineExecution(response, &metadata)
|
|
}
|
|
output := &DescribePipelineExecutionOutput{}
|
|
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_deserializeOpDocumentDescribePipelineExecutionOutput(&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_deserializeOpErrorDescribePipelineExecution(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeProcessingJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeProcessingJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeProcessingJob) 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_deserializeOpErrorDescribeProcessingJob(response, &metadata)
|
|
}
|
|
output := &DescribeProcessingJobOutput{}
|
|
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_deserializeOpDocumentDescribeProcessingJobOutput(&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_deserializeOpErrorDescribeProcessingJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeProject struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeProject) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeProject) 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_deserializeOpErrorDescribeProject(response, &metadata)
|
|
}
|
|
output := &DescribeProjectOutput{}
|
|
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_deserializeOpDocumentDescribeProjectOutput(&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_deserializeOpErrorDescribeProject(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeStudioLifecycleConfig struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeStudioLifecycleConfig) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeStudioLifecycleConfig) 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_deserializeOpErrorDescribeStudioLifecycleConfig(response, &metadata)
|
|
}
|
|
output := &DescribeStudioLifecycleConfigOutput{}
|
|
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_deserializeOpDocumentDescribeStudioLifecycleConfigOutput(&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_deserializeOpErrorDescribeStudioLifecycleConfig(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeSubscribedWorkteam struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeSubscribedWorkteam) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeSubscribedWorkteam) 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_deserializeOpErrorDescribeSubscribedWorkteam(response, &metadata)
|
|
}
|
|
output := &DescribeSubscribedWorkteamOutput{}
|
|
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_deserializeOpDocumentDescribeSubscribedWorkteamOutput(&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_deserializeOpErrorDescribeSubscribedWorkteam(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeTrainingJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeTrainingJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeTrainingJob) 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_deserializeOpErrorDescribeTrainingJob(response, &metadata)
|
|
}
|
|
output := &DescribeTrainingJobOutput{}
|
|
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_deserializeOpDocumentDescribeTrainingJobOutput(&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_deserializeOpErrorDescribeTrainingJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeTransformJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeTransformJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeTransformJob) 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_deserializeOpErrorDescribeTransformJob(response, &metadata)
|
|
}
|
|
output := &DescribeTransformJobOutput{}
|
|
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_deserializeOpDocumentDescribeTransformJobOutput(&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_deserializeOpErrorDescribeTransformJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeTrial struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeTrial) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeTrial) 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_deserializeOpErrorDescribeTrial(response, &metadata)
|
|
}
|
|
output := &DescribeTrialOutput{}
|
|
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_deserializeOpDocumentDescribeTrialOutput(&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_deserializeOpErrorDescribeTrial(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeTrialComponent struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeTrialComponent) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeTrialComponent) 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_deserializeOpErrorDescribeTrialComponent(response, &metadata)
|
|
}
|
|
output := &DescribeTrialComponentOutput{}
|
|
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_deserializeOpDocumentDescribeTrialComponentOutput(&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_deserializeOpErrorDescribeTrialComponent(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeUserProfile struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeUserProfile) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeUserProfile) 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_deserializeOpErrorDescribeUserProfile(response, &metadata)
|
|
}
|
|
output := &DescribeUserProfileOutput{}
|
|
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_deserializeOpDocumentDescribeUserProfileOutput(&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_deserializeOpErrorDescribeUserProfile(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeWorkforce struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeWorkforce) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeWorkforce) 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_deserializeOpErrorDescribeWorkforce(response, &metadata)
|
|
}
|
|
output := &DescribeWorkforceOutput{}
|
|
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_deserializeOpDocumentDescribeWorkforceOutput(&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_deserializeOpErrorDescribeWorkforce(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDescribeWorkteam struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDescribeWorkteam) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDescribeWorkteam) 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_deserializeOpErrorDescribeWorkteam(response, &metadata)
|
|
}
|
|
output := &DescribeWorkteamOutput{}
|
|
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_deserializeOpDocumentDescribeWorkteamOutput(&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_deserializeOpErrorDescribeWorkteam(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDisableSagemakerServicecatalogPortfolio struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDisableSagemakerServicecatalogPortfolio) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDisableSagemakerServicecatalogPortfolio) 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_deserializeOpErrorDisableSagemakerServicecatalogPortfolio(response, &metadata)
|
|
}
|
|
output := &DisableSagemakerServicecatalogPortfolioOutput{}
|
|
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_deserializeOpDocumentDisableSagemakerServicecatalogPortfolioOutput(&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_deserializeOpErrorDisableSagemakerServicecatalogPortfolio(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpDisassociateTrialComponent struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpDisassociateTrialComponent) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpDisassociateTrialComponent) 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_deserializeOpErrorDisassociateTrialComponent(response, &metadata)
|
|
}
|
|
output := &DisassociateTrialComponentOutput{}
|
|
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_deserializeOpDocumentDisassociateTrialComponentOutput(&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_deserializeOpErrorDisassociateTrialComponent(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpEnableSagemakerServicecatalogPortfolio struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpEnableSagemakerServicecatalogPortfolio) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpEnableSagemakerServicecatalogPortfolio) 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_deserializeOpErrorEnableSagemakerServicecatalogPortfolio(response, &metadata)
|
|
}
|
|
output := &EnableSagemakerServicecatalogPortfolioOutput{}
|
|
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_deserializeOpDocumentEnableSagemakerServicecatalogPortfolioOutput(&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_deserializeOpErrorEnableSagemakerServicecatalogPortfolio(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpGetDeviceFleetReport struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpGetDeviceFleetReport) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpGetDeviceFleetReport) 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_deserializeOpErrorGetDeviceFleetReport(response, &metadata)
|
|
}
|
|
output := &GetDeviceFleetReportOutput{}
|
|
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_deserializeOpDocumentGetDeviceFleetReportOutput(&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_deserializeOpErrorGetDeviceFleetReport(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpGetModelPackageGroupPolicy struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpGetModelPackageGroupPolicy) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpGetModelPackageGroupPolicy) 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_deserializeOpErrorGetModelPackageGroupPolicy(response, &metadata)
|
|
}
|
|
output := &GetModelPackageGroupPolicyOutput{}
|
|
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_deserializeOpDocumentGetModelPackageGroupPolicyOutput(&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_deserializeOpErrorGetModelPackageGroupPolicy(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpGetSagemakerServicecatalogPortfolioStatus struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpGetSagemakerServicecatalogPortfolioStatus) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpGetSagemakerServicecatalogPortfolioStatus) 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_deserializeOpErrorGetSagemakerServicecatalogPortfolioStatus(response, &metadata)
|
|
}
|
|
output := &GetSagemakerServicecatalogPortfolioStatusOutput{}
|
|
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_deserializeOpDocumentGetSagemakerServicecatalogPortfolioStatusOutput(&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_deserializeOpErrorGetSagemakerServicecatalogPortfolioStatus(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpGetSearchSuggestions struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpGetSearchSuggestions) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpGetSearchSuggestions) 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_deserializeOpErrorGetSearchSuggestions(response, &metadata)
|
|
}
|
|
output := &GetSearchSuggestionsOutput{}
|
|
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_deserializeOpDocumentGetSearchSuggestionsOutput(&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_deserializeOpErrorGetSearchSuggestions(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListActions struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListActions) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListActions) 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_deserializeOpErrorListActions(response, &metadata)
|
|
}
|
|
output := &ListActionsOutput{}
|
|
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_deserializeOpDocumentListActionsOutput(&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_deserializeOpErrorListActions(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListAlgorithms struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListAlgorithms) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListAlgorithms) 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_deserializeOpErrorListAlgorithms(response, &metadata)
|
|
}
|
|
output := &ListAlgorithmsOutput{}
|
|
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_deserializeOpDocumentListAlgorithmsOutput(&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_deserializeOpErrorListAlgorithms(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListAppImageConfigs struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListAppImageConfigs) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListAppImageConfigs) 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_deserializeOpErrorListAppImageConfigs(response, &metadata)
|
|
}
|
|
output := &ListAppImageConfigsOutput{}
|
|
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_deserializeOpDocumentListAppImageConfigsOutput(&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_deserializeOpErrorListAppImageConfigs(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListApps struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListApps) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListApps) 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_deserializeOpErrorListApps(response, &metadata)
|
|
}
|
|
output := &ListAppsOutput{}
|
|
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_deserializeOpDocumentListAppsOutput(&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_deserializeOpErrorListApps(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListArtifacts struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListArtifacts) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListArtifacts) 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_deserializeOpErrorListArtifacts(response, &metadata)
|
|
}
|
|
output := &ListArtifactsOutput{}
|
|
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_deserializeOpDocumentListArtifactsOutput(&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_deserializeOpErrorListArtifacts(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListAssociations struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListAssociations) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListAssociations) 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_deserializeOpErrorListAssociations(response, &metadata)
|
|
}
|
|
output := &ListAssociationsOutput{}
|
|
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_deserializeOpDocumentListAssociationsOutput(&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_deserializeOpErrorListAssociations(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListAutoMLJobs struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListAutoMLJobs) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListAutoMLJobs) 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_deserializeOpErrorListAutoMLJobs(response, &metadata)
|
|
}
|
|
output := &ListAutoMLJobsOutput{}
|
|
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_deserializeOpDocumentListAutoMLJobsOutput(&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_deserializeOpErrorListAutoMLJobs(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListCandidatesForAutoMLJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListCandidatesForAutoMLJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListCandidatesForAutoMLJob) 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_deserializeOpErrorListCandidatesForAutoMLJob(response, &metadata)
|
|
}
|
|
output := &ListCandidatesForAutoMLJobOutput{}
|
|
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_deserializeOpDocumentListCandidatesForAutoMLJobOutput(&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_deserializeOpErrorListCandidatesForAutoMLJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListCodeRepositories struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListCodeRepositories) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListCodeRepositories) 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_deserializeOpErrorListCodeRepositories(response, &metadata)
|
|
}
|
|
output := &ListCodeRepositoriesOutput{}
|
|
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_deserializeOpDocumentListCodeRepositoriesOutput(&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_deserializeOpErrorListCodeRepositories(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListCompilationJobs struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListCompilationJobs) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListCompilationJobs) 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_deserializeOpErrorListCompilationJobs(response, &metadata)
|
|
}
|
|
output := &ListCompilationJobsOutput{}
|
|
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_deserializeOpDocumentListCompilationJobsOutput(&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_deserializeOpErrorListCompilationJobs(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListContexts struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListContexts) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListContexts) 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_deserializeOpErrorListContexts(response, &metadata)
|
|
}
|
|
output := &ListContextsOutput{}
|
|
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_deserializeOpDocumentListContextsOutput(&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_deserializeOpErrorListContexts(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListDataQualityJobDefinitions struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListDataQualityJobDefinitions) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListDataQualityJobDefinitions) 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_deserializeOpErrorListDataQualityJobDefinitions(response, &metadata)
|
|
}
|
|
output := &ListDataQualityJobDefinitionsOutput{}
|
|
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_deserializeOpDocumentListDataQualityJobDefinitionsOutput(&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_deserializeOpErrorListDataQualityJobDefinitions(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListDeviceFleets struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListDeviceFleets) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListDeviceFleets) 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_deserializeOpErrorListDeviceFleets(response, &metadata)
|
|
}
|
|
output := &ListDeviceFleetsOutput{}
|
|
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_deserializeOpDocumentListDeviceFleetsOutput(&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_deserializeOpErrorListDeviceFleets(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListDevices struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListDevices) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListDevices) 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_deserializeOpErrorListDevices(response, &metadata)
|
|
}
|
|
output := &ListDevicesOutput{}
|
|
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_deserializeOpDocumentListDevicesOutput(&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_deserializeOpErrorListDevices(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListDomains struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListDomains) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListDomains) 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_deserializeOpErrorListDomains(response, &metadata)
|
|
}
|
|
output := &ListDomainsOutput{}
|
|
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_deserializeOpDocumentListDomainsOutput(&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_deserializeOpErrorListDomains(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListEdgePackagingJobs struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListEdgePackagingJobs) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListEdgePackagingJobs) 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_deserializeOpErrorListEdgePackagingJobs(response, &metadata)
|
|
}
|
|
output := &ListEdgePackagingJobsOutput{}
|
|
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_deserializeOpDocumentListEdgePackagingJobsOutput(&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_deserializeOpErrorListEdgePackagingJobs(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListEndpointConfigs struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListEndpointConfigs) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListEndpointConfigs) 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_deserializeOpErrorListEndpointConfigs(response, &metadata)
|
|
}
|
|
output := &ListEndpointConfigsOutput{}
|
|
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_deserializeOpDocumentListEndpointConfigsOutput(&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_deserializeOpErrorListEndpointConfigs(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListEndpoints struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListEndpoints) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListEndpoints) 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_deserializeOpErrorListEndpoints(response, &metadata)
|
|
}
|
|
output := &ListEndpointsOutput{}
|
|
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_deserializeOpDocumentListEndpointsOutput(&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_deserializeOpErrorListEndpoints(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListExperiments struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListExperiments) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListExperiments) 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_deserializeOpErrorListExperiments(response, &metadata)
|
|
}
|
|
output := &ListExperimentsOutput{}
|
|
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_deserializeOpDocumentListExperimentsOutput(&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_deserializeOpErrorListExperiments(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListFeatureGroups struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListFeatureGroups) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListFeatureGroups) 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_deserializeOpErrorListFeatureGroups(response, &metadata)
|
|
}
|
|
output := &ListFeatureGroupsOutput{}
|
|
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_deserializeOpDocumentListFeatureGroupsOutput(&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_deserializeOpErrorListFeatureGroups(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListFlowDefinitions struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListFlowDefinitions) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListFlowDefinitions) 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_deserializeOpErrorListFlowDefinitions(response, &metadata)
|
|
}
|
|
output := &ListFlowDefinitionsOutput{}
|
|
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_deserializeOpDocumentListFlowDefinitionsOutput(&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_deserializeOpErrorListFlowDefinitions(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListHumanTaskUis struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListHumanTaskUis) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListHumanTaskUis) 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_deserializeOpErrorListHumanTaskUis(response, &metadata)
|
|
}
|
|
output := &ListHumanTaskUisOutput{}
|
|
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_deserializeOpDocumentListHumanTaskUisOutput(&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_deserializeOpErrorListHumanTaskUis(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListHyperParameterTuningJobs struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListHyperParameterTuningJobs) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListHyperParameterTuningJobs) 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_deserializeOpErrorListHyperParameterTuningJobs(response, &metadata)
|
|
}
|
|
output := &ListHyperParameterTuningJobsOutput{}
|
|
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_deserializeOpDocumentListHyperParameterTuningJobsOutput(&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_deserializeOpErrorListHyperParameterTuningJobs(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListImages struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListImages) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListImages) 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_deserializeOpErrorListImages(response, &metadata)
|
|
}
|
|
output := &ListImagesOutput{}
|
|
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_deserializeOpDocumentListImagesOutput(&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_deserializeOpErrorListImages(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListImageVersions struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListImageVersions) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListImageVersions) 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_deserializeOpErrorListImageVersions(response, &metadata)
|
|
}
|
|
output := &ListImageVersionsOutput{}
|
|
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_deserializeOpDocumentListImageVersionsOutput(&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_deserializeOpErrorListImageVersions(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListLabelingJobs struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListLabelingJobs) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListLabelingJobs) 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_deserializeOpErrorListLabelingJobs(response, &metadata)
|
|
}
|
|
output := &ListLabelingJobsOutput{}
|
|
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_deserializeOpDocumentListLabelingJobsOutput(&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_deserializeOpErrorListLabelingJobs(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListLabelingJobsForWorkteam struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListLabelingJobsForWorkteam) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListLabelingJobsForWorkteam) 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_deserializeOpErrorListLabelingJobsForWorkteam(response, &metadata)
|
|
}
|
|
output := &ListLabelingJobsForWorkteamOutput{}
|
|
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_deserializeOpDocumentListLabelingJobsForWorkteamOutput(&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_deserializeOpErrorListLabelingJobsForWorkteam(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListModelBiasJobDefinitions struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListModelBiasJobDefinitions) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListModelBiasJobDefinitions) 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_deserializeOpErrorListModelBiasJobDefinitions(response, &metadata)
|
|
}
|
|
output := &ListModelBiasJobDefinitionsOutput{}
|
|
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_deserializeOpDocumentListModelBiasJobDefinitionsOutput(&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_deserializeOpErrorListModelBiasJobDefinitions(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListModelExplainabilityJobDefinitions struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListModelExplainabilityJobDefinitions) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListModelExplainabilityJobDefinitions) 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_deserializeOpErrorListModelExplainabilityJobDefinitions(response, &metadata)
|
|
}
|
|
output := &ListModelExplainabilityJobDefinitionsOutput{}
|
|
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_deserializeOpDocumentListModelExplainabilityJobDefinitionsOutput(&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_deserializeOpErrorListModelExplainabilityJobDefinitions(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListModelPackageGroups struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListModelPackageGroups) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListModelPackageGroups) 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_deserializeOpErrorListModelPackageGroups(response, &metadata)
|
|
}
|
|
output := &ListModelPackageGroupsOutput{}
|
|
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_deserializeOpDocumentListModelPackageGroupsOutput(&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_deserializeOpErrorListModelPackageGroups(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListModelPackages struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListModelPackages) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListModelPackages) 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_deserializeOpErrorListModelPackages(response, &metadata)
|
|
}
|
|
output := &ListModelPackagesOutput{}
|
|
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_deserializeOpDocumentListModelPackagesOutput(&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_deserializeOpErrorListModelPackages(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListModelQualityJobDefinitions struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListModelQualityJobDefinitions) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListModelQualityJobDefinitions) 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_deserializeOpErrorListModelQualityJobDefinitions(response, &metadata)
|
|
}
|
|
output := &ListModelQualityJobDefinitionsOutput{}
|
|
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_deserializeOpDocumentListModelQualityJobDefinitionsOutput(&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_deserializeOpErrorListModelQualityJobDefinitions(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListModels struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListModels) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListModels) 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_deserializeOpErrorListModels(response, &metadata)
|
|
}
|
|
output := &ListModelsOutput{}
|
|
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_deserializeOpDocumentListModelsOutput(&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_deserializeOpErrorListModels(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListMonitoringExecutions struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListMonitoringExecutions) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListMonitoringExecutions) 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_deserializeOpErrorListMonitoringExecutions(response, &metadata)
|
|
}
|
|
output := &ListMonitoringExecutionsOutput{}
|
|
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_deserializeOpDocumentListMonitoringExecutionsOutput(&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_deserializeOpErrorListMonitoringExecutions(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListMonitoringSchedules struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListMonitoringSchedules) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListMonitoringSchedules) 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_deserializeOpErrorListMonitoringSchedules(response, &metadata)
|
|
}
|
|
output := &ListMonitoringSchedulesOutput{}
|
|
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_deserializeOpDocumentListMonitoringSchedulesOutput(&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_deserializeOpErrorListMonitoringSchedules(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListNotebookInstanceLifecycleConfigs struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListNotebookInstanceLifecycleConfigs) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListNotebookInstanceLifecycleConfigs) 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_deserializeOpErrorListNotebookInstanceLifecycleConfigs(response, &metadata)
|
|
}
|
|
output := &ListNotebookInstanceLifecycleConfigsOutput{}
|
|
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_deserializeOpDocumentListNotebookInstanceLifecycleConfigsOutput(&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_deserializeOpErrorListNotebookInstanceLifecycleConfigs(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListNotebookInstances struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListNotebookInstances) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListNotebookInstances) 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_deserializeOpErrorListNotebookInstances(response, &metadata)
|
|
}
|
|
output := &ListNotebookInstancesOutput{}
|
|
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_deserializeOpDocumentListNotebookInstancesOutput(&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_deserializeOpErrorListNotebookInstances(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListPipelineExecutions struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListPipelineExecutions) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListPipelineExecutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
|
|
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
|
|
) {
|
|
out, metadata, err = next.HandleDeserialize(ctx, in)
|
|
if err != nil {
|
|
return out, metadata, err
|
|
}
|
|
|
|
response, ok := out.RawResponse.(*smithyhttp.Response)
|
|
if !ok {
|
|
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
|
|
}
|
|
|
|
if response.StatusCode < 200 || response.StatusCode >= 300 {
|
|
return out, metadata, awsAwsjson11_deserializeOpErrorListPipelineExecutions(response, &metadata)
|
|
}
|
|
output := &ListPipelineExecutionsOutput{}
|
|
out.Result = output
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(response.Body, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
var shape interface{}
|
|
if err := decoder.Decode(&shape); err != nil && err != io.EOF {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return out, metadata, err
|
|
}
|
|
|
|
err = awsAwsjson11_deserializeOpDocumentListPipelineExecutionsOutput(&output, shape)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return out, metadata, err
|
|
}
|
|
|
|
return out, metadata, err
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpErrorListPipelineExecutions(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListPipelineExecutionSteps struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListPipelineExecutionSteps) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListPipelineExecutionSteps) 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_deserializeOpErrorListPipelineExecutionSteps(response, &metadata)
|
|
}
|
|
output := &ListPipelineExecutionStepsOutput{}
|
|
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_deserializeOpDocumentListPipelineExecutionStepsOutput(&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_deserializeOpErrorListPipelineExecutionSteps(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListPipelineParametersForExecution struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListPipelineParametersForExecution) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListPipelineParametersForExecution) 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_deserializeOpErrorListPipelineParametersForExecution(response, &metadata)
|
|
}
|
|
output := &ListPipelineParametersForExecutionOutput{}
|
|
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_deserializeOpDocumentListPipelineParametersForExecutionOutput(&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_deserializeOpErrorListPipelineParametersForExecution(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListPipelines struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListPipelines) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListPipelines) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
|
|
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
|
|
) {
|
|
out, metadata, err = next.HandleDeserialize(ctx, in)
|
|
if err != nil {
|
|
return out, metadata, err
|
|
}
|
|
|
|
response, ok := out.RawResponse.(*smithyhttp.Response)
|
|
if !ok {
|
|
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
|
|
}
|
|
|
|
if response.StatusCode < 200 || response.StatusCode >= 300 {
|
|
return out, metadata, awsAwsjson11_deserializeOpErrorListPipelines(response, &metadata)
|
|
}
|
|
output := &ListPipelinesOutput{}
|
|
out.Result = output
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(response.Body, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
var shape interface{}
|
|
if err := decoder.Decode(&shape); err != nil && err != io.EOF {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return out, metadata, err
|
|
}
|
|
|
|
err = awsAwsjson11_deserializeOpDocumentListPipelinesOutput(&output, shape)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return out, metadata, err
|
|
}
|
|
|
|
return out, metadata, err
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpErrorListPipelines(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListProcessingJobs struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListProcessingJobs) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListProcessingJobs) 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_deserializeOpErrorListProcessingJobs(response, &metadata)
|
|
}
|
|
output := &ListProcessingJobsOutput{}
|
|
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_deserializeOpDocumentListProcessingJobsOutput(&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_deserializeOpErrorListProcessingJobs(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListProjects struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListProjects) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListProjects) 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_deserializeOpErrorListProjects(response, &metadata)
|
|
}
|
|
output := &ListProjectsOutput{}
|
|
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_deserializeOpDocumentListProjectsOutput(&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_deserializeOpErrorListProjects(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListStudioLifecycleConfigs struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListStudioLifecycleConfigs) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListStudioLifecycleConfigs) 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_deserializeOpErrorListStudioLifecycleConfigs(response, &metadata)
|
|
}
|
|
output := &ListStudioLifecycleConfigsOutput{}
|
|
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_deserializeOpDocumentListStudioLifecycleConfigsOutput(&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_deserializeOpErrorListStudioLifecycleConfigs(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListSubscribedWorkteams struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListSubscribedWorkteams) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListSubscribedWorkteams) 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_deserializeOpErrorListSubscribedWorkteams(response, &metadata)
|
|
}
|
|
output := &ListSubscribedWorkteamsOutput{}
|
|
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_deserializeOpDocumentListSubscribedWorkteamsOutput(&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_deserializeOpErrorListSubscribedWorkteams(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListTags struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListTags) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListTags) 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_deserializeOpErrorListTags(response, &metadata)
|
|
}
|
|
output := &ListTagsOutput{}
|
|
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_deserializeOpDocumentListTagsOutput(&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_deserializeOpErrorListTags(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListTrainingJobs struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListTrainingJobs) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListTrainingJobs) 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_deserializeOpErrorListTrainingJobs(response, &metadata)
|
|
}
|
|
output := &ListTrainingJobsOutput{}
|
|
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_deserializeOpDocumentListTrainingJobsOutput(&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_deserializeOpErrorListTrainingJobs(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListTrainingJobsForHyperParameterTuningJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListTrainingJobsForHyperParameterTuningJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListTrainingJobsForHyperParameterTuningJob) 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_deserializeOpErrorListTrainingJobsForHyperParameterTuningJob(response, &metadata)
|
|
}
|
|
output := &ListTrainingJobsForHyperParameterTuningJobOutput{}
|
|
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_deserializeOpDocumentListTrainingJobsForHyperParameterTuningJobOutput(&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_deserializeOpErrorListTrainingJobsForHyperParameterTuningJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListTransformJobs struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListTransformJobs) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListTransformJobs) 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_deserializeOpErrorListTransformJobs(response, &metadata)
|
|
}
|
|
output := &ListTransformJobsOutput{}
|
|
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_deserializeOpDocumentListTransformJobsOutput(&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_deserializeOpErrorListTransformJobs(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListTrialComponents struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListTrialComponents) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListTrialComponents) 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_deserializeOpErrorListTrialComponents(response, &metadata)
|
|
}
|
|
output := &ListTrialComponentsOutput{}
|
|
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_deserializeOpDocumentListTrialComponentsOutput(&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_deserializeOpErrorListTrialComponents(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListTrials struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListTrials) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListTrials) 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_deserializeOpErrorListTrials(response, &metadata)
|
|
}
|
|
output := &ListTrialsOutput{}
|
|
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_deserializeOpDocumentListTrialsOutput(&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_deserializeOpErrorListTrials(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListUserProfiles struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListUserProfiles) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListUserProfiles) 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_deserializeOpErrorListUserProfiles(response, &metadata)
|
|
}
|
|
output := &ListUserProfilesOutput{}
|
|
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_deserializeOpDocumentListUserProfilesOutput(&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_deserializeOpErrorListUserProfiles(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListWorkforces struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListWorkforces) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListWorkforces) 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_deserializeOpErrorListWorkforces(response, &metadata)
|
|
}
|
|
output := &ListWorkforcesOutput{}
|
|
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_deserializeOpDocumentListWorkforcesOutput(&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_deserializeOpErrorListWorkforces(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpListWorkteams struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpListWorkteams) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpListWorkteams) 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_deserializeOpErrorListWorkteams(response, &metadata)
|
|
}
|
|
output := &ListWorkteamsOutput{}
|
|
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_deserializeOpDocumentListWorkteamsOutput(&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_deserializeOpErrorListWorkteams(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpPutModelPackageGroupPolicy struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpPutModelPackageGroupPolicy) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpPutModelPackageGroupPolicy) 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_deserializeOpErrorPutModelPackageGroupPolicy(response, &metadata)
|
|
}
|
|
output := &PutModelPackageGroupPolicyOutput{}
|
|
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_deserializeOpDocumentPutModelPackageGroupPolicyOutput(&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_deserializeOpErrorPutModelPackageGroupPolicy(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpRegisterDevices struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpRegisterDevices) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpRegisterDevices) 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_deserializeOpErrorRegisterDevices(response, &metadata)
|
|
}
|
|
output := &RegisterDevicesOutput{}
|
|
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_deserializeOpErrorRegisterDevices(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpRenderUiTemplate struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpRenderUiTemplate) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpRenderUiTemplate) 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_deserializeOpErrorRenderUiTemplate(response, &metadata)
|
|
}
|
|
output := &RenderUiTemplateOutput{}
|
|
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_deserializeOpDocumentRenderUiTemplateOutput(&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_deserializeOpErrorRenderUiTemplate(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpRetryPipelineExecution struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpRetryPipelineExecution) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpRetryPipelineExecution) 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_deserializeOpErrorRetryPipelineExecution(response, &metadata)
|
|
}
|
|
output := &RetryPipelineExecutionOutput{}
|
|
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_deserializeOpDocumentRetryPipelineExecutionOutput(&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_deserializeOpErrorRetryPipelineExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ConflictException", errorCode):
|
|
return awsAwsjson11_deserializeErrorConflictException(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpSearch struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpSearch) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpSearch) 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_deserializeOpErrorSearch(response, &metadata)
|
|
}
|
|
output := &SearchOutput{}
|
|
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_deserializeOpDocumentSearchOutput(&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_deserializeOpErrorSearch(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpSendPipelineExecutionStepFailure struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpSendPipelineExecutionStepFailure) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpSendPipelineExecutionStepFailure) 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_deserializeOpErrorSendPipelineExecutionStepFailure(response, &metadata)
|
|
}
|
|
output := &SendPipelineExecutionStepFailureOutput{}
|
|
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_deserializeOpDocumentSendPipelineExecutionStepFailureOutput(&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_deserializeOpErrorSendPipelineExecutionStepFailure(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpSendPipelineExecutionStepSuccess struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpSendPipelineExecutionStepSuccess) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpSendPipelineExecutionStepSuccess) 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_deserializeOpErrorSendPipelineExecutionStepSuccess(response, &metadata)
|
|
}
|
|
output := &SendPipelineExecutionStepSuccessOutput{}
|
|
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_deserializeOpDocumentSendPipelineExecutionStepSuccessOutput(&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_deserializeOpErrorSendPipelineExecutionStepSuccess(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpStartMonitoringSchedule struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpStartMonitoringSchedule) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpStartMonitoringSchedule) 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_deserializeOpErrorStartMonitoringSchedule(response, &metadata)
|
|
}
|
|
output := &StartMonitoringScheduleOutput{}
|
|
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_deserializeOpErrorStartMonitoringSchedule(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpStartNotebookInstance struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpStartNotebookInstance) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpStartNotebookInstance) 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_deserializeOpErrorStartNotebookInstance(response, &metadata)
|
|
}
|
|
output := &StartNotebookInstanceOutput{}
|
|
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_deserializeOpErrorStartNotebookInstance(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpStartPipelineExecution struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpStartPipelineExecution) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpStartPipelineExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
|
|
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
|
|
) {
|
|
out, metadata, err = next.HandleDeserialize(ctx, in)
|
|
if err != nil {
|
|
return out, metadata, err
|
|
}
|
|
|
|
response, ok := out.RawResponse.(*smithyhttp.Response)
|
|
if !ok {
|
|
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
|
|
}
|
|
|
|
if response.StatusCode < 200 || response.StatusCode >= 300 {
|
|
return out, metadata, awsAwsjson11_deserializeOpErrorStartPipelineExecution(response, &metadata)
|
|
}
|
|
output := &StartPipelineExecutionOutput{}
|
|
out.Result = output
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(response.Body, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
var shape interface{}
|
|
if err := decoder.Decode(&shape); err != nil && err != io.EOF {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return out, metadata, err
|
|
}
|
|
|
|
err = awsAwsjson11_deserializeOpDocumentStartPipelineExecutionOutput(&output, shape)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return out, metadata, err
|
|
}
|
|
|
|
return out, metadata, err
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpErrorStartPipelineExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpStopAutoMLJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpStopAutoMLJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpStopAutoMLJob) 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_deserializeOpErrorStopAutoMLJob(response, &metadata)
|
|
}
|
|
output := &StopAutoMLJobOutput{}
|
|
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_deserializeOpErrorStopAutoMLJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpStopCompilationJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpStopCompilationJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpStopCompilationJob) 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_deserializeOpErrorStopCompilationJob(response, &metadata)
|
|
}
|
|
output := &StopCompilationJobOutput{}
|
|
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_deserializeOpErrorStopCompilationJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpStopEdgePackagingJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpStopEdgePackagingJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpStopEdgePackagingJob) 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_deserializeOpErrorStopEdgePackagingJob(response, &metadata)
|
|
}
|
|
output := &StopEdgePackagingJobOutput{}
|
|
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_deserializeOpErrorStopEdgePackagingJob(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpStopHyperParameterTuningJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpStopHyperParameterTuningJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpStopHyperParameterTuningJob) 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_deserializeOpErrorStopHyperParameterTuningJob(response, &metadata)
|
|
}
|
|
output := &StopHyperParameterTuningJobOutput{}
|
|
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_deserializeOpErrorStopHyperParameterTuningJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpStopLabelingJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpStopLabelingJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpStopLabelingJob) 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_deserializeOpErrorStopLabelingJob(response, &metadata)
|
|
}
|
|
output := &StopLabelingJobOutput{}
|
|
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_deserializeOpErrorStopLabelingJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpStopMonitoringSchedule struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpStopMonitoringSchedule) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpStopMonitoringSchedule) 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_deserializeOpErrorStopMonitoringSchedule(response, &metadata)
|
|
}
|
|
output := &StopMonitoringScheduleOutput{}
|
|
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_deserializeOpErrorStopMonitoringSchedule(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpStopNotebookInstance struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpStopNotebookInstance) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpStopNotebookInstance) 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_deserializeOpErrorStopNotebookInstance(response, &metadata)
|
|
}
|
|
output := &StopNotebookInstanceOutput{}
|
|
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_deserializeOpErrorStopNotebookInstance(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpStopPipelineExecution struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpStopPipelineExecution) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpStopPipelineExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
|
|
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
|
|
) {
|
|
out, metadata, err = next.HandleDeserialize(ctx, in)
|
|
if err != nil {
|
|
return out, metadata, err
|
|
}
|
|
|
|
response, ok := out.RawResponse.(*smithyhttp.Response)
|
|
if !ok {
|
|
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
|
|
}
|
|
|
|
if response.StatusCode < 200 || response.StatusCode >= 300 {
|
|
return out, metadata, awsAwsjson11_deserializeOpErrorStopPipelineExecution(response, &metadata)
|
|
}
|
|
output := &StopPipelineExecutionOutput{}
|
|
out.Result = output
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(response.Body, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
var shape interface{}
|
|
if err := decoder.Decode(&shape); err != nil && err != io.EOF {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return out, metadata, err
|
|
}
|
|
|
|
err = awsAwsjson11_deserializeOpDocumentStopPipelineExecutionOutput(&output, shape)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return out, metadata, err
|
|
}
|
|
|
|
return out, metadata, err
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpErrorStopPipelineExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpStopProcessingJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpStopProcessingJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpStopProcessingJob) 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_deserializeOpErrorStopProcessingJob(response, &metadata)
|
|
}
|
|
output := &StopProcessingJobOutput{}
|
|
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_deserializeOpErrorStopProcessingJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpStopTrainingJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpStopTrainingJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpStopTrainingJob) 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_deserializeOpErrorStopTrainingJob(response, &metadata)
|
|
}
|
|
output := &StopTrainingJobOutput{}
|
|
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_deserializeOpErrorStopTrainingJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpStopTransformJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpStopTransformJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpStopTransformJob) 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_deserializeOpErrorStopTransformJob(response, &metadata)
|
|
}
|
|
output := &StopTransformJobOutput{}
|
|
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_deserializeOpErrorStopTransformJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateAction struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateAction) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateAction) 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_deserializeOpErrorUpdateAction(response, &metadata)
|
|
}
|
|
output := &UpdateActionOutput{}
|
|
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_deserializeOpDocumentUpdateActionOutput(&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_deserializeOpErrorUpdateAction(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ConflictException", errorCode):
|
|
return awsAwsjson11_deserializeErrorConflictException(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateAppImageConfig struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateAppImageConfig) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateAppImageConfig) 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_deserializeOpErrorUpdateAppImageConfig(response, &metadata)
|
|
}
|
|
output := &UpdateAppImageConfigOutput{}
|
|
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_deserializeOpDocumentUpdateAppImageConfigOutput(&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_deserializeOpErrorUpdateAppImageConfig(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateArtifact struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateArtifact) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateArtifact) 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_deserializeOpErrorUpdateArtifact(response, &metadata)
|
|
}
|
|
output := &UpdateArtifactOutput{}
|
|
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_deserializeOpDocumentUpdateArtifactOutput(&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_deserializeOpErrorUpdateArtifact(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ConflictException", errorCode):
|
|
return awsAwsjson11_deserializeErrorConflictException(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateCodeRepository struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateCodeRepository) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateCodeRepository) 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_deserializeOpErrorUpdateCodeRepository(response, &metadata)
|
|
}
|
|
output := &UpdateCodeRepositoryOutput{}
|
|
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_deserializeOpDocumentUpdateCodeRepositoryOutput(&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_deserializeOpErrorUpdateCodeRepository(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateContext struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateContext) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateContext) 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_deserializeOpErrorUpdateContext(response, &metadata)
|
|
}
|
|
output := &UpdateContextOutput{}
|
|
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_deserializeOpDocumentUpdateContextOutput(&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_deserializeOpErrorUpdateContext(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ConflictException", errorCode):
|
|
return awsAwsjson11_deserializeErrorConflictException(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateDeviceFleet struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateDeviceFleet) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateDeviceFleet) 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_deserializeOpErrorUpdateDeviceFleet(response, &metadata)
|
|
}
|
|
output := &UpdateDeviceFleetOutput{}
|
|
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_deserializeOpErrorUpdateDeviceFleet(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateDevices struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateDevices) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateDevices) 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_deserializeOpErrorUpdateDevices(response, &metadata)
|
|
}
|
|
output := &UpdateDevicesOutput{}
|
|
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_deserializeOpErrorUpdateDevices(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateDomain struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateDomain) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateDomain) 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_deserializeOpErrorUpdateDomain(response, &metadata)
|
|
}
|
|
output := &UpdateDomainOutput{}
|
|
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_deserializeOpDocumentUpdateDomainOutput(&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_deserializeOpErrorUpdateDomain(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateEndpoint struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateEndpoint) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateEndpoint) 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_deserializeOpErrorUpdateEndpoint(response, &metadata)
|
|
}
|
|
output := &UpdateEndpointOutput{}
|
|
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_deserializeOpDocumentUpdateEndpointOutput(&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_deserializeOpErrorUpdateEndpoint(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateEndpointWeightsAndCapacities struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateEndpointWeightsAndCapacities) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateEndpointWeightsAndCapacities) 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_deserializeOpErrorUpdateEndpointWeightsAndCapacities(response, &metadata)
|
|
}
|
|
output := &UpdateEndpointWeightsAndCapacitiesOutput{}
|
|
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_deserializeOpDocumentUpdateEndpointWeightsAndCapacitiesOutput(&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_deserializeOpErrorUpdateEndpointWeightsAndCapacities(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateExperiment struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateExperiment) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateExperiment) 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_deserializeOpErrorUpdateExperiment(response, &metadata)
|
|
}
|
|
output := &UpdateExperimentOutput{}
|
|
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_deserializeOpDocumentUpdateExperimentOutput(&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_deserializeOpErrorUpdateExperiment(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ConflictException", errorCode):
|
|
return awsAwsjson11_deserializeErrorConflictException(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateImage struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateImage) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateImage) 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_deserializeOpErrorUpdateImage(response, &metadata)
|
|
}
|
|
output := &UpdateImageOutput{}
|
|
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_deserializeOpDocumentUpdateImageOutput(&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_deserializeOpErrorUpdateImage(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateModelPackage struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateModelPackage) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateModelPackage) 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_deserializeOpErrorUpdateModelPackage(response, &metadata)
|
|
}
|
|
output := &UpdateModelPackageOutput{}
|
|
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_deserializeOpDocumentUpdateModelPackageOutput(&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_deserializeOpErrorUpdateModelPackage(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateMonitoringSchedule struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateMonitoringSchedule) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateMonitoringSchedule) 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_deserializeOpErrorUpdateMonitoringSchedule(response, &metadata)
|
|
}
|
|
output := &UpdateMonitoringScheduleOutput{}
|
|
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_deserializeOpDocumentUpdateMonitoringScheduleOutput(&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_deserializeOpErrorUpdateMonitoringSchedule(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateNotebookInstance struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateNotebookInstance) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateNotebookInstance) 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_deserializeOpErrorUpdateNotebookInstance(response, &metadata)
|
|
}
|
|
output := &UpdateNotebookInstanceOutput{}
|
|
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_deserializeOpDocumentUpdateNotebookInstanceOutput(&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_deserializeOpErrorUpdateNotebookInstance(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateNotebookInstanceLifecycleConfig struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateNotebookInstanceLifecycleConfig) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateNotebookInstanceLifecycleConfig) 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_deserializeOpErrorUpdateNotebookInstanceLifecycleConfig(response, &metadata)
|
|
}
|
|
output := &UpdateNotebookInstanceLifecycleConfigOutput{}
|
|
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_deserializeOpDocumentUpdateNotebookInstanceLifecycleConfigOutput(&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_deserializeOpErrorUpdateNotebookInstanceLifecycleConfig(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdatePipeline struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdatePipeline) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdatePipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
|
|
out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
|
|
) {
|
|
out, metadata, err = next.HandleDeserialize(ctx, in)
|
|
if err != nil {
|
|
return out, metadata, err
|
|
}
|
|
|
|
response, ok := out.RawResponse.(*smithyhttp.Response)
|
|
if !ok {
|
|
return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
|
|
}
|
|
|
|
if response.StatusCode < 200 || response.StatusCode >= 300 {
|
|
return out, metadata, awsAwsjson11_deserializeOpErrorUpdatePipeline(response, &metadata)
|
|
}
|
|
output := &UpdatePipelineOutput{}
|
|
out.Result = output
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(response.Body, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
var shape interface{}
|
|
if err := decoder.Decode(&shape); err != nil && err != io.EOF {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return out, metadata, err
|
|
}
|
|
|
|
err = awsAwsjson11_deserializeOpDocumentUpdatePipelineOutput(&output, shape)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return out, metadata, err
|
|
}
|
|
|
|
return out, metadata, err
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpErrorUpdatePipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdatePipelineExecution struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdatePipelineExecution) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdatePipelineExecution) 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_deserializeOpErrorUpdatePipelineExecution(response, &metadata)
|
|
}
|
|
output := &UpdatePipelineExecutionOutput{}
|
|
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_deserializeOpDocumentUpdatePipelineExecutionOutput(&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_deserializeOpErrorUpdatePipelineExecution(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateProject struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateProject) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateProject) 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_deserializeOpErrorUpdateProject(response, &metadata)
|
|
}
|
|
output := &UpdateProjectOutput{}
|
|
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_deserializeOpDocumentUpdateProjectOutput(&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_deserializeOpErrorUpdateProject(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateTrainingJob struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateTrainingJob) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateTrainingJob) 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_deserializeOpErrorUpdateTrainingJob(response, &metadata)
|
|
}
|
|
output := &UpdateTrainingJobOutput{}
|
|
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_deserializeOpDocumentUpdateTrainingJobOutput(&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_deserializeOpErrorUpdateTrainingJob(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("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateTrial struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateTrial) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateTrial) 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_deserializeOpErrorUpdateTrial(response, &metadata)
|
|
}
|
|
output := &UpdateTrialOutput{}
|
|
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_deserializeOpDocumentUpdateTrialOutput(&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_deserializeOpErrorUpdateTrial(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ConflictException", errorCode):
|
|
return awsAwsjson11_deserializeErrorConflictException(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateTrialComponent struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateTrialComponent) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateTrialComponent) 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_deserializeOpErrorUpdateTrialComponent(response, &metadata)
|
|
}
|
|
output := &UpdateTrialComponentOutput{}
|
|
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_deserializeOpDocumentUpdateTrialComponentOutput(&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_deserializeOpErrorUpdateTrialComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error {
|
|
var errorBuffer bytes.Buffer
|
|
if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
|
|
return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
|
|
}
|
|
errorBody := bytes.NewReader(errorBuffer.Bytes())
|
|
|
|
errorCode := "UnknownError"
|
|
errorMessage := errorCode
|
|
|
|
code := response.Header.Get("X-Amzn-ErrorType")
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
code, message, err := restjson.GetErrorInfo(decoder)
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
if len(code) != 0 {
|
|
errorCode = restjson.SanitizeErrorCode(code)
|
|
}
|
|
if len(message) != 0 {
|
|
errorMessage = message
|
|
}
|
|
|
|
switch {
|
|
case strings.EqualFold("ConflictException", errorCode):
|
|
return awsAwsjson11_deserializeErrorConflictException(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateUserProfile struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateUserProfile) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateUserProfile) 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_deserializeOpErrorUpdateUserProfile(response, &metadata)
|
|
}
|
|
output := &UpdateUserProfileOutput{}
|
|
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_deserializeOpDocumentUpdateUserProfileOutput(&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_deserializeOpErrorUpdateUserProfile(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("ResourceInUse", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceInUse(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
case strings.EqualFold("ResourceNotFound", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceNotFound(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateWorkforce struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateWorkforce) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateWorkforce) 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_deserializeOpErrorUpdateWorkforce(response, &metadata)
|
|
}
|
|
output := &UpdateWorkforceOutput{}
|
|
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_deserializeOpDocumentUpdateWorkforceOutput(&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_deserializeOpErrorUpdateWorkforce(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 {
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
type awsAwsjson11_deserializeOpUpdateWorkteam struct {
|
|
}
|
|
|
|
func (*awsAwsjson11_deserializeOpUpdateWorkteam) ID() string {
|
|
return "OperationDeserializer"
|
|
}
|
|
|
|
func (m *awsAwsjson11_deserializeOpUpdateWorkteam) 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_deserializeOpErrorUpdateWorkteam(response, &metadata)
|
|
}
|
|
output := &UpdateWorkteamOutput{}
|
|
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_deserializeOpDocumentUpdateWorkteamOutput(&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_deserializeOpErrorUpdateWorkteam(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("ResourceLimitExceeded", errorCode):
|
|
return awsAwsjson11_deserializeErrorResourceLimitExceeded(response, errorBody)
|
|
|
|
default:
|
|
genericError := &smithy.GenericAPIError{
|
|
Code: errorCode,
|
|
Message: errorMessage,
|
|
}
|
|
return genericError
|
|
|
|
}
|
|
}
|
|
|
|
func awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
|
|
var buff [1024]byte
|
|
ringBuffer := smithyio.NewRingBuffer(buff[:])
|
|
|
|
body := io.TeeReader(errorBody, ringBuffer)
|
|
decoder := json.NewDecoder(body)
|
|
decoder.UseNumber()
|
|
var shape interface{}
|
|
if err := decoder.Decode(&shape); err != nil && err != io.EOF {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
output := &types.ConflictException{}
|
|
err := awsAwsjson11_deserializeDocumentConflictException(&output, shape)
|
|
|
|
if err != nil {
|
|
var snapshot bytes.Buffer
|
|
io.Copy(&snapshot, ringBuffer)
|
|
err = &smithy.DeserializationError{
|
|
Err: fmt.Errorf("failed to decode response body, %w", err),
|
|
Snapshot: snapshot.Bytes(),
|
|
}
|
|
return err
|
|
}
|
|
|
|
errorBody.Seek(0, io.SeekStart)
|
|
return output
|
|
}
|
|
|
|
func awsAwsjson11_deserializeErrorResourceInUse(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.ResourceInUse{}
|
|
err := awsAwsjson11_deserializeDocumentResourceInUse(&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_deserializeErrorResourceLimitExceeded(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.ResourceLimitExceeded{}
|
|
err := awsAwsjson11_deserializeDocumentResourceLimitExceeded(&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_deserializeErrorResourceNotFound(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.ResourceNotFound{}
|
|
err := awsAwsjson11_deserializeDocumentResourceNotFound(&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_deserializeDocumentActionSource(v **types.ActionSource, 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.ActionSource
|
|
if *v == nil {
|
|
sv = &types.ActionSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "SourceId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceId = ptr.String(jtv)
|
|
}
|
|
|
|
case "SourceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceType = ptr.String(jtv)
|
|
}
|
|
|
|
case "SourceUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String2048 to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceUri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentActionSummaries(v *[]types.ActionSummary, 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.ActionSummary
|
|
if *v == nil {
|
|
cv = []types.ActionSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ActionSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentActionSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentActionSummary(v **types.ActionSummary, 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.ActionSummary
|
|
if *v == nil {
|
|
sv = &types.ActionSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ActionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ActionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ActionArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ActionName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ActionName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ActionType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String64 to be of type string, got %T instead", value)
|
|
}
|
|
sv.ActionType = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Source":
|
|
if err := awsAwsjson11_deserializeDocumentActionSource(&sv.Source, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Status":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ActionStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.Status = types.ActionStatus(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAdditionalCodeRepositoryNamesOrUrls(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 CodeRepositoryNameOrUrl to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAgentVersion(v **types.AgentVersion, 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.AgentVersion
|
|
if *v == nil {
|
|
sv = &types.AgentVersion{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AgentCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.AgentCount = i64
|
|
}
|
|
|
|
case "Version":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgeVersion to be of type string, got %T instead", value)
|
|
}
|
|
sv.Version = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAgentVersions(v *[]types.AgentVersion, 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.AgentVersion
|
|
if *v == nil {
|
|
cv = []types.AgentVersion{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.AgentVersion
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentAgentVersion(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAlarm(v **types.Alarm, 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.Alarm
|
|
if *v == nil {
|
|
sv = &types.Alarm{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AlarmName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AlarmName to be of type string, got %T instead", value)
|
|
}
|
|
sv.AlarmName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAlarmList(v *[]types.Alarm, 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.Alarm
|
|
if *v == nil {
|
|
cv = []types.Alarm{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.Alarm
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentAlarm(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAlgorithmSpecification(v **types.AlgorithmSpecification, 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.AlgorithmSpecification
|
|
if *v == nil {
|
|
sv = &types.AlgorithmSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AlgorithmName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ArnOrName to be of type string, got %T instead", value)
|
|
}
|
|
sv.AlgorithmName = ptr.String(jtv)
|
|
}
|
|
|
|
case "EnableSageMakerMetricsTimeSeries":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableSageMakerMetricsTimeSeries = jtv
|
|
}
|
|
|
|
case "MetricDefinitions":
|
|
if err := awsAwsjson11_deserializeDocumentMetricDefinitionList(&sv.MetricDefinitions, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrainingImage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AlgorithmImage to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingImage = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingInputMode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingInputMode to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingInputMode = types.TrainingInputMode(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAlgorithmStatusDetails(v **types.AlgorithmStatusDetails, 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.AlgorithmStatusDetails
|
|
if *v == nil {
|
|
sv = &types.AlgorithmStatusDetails{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ImageScanStatuses":
|
|
if err := awsAwsjson11_deserializeDocumentAlgorithmStatusItemList(&sv.ImageScanStatuses, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ValidationStatuses":
|
|
if err := awsAwsjson11_deserializeDocumentAlgorithmStatusItemList(&sv.ValidationStatuses, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAlgorithmStatusItem(v **types.AlgorithmStatusItem, 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.AlgorithmStatusItem
|
|
if *v == nil {
|
|
sv = &types.AlgorithmStatusItem{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "Name":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.Name = ptr.String(jtv)
|
|
}
|
|
|
|
case "Status":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DetailedAlgorithmStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.Status = types.DetailedAlgorithmStatus(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAlgorithmStatusItemList(v *[]types.AlgorithmStatusItem, 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.AlgorithmStatusItem
|
|
if *v == nil {
|
|
cv = []types.AlgorithmStatusItem{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.AlgorithmStatusItem
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentAlgorithmStatusItem(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAlgorithmSummary(v **types.AlgorithmSummary, 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.AlgorithmSummary
|
|
if *v == nil {
|
|
sv = &types.AlgorithmSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AlgorithmArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AlgorithmArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AlgorithmArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "AlgorithmDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.AlgorithmDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "AlgorithmName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.AlgorithmName = ptr.String(jtv)
|
|
}
|
|
|
|
case "AlgorithmStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AlgorithmStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.AlgorithmStatus = types.AlgorithmStatus(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAlgorithmSummaryList(v *[]types.AlgorithmSummary, 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.AlgorithmSummary
|
|
if *v == nil {
|
|
cv = []types.AlgorithmSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.AlgorithmSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentAlgorithmSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAlgorithmValidationProfile(v **types.AlgorithmValidationProfile, 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.AlgorithmValidationProfile
|
|
if *v == nil {
|
|
sv = &types.AlgorithmValidationProfile{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ProfileName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProfileName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingJobDefinition":
|
|
if err := awsAwsjson11_deserializeDocumentTrainingJobDefinition(&sv.TrainingJobDefinition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TransformJobDefinition":
|
|
if err := awsAwsjson11_deserializeDocumentTransformJobDefinition(&sv.TransformJobDefinition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAlgorithmValidationProfiles(v *[]types.AlgorithmValidationProfile, 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.AlgorithmValidationProfile
|
|
if *v == nil {
|
|
cv = []types.AlgorithmValidationProfile{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.AlgorithmValidationProfile
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentAlgorithmValidationProfile(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAlgorithmValidationSpecification(v **types.AlgorithmValidationSpecification, 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.AlgorithmValidationSpecification
|
|
if *v == nil {
|
|
sv = &types.AlgorithmValidationSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ValidationProfiles":
|
|
if err := awsAwsjson11_deserializeDocumentAlgorithmValidationProfiles(&sv.ValidationProfiles, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ValidationRole":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ValidationRole = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAnnotationConsolidationConfig(v **types.AnnotationConsolidationConfig, 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.AnnotationConsolidationConfig
|
|
if *v == nil {
|
|
sv = &types.AnnotationConsolidationConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AnnotationConsolidationLambdaArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LambdaFunctionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AnnotationConsolidationLambdaArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAppDetails(v **types.AppDetails, 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.AppDetails
|
|
if *v == nil {
|
|
sv = &types.AppDetails{}
|
|
} 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 AppName to be of type string, got %T instead", value)
|
|
}
|
|
sv.AppName = ptr.String(jtv)
|
|
}
|
|
|
|
case "AppType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppType to be of type string, got %T instead", value)
|
|
}
|
|
sv.AppType = types.AppType(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DomainId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DomainId to be of type string, got %T instead", value)
|
|
}
|
|
sv.DomainId = ptr.String(jtv)
|
|
}
|
|
|
|
case "Status":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.Status = types.AppStatus(jtv)
|
|
}
|
|
|
|
case "UserProfileName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected UserProfileName to be of type string, got %T instead", value)
|
|
}
|
|
sv.UserProfileName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAppImageConfigDetails(v **types.AppImageConfigDetails, 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.AppImageConfigDetails
|
|
if *v == nil {
|
|
sv = &types.AppImageConfigDetails{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AppImageConfigArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppImageConfigArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AppImageConfigArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "AppImageConfigName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppImageConfigName to be of type string, got %T instead", value)
|
|
}
|
|
sv.AppImageConfigName = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "KernelGatewayImageConfig":
|
|
if err := awsAwsjson11_deserializeDocumentKernelGatewayImageConfig(&sv.KernelGatewayImageConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAppImageConfigList(v *[]types.AppImageConfigDetails, 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.AppImageConfigDetails
|
|
if *v == nil {
|
|
cv = []types.AppImageConfigDetails{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.AppImageConfigDetails
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentAppImageConfigDetails(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAppList(v *[]types.AppDetails, 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.AppDetails
|
|
if *v == nil {
|
|
cv = []types.AppDetails{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.AppDetails
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentAppDetails(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAppSpecification(v **types.AppSpecification, 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.AppSpecification
|
|
if *v == nil {
|
|
sv = &types.AppSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ContainerArguments":
|
|
if err := awsAwsjson11_deserializeDocumentContainerArguments(&sv.ContainerArguments, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ContainerEntrypoint":
|
|
if err := awsAwsjson11_deserializeDocumentContainerEntrypoint(&sv.ContainerEntrypoint, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ImageUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageUri to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageUri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentArtifactSource(v **types.ArtifactSource, 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.ArtifactSource
|
|
if *v == nil {
|
|
sv = &types.ArtifactSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "SourceTypes":
|
|
if err := awsAwsjson11_deserializeDocumentArtifactSourceTypes(&sv.SourceTypes, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SourceUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String2048 to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceUri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentArtifactSourceType(v **types.ArtifactSourceType, 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.ArtifactSourceType
|
|
if *v == nil {
|
|
sv = &types.ArtifactSourceType{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "SourceIdType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ArtifactSourceIdType to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceIdType = types.ArtifactSourceIdType(jtv)
|
|
}
|
|
|
|
case "Value":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.Value = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentArtifactSourceTypes(v *[]types.ArtifactSourceType, 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.ArtifactSourceType
|
|
if *v == nil {
|
|
cv = []types.ArtifactSourceType{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ArtifactSourceType
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentArtifactSourceType(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentArtifactSummaries(v *[]types.ArtifactSummary, 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.ArtifactSummary
|
|
if *v == nil {
|
|
cv = []types.ArtifactSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ArtifactSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentArtifactSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentArtifactSummary(v **types.ArtifactSummary, 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.ArtifactSummary
|
|
if *v == nil {
|
|
sv = &types.ArtifactSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ArtifactArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ArtifactArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ArtifactArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ArtifactName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ArtifactName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ArtifactType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.ArtifactType = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Source":
|
|
if err := awsAwsjson11_deserializeDocumentArtifactSource(&sv.Source, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAssociationSummaries(v *[]types.AssociationSummary, 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.AssociationSummary
|
|
if *v == nil {
|
|
cv = []types.AssociationSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.AssociationSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentAssociationSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAssociationSummary(v **types.AssociationSummary, 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.AssociationSummary
|
|
if *v == nil {
|
|
sv = &types.AssociationSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AssociationType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AssociationEdgeType to be of type string, got %T instead", value)
|
|
}
|
|
sv.AssociationType = types.AssociationEdgeType(jtv)
|
|
}
|
|
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DestinationArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AssociationEntityArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.DestinationArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "DestinationName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DestinationName = ptr.String(jtv)
|
|
}
|
|
|
|
case "DestinationType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.DestinationType = ptr.String(jtv)
|
|
}
|
|
|
|
case "SourceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AssociationEntityArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "SourceName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceName = ptr.String(jtv)
|
|
}
|
|
|
|
case "SourceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceType = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAsyncInferenceClientConfig(v **types.AsyncInferenceClientConfig, 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.AsyncInferenceClientConfig
|
|
if *v == nil {
|
|
sv = &types.AsyncInferenceClientConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MaxConcurrentInvocationsPerInstance":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxConcurrentInvocationsPerInstance to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxConcurrentInvocationsPerInstance = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAsyncInferenceConfig(v **types.AsyncInferenceConfig, 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.AsyncInferenceConfig
|
|
if *v == nil {
|
|
sv = &types.AsyncInferenceConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ClientConfig":
|
|
if err := awsAwsjson11_deserializeDocumentAsyncInferenceClientConfig(&sv.ClientConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentAsyncInferenceOutputConfig(&sv.OutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAsyncInferenceNotificationConfig(v **types.AsyncInferenceNotificationConfig, 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.AsyncInferenceNotificationConfig
|
|
if *v == nil {
|
|
sv = &types.AsyncInferenceNotificationConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ErrorTopic":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SnsTopicArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ErrorTopic = ptr.String(jtv)
|
|
}
|
|
|
|
case "SuccessTopic":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SnsTopicArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.SuccessTopic = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAsyncInferenceOutputConfig(v **types.AsyncInferenceOutputConfig, 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.AsyncInferenceOutputConfig
|
|
if *v == nil {
|
|
sv = &types.AsyncInferenceOutputConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "NotificationConfig":
|
|
if err := awsAwsjson11_deserializeDocumentAsyncInferenceNotificationConfig(&sv.NotificationConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "S3OutputPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DestinationS3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3OutputPath = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAthenaDatasetDefinition(v **types.AthenaDatasetDefinition, 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.AthenaDatasetDefinition
|
|
if *v == nil {
|
|
sv = &types.AthenaDatasetDefinition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Catalog":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AthenaCatalog to be of type string, got %T instead", value)
|
|
}
|
|
sv.Catalog = ptr.String(jtv)
|
|
}
|
|
|
|
case "Database":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AthenaDatabase to be of type string, got %T instead", value)
|
|
}
|
|
sv.Database = ptr.String(jtv)
|
|
}
|
|
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "OutputCompression":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AthenaResultCompressionType to be of type string, got %T instead", value)
|
|
}
|
|
sv.OutputCompression = types.AthenaResultCompressionType(jtv)
|
|
}
|
|
|
|
case "OutputFormat":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AthenaResultFormat to be of type string, got %T instead", value)
|
|
}
|
|
sv.OutputFormat = types.AthenaResultFormat(jtv)
|
|
}
|
|
|
|
case "OutputS3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.OutputS3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
case "QueryString":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AthenaQueryString to be of type string, got %T instead", value)
|
|
}
|
|
sv.QueryString = ptr.String(jtv)
|
|
}
|
|
|
|
case "WorkGroup":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AthenaWorkGroup to be of type string, got %T instead", value)
|
|
}
|
|
sv.WorkGroup = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAttributeNames(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 AttributeName to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLCandidate(v **types.AutoMLCandidate, 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.AutoMLCandidate
|
|
if *v == nil {
|
|
sv = &types.AutoMLCandidate{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CandidateName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CandidateName to be of type string, got %T instead", value)
|
|
}
|
|
sv.CandidateName = ptr.String(jtv)
|
|
}
|
|
|
|
case "CandidateProperties":
|
|
if err := awsAwsjson11_deserializeDocumentCandidateProperties(&sv.CandidateProperties, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CandidateStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CandidateStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.CandidateStatus = types.CandidateStatus(jtv)
|
|
}
|
|
|
|
case "CandidateSteps":
|
|
if err := awsAwsjson11_deserializeDocumentCandidateSteps(&sv.CandidateSteps, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "EndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLFailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "FinalAutoMLJobObjectiveMetric":
|
|
if err := awsAwsjson11_deserializeDocumentFinalAutoMLJobObjectiveMetric(&sv.FinalAutoMLJobObjectiveMetric, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "InferenceContainers":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLContainerDefinitions(&sv.InferenceContainers, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ObjectiveStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ObjectiveStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ObjectiveStatus = types.ObjectiveStatus(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLCandidates(v *[]types.AutoMLCandidate, 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.AutoMLCandidate
|
|
if *v == nil {
|
|
cv = []types.AutoMLCandidate{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.AutoMLCandidate
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLCandidate(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLCandidateStep(v **types.AutoMLCandidateStep, 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.AutoMLCandidateStep
|
|
if *v == nil {
|
|
sv = &types.AutoMLCandidateStep{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CandidateStepArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CandidateStepArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.CandidateStepArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "CandidateStepName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CandidateStepName to be of type string, got %T instead", value)
|
|
}
|
|
sv.CandidateStepName = ptr.String(jtv)
|
|
}
|
|
|
|
case "CandidateStepType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CandidateStepType to be of type string, got %T instead", value)
|
|
}
|
|
sv.CandidateStepType = types.CandidateStepType(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLChannel(v **types.AutoMLChannel, 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.AutoMLChannel
|
|
if *v == nil {
|
|
sv = &types.AutoMLChannel{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CompressionType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CompressionType to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompressionType = types.CompressionType(jtv)
|
|
}
|
|
|
|
case "DataSource":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLDataSource(&sv.DataSource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TargetAttributeName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TargetAttributeName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TargetAttributeName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLContainerDefinition(v **types.AutoMLContainerDefinition, 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.AutoMLContainerDefinition
|
|
if *v == nil {
|
|
sv = &types.AutoMLContainerDefinition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Environment":
|
|
if err := awsAwsjson11_deserializeDocumentEnvironmentMap(&sv.Environment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Image":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContainerImage to be of type string, got %T instead", value)
|
|
}
|
|
sv.Image = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelDataUrl":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected Url to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelDataUrl = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLContainerDefinitions(v *[]types.AutoMLContainerDefinition, 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.AutoMLContainerDefinition
|
|
if *v == nil {
|
|
cv = []types.AutoMLContainerDefinition{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.AutoMLContainerDefinition
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLContainerDefinition(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLDataSource(v **types.AutoMLDataSource, 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.AutoMLDataSource
|
|
if *v == nil {
|
|
sv = &types.AutoMLDataSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "S3DataSource":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLS3DataSource(&sv.S3DataSource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLInputDataConfig(v *[]types.AutoMLChannel, 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.AutoMLChannel
|
|
if *v == nil {
|
|
cv = []types.AutoMLChannel{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.AutoMLChannel
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLChannel(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLJobArtifacts(v **types.AutoMLJobArtifacts, 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.AutoMLJobArtifacts
|
|
if *v == nil {
|
|
sv = &types.AutoMLJobArtifacts{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CandidateDefinitionNotebookLocation":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CandidateDefinitionNotebookLocation to be of type string, got %T instead", value)
|
|
}
|
|
sv.CandidateDefinitionNotebookLocation = ptr.String(jtv)
|
|
}
|
|
|
|
case "DataExplorationNotebookLocation":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DataExplorationNotebookLocation to be of type string, got %T instead", value)
|
|
}
|
|
sv.DataExplorationNotebookLocation = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLJobCompletionCriteria(v **types.AutoMLJobCompletionCriteria, 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.AutoMLJobCompletionCriteria
|
|
if *v == nil {
|
|
sv = &types.AutoMLJobCompletionCriteria{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MaxAutoMLJobRuntimeInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxAutoMLJobRuntimeInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxAutoMLJobRuntimeInSeconds = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "MaxCandidates":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxCandidates to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxCandidates = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "MaxRuntimePerTrainingJobInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxRuntimePerTrainingJobInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxRuntimePerTrainingJobInSeconds = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLJobConfig(v **types.AutoMLJobConfig, 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.AutoMLJobConfig
|
|
if *v == nil {
|
|
sv = &types.AutoMLJobConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CompletionCriteria":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLJobCompletionCriteria(&sv.CompletionCriteria, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SecurityConfig":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLSecurityConfig(&sv.SecurityConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLJobObjective(v **types.AutoMLJobObjective, 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.AutoMLJobObjective
|
|
if *v == nil {
|
|
sv = &types.AutoMLJobObjective{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MetricName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLMetricEnum to be of type string, got %T instead", value)
|
|
}
|
|
sv.MetricName = types.AutoMLMetricEnum(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLJobSummaries(v *[]types.AutoMLJobSummary, 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.AutoMLJobSummary
|
|
if *v == nil {
|
|
cv = []types.AutoMLJobSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.AutoMLJobSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLJobSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLJobSummary(v **types.AutoMLJobSummary, 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.AutoMLJobSummary
|
|
if *v == nil {
|
|
sv = &types.AutoMLJobSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AutoMLJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AutoMLJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "AutoMLJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.AutoMLJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "AutoMLJobSecondaryStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobSecondaryStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.AutoMLJobSecondaryStatus = types.AutoMLJobSecondaryStatus(jtv)
|
|
}
|
|
|
|
case "AutoMLJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.AutoMLJobStatus = types.AutoMLJobStatus(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "EndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLFailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "PartialFailureReasons":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLPartialFailureReasons(&sv.PartialFailureReasons, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLOutputDataConfig(v **types.AutoMLOutputDataConfig, 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.AutoMLOutputDataConfig
|
|
if *v == nil {
|
|
sv = &types.AutoMLOutputDataConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3OutputPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3OutputPath = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLPartialFailureReason(v **types.AutoMLPartialFailureReason, 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.AutoMLPartialFailureReason
|
|
if *v == nil {
|
|
sv = &types.AutoMLPartialFailureReason{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "PartialFailureMessage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLFailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.PartialFailureMessage = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLPartialFailureReasons(v *[]types.AutoMLPartialFailureReason, 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.AutoMLPartialFailureReason
|
|
if *v == nil {
|
|
cv = []types.AutoMLPartialFailureReason{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.AutoMLPartialFailureReason
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLPartialFailureReason(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLS3DataSource(v **types.AutoMLS3DataSource, 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.AutoMLS3DataSource
|
|
if *v == nil {
|
|
sv = &types.AutoMLS3DataSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "S3DataType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLS3DataType to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3DataType = types.AutoMLS3DataType(jtv)
|
|
}
|
|
|
|
case "S3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoMLSecurityConfig(v **types.AutoMLSecurityConfig, 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.AutoMLSecurityConfig
|
|
if *v == nil {
|
|
sv = &types.AutoMLSecurityConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EnableInterContainerTrafficEncryption":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableInterContainerTrafficEncryption = jtv
|
|
}
|
|
|
|
case "VolumeKmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.VolumeKmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "VpcConfig":
|
|
if err := awsAwsjson11_deserializeDocumentVpcConfig(&sv.VpcConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentAutoRollbackConfig(v **types.AutoRollbackConfig, 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.AutoRollbackConfig
|
|
if *v == nil {
|
|
sv = &types.AutoRollbackConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Alarms":
|
|
if err := awsAwsjson11_deserializeDocumentAlarmList(&sv.Alarms, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentBatchDescribeModelPackageError(v **types.BatchDescribeModelPackageError, 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.BatchDescribeModelPackageError
|
|
if *v == nil {
|
|
sv = &types.BatchDescribeModelPackageError{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ErrorCode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.ErrorCode = ptr.String(jtv)
|
|
}
|
|
|
|
case "ErrorResponse":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.ErrorResponse = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentBatchDescribeModelPackageErrorMap(v *map[string]types.BatchDescribeModelPackageError, 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.BatchDescribeModelPackageError
|
|
if *v == nil {
|
|
mv = map[string]types.BatchDescribeModelPackageError{}
|
|
} else {
|
|
mv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
var parsedVal types.BatchDescribeModelPackageError
|
|
mapVar := parsedVal
|
|
destAddr := &mapVar
|
|
if err := awsAwsjson11_deserializeDocumentBatchDescribeModelPackageError(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
parsedVal = *destAddr
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentBatchDescribeModelPackageSummary(v **types.BatchDescribeModelPackageSummary, 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.BatchDescribeModelPackageSummary
|
|
if *v == nil {
|
|
sv = &types.BatchDescribeModelPackageSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "InferenceSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentInferenceSpecification(&sv.InferenceSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelApprovalStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelApprovalStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelApprovalStatus = types.ModelApprovalStatus(jtv)
|
|
}
|
|
|
|
case "ModelPackageArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageGroupName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageStatus = types.ModelPackageStatus(jtv)
|
|
}
|
|
|
|
case "ModelPackageVersion":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageVersion to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ModelPackageVersion = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentBias(v **types.Bias, 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.Bias
|
|
if *v == nil {
|
|
sv = &types.Bias{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Report":
|
|
if err := awsAwsjson11_deserializeDocumentMetricsSource(&sv.Report, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentBlueGreenUpdatePolicy(v **types.BlueGreenUpdatePolicy, 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.BlueGreenUpdatePolicy
|
|
if *v == nil {
|
|
sv = &types.BlueGreenUpdatePolicy{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MaximumExecutionTimeoutInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaximumExecutionTimeoutInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaximumExecutionTimeoutInSeconds = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "TerminationWaitInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TerminationWaitInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TerminationWaitInSeconds = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "TrafficRoutingConfiguration":
|
|
if err := awsAwsjson11_deserializeDocumentTrafficRoutingConfig(&sv.TrafficRoutingConfiguration, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCacheHitResult(v **types.CacheHitResult, 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.CacheHitResult
|
|
if *v == nil {
|
|
sv = &types.CacheHitResult{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "SourcePipelineExecutionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourcePipelineExecutionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCallbackStepMetadata(v **types.CallbackStepMetadata, 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.CallbackStepMetadata
|
|
if *v == nil {
|
|
sv = &types.CallbackStepMetadata{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CallbackToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CallbackToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.CallbackToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "OutputParameters":
|
|
if err := awsAwsjson11_deserializeDocumentOutputParameterList(&sv.OutputParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SqsQueueUrl":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.SqsQueueUrl = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCandidateArtifactLocations(v **types.CandidateArtifactLocations, 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.CandidateArtifactLocations
|
|
if *v == nil {
|
|
sv = &types.CandidateArtifactLocations{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Explainability":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExplainabilityLocation to be of type string, got %T instead", value)
|
|
}
|
|
sv.Explainability = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCandidateProperties(v **types.CandidateProperties, 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.CandidateProperties
|
|
if *v == nil {
|
|
sv = &types.CandidateProperties{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CandidateArtifactLocations":
|
|
if err := awsAwsjson11_deserializeDocumentCandidateArtifactLocations(&sv.CandidateArtifactLocations, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CandidateMetrics":
|
|
if err := awsAwsjson11_deserializeDocumentMetricDataList(&sv.CandidateMetrics, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCandidateSteps(v *[]types.AutoMLCandidateStep, 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.AutoMLCandidateStep
|
|
if *v == nil {
|
|
cv = []types.AutoMLCandidateStep{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.AutoMLCandidateStep
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLCandidateStep(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCapacitySize(v **types.CapacitySize, 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.CapacitySize
|
|
if *v == nil {
|
|
sv = &types.CapacitySize{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Type":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CapacitySizeType to be of type string, got %T instead", value)
|
|
}
|
|
sv.Type = types.CapacitySizeType(jtv)
|
|
}
|
|
|
|
case "Value":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected CapacitySizeValue to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Value = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCaptureContentTypeHeader(v **types.CaptureContentTypeHeader, 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.CaptureContentTypeHeader
|
|
if *v == nil {
|
|
sv = &types.CaptureContentTypeHeader{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CsvContentTypes":
|
|
if err := awsAwsjson11_deserializeDocumentCsvContentTypes(&sv.CsvContentTypes, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "JsonContentTypes":
|
|
if err := awsAwsjson11_deserializeDocumentJsonContentTypes(&sv.JsonContentTypes, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCaptureOption(v **types.CaptureOption, 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.CaptureOption
|
|
if *v == nil {
|
|
sv = &types.CaptureOption{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CaptureMode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CaptureMode to be of type string, got %T instead", value)
|
|
}
|
|
sv.CaptureMode = types.CaptureMode(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCaptureOptionList(v *[]types.CaptureOption, 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.CaptureOption
|
|
if *v == nil {
|
|
cv = []types.CaptureOption{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.CaptureOption
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentCaptureOption(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCategoricalParameterRange(v **types.CategoricalParameterRange, 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.CategoricalParameterRange
|
|
if *v == nil {
|
|
sv = &types.CategoricalParameterRange{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Name":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ParameterKey to be of type string, got %T instead", value)
|
|
}
|
|
sv.Name = ptr.String(jtv)
|
|
}
|
|
|
|
case "Values":
|
|
if err := awsAwsjson11_deserializeDocumentParameterValues(&sv.Values, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCategoricalParameterRanges(v *[]types.CategoricalParameterRange, 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.CategoricalParameterRange
|
|
if *v == nil {
|
|
cv = []types.CategoricalParameterRange{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.CategoricalParameterRange
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentCategoricalParameterRange(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCategoricalParameterRangeSpecification(v **types.CategoricalParameterRangeSpecification, 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.CategoricalParameterRangeSpecification
|
|
if *v == nil {
|
|
sv = &types.CategoricalParameterRangeSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Values":
|
|
if err := awsAwsjson11_deserializeDocumentParameterValues(&sv.Values, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentChannel(v **types.Channel, 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.Channel
|
|
if *v == nil {
|
|
sv = &types.Channel{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ChannelName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ChannelName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ChannelName = ptr.String(jtv)
|
|
}
|
|
|
|
case "CompressionType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CompressionType to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompressionType = types.CompressionType(jtv)
|
|
}
|
|
|
|
case "ContentType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContentType to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContentType = ptr.String(jtv)
|
|
}
|
|
|
|
case "DataSource":
|
|
if err := awsAwsjson11_deserializeDocumentDataSource(&sv.DataSource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "InputMode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingInputMode to be of type string, got %T instead", value)
|
|
}
|
|
sv.InputMode = types.TrainingInputMode(jtv)
|
|
}
|
|
|
|
case "RecordWrapperType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RecordWrapper to be of type string, got %T instead", value)
|
|
}
|
|
sv.RecordWrapperType = types.RecordWrapper(jtv)
|
|
}
|
|
|
|
case "ShuffleConfig":
|
|
if err := awsAwsjson11_deserializeDocumentShuffleConfig(&sv.ShuffleConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentChannelSpecification(v **types.ChannelSpecification, 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.ChannelSpecification
|
|
if *v == nil {
|
|
sv = &types.ChannelSpecification{}
|
|
} 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 EntityDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.Description = ptr.String(jtv)
|
|
}
|
|
|
|
case "IsRequired":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.IsRequired = jtv
|
|
}
|
|
|
|
case "Name":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ChannelName to be of type string, got %T instead", value)
|
|
}
|
|
sv.Name = ptr.String(jtv)
|
|
}
|
|
|
|
case "SupportedCompressionTypes":
|
|
if err := awsAwsjson11_deserializeDocumentCompressionTypes(&sv.SupportedCompressionTypes, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SupportedContentTypes":
|
|
if err := awsAwsjson11_deserializeDocumentContentTypes(&sv.SupportedContentTypes, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SupportedInputModes":
|
|
if err := awsAwsjson11_deserializeDocumentInputModes(&sv.SupportedInputModes, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentChannelSpecifications(v *[]types.ChannelSpecification, 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.ChannelSpecification
|
|
if *v == nil {
|
|
cv = []types.ChannelSpecification{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ChannelSpecification
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentChannelSpecification(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCheckpointConfig(v **types.CheckpointConfig, 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.CheckpointConfig
|
|
if *v == nil {
|
|
sv = &types.CheckpointConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "LocalPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DirectoryPath to be of type string, got %T instead", value)
|
|
}
|
|
sv.LocalPath = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCidrs(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 Cidr to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCodeRepositorySummary(v **types.CodeRepositorySummary, 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.CodeRepositorySummary
|
|
if *v == nil {
|
|
sv = &types.CodeRepositorySummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CodeRepositoryArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CodeRepositoryArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.CodeRepositoryArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "CodeRepositoryName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.CodeRepositoryName = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "GitConfig":
|
|
if err := awsAwsjson11_deserializeDocumentGitConfig(&sv.GitConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCodeRepositorySummaryList(v *[]types.CodeRepositorySummary, 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.CodeRepositorySummary
|
|
if *v == nil {
|
|
cv = []types.CodeRepositorySummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.CodeRepositorySummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentCodeRepositorySummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCognitoConfig(v **types.CognitoConfig, 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.CognitoConfig
|
|
if *v == nil {
|
|
sv = &types.CognitoConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ClientId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ClientId to be of type string, got %T instead", value)
|
|
}
|
|
sv.ClientId = ptr.String(jtv)
|
|
}
|
|
|
|
case "UserPool":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CognitoUserPool to be of type string, got %T instead", value)
|
|
}
|
|
sv.UserPool = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCognitoMemberDefinition(v **types.CognitoMemberDefinition, 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.CognitoMemberDefinition
|
|
if *v == nil {
|
|
sv = &types.CognitoMemberDefinition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ClientId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ClientId to be of type string, got %T instead", value)
|
|
}
|
|
sv.ClientId = ptr.String(jtv)
|
|
}
|
|
|
|
case "UserGroup":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CognitoUserGroup to be of type string, got %T instead", value)
|
|
}
|
|
sv.UserGroup = ptr.String(jtv)
|
|
}
|
|
|
|
case "UserPool":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CognitoUserPool to be of type string, got %T instead", value)
|
|
}
|
|
sv.UserPool = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCollectionConfiguration(v **types.CollectionConfiguration, 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.CollectionConfiguration
|
|
if *v == nil {
|
|
sv = &types.CollectionConfiguration{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CollectionName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CollectionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.CollectionName = ptr.String(jtv)
|
|
}
|
|
|
|
case "CollectionParameters":
|
|
if err := awsAwsjson11_deserializeDocumentCollectionParameters(&sv.CollectionParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCollectionConfigurations(v *[]types.CollectionConfiguration, 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.CollectionConfiguration
|
|
if *v == nil {
|
|
cv = []types.CollectionConfiguration{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.CollectionConfiguration
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentCollectionConfiguration(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCollectionParameters(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 ConfigValue to be of type string, got %T instead", value)
|
|
}
|
|
parsedVal = jtv
|
|
}
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCompilationJobSummaries(v *[]types.CompilationJobSummary, 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.CompilationJobSummary
|
|
if *v == nil {
|
|
cv = []types.CompilationJobSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.CompilationJobSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentCompilationJobSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCompilationJobSummary(v **types.CompilationJobSummary, 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.CompilationJobSummary
|
|
if *v == nil {
|
|
sv = &types.CompilationJobSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CompilationEndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CompilationEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "CompilationJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CompilationJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompilationJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "CompilationJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompilationJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "CompilationJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CompilationJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompilationJobStatus = types.CompilationJobStatus(jtv)
|
|
}
|
|
|
|
case "CompilationStartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CompilationStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "CompilationTargetDevice":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TargetDevice to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompilationTargetDevice = types.TargetDevice(jtv)
|
|
}
|
|
|
|
case "CompilationTargetPlatformAccelerator":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TargetPlatformAccelerator to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompilationTargetPlatformAccelerator = types.TargetPlatformAccelerator(jtv)
|
|
}
|
|
|
|
case "CompilationTargetPlatformArch":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TargetPlatformArch to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompilationTargetPlatformArch = types.TargetPlatformArch(jtv)
|
|
}
|
|
|
|
case "CompilationTargetPlatformOs":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TargetPlatformOs to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompilationTargetPlatformOs = types.TargetPlatformOs(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCompressionTypes(v *[]types.CompressionType, 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.CompressionType
|
|
if *v == nil {
|
|
cv = []types.CompressionType{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.CompressionType
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CompressionType to be of type string, got %T instead", value)
|
|
}
|
|
col = types.CompressionType(jtv)
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentConditionStepMetadata(v **types.ConditionStepMetadata, 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.ConditionStepMetadata
|
|
if *v == nil {
|
|
sv = &types.ConditionStepMetadata{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Outcome":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ConditionOutcome to be of type string, got %T instead", value)
|
|
}
|
|
sv.Outcome = types.ConditionOutcome(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error {
|
|
if v == nil {
|
|
return fmt.Errorf("unexpected nil of type %T", v)
|
|
}
|
|
if value == nil {
|
|
return nil
|
|
}
|
|
|
|
shape, ok := value.(map[string]interface{})
|
|
if !ok {
|
|
return fmt.Errorf("unexpected JSON type %v", value)
|
|
}
|
|
|
|
var sv *types.ConflictException
|
|
if *v == nil {
|
|
sv = &types.ConflictException{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Message":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.Message = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentContainerArguments(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 ContainerArgument to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentContainerDefinition(v **types.ContainerDefinition, 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.ContainerDefinition
|
|
if *v == nil {
|
|
sv = &types.ContainerDefinition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ContainerHostname":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContainerHostname to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContainerHostname = ptr.String(jtv)
|
|
}
|
|
|
|
case "Environment":
|
|
if err := awsAwsjson11_deserializeDocumentEnvironmentMap(&sv.Environment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Image":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContainerImage to be of type string, got %T instead", value)
|
|
}
|
|
sv.Image = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageConfig":
|
|
if err := awsAwsjson11_deserializeDocumentImageConfig(&sv.ImageConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Mode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContainerMode to be of type string, got %T instead", value)
|
|
}
|
|
sv.Mode = types.ContainerMode(jtv)
|
|
}
|
|
|
|
case "ModelDataUrl":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected Url to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelDataUrl = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected VersionedArnOrName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageName = ptr.String(jtv)
|
|
}
|
|
|
|
case "MultiModelConfig":
|
|
if err := awsAwsjson11_deserializeDocumentMultiModelConfig(&sv.MultiModelConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentContainerDefinitionList(v *[]types.ContainerDefinition, 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.ContainerDefinition
|
|
if *v == nil {
|
|
cv = []types.ContainerDefinition{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ContainerDefinition
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentContainerDefinition(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentContainerEntrypoint(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 ContainerEntrypointString to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentContentClassifiers(v *[]types.ContentClassifier, 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.ContentClassifier
|
|
if *v == nil {
|
|
cv = []types.ContentClassifier{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ContentClassifier
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContentClassifier to be of type string, got %T instead", value)
|
|
}
|
|
col = types.ContentClassifier(jtv)
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentContentTypes(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 ContentType to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentContextSource(v **types.ContextSource, 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.ContextSource
|
|
if *v == nil {
|
|
sv = &types.ContextSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "SourceId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceId = ptr.String(jtv)
|
|
}
|
|
|
|
case "SourceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceType = ptr.String(jtv)
|
|
}
|
|
|
|
case "SourceUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String2048 to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceUri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentContextSummaries(v *[]types.ContextSummary, 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.ContextSummary
|
|
if *v == nil {
|
|
cv = []types.ContextSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ContextSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentContextSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentContextSummary(v **types.ContextSummary, 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.ContextSummary
|
|
if *v == nil {
|
|
sv = &types.ContextSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ContextArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContextArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContextArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ContextName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContextName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ContextType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContextType = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Source":
|
|
if err := awsAwsjson11_deserializeDocumentContextSource(&sv.Source, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentContinuousParameterRange(v **types.ContinuousParameterRange, 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.ContinuousParameterRange
|
|
if *v == nil {
|
|
sv = &types.ContinuousParameterRange{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MaxValue":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.MaxValue = ptr.String(jtv)
|
|
}
|
|
|
|
case "MinValue":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.MinValue = ptr.String(jtv)
|
|
}
|
|
|
|
case "Name":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ParameterKey to be of type string, got %T instead", value)
|
|
}
|
|
sv.Name = ptr.String(jtv)
|
|
}
|
|
|
|
case "ScalingType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterScalingType to be of type string, got %T instead", value)
|
|
}
|
|
sv.ScalingType = types.HyperParameterScalingType(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentContinuousParameterRanges(v *[]types.ContinuousParameterRange, 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.ContinuousParameterRange
|
|
if *v == nil {
|
|
cv = []types.ContinuousParameterRange{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ContinuousParameterRange
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentContinuousParameterRange(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentContinuousParameterRangeSpecification(v **types.ContinuousParameterRangeSpecification, 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.ContinuousParameterRangeSpecification
|
|
if *v == nil {
|
|
sv = &types.ContinuousParameterRangeSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MaxValue":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.MaxValue = ptr.String(jtv)
|
|
}
|
|
|
|
case "MinValue":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.MinValue = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCsvContentTypes(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 CsvContentType to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCustomerMetadataMap(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 CustomerMetadataValue to be of type string, got %T instead", value)
|
|
}
|
|
parsedVal = jtv
|
|
}
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCustomImage(v **types.CustomImage, 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.CustomImage
|
|
if *v == nil {
|
|
sv = &types.CustomImage{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AppImageConfigName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppImageConfigName to be of type string, got %T instead", value)
|
|
}
|
|
sv.AppImageConfigName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageVersionNumber":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageVersionNumber to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ImageVersionNumber = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentCustomImages(v *[]types.CustomImage, 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.CustomImage
|
|
if *v == nil {
|
|
cv = []types.CustomImage{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.CustomImage
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentCustomImage(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDataCaptureConfig(v **types.DataCaptureConfig, 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.DataCaptureConfig
|
|
if *v == nil {
|
|
sv = &types.DataCaptureConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CaptureContentTypeHeader":
|
|
if err := awsAwsjson11_deserializeDocumentCaptureContentTypeHeader(&sv.CaptureContentTypeHeader, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CaptureOptions":
|
|
if err := awsAwsjson11_deserializeDocumentCaptureOptionList(&sv.CaptureOptions, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DestinationS3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DestinationS3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.DestinationS3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
case "EnableCapture":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected EnableCapture to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableCapture = jtv
|
|
}
|
|
|
|
case "InitialSamplingPercentage":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected SamplingPercentage to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.InitialSamplingPercentage = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDataCaptureConfigSummary(v **types.DataCaptureConfigSummary, 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.DataCaptureConfigSummary
|
|
if *v == nil {
|
|
sv = &types.DataCaptureConfigSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CaptureStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CaptureStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.CaptureStatus = types.CaptureStatus(jtv)
|
|
}
|
|
|
|
case "CurrentSamplingPercentage":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected SamplingPercentage to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CurrentSamplingPercentage = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "DestinationS3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DestinationS3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.DestinationS3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
case "EnableCapture":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected EnableCapture to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableCapture = jtv
|
|
}
|
|
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDataCatalogConfig(v **types.DataCatalogConfig, 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.DataCatalogConfig
|
|
if *v == nil {
|
|
sv = &types.DataCatalogConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Catalog":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected Catalog to be of type string, got %T instead", value)
|
|
}
|
|
sv.Catalog = ptr.String(jtv)
|
|
}
|
|
|
|
case "Database":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected Database to be of type string, got %T instead", value)
|
|
}
|
|
sv.Database = ptr.String(jtv)
|
|
}
|
|
|
|
case "TableName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TableName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TableName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDataProcessing(v **types.DataProcessing, 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.DataProcessing
|
|
if *v == nil {
|
|
sv = &types.DataProcessing{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "InputFilter":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected JsonPath to be of type string, got %T instead", value)
|
|
}
|
|
sv.InputFilter = ptr.String(jtv)
|
|
}
|
|
|
|
case "JoinSource":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected JoinSource to be of type string, got %T instead", value)
|
|
}
|
|
sv.JoinSource = types.JoinSource(jtv)
|
|
}
|
|
|
|
case "OutputFilter":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected JsonPath to be of type string, got %T instead", value)
|
|
}
|
|
sv.OutputFilter = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDataQualityAppSpecification(v **types.DataQualityAppSpecification, 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.DataQualityAppSpecification
|
|
if *v == nil {
|
|
sv = &types.DataQualityAppSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ContainerArguments":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringContainerArguments(&sv.ContainerArguments, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ContainerEntrypoint":
|
|
if err := awsAwsjson11_deserializeDocumentContainerEntrypoint(&sv.ContainerEntrypoint, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Environment":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringEnvironmentMap(&sv.Environment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ImageUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageUri to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageUri = ptr.String(jtv)
|
|
}
|
|
|
|
case "PostAnalyticsProcessorSourceUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.PostAnalyticsProcessorSourceUri = ptr.String(jtv)
|
|
}
|
|
|
|
case "RecordPreprocessorSourceUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.RecordPreprocessorSourceUri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDataQualityBaselineConfig(v **types.DataQualityBaselineConfig, 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.DataQualityBaselineConfig
|
|
if *v == nil {
|
|
sv = &types.DataQualityBaselineConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "BaseliningJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.BaseliningJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ConstraintsResource":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringConstraintsResource(&sv.ConstraintsResource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "StatisticsResource":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringStatisticsResource(&sv.StatisticsResource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDataQualityJobInput(v **types.DataQualityJobInput, 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.DataQualityJobInput
|
|
if *v == nil {
|
|
sv = &types.DataQualityJobInput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EndpointInput":
|
|
if err := awsAwsjson11_deserializeDocumentEndpointInput(&sv.EndpointInput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDatasetDefinition(v **types.DatasetDefinition, 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.DatasetDefinition
|
|
if *v == nil {
|
|
sv = &types.DatasetDefinition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AthenaDatasetDefinition":
|
|
if err := awsAwsjson11_deserializeDocumentAthenaDatasetDefinition(&sv.AthenaDatasetDefinition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DataDistributionType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DataDistributionType to be of type string, got %T instead", value)
|
|
}
|
|
sv.DataDistributionType = types.DataDistributionType(jtv)
|
|
}
|
|
|
|
case "InputMode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected InputMode to be of type string, got %T instead", value)
|
|
}
|
|
sv.InputMode = types.InputMode(jtv)
|
|
}
|
|
|
|
case "LocalPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingLocalPath to be of type string, got %T instead", value)
|
|
}
|
|
sv.LocalPath = ptr.String(jtv)
|
|
}
|
|
|
|
case "RedshiftDatasetDefinition":
|
|
if err := awsAwsjson11_deserializeDocumentRedshiftDatasetDefinition(&sv.RedshiftDatasetDefinition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDataSource(v **types.DataSource, 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.DataSource
|
|
if *v == nil {
|
|
sv = &types.DataSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "FileSystemDataSource":
|
|
if err := awsAwsjson11_deserializeDocumentFileSystemDataSource(&sv.FileSystemDataSource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "S3DataSource":
|
|
if err := awsAwsjson11_deserializeDocumentS3DataSource(&sv.S3DataSource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDebugHookConfig(v **types.DebugHookConfig, 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.DebugHookConfig
|
|
if *v == nil {
|
|
sv = &types.DebugHookConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CollectionConfigurations":
|
|
if err := awsAwsjson11_deserializeDocumentCollectionConfigurations(&sv.CollectionConfigurations, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "HookParameters":
|
|
if err := awsAwsjson11_deserializeDocumentHookParameters(&sv.HookParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LocalPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DirectoryPath to be of type string, got %T instead", value)
|
|
}
|
|
sv.LocalPath = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3OutputPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3OutputPath = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDebugRuleConfiguration(v **types.DebugRuleConfiguration, 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.DebugRuleConfiguration
|
|
if *v == nil {
|
|
sv = &types.DebugRuleConfiguration{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "InstanceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingInstanceType to be of type string, got %T instead", value)
|
|
}
|
|
sv.InstanceType = types.ProcessingInstanceType(jtv)
|
|
}
|
|
|
|
case "LocalPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DirectoryPath to be of type string, got %T instead", value)
|
|
}
|
|
sv.LocalPath = ptr.String(jtv)
|
|
}
|
|
|
|
case "RuleConfigurationName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RuleConfigurationName to be of type string, got %T instead", value)
|
|
}
|
|
sv.RuleConfigurationName = ptr.String(jtv)
|
|
}
|
|
|
|
case "RuleEvaluatorImage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AlgorithmImage to be of type string, got %T instead", value)
|
|
}
|
|
sv.RuleEvaluatorImage = ptr.String(jtv)
|
|
}
|
|
|
|
case "RuleParameters":
|
|
if err := awsAwsjson11_deserializeDocumentRuleParameters(&sv.RuleParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "S3OutputPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3OutputPath = ptr.String(jtv)
|
|
}
|
|
|
|
case "VolumeSizeInGB":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected OptionalVolumeSizeInGB to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.VolumeSizeInGB = int32(i64)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDebugRuleConfigurations(v *[]types.DebugRuleConfiguration, 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.DebugRuleConfiguration
|
|
if *v == nil {
|
|
cv = []types.DebugRuleConfiguration{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.DebugRuleConfiguration
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentDebugRuleConfiguration(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDebugRuleEvaluationStatus(v **types.DebugRuleEvaluationStatus, 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.DebugRuleEvaluationStatus
|
|
if *v == nil {
|
|
sv = &types.DebugRuleEvaluationStatus{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "RuleConfigurationName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RuleConfigurationName to be of type string, got %T instead", value)
|
|
}
|
|
sv.RuleConfigurationName = ptr.String(jtv)
|
|
}
|
|
|
|
case "RuleEvaluationJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RuleEvaluationJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "RuleEvaluationStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RuleEvaluationStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.RuleEvaluationStatus = types.RuleEvaluationStatus(jtv)
|
|
}
|
|
|
|
case "StatusDetails":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected StatusDetails to be of type string, got %T instead", value)
|
|
}
|
|
sv.StatusDetails = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDebugRuleEvaluationStatuses(v *[]types.DebugRuleEvaluationStatus, 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.DebugRuleEvaluationStatus
|
|
if *v == nil {
|
|
cv = []types.DebugRuleEvaluationStatus{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.DebugRuleEvaluationStatus
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentDebugRuleEvaluationStatus(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDeployedImage(v **types.DeployedImage, 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.DeployedImage
|
|
if *v == nil {
|
|
sv = &types.DeployedImage{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ResolutionTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ResolutionTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ResolvedImage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContainerImage to be of type string, got %T instead", value)
|
|
}
|
|
sv.ResolvedImage = ptr.String(jtv)
|
|
}
|
|
|
|
case "SpecifiedImage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContainerImage to be of type string, got %T instead", value)
|
|
}
|
|
sv.SpecifiedImage = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDeployedImages(v *[]types.DeployedImage, 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.DeployedImage
|
|
if *v == nil {
|
|
cv = []types.DeployedImage{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.DeployedImage
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentDeployedImage(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDeploymentConfig(v **types.DeploymentConfig, 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.DeploymentConfig
|
|
if *v == nil {
|
|
sv = &types.DeploymentConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AutoRollbackConfiguration":
|
|
if err := awsAwsjson11_deserializeDocumentAutoRollbackConfig(&sv.AutoRollbackConfiguration, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "BlueGreenUpdatePolicy":
|
|
if err := awsAwsjson11_deserializeDocumentBlueGreenUpdatePolicy(&sv.BlueGreenUpdatePolicy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDeviceFleetSummaries(v *[]types.DeviceFleetSummary, 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.DeviceFleetSummary
|
|
if *v == nil {
|
|
cv = []types.DeviceFleetSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.DeviceFleetSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentDeviceFleetSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDeviceFleetSummary(v **types.DeviceFleetSummary, 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.DeviceFleetSummary
|
|
if *v == nil {
|
|
sv = &types.DeviceFleetSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DeviceFleetArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DeviceFleetArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.DeviceFleetArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "DeviceFleetName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DeviceFleetName = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDeviceStats(v **types.DeviceStats, 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.DeviceStats
|
|
if *v == nil {
|
|
sv = &types.DeviceStats{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ConnectedDeviceCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ConnectedDeviceCount = i64
|
|
}
|
|
|
|
case "RegisteredDeviceCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.RegisteredDeviceCount = i64
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDeviceSummaries(v *[]types.DeviceSummary, 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.DeviceSummary
|
|
if *v == nil {
|
|
cv = []types.DeviceSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.DeviceSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentDeviceSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDeviceSummary(v **types.DeviceSummary, 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.DeviceSummary
|
|
if *v == nil {
|
|
sv = &types.DeviceSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AgentVersion":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgeVersion to be of type string, got %T instead", value)
|
|
}
|
|
sv.AgentVersion = ptr.String(jtv)
|
|
}
|
|
|
|
case "Description":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DeviceDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.Description = ptr.String(jtv)
|
|
}
|
|
|
|
case "DeviceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DeviceArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.DeviceArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "DeviceFleetName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DeviceFleetName = ptr.String(jtv)
|
|
}
|
|
|
|
case "DeviceName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DeviceName = ptr.String(jtv)
|
|
}
|
|
|
|
case "IotThingName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ThingName to be of type string, got %T instead", value)
|
|
}
|
|
sv.IotThingName = ptr.String(jtv)
|
|
}
|
|
|
|
case "LatestHeartbeat":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LatestHeartbeat = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Models":
|
|
if err := awsAwsjson11_deserializeDocumentEdgeModelSummaries(&sv.Models, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RegistrationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.RegistrationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDomainDetails(v **types.DomainDetails, 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.DomainDetails
|
|
if *v == nil {
|
|
sv = &types.DomainDetails{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DomainArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DomainArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.DomainArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "DomainId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DomainId to be of type string, got %T instead", value)
|
|
}
|
|
sv.DomainId = ptr.String(jtv)
|
|
}
|
|
|
|
case "DomainName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DomainName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DomainName = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Status":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DomainStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.Status = types.DomainStatus(jtv)
|
|
}
|
|
|
|
case "Url":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String1024 to be of type string, got %T instead", value)
|
|
}
|
|
sv.Url = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDomainList(v *[]types.DomainDetails, 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.DomainDetails
|
|
if *v == nil {
|
|
cv = []types.DomainDetails{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.DomainDetails
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentDomainDetails(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDomainSecurityGroupIds(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 SecurityGroupId to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentDomainSettings(v **types.DomainSettings, 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.DomainSettings
|
|
if *v == nil {
|
|
sv = &types.DomainSettings{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "RStudioServerProDomainSettings":
|
|
if err := awsAwsjson11_deserializeDocumentRStudioServerProDomainSettings(&sv.RStudioServerProDomainSettings, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SecurityGroupIds":
|
|
if err := awsAwsjson11_deserializeDocumentDomainSecurityGroupIds(&sv.SecurityGroupIds, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEdgeModel(v **types.EdgeModel, 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.EdgeModel
|
|
if *v == nil {
|
|
sv = &types.EdgeModel{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "LatestInference":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LatestInference = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LatestSampleTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LatestSampleTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ModelName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelVersion":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgeVersion to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelVersion = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEdgeModels(v *[]types.EdgeModel, 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.EdgeModel
|
|
if *v == nil {
|
|
cv = []types.EdgeModel{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.EdgeModel
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentEdgeModel(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEdgeModelStat(v **types.EdgeModelStat, 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.EdgeModelStat
|
|
if *v == nil {
|
|
sv = &types.EdgeModelStat{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ActiveDeviceCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ActiveDeviceCount = i64
|
|
}
|
|
|
|
case "ConnectedDeviceCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ConnectedDeviceCount = i64
|
|
}
|
|
|
|
case "ModelName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelVersion":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgeVersion to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelVersion = ptr.String(jtv)
|
|
}
|
|
|
|
case "OfflineDeviceCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.OfflineDeviceCount = i64
|
|
}
|
|
|
|
case "SamplingDeviceCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected Long to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.SamplingDeviceCount = i64
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEdgeModelStats(v *[]types.EdgeModelStat, 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.EdgeModelStat
|
|
if *v == nil {
|
|
cv = []types.EdgeModelStat{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.EdgeModelStat
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentEdgeModelStat(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEdgeModelSummaries(v *[]types.EdgeModelSummary, 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.EdgeModelSummary
|
|
if *v == nil {
|
|
cv = []types.EdgeModelSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.EdgeModelSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentEdgeModelSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEdgeModelSummary(v **types.EdgeModelSummary, 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.EdgeModelSummary
|
|
if *v == nil {
|
|
sv = &types.EdgeModelSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ModelName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelVersion":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgeVersion to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelVersion = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEdgeOutputConfig(v **types.EdgeOutputConfig, 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.EdgeOutputConfig
|
|
if *v == nil {
|
|
sv = &types.EdgeOutputConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "PresetDeploymentConfig":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.PresetDeploymentConfig = ptr.String(jtv)
|
|
}
|
|
|
|
case "PresetDeploymentType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgePresetDeploymentType to be of type string, got %T instead", value)
|
|
}
|
|
sv.PresetDeploymentType = types.EdgePresetDeploymentType(jtv)
|
|
}
|
|
|
|
case "S3OutputLocation":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3OutputLocation = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEdgePackagingJobSummaries(v *[]types.EdgePackagingJobSummary, 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.EdgePackagingJobSummary
|
|
if *v == nil {
|
|
cv = []types.EdgePackagingJobSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.EdgePackagingJobSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentEdgePackagingJobSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEdgePackagingJobSummary(v **types.EdgePackagingJobSummary, 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.EdgePackagingJobSummary
|
|
if *v == nil {
|
|
sv = &types.EdgePackagingJobSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CompilationJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompilationJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "EdgePackagingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgePackagingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.EdgePackagingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "EdgePackagingJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EdgePackagingJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "EdgePackagingJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgePackagingJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.EdgePackagingJobStatus = types.EdgePackagingJobStatus(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ModelName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelVersion":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgeVersion to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelVersion = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEdgePresetDeploymentOutput(v **types.EdgePresetDeploymentOutput, 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.EdgePresetDeploymentOutput
|
|
if *v == nil {
|
|
sv = &types.EdgePresetDeploymentOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Artifact":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgePresetDeploymentArtifact to be of type string, got %T instead", value)
|
|
}
|
|
sv.Artifact = ptr.String(jtv)
|
|
}
|
|
|
|
case "Status":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgePresetDeploymentStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.Status = types.EdgePresetDeploymentStatus(jtv)
|
|
}
|
|
|
|
case "StatusMessage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.StatusMessage = ptr.String(jtv)
|
|
}
|
|
|
|
case "Type":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgePresetDeploymentType to be of type string, got %T instead", value)
|
|
}
|
|
sv.Type = types.EdgePresetDeploymentType(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEndpoint(v **types.Endpoint, 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.Endpoint
|
|
if *v == nil {
|
|
sv = &types.Endpoint{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DataCaptureConfig":
|
|
if err := awsAwsjson11_deserializeDocumentDataCaptureConfigSummary(&sv.DataCaptureConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "EndpointArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "EndpointConfigName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointConfigName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointConfigName = ptr.String(jtv)
|
|
}
|
|
|
|
case "EndpointName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointName = ptr.String(jtv)
|
|
}
|
|
|
|
case "EndpointStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointStatus = types.EndpointStatus(jtv)
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MonitoringSchedules":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringScheduleList(&sv.MonitoringSchedules, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProductionVariants":
|
|
if err := awsAwsjson11_deserializeDocumentProductionVariantSummaryList(&sv.ProductionVariants, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEndpointConfigSummary(v **types.EndpointConfigSummary, 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.EndpointConfigSummary
|
|
if *v == nil {
|
|
sv = &types.EndpointConfigSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "EndpointConfigArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointConfigArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointConfigArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "EndpointConfigName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointConfigName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointConfigName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEndpointConfigSummaryList(v *[]types.EndpointConfigSummary, 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.EndpointConfigSummary
|
|
if *v == nil {
|
|
cv = []types.EndpointConfigSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.EndpointConfigSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentEndpointConfigSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEndpointInput(v **types.EndpointInput, 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.EndpointInput
|
|
if *v == nil {
|
|
sv = &types.EndpointInput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EndpointName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointName = ptr.String(jtv)
|
|
}
|
|
|
|
case "EndTimeOffset":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringTimeOffsetString to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndTimeOffset = ptr.String(jtv)
|
|
}
|
|
|
|
case "FeaturesAttribute":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.FeaturesAttribute = ptr.String(jtv)
|
|
}
|
|
|
|
case "InferenceAttribute":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.InferenceAttribute = ptr.String(jtv)
|
|
}
|
|
|
|
case "LocalPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingLocalPath to be of type string, got %T instead", value)
|
|
}
|
|
sv.LocalPath = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProbabilityAttribute":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProbabilityAttribute = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProbabilityThresholdAttribute":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ProbabilityThresholdAttribute = ptr.Float64(f64)
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.ProbabilityThresholdAttribute = ptr.Float64(f64)
|
|
|
|
default:
|
|
return fmt.Errorf("expected ProbabilityThresholdAttribute to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "S3DataDistributionType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingS3DataDistributionType to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3DataDistributionType = types.ProcessingS3DataDistributionType(jtv)
|
|
}
|
|
|
|
case "S3InputMode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingS3InputMode to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3InputMode = types.ProcessingS3InputMode(jtv)
|
|
}
|
|
|
|
case "StartTimeOffset":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringTimeOffsetString to be of type string, got %T instead", value)
|
|
}
|
|
sv.StartTimeOffset = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEndpointSummary(v **types.EndpointSummary, 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.EndpointSummary
|
|
if *v == nil {
|
|
sv = &types.EndpointSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "EndpointArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "EndpointName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointName = ptr.String(jtv)
|
|
}
|
|
|
|
case "EndpointStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointStatus = types.EndpointStatus(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEndpointSummaryList(v *[]types.EndpointSummary, 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.EndpointSummary
|
|
if *v == nil {
|
|
cv = []types.EndpointSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.EndpointSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentEndpointSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentEnvironmentMap(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 EnvironmentValue to be of type string, got %T instead", value)
|
|
}
|
|
parsedVal = jtv
|
|
}
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentExperiment(v **types.Experiment, 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.Experiment
|
|
if *v == nil {
|
|
sv = &types.Experiment{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Description":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.Description = ptr.String(jtv)
|
|
}
|
|
|
|
case "DisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ExperimentArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExperimentArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ExperimentName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExperimentName = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Source":
|
|
if err := awsAwsjson11_deserializeDocumentExperimentSource(&sv.Source, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentExperimentConfig(v **types.ExperimentConfig, 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.ExperimentConfig
|
|
if *v == nil {
|
|
sv = &types.ExperimentConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ExperimentName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExperimentName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialComponentDisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialComponentDisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentExperimentSource(v **types.ExperimentSource, 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.ExperimentSource
|
|
if *v == nil {
|
|
sv = &types.ExperimentSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "SourceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentSourceArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "SourceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SourceType to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceType = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentExperimentSummaries(v *[]types.ExperimentSummary, 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.ExperimentSummary
|
|
if *v == nil {
|
|
cv = []types.ExperimentSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ExperimentSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentExperimentSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentExperimentSummary(v **types.ExperimentSummary, 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.ExperimentSummary
|
|
if *v == nil {
|
|
sv = &types.ExperimentSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ExperimentArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExperimentArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ExperimentName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExperimentName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ExperimentSource":
|
|
if err := awsAwsjson11_deserializeDocumentExperimentSource(&sv.ExperimentSource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentExplainability(v **types.Explainability, 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.Explainability
|
|
if *v == nil {
|
|
sv = &types.Explainability{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Report":
|
|
if err := awsAwsjson11_deserializeDocumentMetricsSource(&sv.Report, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentFeatureDefinition(v **types.FeatureDefinition, 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.FeatureDefinition
|
|
if *v == nil {
|
|
sv = &types.FeatureDefinition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "FeatureName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureName to be of type string, got %T instead", value)
|
|
}
|
|
sv.FeatureName = ptr.String(jtv)
|
|
}
|
|
|
|
case "FeatureType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureType to be of type string, got %T instead", value)
|
|
}
|
|
sv.FeatureType = types.FeatureType(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentFeatureDefinitions(v *[]types.FeatureDefinition, 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.FeatureDefinition
|
|
if *v == nil {
|
|
cv = []types.FeatureDefinition{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.FeatureDefinition
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentFeatureDefinition(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentFeatureGroup(v **types.FeatureGroup, 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.FeatureGroup
|
|
if *v == nil {
|
|
sv = &types.FeatureGroup{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Description":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected Description to be of type string, got %T instead", value)
|
|
}
|
|
sv.Description = ptr.String(jtv)
|
|
}
|
|
|
|
case "EventTimeFeatureName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EventTimeFeatureName = ptr.String(jtv)
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "FeatureDefinitions":
|
|
if err := awsAwsjson11_deserializeDocumentFeatureDefinitions(&sv.FeatureDefinitions, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "FeatureGroupArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureGroupArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.FeatureGroupArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "FeatureGroupName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureGroupName to be of type string, got %T instead", value)
|
|
}
|
|
sv.FeatureGroupName = ptr.String(jtv)
|
|
}
|
|
|
|
case "FeatureGroupStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureGroupStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.FeatureGroupStatus = types.FeatureGroupStatus(jtv)
|
|
}
|
|
|
|
case "OfflineStoreConfig":
|
|
if err := awsAwsjson11_deserializeDocumentOfflineStoreConfig(&sv.OfflineStoreConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OfflineStoreStatus":
|
|
if err := awsAwsjson11_deserializeDocumentOfflineStoreStatus(&sv.OfflineStoreStatus, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OnlineStoreConfig":
|
|
if err := awsAwsjson11_deserializeDocumentOnlineStoreConfig(&sv.OnlineStoreConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RecordIdentifierFeatureName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureName to be of type string, got %T instead", value)
|
|
}
|
|
sv.RecordIdentifierFeatureName = ptr.String(jtv)
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentFeatureGroupSummaries(v *[]types.FeatureGroupSummary, 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.FeatureGroupSummary
|
|
if *v == nil {
|
|
cv = []types.FeatureGroupSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.FeatureGroupSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentFeatureGroupSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentFeatureGroupSummary(v **types.FeatureGroupSummary, 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.FeatureGroupSummary
|
|
if *v == nil {
|
|
sv = &types.FeatureGroupSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FeatureGroupArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureGroupArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.FeatureGroupArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "FeatureGroupName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureGroupName to be of type string, got %T instead", value)
|
|
}
|
|
sv.FeatureGroupName = ptr.String(jtv)
|
|
}
|
|
|
|
case "FeatureGroupStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureGroupStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.FeatureGroupStatus = types.FeatureGroupStatus(jtv)
|
|
}
|
|
|
|
case "OfflineStoreStatus":
|
|
if err := awsAwsjson11_deserializeDocumentOfflineStoreStatus(&sv.OfflineStoreStatus, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentFileSystemConfig(v **types.FileSystemConfig, 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.FileSystemConfig
|
|
if *v == nil {
|
|
sv = &types.FileSystemConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DefaultGid":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected DefaultGid to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.DefaultGid = int32(i64)
|
|
}
|
|
|
|
case "DefaultUid":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected DefaultUid to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.DefaultUid = int32(i64)
|
|
}
|
|
|
|
case "MountPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MountPath to be of type string, got %T instead", value)
|
|
}
|
|
sv.MountPath = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentFileSystemDataSource(v **types.FileSystemDataSource, 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.FileSystemDataSource
|
|
if *v == nil {
|
|
sv = &types.FileSystemDataSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DirectoryPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DirectoryPath to be of type string, got %T instead", value)
|
|
}
|
|
sv.DirectoryPath = ptr.String(jtv)
|
|
}
|
|
|
|
case "FileSystemAccessMode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FileSystemAccessMode to be of type string, got %T instead", value)
|
|
}
|
|
sv.FileSystemAccessMode = types.FileSystemAccessMode(jtv)
|
|
}
|
|
|
|
case "FileSystemId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value)
|
|
}
|
|
sv.FileSystemId = ptr.String(jtv)
|
|
}
|
|
|
|
case "FileSystemType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FileSystemType to be of type string, got %T instead", value)
|
|
}
|
|
sv.FileSystemType = types.FileSystemType(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentFinalAutoMLJobObjectiveMetric(v **types.FinalAutoMLJobObjectiveMetric, 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.FinalAutoMLJobObjectiveMetric
|
|
if *v == nil {
|
|
sv = &types.FinalAutoMLJobObjectiveMetric{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MetricName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLMetricEnum to be of type string, got %T instead", value)
|
|
}
|
|
sv.MetricName = types.AutoMLMetricEnum(jtv)
|
|
}
|
|
|
|
case "Type":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobObjectiveType to be of type string, got %T instead", value)
|
|
}
|
|
sv.Type = types.AutoMLJobObjectiveType(jtv)
|
|
}
|
|
|
|
case "Value":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Value = float32(f64)
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.Value = float32(f64)
|
|
|
|
default:
|
|
return fmt.Errorf("expected MetricValue to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentFinalHyperParameterTuningJobObjectiveMetric(v **types.FinalHyperParameterTuningJobObjectiveMetric, 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.FinalHyperParameterTuningJobObjectiveMetric
|
|
if *v == nil {
|
|
sv = &types.FinalHyperParameterTuningJobObjectiveMetric{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MetricName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MetricName to be of type string, got %T instead", value)
|
|
}
|
|
sv.MetricName = ptr.String(jtv)
|
|
}
|
|
|
|
case "Type":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobObjectiveType to be of type string, got %T instead", value)
|
|
}
|
|
sv.Type = types.HyperParameterTuningJobObjectiveType(jtv)
|
|
}
|
|
|
|
case "Value":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Value = float32(f64)
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.Value = float32(f64)
|
|
|
|
default:
|
|
return fmt.Errorf("expected MetricValue to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentFinalMetricDataList(v *[]types.MetricData, 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.MetricData
|
|
if *v == nil {
|
|
cv = []types.MetricData{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.MetricData
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentMetricData(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentFlowDefinitionOutputConfig(v **types.FlowDefinitionOutputConfig, 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.FlowDefinitionOutputConfig
|
|
if *v == nil {
|
|
sv = &types.FlowDefinitionOutputConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3OutputPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3OutputPath = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentFlowDefinitionSummaries(v *[]types.FlowDefinitionSummary, 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.FlowDefinitionSummary
|
|
if *v == nil {
|
|
cv = []types.FlowDefinitionSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.FlowDefinitionSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentFlowDefinitionSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentFlowDefinitionSummary(v **types.FlowDefinitionSummary, 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.FlowDefinitionSummary
|
|
if *v == nil {
|
|
sv = &types.FlowDefinitionSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "FlowDefinitionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FlowDefinitionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.FlowDefinitionArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "FlowDefinitionName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FlowDefinitionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.FlowDefinitionName = ptr.String(jtv)
|
|
}
|
|
|
|
case "FlowDefinitionStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FlowDefinitionStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.FlowDefinitionStatus = types.FlowDefinitionStatus(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentFlowDefinitionTaskKeywords(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 FlowDefinitionTaskKeyword to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentGitConfig(v **types.GitConfig, 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.GitConfig
|
|
if *v == nil {
|
|
sv = &types.GitConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Branch":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected Branch to be of type string, got %T instead", value)
|
|
}
|
|
sv.Branch = ptr.String(jtv)
|
|
}
|
|
|
|
case "RepositoryUrl":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected GitConfigUrl to be of type string, got %T instead", value)
|
|
}
|
|
sv.RepositoryUrl = ptr.String(jtv)
|
|
}
|
|
|
|
case "SecretArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SecretArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.SecretArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentGroups(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 Group to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHookParameters(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 ConfigValue to be of type string, got %T instead", value)
|
|
}
|
|
parsedVal = jtv
|
|
}
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHumanLoopActivationConditionsConfig(v **types.HumanLoopActivationConditionsConfig, 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.HumanLoopActivationConditionsConfig
|
|
if *v == nil {
|
|
sv = &types.HumanLoopActivationConditionsConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "HumanLoopActivationConditions":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SynthesizedJsonHumanLoopActivationConditions to be of type string, got %T instead", value)
|
|
}
|
|
sv.HumanLoopActivationConditions = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHumanLoopActivationConfig(v **types.HumanLoopActivationConfig, 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.HumanLoopActivationConfig
|
|
if *v == nil {
|
|
sv = &types.HumanLoopActivationConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "HumanLoopActivationConditionsConfig":
|
|
if err := awsAwsjson11_deserializeDocumentHumanLoopActivationConditionsConfig(&sv.HumanLoopActivationConditionsConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHumanLoopConfig(v **types.HumanLoopConfig, 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.HumanLoopConfig
|
|
if *v == nil {
|
|
sv = &types.HumanLoopConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "HumanTaskUiArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HumanTaskUiArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.HumanTaskUiArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "PublicWorkforceTaskPrice":
|
|
if err := awsAwsjson11_deserializeDocumentPublicWorkforceTaskPrice(&sv.PublicWorkforceTaskPrice, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TaskAvailabilityLifetimeInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected FlowDefinitionTaskAvailabilityLifetimeInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TaskAvailabilityLifetimeInSeconds = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "TaskCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected FlowDefinitionTaskCount to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TaskCount = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "TaskDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FlowDefinitionTaskDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.TaskDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "TaskKeywords":
|
|
if err := awsAwsjson11_deserializeDocumentFlowDefinitionTaskKeywords(&sv.TaskKeywords, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TaskTimeLimitInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected FlowDefinitionTaskTimeLimitInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TaskTimeLimitInSeconds = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "TaskTitle":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FlowDefinitionTaskTitle to be of type string, got %T instead", value)
|
|
}
|
|
sv.TaskTitle = ptr.String(jtv)
|
|
}
|
|
|
|
case "WorkteamArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected WorkteamArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.WorkteamArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHumanLoopRequestSource(v **types.HumanLoopRequestSource, 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.HumanLoopRequestSource
|
|
if *v == nil {
|
|
sv = &types.HumanLoopRequestSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AwsManagedHumanLoopRequestSource":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AwsManagedHumanLoopRequestSource to be of type string, got %T instead", value)
|
|
}
|
|
sv.AwsManagedHumanLoopRequestSource = types.AwsManagedHumanLoopRequestSource(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHumanTaskConfig(v **types.HumanTaskConfig, 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.HumanTaskConfig
|
|
if *v == nil {
|
|
sv = &types.HumanTaskConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AnnotationConsolidationConfig":
|
|
if err := awsAwsjson11_deserializeDocumentAnnotationConsolidationConfig(&sv.AnnotationConsolidationConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "MaxConcurrentTaskCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxConcurrentTaskCount to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxConcurrentTaskCount = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "NumberOfHumanWorkersPerDataObject":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected NumberOfHumanWorkersPerDataObject to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.NumberOfHumanWorkersPerDataObject = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "PreHumanTaskLambdaArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LambdaFunctionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PreHumanTaskLambdaArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "PublicWorkforceTaskPrice":
|
|
if err := awsAwsjson11_deserializeDocumentPublicWorkforceTaskPrice(&sv.PublicWorkforceTaskPrice, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TaskAvailabilityLifetimeInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TaskAvailabilityLifetimeInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TaskAvailabilityLifetimeInSeconds = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "TaskDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TaskDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.TaskDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "TaskKeywords":
|
|
if err := awsAwsjson11_deserializeDocumentTaskKeywords(&sv.TaskKeywords, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TaskTimeLimitInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TaskTimeLimitInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TaskTimeLimitInSeconds = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "TaskTitle":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TaskTitle to be of type string, got %T instead", value)
|
|
}
|
|
sv.TaskTitle = ptr.String(jtv)
|
|
}
|
|
|
|
case "UiConfig":
|
|
if err := awsAwsjson11_deserializeDocumentUiConfig(&sv.UiConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "WorkteamArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected WorkteamArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.WorkteamArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHumanTaskUiSummaries(v *[]types.HumanTaskUiSummary, 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.HumanTaskUiSummary
|
|
if *v == nil {
|
|
cv = []types.HumanTaskUiSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.HumanTaskUiSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentHumanTaskUiSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHumanTaskUiSummary(v **types.HumanTaskUiSummary, 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.HumanTaskUiSummary
|
|
if *v == nil {
|
|
sv = &types.HumanTaskUiSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "HumanTaskUiArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HumanTaskUiArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.HumanTaskUiArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "HumanTaskUiName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HumanTaskUiName to be of type string, got %T instead", value)
|
|
}
|
|
sv.HumanTaskUiName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHyperParameterAlgorithmSpecification(v **types.HyperParameterAlgorithmSpecification, 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.HyperParameterAlgorithmSpecification
|
|
if *v == nil {
|
|
sv = &types.HyperParameterAlgorithmSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AlgorithmName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ArnOrName to be of type string, got %T instead", value)
|
|
}
|
|
sv.AlgorithmName = ptr.String(jtv)
|
|
}
|
|
|
|
case "MetricDefinitions":
|
|
if err := awsAwsjson11_deserializeDocumentMetricDefinitionList(&sv.MetricDefinitions, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrainingImage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AlgorithmImage to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingImage = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingInputMode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingInputMode to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingInputMode = types.TrainingInputMode(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHyperParameters(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 HyperParameterValue to be of type string, got %T instead", value)
|
|
}
|
|
parsedVal = jtv
|
|
}
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHyperParameterSpecification(v **types.HyperParameterSpecification, 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.HyperParameterSpecification
|
|
if *v == nil {
|
|
sv = &types.HyperParameterSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DefaultValue":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.DefaultValue = ptr.String(jtv)
|
|
}
|
|
|
|
case "Description":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.Description = ptr.String(jtv)
|
|
}
|
|
|
|
case "IsRequired":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.IsRequired = jtv
|
|
}
|
|
|
|
case "IsTunable":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.IsTunable = jtv
|
|
}
|
|
|
|
case "Name":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ParameterName to be of type string, got %T instead", value)
|
|
}
|
|
sv.Name = ptr.String(jtv)
|
|
}
|
|
|
|
case "Range":
|
|
if err := awsAwsjson11_deserializeDocumentParameterRange(&sv.Range, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Type":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ParameterType to be of type string, got %T instead", value)
|
|
}
|
|
sv.Type = types.ParameterType(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHyperParameterSpecifications(v *[]types.HyperParameterSpecification, 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.HyperParameterSpecification
|
|
if *v == nil {
|
|
cv = []types.HyperParameterSpecification{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.HyperParameterSpecification
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterSpecification(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHyperParameterTrainingJobDefinition(v **types.HyperParameterTrainingJobDefinition, 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.HyperParameterTrainingJobDefinition
|
|
if *v == nil {
|
|
sv = &types.HyperParameterTrainingJobDefinition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AlgorithmSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterAlgorithmSpecification(&sv.AlgorithmSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CheckpointConfig":
|
|
if err := awsAwsjson11_deserializeDocumentCheckpointConfig(&sv.CheckpointConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DefinitionName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTrainingJobDefinitionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DefinitionName = ptr.String(jtv)
|
|
}
|
|
|
|
case "EnableInterContainerTrafficEncryption":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableInterContainerTrafficEncryption = jtv
|
|
}
|
|
|
|
case "EnableManagedSpotTraining":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableManagedSpotTraining = jtv
|
|
}
|
|
|
|
case "EnableNetworkIsolation":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableNetworkIsolation = jtv
|
|
}
|
|
|
|
case "HyperParameterRanges":
|
|
if err := awsAwsjson11_deserializeDocumentParameterRanges(&sv.HyperParameterRanges, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "InputDataConfig":
|
|
if err := awsAwsjson11_deserializeDocumentInputDataConfig(&sv.InputDataConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OutputDataConfig":
|
|
if err := awsAwsjson11_deserializeDocumentOutputDataConfig(&sv.OutputDataConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ResourceConfig":
|
|
if err := awsAwsjson11_deserializeDocumentResourceConfig(&sv.ResourceConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RetryStrategy":
|
|
if err := awsAwsjson11_deserializeDocumentRetryStrategy(&sv.RetryStrategy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "StaticHyperParameters":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameters(&sv.StaticHyperParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "StoppingCondition":
|
|
if err := awsAwsjson11_deserializeDocumentStoppingCondition(&sv.StoppingCondition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TuningObjective":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterTuningJobObjective(&sv.TuningObjective, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "VpcConfig":
|
|
if err := awsAwsjson11_deserializeDocumentVpcConfig(&sv.VpcConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHyperParameterTrainingJobDefinitions(v *[]types.HyperParameterTrainingJobDefinition, 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.HyperParameterTrainingJobDefinition
|
|
if *v == nil {
|
|
cv = []types.HyperParameterTrainingJobDefinition{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.HyperParameterTrainingJobDefinition
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterTrainingJobDefinition(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHyperParameterTrainingJobSummaries(v *[]types.HyperParameterTrainingJobSummary, 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.HyperParameterTrainingJobSummary
|
|
if *v == nil {
|
|
cv = []types.HyperParameterTrainingJobSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.HyperParameterTrainingJobSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterTrainingJobSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHyperParameterTrainingJobSummary(v **types.HyperParameterTrainingJobSummary, 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.HyperParameterTrainingJobSummary
|
|
if *v == nil {
|
|
sv = &types.HyperParameterTrainingJobSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "FinalHyperParameterTuningJobObjectiveMetric":
|
|
if err := awsAwsjson11_deserializeDocumentFinalHyperParameterTuningJobObjectiveMetric(&sv.FinalHyperParameterTuningJobObjectiveMetric, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ObjectiveStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ObjectiveStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ObjectiveStatus = types.ObjectiveStatus(jtv)
|
|
}
|
|
|
|
case "TrainingEndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TrainingEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "TrainingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingJobDefinitionName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTrainingJobDefinitionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobDefinitionName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobStatus = types.TrainingJobStatus(jtv)
|
|
}
|
|
|
|
case "TrainingStartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TrainingStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "TunedHyperParameters":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameters(&sv.TunedHyperParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TuningJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TuningJobName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHyperParameterTuningJobConfig(v **types.HyperParameterTuningJobConfig, 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.HyperParameterTuningJobConfig
|
|
if *v == nil {
|
|
sv = &types.HyperParameterTuningJobConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "HyperParameterTuningJobObjective":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterTuningJobObjective(&sv.HyperParameterTuningJobObjective, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ParameterRanges":
|
|
if err := awsAwsjson11_deserializeDocumentParameterRanges(&sv.ParameterRanges, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ResourceLimits":
|
|
if err := awsAwsjson11_deserializeDocumentResourceLimits(&sv.ResourceLimits, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Strategy":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobStrategyType to be of type string, got %T instead", value)
|
|
}
|
|
sv.Strategy = types.HyperParameterTuningJobStrategyType(jtv)
|
|
}
|
|
|
|
case "TrainingJobEarlyStoppingType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobEarlyStoppingType to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobEarlyStoppingType = types.TrainingJobEarlyStoppingType(jtv)
|
|
}
|
|
|
|
case "TuningJobCompletionCriteria":
|
|
if err := awsAwsjson11_deserializeDocumentTuningJobCompletionCriteria(&sv.TuningJobCompletionCriteria, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHyperParameterTuningJobObjective(v **types.HyperParameterTuningJobObjective, 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.HyperParameterTuningJobObjective
|
|
if *v == nil {
|
|
sv = &types.HyperParameterTuningJobObjective{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MetricName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MetricName to be of type string, got %T instead", value)
|
|
}
|
|
sv.MetricName = ptr.String(jtv)
|
|
}
|
|
|
|
case "Type":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobObjectiveType to be of type string, got %T instead", value)
|
|
}
|
|
sv.Type = types.HyperParameterTuningJobObjectiveType(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHyperParameterTuningJobObjectives(v *[]types.HyperParameterTuningJobObjective, 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.HyperParameterTuningJobObjective
|
|
if *v == nil {
|
|
cv = []types.HyperParameterTuningJobObjective{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.HyperParameterTuningJobObjective
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterTuningJobObjective(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHyperParameterTuningJobSummaries(v *[]types.HyperParameterTuningJobSummary, 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.HyperParameterTuningJobSummary
|
|
if *v == nil {
|
|
cv = []types.HyperParameterTuningJobSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.HyperParameterTuningJobSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterTuningJobSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHyperParameterTuningJobSummary(v **types.HyperParameterTuningJobSummary, 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.HyperParameterTuningJobSummary
|
|
if *v == nil {
|
|
sv = &types.HyperParameterTuningJobSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "HyperParameterTuningEndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.HyperParameterTuningEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "HyperParameterTuningJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.HyperParameterTuningJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "HyperParameterTuningJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.HyperParameterTuningJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "HyperParameterTuningJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.HyperParameterTuningJobStatus = types.HyperParameterTuningJobStatus(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ObjectiveStatusCounters":
|
|
if err := awsAwsjson11_deserializeDocumentObjectiveStatusCounters(&sv.ObjectiveStatusCounters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ResourceLimits":
|
|
if err := awsAwsjson11_deserializeDocumentResourceLimits(&sv.ResourceLimits, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Strategy":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobStrategyType to be of type string, got %T instead", value)
|
|
}
|
|
sv.Strategy = types.HyperParameterTuningJobStrategyType(jtv)
|
|
}
|
|
|
|
case "TrainingJobStatusCounters":
|
|
if err := awsAwsjson11_deserializeDocumentTrainingJobStatusCounters(&sv.TrainingJobStatusCounters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentHyperParameterTuningJobWarmStartConfig(v **types.HyperParameterTuningJobWarmStartConfig, 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.HyperParameterTuningJobWarmStartConfig
|
|
if *v == nil {
|
|
sv = &types.HyperParameterTuningJobWarmStartConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ParentHyperParameterTuningJobs":
|
|
if err := awsAwsjson11_deserializeDocumentParentHyperParameterTuningJobs(&sv.ParentHyperParameterTuningJobs, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "WarmStartType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobWarmStartType to be of type string, got %T instead", value)
|
|
}
|
|
sv.WarmStartType = types.HyperParameterTuningJobWarmStartType(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentImage(v **types.Image, 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.Image
|
|
if *v == nil {
|
|
sv = &types.Image{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Description":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.Description = ptr.String(jtv)
|
|
}
|
|
|
|
case "DisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageDisplayName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageStatus = types.ImageStatus(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentImageConfig(v **types.ImageConfig, 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.ImageConfig
|
|
if *v == nil {
|
|
sv = &types.ImageConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "RepositoryAccessMode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RepositoryAccessMode to be of type string, got %T instead", value)
|
|
}
|
|
sv.RepositoryAccessMode = types.RepositoryAccessMode(jtv)
|
|
}
|
|
|
|
case "RepositoryAuthConfig":
|
|
if err := awsAwsjson11_deserializeDocumentRepositoryAuthConfig(&sv.RepositoryAuthConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentImages(v *[]types.Image, 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.Image
|
|
if *v == nil {
|
|
cv = []types.Image{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.Image
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentImage(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentImageVersion(v **types.ImageVersion, 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.ImageVersion
|
|
if *v == nil {
|
|
sv = &types.ImageVersion{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageVersionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageVersionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageVersionArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageVersionStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageVersionStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageVersionStatus = types.ImageVersionStatus(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Version":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageVersionNumber to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Version = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentImageVersions(v *[]types.ImageVersion, 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.ImageVersion
|
|
if *v == nil {
|
|
cv = []types.ImageVersion{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ImageVersion
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentImageVersion(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentInferenceExecutionConfig(v **types.InferenceExecutionConfig, 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.InferenceExecutionConfig
|
|
if *v == nil {
|
|
sv = &types.InferenceExecutionConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Mode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected InferenceExecutionMode to be of type string, got %T instead", value)
|
|
}
|
|
sv.Mode = types.InferenceExecutionMode(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentInferenceSpecification(v **types.InferenceSpecification, 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.InferenceSpecification
|
|
if *v == nil {
|
|
sv = &types.InferenceSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Containers":
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageContainerDefinitionList(&sv.Containers, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SupportedContentTypes":
|
|
if err := awsAwsjson11_deserializeDocumentContentTypes(&sv.SupportedContentTypes, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SupportedRealtimeInferenceInstanceTypes":
|
|
if err := awsAwsjson11_deserializeDocumentRealtimeInferenceInstanceTypes(&sv.SupportedRealtimeInferenceInstanceTypes, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SupportedResponseMIMETypes":
|
|
if err := awsAwsjson11_deserializeDocumentResponseMIMETypes(&sv.SupportedResponseMIMETypes, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SupportedTransformInstanceTypes":
|
|
if err := awsAwsjson11_deserializeDocumentTransformInstanceTypes(&sv.SupportedTransformInstanceTypes, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentInputConfig(v **types.InputConfig, 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.InputConfig
|
|
if *v == nil {
|
|
sv = &types.InputConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DataInputConfig":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DataInputConfig to be of type string, got %T instead", value)
|
|
}
|
|
sv.DataInputConfig = ptr.String(jtv)
|
|
}
|
|
|
|
case "Framework":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected Framework to be of type string, got %T instead", value)
|
|
}
|
|
sv.Framework = types.Framework(jtv)
|
|
}
|
|
|
|
case "FrameworkVersion":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FrameworkVersion to be of type string, got %T instead", value)
|
|
}
|
|
sv.FrameworkVersion = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentInputDataConfig(v *[]types.Channel, 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.Channel
|
|
if *v == nil {
|
|
cv = []types.Channel{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.Channel
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentChannel(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentInputModes(v *[]types.TrainingInputMode, 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.TrainingInputMode
|
|
if *v == nil {
|
|
cv = []types.TrainingInputMode{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.TrainingInputMode
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingInputMode to be of type string, got %T instead", value)
|
|
}
|
|
col = types.TrainingInputMode(jtv)
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentIntegerParameterRange(v **types.IntegerParameterRange, 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.IntegerParameterRange
|
|
if *v == nil {
|
|
sv = &types.IntegerParameterRange{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MaxValue":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.MaxValue = ptr.String(jtv)
|
|
}
|
|
|
|
case "MinValue":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.MinValue = ptr.String(jtv)
|
|
}
|
|
|
|
case "Name":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ParameterKey to be of type string, got %T instead", value)
|
|
}
|
|
sv.Name = ptr.String(jtv)
|
|
}
|
|
|
|
case "ScalingType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterScalingType to be of type string, got %T instead", value)
|
|
}
|
|
sv.ScalingType = types.HyperParameterScalingType(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentIntegerParameterRanges(v *[]types.IntegerParameterRange, 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.IntegerParameterRange
|
|
if *v == nil {
|
|
cv = []types.IntegerParameterRange{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.IntegerParameterRange
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentIntegerParameterRange(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentIntegerParameterRangeSpecification(v **types.IntegerParameterRangeSpecification, 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.IntegerParameterRangeSpecification
|
|
if *v == nil {
|
|
sv = &types.IntegerParameterRangeSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MaxValue":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.MaxValue = ptr.String(jtv)
|
|
}
|
|
|
|
case "MinValue":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.MinValue = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentJsonContentTypes(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 JsonContentType to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentJupyterServerAppSettings(v **types.JupyterServerAppSettings, 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.JupyterServerAppSettings
|
|
if *v == nil {
|
|
sv = &types.JupyterServerAppSettings{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DefaultResourceSpec":
|
|
if err := awsAwsjson11_deserializeDocumentResourceSpec(&sv.DefaultResourceSpec, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LifecycleConfigArns":
|
|
if err := awsAwsjson11_deserializeDocumentLifecycleConfigArns(&sv.LifecycleConfigArns, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentKernelGatewayAppSettings(v **types.KernelGatewayAppSettings, 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.KernelGatewayAppSettings
|
|
if *v == nil {
|
|
sv = &types.KernelGatewayAppSettings{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CustomImages":
|
|
if err := awsAwsjson11_deserializeDocumentCustomImages(&sv.CustomImages, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DefaultResourceSpec":
|
|
if err := awsAwsjson11_deserializeDocumentResourceSpec(&sv.DefaultResourceSpec, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LifecycleConfigArns":
|
|
if err := awsAwsjson11_deserializeDocumentLifecycleConfigArns(&sv.LifecycleConfigArns, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentKernelGatewayImageConfig(v **types.KernelGatewayImageConfig, 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.KernelGatewayImageConfig
|
|
if *v == nil {
|
|
sv = &types.KernelGatewayImageConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "FileSystemConfig":
|
|
if err := awsAwsjson11_deserializeDocumentFileSystemConfig(&sv.FileSystemConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "KernelSpecs":
|
|
if err := awsAwsjson11_deserializeDocumentKernelSpecs(&sv.KernelSpecs, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentKernelSpec(v **types.KernelSpec, 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.KernelSpec
|
|
if *v == nil {
|
|
sv = &types.KernelSpec{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KernelDisplayName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "Name":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KernelName to be of type string, got %T instead", value)
|
|
}
|
|
sv.Name = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentKernelSpecs(v *[]types.KernelSpec, 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.KernelSpec
|
|
if *v == nil {
|
|
cv = []types.KernelSpec{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.KernelSpec
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentKernelSpec(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelCounters(v **types.LabelCounters, 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.LabelCounters
|
|
if *v == nil {
|
|
sv = &types.LabelCounters{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "FailedNonRetryableError":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.FailedNonRetryableError = int32(i64)
|
|
}
|
|
|
|
case "HumanLabeled":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.HumanLabeled = int32(i64)
|
|
}
|
|
|
|
case "MachineLabeled":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MachineLabeled = int32(i64)
|
|
}
|
|
|
|
case "TotalLabeled":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TotalLabeled = int32(i64)
|
|
}
|
|
|
|
case "Unlabeled":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Unlabeled = int32(i64)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelCountersForWorkteam(v **types.LabelCountersForWorkteam, 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.LabelCountersForWorkteam
|
|
if *v == nil {
|
|
sv = &types.LabelCountersForWorkteam{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "HumanLabeled":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.HumanLabeled = int32(i64)
|
|
}
|
|
|
|
case "PendingHuman":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.PendingHuman = int32(i64)
|
|
}
|
|
|
|
case "Total":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Total = int32(i64)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelingJobAlgorithmsConfig(v **types.LabelingJobAlgorithmsConfig, 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.LabelingJobAlgorithmsConfig
|
|
if *v == nil {
|
|
sv = &types.LabelingJobAlgorithmsConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "InitialActiveLearningModelArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.InitialActiveLearningModelArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "LabelingJobAlgorithmSpecificationArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelingJobAlgorithmSpecificationArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.LabelingJobAlgorithmSpecificationArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "LabelingJobResourceConfig":
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobResourceConfig(&sv.LabelingJobResourceConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelingJobDataAttributes(v **types.LabelingJobDataAttributes, 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.LabelingJobDataAttributes
|
|
if *v == nil {
|
|
sv = &types.LabelingJobDataAttributes{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ContentClassifiers":
|
|
if err := awsAwsjson11_deserializeDocumentContentClassifiers(&sv.ContentClassifiers, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelingJobDataSource(v **types.LabelingJobDataSource, 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.LabelingJobDataSource
|
|
if *v == nil {
|
|
sv = &types.LabelingJobDataSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "S3DataSource":
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobS3DataSource(&sv.S3DataSource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SnsDataSource":
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobSnsDataSource(&sv.SnsDataSource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelingJobForWorkteamSummary(v **types.LabelingJobForWorkteamSummary, 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.LabelingJobForWorkteamSummary
|
|
if *v == nil {
|
|
sv = &types.LabelingJobForWorkteamSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "JobReferenceCode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected JobReferenceCode to be of type string, got %T instead", value)
|
|
}
|
|
sv.JobReferenceCode = ptr.String(jtv)
|
|
}
|
|
|
|
case "LabelCounters":
|
|
if err := awsAwsjson11_deserializeDocumentLabelCountersForWorkteam(&sv.LabelCounters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LabelingJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelingJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.LabelingJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "NumberOfHumanWorkersPerDataObject":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected NumberOfHumanWorkersPerDataObject to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.NumberOfHumanWorkersPerDataObject = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "WorkRequesterAccountId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AccountId to be of type string, got %T instead", value)
|
|
}
|
|
sv.WorkRequesterAccountId = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelingJobForWorkteamSummaryList(v *[]types.LabelingJobForWorkteamSummary, 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.LabelingJobForWorkteamSummary
|
|
if *v == nil {
|
|
cv = []types.LabelingJobForWorkteamSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.LabelingJobForWorkteamSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobForWorkteamSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelingJobInputConfig(v **types.LabelingJobInputConfig, 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.LabelingJobInputConfig
|
|
if *v == nil {
|
|
sv = &types.LabelingJobInputConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DataAttributes":
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobDataAttributes(&sv.DataAttributes, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DataSource":
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobDataSource(&sv.DataSource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelingJobOutput(v **types.LabelingJobOutput, 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.LabelingJobOutput
|
|
if *v == nil {
|
|
sv = &types.LabelingJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "FinalActiveLearningModelArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.FinalActiveLearningModelArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "OutputDatasetS3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.OutputDatasetS3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelingJobOutputConfig(v **types.LabelingJobOutputConfig, 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.LabelingJobOutputConfig
|
|
if *v == nil {
|
|
sv = &types.LabelingJobOutputConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3OutputPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3OutputPath = ptr.String(jtv)
|
|
}
|
|
|
|
case "SnsTopicArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SnsTopicArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.SnsTopicArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelingJobResourceConfig(v **types.LabelingJobResourceConfig, 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.LabelingJobResourceConfig
|
|
if *v == nil {
|
|
sv = &types.LabelingJobResourceConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "VolumeKmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.VolumeKmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelingJobS3DataSource(v **types.LabelingJobS3DataSource, 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.LabelingJobS3DataSource
|
|
if *v == nil {
|
|
sv = &types.LabelingJobS3DataSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ManifestS3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.ManifestS3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelingJobSnsDataSource(v **types.LabelingJobSnsDataSource, 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.LabelingJobSnsDataSource
|
|
if *v == nil {
|
|
sv = &types.LabelingJobSnsDataSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "SnsTopicArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SnsTopicArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.SnsTopicArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelingJobStoppingConditions(v **types.LabelingJobStoppingConditions, 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.LabelingJobStoppingConditions
|
|
if *v == nil {
|
|
sv = &types.LabelingJobStoppingConditions{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MaxHumanLabeledObjectCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxHumanLabeledObjectCount to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxHumanLabeledObjectCount = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "MaxPercentageOfInputDatasetLabeled":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxPercentageOfInputDatasetLabeled to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxPercentageOfInputDatasetLabeled = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelingJobSummary(v **types.LabelingJobSummary, 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.LabelingJobSummary
|
|
if *v == nil {
|
|
sv = &types.LabelingJobSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AnnotationConsolidationLambdaArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LambdaFunctionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AnnotationConsolidationLambdaArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "InputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobInputConfig(&sv.InputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LabelCounters":
|
|
if err := awsAwsjson11_deserializeDocumentLabelCounters(&sv.LabelCounters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LabelingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.LabelingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "LabelingJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelingJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.LabelingJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "LabelingJobOutput":
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobOutput(&sv.LabelingJobOutput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LabelingJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelingJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.LabelingJobStatus = types.LabelingJobStatus(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "PreHumanTaskLambdaArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LambdaFunctionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PreHumanTaskLambdaArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "WorkteamArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected WorkteamArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.WorkteamArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLabelingJobSummaryList(v *[]types.LabelingJobSummary, 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.LabelingJobSummary
|
|
if *v == nil {
|
|
cv = []types.LabelingJobSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.LabelingJobSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLambdaStepMetadata(v **types.LambdaStepMetadata, 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.LambdaStepMetadata
|
|
if *v == nil {
|
|
sv = &types.LambdaStepMetadata{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Arn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.Arn = ptr.String(jtv)
|
|
}
|
|
|
|
case "OutputParameters":
|
|
if err := awsAwsjson11_deserializeDocumentOutputParameterList(&sv.OutputParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLifecycleConfigArns(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 StudioLifecycleConfigArn to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentLineageEntityParameters(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 StringParameterValue to be of type string, got %T instead", value)
|
|
}
|
|
parsedVal = jtv
|
|
}
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMemberDefinition(v **types.MemberDefinition, 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.MemberDefinition
|
|
if *v == nil {
|
|
sv = &types.MemberDefinition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CognitoMemberDefinition":
|
|
if err := awsAwsjson11_deserializeDocumentCognitoMemberDefinition(&sv.CognitoMemberDefinition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OidcMemberDefinition":
|
|
if err := awsAwsjson11_deserializeDocumentOidcMemberDefinition(&sv.OidcMemberDefinition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMemberDefinitions(v *[]types.MemberDefinition, 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.MemberDefinition
|
|
if *v == nil {
|
|
cv = []types.MemberDefinition{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.MemberDefinition
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentMemberDefinition(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMetadataProperties(v **types.MetadataProperties, 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.MetadataProperties
|
|
if *v == nil {
|
|
sv = &types.MetadataProperties{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CommitId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MetadataPropertyValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.CommitId = ptr.String(jtv)
|
|
}
|
|
|
|
case "GeneratedBy":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MetadataPropertyValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.GeneratedBy = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProjectId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MetadataPropertyValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectId = ptr.String(jtv)
|
|
}
|
|
|
|
case "Repository":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MetadataPropertyValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.Repository = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMetricData(v **types.MetricData, 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.MetricData
|
|
if *v == nil {
|
|
sv = &types.MetricData{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MetricName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MetricName to be of type string, got %T instead", value)
|
|
}
|
|
sv.MetricName = ptr.String(jtv)
|
|
}
|
|
|
|
case "Timestamp":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Timestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Value":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Value = float32(f64)
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.Value = float32(f64)
|
|
|
|
default:
|
|
return fmt.Errorf("expected Float to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMetricDataList(v *[]types.MetricDatum, 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.MetricDatum
|
|
if *v == nil {
|
|
cv = []types.MetricDatum{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.MetricDatum
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentMetricDatum(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMetricDatum(v **types.MetricDatum, 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.MetricDatum
|
|
if *v == nil {
|
|
sv = &types.MetricDatum{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MetricName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLMetricEnum to be of type string, got %T instead", value)
|
|
}
|
|
sv.MetricName = types.AutoMLMetricEnum(jtv)
|
|
}
|
|
|
|
case "Set":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MetricSetSource to be of type string, got %T instead", value)
|
|
}
|
|
sv.Set = types.MetricSetSource(jtv)
|
|
}
|
|
|
|
case "Value":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Value = float32(f64)
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.Value = float32(f64)
|
|
|
|
default:
|
|
return fmt.Errorf("expected Float to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMetricDefinition(v **types.MetricDefinition, 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.MetricDefinition
|
|
if *v == nil {
|
|
sv = &types.MetricDefinition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Name":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MetricName to be of type string, got %T instead", value)
|
|
}
|
|
sv.Name = ptr.String(jtv)
|
|
}
|
|
|
|
case "Regex":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MetricRegex to be of type string, got %T instead", value)
|
|
}
|
|
sv.Regex = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMetricDefinitionList(v *[]types.MetricDefinition, 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.MetricDefinition
|
|
if *v == nil {
|
|
cv = []types.MetricDefinition{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.MetricDefinition
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentMetricDefinition(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMetricsSource(v **types.MetricsSource, 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.MetricsSource
|
|
if *v == nil {
|
|
sv = &types.MetricsSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ContentDigest":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContentDigest to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContentDigest = ptr.String(jtv)
|
|
}
|
|
|
|
case "ContentType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContentType to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContentType = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelArtifacts(v **types.ModelArtifacts, 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.ModelArtifacts
|
|
if *v == nil {
|
|
sv = &types.ModelArtifacts{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "S3ModelArtifacts":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3ModelArtifacts = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelBiasAppSpecification(v **types.ModelBiasAppSpecification, 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.ModelBiasAppSpecification
|
|
if *v == nil {
|
|
sv = &types.ModelBiasAppSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ConfigUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.ConfigUri = ptr.String(jtv)
|
|
}
|
|
|
|
case "Environment":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringEnvironmentMap(&sv.Environment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ImageUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageUri to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageUri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelBiasBaselineConfig(v **types.ModelBiasBaselineConfig, 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.ModelBiasBaselineConfig
|
|
if *v == nil {
|
|
sv = &types.ModelBiasBaselineConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "BaseliningJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.BaseliningJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ConstraintsResource":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringConstraintsResource(&sv.ConstraintsResource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelBiasJobInput(v **types.ModelBiasJobInput, 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.ModelBiasJobInput
|
|
if *v == nil {
|
|
sv = &types.ModelBiasJobInput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EndpointInput":
|
|
if err := awsAwsjson11_deserializeDocumentEndpointInput(&sv.EndpointInput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "GroundTruthS3Input":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringGroundTruthS3Input(&sv.GroundTruthS3Input, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelClientConfig(v **types.ModelClientConfig, 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.ModelClientConfig
|
|
if *v == nil {
|
|
sv = &types.ModelClientConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "InvocationsMaxRetries":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected InvocationsMaxRetries to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.InvocationsMaxRetries = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "InvocationsTimeoutInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected InvocationsTimeoutInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.InvocationsTimeoutInSeconds = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelDataQuality(v **types.ModelDataQuality, 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.ModelDataQuality
|
|
if *v == nil {
|
|
sv = &types.ModelDataQuality{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Constraints":
|
|
if err := awsAwsjson11_deserializeDocumentMetricsSource(&sv.Constraints, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Statistics":
|
|
if err := awsAwsjson11_deserializeDocumentMetricsSource(&sv.Statistics, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelDeployConfig(v **types.ModelDeployConfig, 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.ModelDeployConfig
|
|
if *v == nil {
|
|
sv = &types.ModelDeployConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AutoGenerateEndpointName":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoGenerateEndpointName to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.AutoGenerateEndpointName = jtv
|
|
}
|
|
|
|
case "EndpointName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelDeployResult(v **types.ModelDeployResult, 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.ModelDeployResult
|
|
if *v == nil {
|
|
sv = &types.ModelDeployResult{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EndpointName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelDigests(v **types.ModelDigests, 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.ModelDigests
|
|
if *v == nil {
|
|
sv = &types.ModelDigests{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ArtifactDigest":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ArtifactDigest to be of type string, got %T instead", value)
|
|
}
|
|
sv.ArtifactDigest = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelExplainabilityAppSpecification(v **types.ModelExplainabilityAppSpecification, 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.ModelExplainabilityAppSpecification
|
|
if *v == nil {
|
|
sv = &types.ModelExplainabilityAppSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ConfigUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.ConfigUri = ptr.String(jtv)
|
|
}
|
|
|
|
case "Environment":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringEnvironmentMap(&sv.Environment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ImageUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageUri to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageUri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelExplainabilityBaselineConfig(v **types.ModelExplainabilityBaselineConfig, 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.ModelExplainabilityBaselineConfig
|
|
if *v == nil {
|
|
sv = &types.ModelExplainabilityBaselineConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "BaseliningJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.BaseliningJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ConstraintsResource":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringConstraintsResource(&sv.ConstraintsResource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelExplainabilityJobInput(v **types.ModelExplainabilityJobInput, 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.ModelExplainabilityJobInput
|
|
if *v == nil {
|
|
sv = &types.ModelExplainabilityJobInput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EndpointInput":
|
|
if err := awsAwsjson11_deserializeDocumentEndpointInput(&sv.EndpointInput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelMetrics(v **types.ModelMetrics, 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.ModelMetrics
|
|
if *v == nil {
|
|
sv = &types.ModelMetrics{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Bias":
|
|
if err := awsAwsjson11_deserializeDocumentBias(&sv.Bias, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Explainability":
|
|
if err := awsAwsjson11_deserializeDocumentExplainability(&sv.Explainability, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelDataQuality":
|
|
if err := awsAwsjson11_deserializeDocumentModelDataQuality(&sv.ModelDataQuality, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelQuality":
|
|
if err := awsAwsjson11_deserializeDocumentModelQuality(&sv.ModelQuality, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelPackage(v **types.ModelPackage, 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.ModelPackage
|
|
if *v == nil {
|
|
sv = &types.ModelPackage{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ApprovalDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ApprovalDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.ApprovalDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "CertifyForMarketplace":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected CertifyForMarketplace to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.CertifyForMarketplace = jtv
|
|
}
|
|
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "CustomerMetadataProperties":
|
|
if err := awsAwsjson11_deserializeDocumentCustomerMetadataMap(&sv.CustomerMetadataProperties, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "InferenceSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentInferenceSpecification(&sv.InferenceSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MetadataProperties":
|
|
if err := awsAwsjson11_deserializeDocumentMetadataProperties(&sv.MetadataProperties, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelApprovalStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelApprovalStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelApprovalStatus = types.ModelApprovalStatus(jtv)
|
|
}
|
|
|
|
case "ModelMetrics":
|
|
if err := awsAwsjson11_deserializeDocumentModelMetrics(&sv.ModelMetrics, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelPackageArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageGroupName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageStatus = types.ModelPackageStatus(jtv)
|
|
}
|
|
|
|
case "ModelPackageStatusDetails":
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageStatusDetails(&sv.ModelPackageStatusDetails, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelPackageVersion":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageVersion to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ModelPackageVersion = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "SourceAlgorithmSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentSourceAlgorithmSpecification(&sv.SourceAlgorithmSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ValidationSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageValidationSpecification(&sv.ValidationSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelPackageContainerDefinition(v **types.ModelPackageContainerDefinition, 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.ModelPackageContainerDefinition
|
|
if *v == nil {
|
|
sv = &types.ModelPackageContainerDefinition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ContainerHostname":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContainerHostname to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContainerHostname = ptr.String(jtv)
|
|
}
|
|
|
|
case "Environment":
|
|
if err := awsAwsjson11_deserializeDocumentEnvironmentMap(&sv.Environment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Image":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContainerImage to be of type string, got %T instead", value)
|
|
}
|
|
sv.Image = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageDigest":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageDigest to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageDigest = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelDataUrl":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected Url to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelDataUrl = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProductId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProductId to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProductId = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelPackageContainerDefinitionList(v *[]types.ModelPackageContainerDefinition, 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.ModelPackageContainerDefinition
|
|
if *v == nil {
|
|
cv = []types.ModelPackageContainerDefinition{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ModelPackageContainerDefinition
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageContainerDefinition(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelPackageGroup(v **types.ModelPackageGroup, 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.ModelPackageGroup
|
|
if *v == nil {
|
|
sv = &types.ModelPackageGroup{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ModelPackageGroupArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageGroupArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageGroupDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageGroupName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageGroupStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageGroupStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupStatus = types.ModelPackageGroupStatus(jtv)
|
|
}
|
|
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelPackageGroupSummary(v **types.ModelPackageGroupSummary, 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.ModelPackageGroupSummary
|
|
if *v == nil {
|
|
sv = &types.ModelPackageGroupSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ModelPackageGroupArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageGroupArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageGroupDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageGroupName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageGroupStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageGroupStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupStatus = types.ModelPackageGroupStatus(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelPackageGroupSummaryList(v *[]types.ModelPackageGroupSummary, 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.ModelPackageGroupSummary
|
|
if *v == nil {
|
|
cv = []types.ModelPackageGroupSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ModelPackageGroupSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageGroupSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelPackageStatusDetails(v **types.ModelPackageStatusDetails, 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.ModelPackageStatusDetails
|
|
if *v == nil {
|
|
sv = &types.ModelPackageStatusDetails{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ImageScanStatuses":
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageStatusItemList(&sv.ImageScanStatuses, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ValidationStatuses":
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageStatusItemList(&sv.ValidationStatuses, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelPackageStatusItem(v **types.ModelPackageStatusItem, 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.ModelPackageStatusItem
|
|
if *v == nil {
|
|
sv = &types.ModelPackageStatusItem{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "Name":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.Name = ptr.String(jtv)
|
|
}
|
|
|
|
case "Status":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DetailedModelPackageStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.Status = types.DetailedModelPackageStatus(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelPackageStatusItemList(v *[]types.ModelPackageStatusItem, 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.ModelPackageStatusItem
|
|
if *v == nil {
|
|
cv = []types.ModelPackageStatusItem{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ModelPackageStatusItem
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageStatusItem(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelPackageSummaries(v *map[string]types.BatchDescribeModelPackageSummary, 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.BatchDescribeModelPackageSummary
|
|
if *v == nil {
|
|
mv = map[string]types.BatchDescribeModelPackageSummary{}
|
|
} else {
|
|
mv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
var parsedVal types.BatchDescribeModelPackageSummary
|
|
mapVar := parsedVal
|
|
destAddr := &mapVar
|
|
if err := awsAwsjson11_deserializeDocumentBatchDescribeModelPackageSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
parsedVal = *destAddr
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelPackageSummary(v **types.ModelPackageSummary, 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.ModelPackageSummary
|
|
if *v == nil {
|
|
sv = &types.ModelPackageSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ModelApprovalStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelApprovalStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelApprovalStatus = types.ModelApprovalStatus(jtv)
|
|
}
|
|
|
|
case "ModelPackageArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageGroupName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageStatus = types.ModelPackageStatus(jtv)
|
|
}
|
|
|
|
case "ModelPackageVersion":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageVersion to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ModelPackageVersion = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelPackageSummaryList(v *[]types.ModelPackageSummary, 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.ModelPackageSummary
|
|
if *v == nil {
|
|
cv = []types.ModelPackageSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ModelPackageSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelPackageValidationProfile(v **types.ModelPackageValidationProfile, 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.ModelPackageValidationProfile
|
|
if *v == nil {
|
|
sv = &types.ModelPackageValidationProfile{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ProfileName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProfileName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TransformJobDefinition":
|
|
if err := awsAwsjson11_deserializeDocumentTransformJobDefinition(&sv.TransformJobDefinition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelPackageValidationProfiles(v *[]types.ModelPackageValidationProfile, 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.ModelPackageValidationProfile
|
|
if *v == nil {
|
|
cv = []types.ModelPackageValidationProfile{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ModelPackageValidationProfile
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageValidationProfile(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelPackageValidationSpecification(v **types.ModelPackageValidationSpecification, 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.ModelPackageValidationSpecification
|
|
if *v == nil {
|
|
sv = &types.ModelPackageValidationSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ValidationProfiles":
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageValidationProfiles(&sv.ValidationProfiles, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ValidationRole":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ValidationRole = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelQuality(v **types.ModelQuality, 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.ModelQuality
|
|
if *v == nil {
|
|
sv = &types.ModelQuality{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Constraints":
|
|
if err := awsAwsjson11_deserializeDocumentMetricsSource(&sv.Constraints, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Statistics":
|
|
if err := awsAwsjson11_deserializeDocumentMetricsSource(&sv.Statistics, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelQualityAppSpecification(v **types.ModelQualityAppSpecification, 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.ModelQualityAppSpecification
|
|
if *v == nil {
|
|
sv = &types.ModelQualityAppSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ContainerArguments":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringContainerArguments(&sv.ContainerArguments, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ContainerEntrypoint":
|
|
if err := awsAwsjson11_deserializeDocumentContainerEntrypoint(&sv.ContainerEntrypoint, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Environment":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringEnvironmentMap(&sv.Environment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ImageUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageUri to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageUri = ptr.String(jtv)
|
|
}
|
|
|
|
case "PostAnalyticsProcessorSourceUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.PostAnalyticsProcessorSourceUri = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProblemType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringProblemType to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProblemType = types.MonitoringProblemType(jtv)
|
|
}
|
|
|
|
case "RecordPreprocessorSourceUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.RecordPreprocessorSourceUri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelQualityBaselineConfig(v **types.ModelQualityBaselineConfig, 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.ModelQualityBaselineConfig
|
|
if *v == nil {
|
|
sv = &types.ModelQualityBaselineConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "BaseliningJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.BaseliningJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ConstraintsResource":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringConstraintsResource(&sv.ConstraintsResource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelQualityJobInput(v **types.ModelQualityJobInput, 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.ModelQualityJobInput
|
|
if *v == nil {
|
|
sv = &types.ModelQualityJobInput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EndpointInput":
|
|
if err := awsAwsjson11_deserializeDocumentEndpointInput(&sv.EndpointInput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "GroundTruthS3Input":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringGroundTruthS3Input(&sv.GroundTruthS3Input, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelStepMetadata(v **types.ModelStepMetadata, 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.ModelStepMetadata
|
|
if *v == nil {
|
|
sv = &types.ModelStepMetadata{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Arn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.Arn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelSummary(v **types.ModelSummary, 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.ModelSummary
|
|
if *v == nil {
|
|
sv = &types.ModelSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ModelArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentModelSummaryList(v *[]types.ModelSummary, 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.ModelSummary
|
|
if *v == nil {
|
|
cv = []types.ModelSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ModelSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentModelSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringAppSpecification(v **types.MonitoringAppSpecification, 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.MonitoringAppSpecification
|
|
if *v == nil {
|
|
sv = &types.MonitoringAppSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ContainerArguments":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringContainerArguments(&sv.ContainerArguments, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ContainerEntrypoint":
|
|
if err := awsAwsjson11_deserializeDocumentContainerEntrypoint(&sv.ContainerEntrypoint, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ImageUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageUri to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageUri = ptr.String(jtv)
|
|
}
|
|
|
|
case "PostAnalyticsProcessorSourceUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.PostAnalyticsProcessorSourceUri = ptr.String(jtv)
|
|
}
|
|
|
|
case "RecordPreprocessorSourceUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.RecordPreprocessorSourceUri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringBaselineConfig(v **types.MonitoringBaselineConfig, 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.MonitoringBaselineConfig
|
|
if *v == nil {
|
|
sv = &types.MonitoringBaselineConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "BaseliningJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.BaseliningJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ConstraintsResource":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringConstraintsResource(&sv.ConstraintsResource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "StatisticsResource":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringStatisticsResource(&sv.StatisticsResource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringClusterConfig(v **types.MonitoringClusterConfig, 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.MonitoringClusterConfig
|
|
if *v == nil {
|
|
sv = &types.MonitoringClusterConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "InstanceCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingInstanceCount to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.InstanceCount = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "InstanceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingInstanceType to be of type string, got %T instead", value)
|
|
}
|
|
sv.InstanceType = types.ProcessingInstanceType(jtv)
|
|
}
|
|
|
|
case "VolumeKmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.VolumeKmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "VolumeSizeInGB":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingVolumeSizeInGB to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.VolumeSizeInGB = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringConstraintsResource(v **types.MonitoringConstraintsResource, 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.MonitoringConstraintsResource
|
|
if *v == nil {
|
|
sv = &types.MonitoringConstraintsResource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "S3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringContainerArguments(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 ContainerArgument to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringEnvironmentMap(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 ProcessingEnvironmentValue to be of type string, got %T instead", value)
|
|
}
|
|
parsedVal = jtv
|
|
}
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringExecutionSummary(v **types.MonitoringExecutionSummary, 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.MonitoringExecutionSummary
|
|
if *v == nil {
|
|
sv = &types.MonitoringExecutionSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "EndpointName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointName = ptr.String(jtv)
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MonitoringExecutionStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExecutionStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringExecutionStatus = types.ExecutionStatus(jtv)
|
|
}
|
|
|
|
case "MonitoringJobDefinitionName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringJobDefinitionName = ptr.String(jtv)
|
|
}
|
|
|
|
case "MonitoringScheduleName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringScheduleName to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringScheduleName = ptr.String(jtv)
|
|
}
|
|
|
|
case "MonitoringType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringType to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringType = types.MonitoringType(jtv)
|
|
}
|
|
|
|
case "ProcessingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProcessingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ScheduledTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ScheduledTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringExecutionSummaryList(v *[]types.MonitoringExecutionSummary, 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.MonitoringExecutionSummary
|
|
if *v == nil {
|
|
cv = []types.MonitoringExecutionSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.MonitoringExecutionSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringExecutionSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringGroundTruthS3Input(v **types.MonitoringGroundTruthS3Input, 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.MonitoringGroundTruthS3Input
|
|
if *v == nil {
|
|
sv = &types.MonitoringGroundTruthS3Input{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "S3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringS3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringInput(v **types.MonitoringInput, 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.MonitoringInput
|
|
if *v == nil {
|
|
sv = &types.MonitoringInput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EndpointInput":
|
|
if err := awsAwsjson11_deserializeDocumentEndpointInput(&sv.EndpointInput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringInputs(v *[]types.MonitoringInput, 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.MonitoringInput
|
|
if *v == nil {
|
|
cv = []types.MonitoringInput{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.MonitoringInput
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringInput(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringJobDefinition(v **types.MonitoringJobDefinition, 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.MonitoringJobDefinition
|
|
if *v == nil {
|
|
sv = &types.MonitoringJobDefinition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "BaselineConfig":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringBaselineConfig(&sv.BaselineConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Environment":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringEnvironmentMap(&sv.Environment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "MonitoringAppSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringAppSpecification(&sv.MonitoringAppSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "MonitoringInputs":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringInputs(&sv.MonitoringInputs, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "MonitoringOutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringOutputConfig(&sv.MonitoringOutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "MonitoringResources":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringResources(&sv.MonitoringResources, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NetworkConfig":
|
|
if err := awsAwsjson11_deserializeDocumentNetworkConfig(&sv.NetworkConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "StoppingCondition":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringStoppingCondition(&sv.StoppingCondition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringJobDefinitionSummary(v **types.MonitoringJobDefinitionSummary, 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.MonitoringJobDefinitionSummary
|
|
if *v == nil {
|
|
sv = &types.MonitoringJobDefinitionSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "EndpointName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointName = ptr.String(jtv)
|
|
}
|
|
|
|
case "MonitoringJobDefinitionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringJobDefinitionArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "MonitoringJobDefinitionName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringJobDefinitionName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringJobDefinitionSummaryList(v *[]types.MonitoringJobDefinitionSummary, 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.MonitoringJobDefinitionSummary
|
|
if *v == nil {
|
|
cv = []types.MonitoringJobDefinitionSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.MonitoringJobDefinitionSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringJobDefinitionSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringNetworkConfig(v **types.MonitoringNetworkConfig, 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.MonitoringNetworkConfig
|
|
if *v == nil {
|
|
sv = &types.MonitoringNetworkConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EnableInterContainerTrafficEncryption":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableInterContainerTrafficEncryption = jtv
|
|
}
|
|
|
|
case "EnableNetworkIsolation":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableNetworkIsolation = jtv
|
|
}
|
|
|
|
case "VpcConfig":
|
|
if err := awsAwsjson11_deserializeDocumentVpcConfig(&sv.VpcConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringOutput(v **types.MonitoringOutput, 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.MonitoringOutput
|
|
if *v == nil {
|
|
sv = &types.MonitoringOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "S3Output":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringS3Output(&sv.S3Output, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringOutputConfig(v **types.MonitoringOutputConfig, 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.MonitoringOutputConfig
|
|
if *v == nil {
|
|
sv = &types.MonitoringOutputConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "MonitoringOutputs":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringOutputs(&sv.MonitoringOutputs, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringOutputs(v *[]types.MonitoringOutput, 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.MonitoringOutput
|
|
if *v == nil {
|
|
cv = []types.MonitoringOutput{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.MonitoringOutput
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringOutput(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringResources(v **types.MonitoringResources, 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.MonitoringResources
|
|
if *v == nil {
|
|
sv = &types.MonitoringResources{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ClusterConfig":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringClusterConfig(&sv.ClusterConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringS3Output(v **types.MonitoringS3Output, 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.MonitoringS3Output
|
|
if *v == nil {
|
|
sv = &types.MonitoringS3Output{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "LocalPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingLocalPath to be of type string, got %T instead", value)
|
|
}
|
|
sv.LocalPath = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3UploadMode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingS3UploadMode to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3UploadMode = types.ProcessingS3UploadMode(jtv)
|
|
}
|
|
|
|
case "S3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringS3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringSchedule(v **types.MonitoringSchedule, 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.MonitoringSchedule
|
|
if *v == nil {
|
|
sv = &types.MonitoringSchedule{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "EndpointName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointName = ptr.String(jtv)
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastMonitoringExecutionSummary":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringExecutionSummary(&sv.LastMonitoringExecutionSummary, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "MonitoringScheduleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringScheduleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringScheduleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "MonitoringScheduleConfig":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringScheduleConfig(&sv.MonitoringScheduleConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "MonitoringScheduleName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringScheduleName to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringScheduleName = ptr.String(jtv)
|
|
}
|
|
|
|
case "MonitoringScheduleStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ScheduleStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringScheduleStatus = types.ScheduleStatus(jtv)
|
|
}
|
|
|
|
case "MonitoringType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringType to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringType = types.MonitoringType(jtv)
|
|
}
|
|
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringScheduleConfig(v **types.MonitoringScheduleConfig, 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.MonitoringScheduleConfig
|
|
if *v == nil {
|
|
sv = &types.MonitoringScheduleConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MonitoringJobDefinition":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringJobDefinition(&sv.MonitoringJobDefinition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "MonitoringJobDefinitionName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringJobDefinitionName = ptr.String(jtv)
|
|
}
|
|
|
|
case "MonitoringType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringType to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringType = types.MonitoringType(jtv)
|
|
}
|
|
|
|
case "ScheduleConfig":
|
|
if err := awsAwsjson11_deserializeDocumentScheduleConfig(&sv.ScheduleConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringScheduleList(v *[]types.MonitoringSchedule, 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.MonitoringSchedule
|
|
if *v == nil {
|
|
cv = []types.MonitoringSchedule{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.MonitoringSchedule
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringSchedule(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringScheduleSummary(v **types.MonitoringScheduleSummary, 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.MonitoringScheduleSummary
|
|
if *v == nil {
|
|
sv = &types.MonitoringScheduleSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "EndpointName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointName = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MonitoringJobDefinitionName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringJobDefinitionName = ptr.String(jtv)
|
|
}
|
|
|
|
case "MonitoringScheduleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringScheduleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringScheduleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "MonitoringScheduleName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringScheduleName to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringScheduleName = ptr.String(jtv)
|
|
}
|
|
|
|
case "MonitoringScheduleStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ScheduleStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringScheduleStatus = types.ScheduleStatus(jtv)
|
|
}
|
|
|
|
case "MonitoringType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringType to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringType = types.MonitoringType(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringScheduleSummaryList(v *[]types.MonitoringScheduleSummary, 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.MonitoringScheduleSummary
|
|
if *v == nil {
|
|
cv = []types.MonitoringScheduleSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.MonitoringScheduleSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringScheduleSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringStatisticsResource(v **types.MonitoringStatisticsResource, 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.MonitoringStatisticsResource
|
|
if *v == nil {
|
|
sv = &types.MonitoringStatisticsResource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "S3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMonitoringStoppingCondition(v **types.MonitoringStoppingCondition, 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.MonitoringStoppingCondition
|
|
if *v == nil {
|
|
sv = &types.MonitoringStoppingCondition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MaxRuntimeInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringMaxRuntimeInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxRuntimeInSeconds = int32(i64)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentMultiModelConfig(v **types.MultiModelConfig, 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.MultiModelConfig
|
|
if *v == nil {
|
|
sv = &types.MultiModelConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ModelCacheSetting":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelCacheSetting to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelCacheSetting = types.ModelCacheSetting(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentNeoVpcConfig(v **types.NeoVpcConfig, 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.NeoVpcConfig
|
|
if *v == nil {
|
|
sv = &types.NeoVpcConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "SecurityGroupIds":
|
|
if err := awsAwsjson11_deserializeDocumentNeoVpcSecurityGroupIds(&sv.SecurityGroupIds, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Subnets":
|
|
if err := awsAwsjson11_deserializeDocumentNeoVpcSubnets(&sv.Subnets, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentNeoVpcSecurityGroupIds(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 NeoVpcSecurityGroupId to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentNeoVpcSubnets(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 NeoVpcSubnetId to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentNetworkConfig(v **types.NetworkConfig, 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.NetworkConfig
|
|
if *v == nil {
|
|
sv = &types.NetworkConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EnableInterContainerTrafficEncryption":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableInterContainerTrafficEncryption = jtv
|
|
}
|
|
|
|
case "EnableNetworkIsolation":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableNetworkIsolation = jtv
|
|
}
|
|
|
|
case "VpcConfig":
|
|
if err := awsAwsjson11_deserializeDocumentVpcConfig(&sv.VpcConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentNotebookInstanceAcceleratorTypes(v *[]types.NotebookInstanceAcceleratorType, 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.NotebookInstanceAcceleratorType
|
|
if *v == nil {
|
|
cv = []types.NotebookInstanceAcceleratorType{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.NotebookInstanceAcceleratorType
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceAcceleratorType to be of type string, got %T instead", value)
|
|
}
|
|
col = types.NotebookInstanceAcceleratorType(jtv)
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentNotebookInstanceLifecycleConfigList(v *[]types.NotebookInstanceLifecycleHook, 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.NotebookInstanceLifecycleHook
|
|
if *v == nil {
|
|
cv = []types.NotebookInstanceLifecycleHook{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.NotebookInstanceLifecycleHook
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentNotebookInstanceLifecycleHook(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentNotebookInstanceLifecycleConfigSummary(v **types.NotebookInstanceLifecycleConfigSummary, 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.NotebookInstanceLifecycleConfigSummary
|
|
if *v == nil {
|
|
sv = &types.NotebookInstanceLifecycleConfigSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "NotebookInstanceLifecycleConfigArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceLifecycleConfigArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotebookInstanceLifecycleConfigArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "NotebookInstanceLifecycleConfigName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceLifecycleConfigName to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotebookInstanceLifecycleConfigName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentNotebookInstanceLifecycleConfigSummaryList(v *[]types.NotebookInstanceLifecycleConfigSummary, 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.NotebookInstanceLifecycleConfigSummary
|
|
if *v == nil {
|
|
cv = []types.NotebookInstanceLifecycleConfigSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.NotebookInstanceLifecycleConfigSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentNotebookInstanceLifecycleConfigSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentNotebookInstanceLifecycleHook(v **types.NotebookInstanceLifecycleHook, 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.NotebookInstanceLifecycleHook
|
|
if *v == nil {
|
|
sv = &types.NotebookInstanceLifecycleHook{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Content":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceLifecycleConfigContent to be of type string, got %T instead", value)
|
|
}
|
|
sv.Content = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentNotebookInstanceSummary(v **types.NotebookInstanceSummary, 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.NotebookInstanceSummary
|
|
if *v == nil {
|
|
sv = &types.NotebookInstanceSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AdditionalCodeRepositories":
|
|
if err := awsAwsjson11_deserializeDocumentAdditionalCodeRepositoryNamesOrUrls(&sv.AdditionalCodeRepositories, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DefaultCodeRepository":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CodeRepositoryNameOrUrl to be of type string, got %T instead", value)
|
|
}
|
|
sv.DefaultCodeRepository = ptr.String(jtv)
|
|
}
|
|
|
|
case "InstanceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected InstanceType to be of type string, got %T instead", value)
|
|
}
|
|
sv.InstanceType = types.InstanceType(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "NotebookInstanceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotebookInstanceArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "NotebookInstanceLifecycleConfigName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceLifecycleConfigName to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotebookInstanceLifecycleConfigName = ptr.String(jtv)
|
|
}
|
|
|
|
case "NotebookInstanceName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceName to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotebookInstanceName = ptr.String(jtv)
|
|
}
|
|
|
|
case "NotebookInstanceStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotebookInstanceStatus = types.NotebookInstanceStatus(jtv)
|
|
}
|
|
|
|
case "Url":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceUrl to be of type string, got %T instead", value)
|
|
}
|
|
sv.Url = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentNotebookInstanceSummaryList(v *[]types.NotebookInstanceSummary, 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.NotebookInstanceSummary
|
|
if *v == nil {
|
|
cv = []types.NotebookInstanceSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.NotebookInstanceSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentNotebookInstanceSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentNotificationConfiguration(v **types.NotificationConfiguration, 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.NotificationConfiguration
|
|
if *v == nil {
|
|
sv = &types.NotificationConfiguration{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NotificationTopicArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotificationTopicArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotificationTopicArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentObjectiveStatusCounters(v **types.ObjectiveStatusCounters, 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.ObjectiveStatusCounters
|
|
if *v == nil {
|
|
sv = &types.ObjectiveStatusCounters{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Failed":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ObjectiveStatusCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Failed = int32(i64)
|
|
}
|
|
|
|
case "Pending":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ObjectiveStatusCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Pending = int32(i64)
|
|
}
|
|
|
|
case "Succeeded":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ObjectiveStatusCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Succeeded = int32(i64)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentOfflineStoreConfig(v **types.OfflineStoreConfig, 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.OfflineStoreConfig
|
|
if *v == nil {
|
|
sv = &types.OfflineStoreConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DataCatalogConfig":
|
|
if err := awsAwsjson11_deserializeDocumentDataCatalogConfig(&sv.DataCatalogConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DisableGlueTableCreation":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.DisableGlueTableCreation = jtv
|
|
}
|
|
|
|
case "S3StorageConfig":
|
|
if err := awsAwsjson11_deserializeDocumentS3StorageConfig(&sv.S3StorageConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentOfflineStoreStatus(v **types.OfflineStoreStatus, 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.OfflineStoreStatus
|
|
if *v == nil {
|
|
sv = &types.OfflineStoreStatus{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "BlockedReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected BlockedReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.BlockedReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "Status":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected OfflineStoreStatusValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.Status = types.OfflineStoreStatusValue(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentOidcConfigForResponse(v **types.OidcConfigForResponse, 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.OidcConfigForResponse
|
|
if *v == nil {
|
|
sv = &types.OidcConfigForResponse{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AuthorizationEndpoint":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected OidcEndpoint to be of type string, got %T instead", value)
|
|
}
|
|
sv.AuthorizationEndpoint = ptr.String(jtv)
|
|
}
|
|
|
|
case "ClientId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ClientId to be of type string, got %T instead", value)
|
|
}
|
|
sv.ClientId = ptr.String(jtv)
|
|
}
|
|
|
|
case "Issuer":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected OidcEndpoint to be of type string, got %T instead", value)
|
|
}
|
|
sv.Issuer = ptr.String(jtv)
|
|
}
|
|
|
|
case "JwksUri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected OidcEndpoint to be of type string, got %T instead", value)
|
|
}
|
|
sv.JwksUri = ptr.String(jtv)
|
|
}
|
|
|
|
case "LogoutEndpoint":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected OidcEndpoint to be of type string, got %T instead", value)
|
|
}
|
|
sv.LogoutEndpoint = ptr.String(jtv)
|
|
}
|
|
|
|
case "TokenEndpoint":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected OidcEndpoint to be of type string, got %T instead", value)
|
|
}
|
|
sv.TokenEndpoint = ptr.String(jtv)
|
|
}
|
|
|
|
case "UserInfoEndpoint":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected OidcEndpoint to be of type string, got %T instead", value)
|
|
}
|
|
sv.UserInfoEndpoint = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentOidcMemberDefinition(v **types.OidcMemberDefinition, 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.OidcMemberDefinition
|
|
if *v == nil {
|
|
sv = &types.OidcMemberDefinition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Groups":
|
|
if err := awsAwsjson11_deserializeDocumentGroups(&sv.Groups, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentOnlineStoreConfig(v **types.OnlineStoreConfig, 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.OnlineStoreConfig
|
|
if *v == nil {
|
|
sv = &types.OnlineStoreConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EnableOnlineStore":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableOnlineStore = jtv
|
|
}
|
|
|
|
case "SecurityConfig":
|
|
if err := awsAwsjson11_deserializeDocumentOnlineStoreSecurityConfig(&sv.SecurityConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentOnlineStoreSecurityConfig(v **types.OnlineStoreSecurityConfig, 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.OnlineStoreSecurityConfig
|
|
if *v == nil {
|
|
sv = &types.OnlineStoreSecurityConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentOutputConfig(v **types.OutputConfig, 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.OutputConfig
|
|
if *v == nil {
|
|
sv = &types.OutputConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CompilerOptions":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CompilerOptions to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompilerOptions = ptr.String(jtv)
|
|
}
|
|
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3OutputLocation":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3OutputLocation = ptr.String(jtv)
|
|
}
|
|
|
|
case "TargetDevice":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TargetDevice to be of type string, got %T instead", value)
|
|
}
|
|
sv.TargetDevice = types.TargetDevice(jtv)
|
|
}
|
|
|
|
case "TargetPlatform":
|
|
if err := awsAwsjson11_deserializeDocumentTargetPlatform(&sv.TargetPlatform, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentOutputDataConfig(v **types.OutputDataConfig, 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.OutputDataConfig
|
|
if *v == nil {
|
|
sv = &types.OutputDataConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3OutputPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3OutputPath = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentOutputParameter(v **types.OutputParameter, 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.OutputParameter
|
|
if *v == nil {
|
|
sv = &types.OutputParameter{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Name":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.Name = ptr.String(jtv)
|
|
}
|
|
|
|
case "Value":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String1024 to be of type string, got %T instead", value)
|
|
}
|
|
sv.Value = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentOutputParameterList(v *[]types.OutputParameter, 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.OutputParameter
|
|
if *v == nil {
|
|
cv = []types.OutputParameter{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.OutputParameter
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentOutputParameter(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentParameter(v **types.Parameter, 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.Parameter
|
|
if *v == nil {
|
|
sv = &types.Parameter{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Name":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineParameterName to be of type string, got %T instead", value)
|
|
}
|
|
sv.Name = ptr.String(jtv)
|
|
}
|
|
|
|
case "Value":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String1024 to be of type string, got %T instead", value)
|
|
}
|
|
sv.Value = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentParameterList(v *[]types.Parameter, 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.Parameter
|
|
if *v == nil {
|
|
cv = []types.Parameter{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.Parameter
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentParameter(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentParameterRange(v **types.ParameterRange, 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.ParameterRange
|
|
if *v == nil {
|
|
sv = &types.ParameterRange{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CategoricalParameterRangeSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentCategoricalParameterRangeSpecification(&sv.CategoricalParameterRangeSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ContinuousParameterRangeSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentContinuousParameterRangeSpecification(&sv.ContinuousParameterRangeSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "IntegerParameterRangeSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentIntegerParameterRangeSpecification(&sv.IntegerParameterRangeSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentParameterRanges(v **types.ParameterRanges, 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.ParameterRanges
|
|
if *v == nil {
|
|
sv = &types.ParameterRanges{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CategoricalParameterRanges":
|
|
if err := awsAwsjson11_deserializeDocumentCategoricalParameterRanges(&sv.CategoricalParameterRanges, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ContinuousParameterRanges":
|
|
if err := awsAwsjson11_deserializeDocumentContinuousParameterRanges(&sv.ContinuousParameterRanges, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "IntegerParameterRanges":
|
|
if err := awsAwsjson11_deserializeDocumentIntegerParameterRanges(&sv.IntegerParameterRanges, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentParameterValues(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 ParameterValue to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentParent(v **types.Parent, 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.Parent
|
|
if *v == nil {
|
|
sv = &types.Parent{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ExperimentName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExperimentName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentParentHyperParameterTuningJob(v **types.ParentHyperParameterTuningJob, 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.ParentHyperParameterTuningJob
|
|
if *v == nil {
|
|
sv = &types.ParentHyperParameterTuningJob{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "HyperParameterTuningJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.HyperParameterTuningJobName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentParentHyperParameterTuningJobs(v *[]types.ParentHyperParameterTuningJob, 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.ParentHyperParameterTuningJob
|
|
if *v == nil {
|
|
cv = []types.ParentHyperParameterTuningJob{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ParentHyperParameterTuningJob
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentParentHyperParameterTuningJob(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentParents(v *[]types.Parent, 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.Parent
|
|
if *v == nil {
|
|
cv = []types.Parent{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.Parent
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentParent(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPendingDeploymentSummary(v **types.PendingDeploymentSummary, 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.PendingDeploymentSummary
|
|
if *v == nil {
|
|
sv = &types.PendingDeploymentSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EndpointConfigName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointConfigName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointConfigName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProductionVariants":
|
|
if err := awsAwsjson11_deserializeDocumentPendingProductionVariantSummaryList(&sv.ProductionVariants, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "StartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPendingProductionVariantSummary(v **types.PendingProductionVariantSummary, 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.PendingProductionVariantSummary
|
|
if *v == nil {
|
|
sv = &types.PendingProductionVariantSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AcceleratorType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProductionVariantAcceleratorType to be of type string, got %T instead", value)
|
|
}
|
|
sv.AcceleratorType = types.ProductionVariantAcceleratorType(jtv)
|
|
}
|
|
|
|
case "CurrentInstanceCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TaskCount to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CurrentInstanceCount = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "CurrentWeight":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CurrentWeight = ptr.Float32(float32(f64))
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.CurrentWeight = ptr.Float32(float32(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected VariantWeight to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DeployedImages":
|
|
if err := awsAwsjson11_deserializeDocumentDeployedImages(&sv.DeployedImages, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DesiredInstanceCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TaskCount to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.DesiredInstanceCount = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "DesiredWeight":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.DesiredWeight = ptr.Float32(float32(f64))
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.DesiredWeight = ptr.Float32(float32(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected VariantWeight to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "InstanceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProductionVariantInstanceType to be of type string, got %T instead", value)
|
|
}
|
|
sv.InstanceType = types.ProductionVariantInstanceType(jtv)
|
|
}
|
|
|
|
case "VariantName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected VariantName to be of type string, got %T instead", value)
|
|
}
|
|
sv.VariantName = ptr.String(jtv)
|
|
}
|
|
|
|
case "VariantStatus":
|
|
if err := awsAwsjson11_deserializeDocumentProductionVariantStatusList(&sv.VariantStatus, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPendingProductionVariantSummaryList(v *[]types.PendingProductionVariantSummary, 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.PendingProductionVariantSummary
|
|
if *v == nil {
|
|
cv = []types.PendingProductionVariantSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.PendingProductionVariantSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentPendingProductionVariantSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPipeline(v **types.Pipeline, 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.Pipeline
|
|
if *v == nil {
|
|
sv = &types.Pipeline{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastRunTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastRunTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "PipelineArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineDisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineName to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineDisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineName to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineName = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineStatus = types.PipelineStatus(jtv)
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPipelineExecution(v **types.PipelineExecution, value interface{}) error {
|
|
if v == nil {
|
|
return fmt.Errorf("unexpected nil of type %T", v)
|
|
}
|
|
if value == nil {
|
|
return nil
|
|
}
|
|
|
|
shape, ok := value.(map[string]interface{})
|
|
if !ok {
|
|
return fmt.Errorf("unexpected JSON type %v", value)
|
|
}
|
|
|
|
var sv *types.PipelineExecution
|
|
if *v == nil {
|
|
sv = &types.PipelineExecution{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionFailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "PipelineArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineExecutionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineExecutionDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineExecutionDisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionDisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineExecutionStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionStatus = types.PipelineExecutionStatus(jtv)
|
|
}
|
|
|
|
case "PipelineExperimentConfig":
|
|
if err := awsAwsjson11_deserializeDocumentPipelineExperimentConfig(&sv.PipelineExperimentConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "PipelineParameters":
|
|
if err := awsAwsjson11_deserializeDocumentParameterList(&sv.PipelineParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPipelineExecutionStep(v **types.PipelineExecutionStep, 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.PipelineExecutionStep
|
|
if *v == nil {
|
|
sv = &types.PipelineExecutionStep{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CacheHitResult":
|
|
if err := awsAwsjson11_deserializeDocumentCacheHitResult(&sv.CacheHitResult, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "EndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "Metadata":
|
|
if err := awsAwsjson11_deserializeDocumentPipelineExecutionStepMetadata(&sv.Metadata, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "StartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "StepName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected StepName to be of type string, got %T instead", value)
|
|
}
|
|
sv.StepName = ptr.String(jtv)
|
|
}
|
|
|
|
case "StepStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected StepStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.StepStatus = types.StepStatus(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPipelineExecutionStepList(v *[]types.PipelineExecutionStep, 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.PipelineExecutionStep
|
|
if *v == nil {
|
|
cv = []types.PipelineExecutionStep{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.PipelineExecutionStep
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentPipelineExecutionStep(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPipelineExecutionStepMetadata(v **types.PipelineExecutionStepMetadata, 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.PipelineExecutionStepMetadata
|
|
if *v == nil {
|
|
sv = &types.PipelineExecutionStepMetadata{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Callback":
|
|
if err := awsAwsjson11_deserializeDocumentCallbackStepMetadata(&sv.Callback, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Condition":
|
|
if err := awsAwsjson11_deserializeDocumentConditionStepMetadata(&sv.Condition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Lambda":
|
|
if err := awsAwsjson11_deserializeDocumentLambdaStepMetadata(&sv.Lambda, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Model":
|
|
if err := awsAwsjson11_deserializeDocumentModelStepMetadata(&sv.Model, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProcessingJob":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingJobStepMetadata(&sv.ProcessingJob, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RegisterModel":
|
|
if err := awsAwsjson11_deserializeDocumentRegisterModelStepMetadata(&sv.RegisterModel, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrainingJob":
|
|
if err := awsAwsjson11_deserializeDocumentTrainingJobStepMetadata(&sv.TrainingJob, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TransformJob":
|
|
if err := awsAwsjson11_deserializeDocumentTransformJobStepMetadata(&sv.TransformJob, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TuningJob":
|
|
if err := awsAwsjson11_deserializeDocumentTuningJobStepMetaData(&sv.TuningJob, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPipelineExecutionSummary(v **types.PipelineExecutionSummary, value interface{}) error {
|
|
if v == nil {
|
|
return fmt.Errorf("unexpected nil of type %T", v)
|
|
}
|
|
if value == nil {
|
|
return nil
|
|
}
|
|
|
|
shape, ok := value.(map[string]interface{})
|
|
if !ok {
|
|
return fmt.Errorf("unexpected JSON type %v", value)
|
|
}
|
|
|
|
var sv *types.PipelineExecutionSummary
|
|
if *v == nil {
|
|
sv = &types.PipelineExecutionSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "PipelineExecutionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineExecutionDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineExecutionDisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionDisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineExecutionStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionStatus = types.PipelineExecutionStatus(jtv)
|
|
}
|
|
|
|
case "StartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPipelineExecutionSummaryList(v *[]types.PipelineExecutionSummary, value interface{}) error {
|
|
if v == nil {
|
|
return fmt.Errorf("unexpected nil of type %T", v)
|
|
}
|
|
if value == nil {
|
|
return nil
|
|
}
|
|
|
|
shape, ok := value.([]interface{})
|
|
if !ok {
|
|
return fmt.Errorf("unexpected JSON type %v", value)
|
|
}
|
|
|
|
var cv []types.PipelineExecutionSummary
|
|
if *v == nil {
|
|
cv = []types.PipelineExecutionSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.PipelineExecutionSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentPipelineExecutionSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPipelineExperimentConfig(v **types.PipelineExperimentConfig, 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.PipelineExperimentConfig
|
|
if *v == nil {
|
|
sv = &types.PipelineExperimentConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ExperimentName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExperimentName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPipelineSummary(v **types.PipelineSummary, value interface{}) error {
|
|
if v == nil {
|
|
return fmt.Errorf("unexpected nil of type %T", v)
|
|
}
|
|
if value == nil {
|
|
return nil
|
|
}
|
|
|
|
shape, ok := value.(map[string]interface{})
|
|
if !ok {
|
|
return fmt.Errorf("unexpected JSON type %v", value)
|
|
}
|
|
|
|
var sv *types.PipelineSummary
|
|
if *v == nil {
|
|
sv = &types.PipelineSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastExecutionTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastExecutionTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "PipelineArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineDisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineName to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineDisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineName to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineName = ptr.String(jtv)
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPipelineSummaryList(v *[]types.PipelineSummary, value interface{}) error {
|
|
if v == nil {
|
|
return fmt.Errorf("unexpected nil of type %T", v)
|
|
}
|
|
if value == nil {
|
|
return nil
|
|
}
|
|
|
|
shape, ok := value.([]interface{})
|
|
if !ok {
|
|
return fmt.Errorf("unexpected JSON type %v", value)
|
|
}
|
|
|
|
var cv []types.PipelineSummary
|
|
if *v == nil {
|
|
cv = []types.PipelineSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.PipelineSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentPipelineSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingClusterConfig(v **types.ProcessingClusterConfig, 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.ProcessingClusterConfig
|
|
if *v == nil {
|
|
sv = &types.ProcessingClusterConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "InstanceCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingInstanceCount to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.InstanceCount = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "InstanceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingInstanceType to be of type string, got %T instead", value)
|
|
}
|
|
sv.InstanceType = types.ProcessingInstanceType(jtv)
|
|
}
|
|
|
|
case "VolumeKmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.VolumeKmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "VolumeSizeInGB":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingVolumeSizeInGB to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.VolumeSizeInGB = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingEnvironmentMap(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 ProcessingEnvironmentValue to be of type string, got %T instead", value)
|
|
}
|
|
parsedVal = jtv
|
|
}
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingFeatureStoreOutput(v **types.ProcessingFeatureStoreOutput, 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.ProcessingFeatureStoreOutput
|
|
if *v == nil {
|
|
sv = &types.ProcessingFeatureStoreOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "FeatureGroupName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureGroupName to be of type string, got %T instead", value)
|
|
}
|
|
sv.FeatureGroupName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingInput(v **types.ProcessingInput, 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.ProcessingInput
|
|
if *v == nil {
|
|
sv = &types.ProcessingInput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AppManaged":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppManaged to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.AppManaged = jtv
|
|
}
|
|
|
|
case "DatasetDefinition":
|
|
if err := awsAwsjson11_deserializeDocumentDatasetDefinition(&sv.DatasetDefinition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "InputName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.InputName = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3Input":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingS3Input(&sv.S3Input, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingInputs(v *[]types.ProcessingInput, 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.ProcessingInput
|
|
if *v == nil {
|
|
cv = []types.ProcessingInput{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ProcessingInput
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentProcessingInput(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingJob(v **types.ProcessingJob, 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.ProcessingJob
|
|
if *v == nil {
|
|
sv = &types.ProcessingJob{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AppSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentAppSpecification(&sv.AppSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "AutoMLJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AutoMLJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Environment":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingEnvironmentMap(&sv.Environment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ExitMessage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExitMessage to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExitMessage = ptr.String(jtv)
|
|
}
|
|
|
|
case "ExperimentConfig":
|
|
if err := awsAwsjson11_deserializeDocumentExperimentConfig(&sv.ExperimentConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MonitoringScheduleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringScheduleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringScheduleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "NetworkConfig":
|
|
if err := awsAwsjson11_deserializeDocumentNetworkConfig(&sv.NetworkConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProcessingEndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ProcessingEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ProcessingInputs":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingInputs(&sv.ProcessingInputs, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProcessingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProcessingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProcessingJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProcessingJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProcessingJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProcessingJobStatus = types.ProcessingJobStatus(jtv)
|
|
}
|
|
|
|
case "ProcessingOutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingOutputConfig(&sv.ProcessingOutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProcessingResources":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingResources(&sv.ProcessingResources, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProcessingStartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ProcessingStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "StoppingCondition":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingStoppingCondition(&sv.StoppingCondition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrainingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingJobStepMetadata(v **types.ProcessingJobStepMetadata, 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.ProcessingJobStepMetadata
|
|
if *v == nil {
|
|
sv = &types.ProcessingJobStepMetadata{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Arn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.Arn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingJobSummaries(v *[]types.ProcessingJobSummary, 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.ProcessingJobSummary
|
|
if *v == nil {
|
|
cv = []types.ProcessingJobSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ProcessingJobSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentProcessingJobSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingJobSummary(v **types.ProcessingJobSummary, 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.ProcessingJobSummary
|
|
if *v == nil {
|
|
sv = &types.ProcessingJobSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ExitMessage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExitMessage to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExitMessage = ptr.String(jtv)
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ProcessingEndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ProcessingEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ProcessingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProcessingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProcessingJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProcessingJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProcessingJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProcessingJobStatus = types.ProcessingJobStatus(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingOutput(v **types.ProcessingOutput, 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.ProcessingOutput
|
|
if *v == nil {
|
|
sv = &types.ProcessingOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AppManaged":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppManaged to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.AppManaged = jtv
|
|
}
|
|
|
|
case "FeatureStoreOutput":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingFeatureStoreOutput(&sv.FeatureStoreOutput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OutputName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.OutputName = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3Output":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingS3Output(&sv.S3Output, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingOutputConfig(v **types.ProcessingOutputConfig, 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.ProcessingOutputConfig
|
|
if *v == nil {
|
|
sv = &types.ProcessingOutputConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "Outputs":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingOutputs(&sv.Outputs, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingOutputs(v *[]types.ProcessingOutput, 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.ProcessingOutput
|
|
if *v == nil {
|
|
cv = []types.ProcessingOutput{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ProcessingOutput
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentProcessingOutput(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingResources(v **types.ProcessingResources, 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.ProcessingResources
|
|
if *v == nil {
|
|
sv = &types.ProcessingResources{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ClusterConfig":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingClusterConfig(&sv.ClusterConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingS3Input(v **types.ProcessingS3Input, 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.ProcessingS3Input
|
|
if *v == nil {
|
|
sv = &types.ProcessingS3Input{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "LocalPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingLocalPath to be of type string, got %T instead", value)
|
|
}
|
|
sv.LocalPath = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3CompressionType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingS3CompressionType to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3CompressionType = types.ProcessingS3CompressionType(jtv)
|
|
}
|
|
|
|
case "S3DataDistributionType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingS3DataDistributionType to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3DataDistributionType = types.ProcessingS3DataDistributionType(jtv)
|
|
}
|
|
|
|
case "S3DataType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingS3DataType to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3DataType = types.ProcessingS3DataType(jtv)
|
|
}
|
|
|
|
case "S3InputMode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingS3InputMode to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3InputMode = types.ProcessingS3InputMode(jtv)
|
|
}
|
|
|
|
case "S3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingS3Output(v **types.ProcessingS3Output, 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.ProcessingS3Output
|
|
if *v == nil {
|
|
sv = &types.ProcessingS3Output{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "LocalPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingLocalPath to be of type string, got %T instead", value)
|
|
}
|
|
sv.LocalPath = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3UploadMode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingS3UploadMode to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3UploadMode = types.ProcessingS3UploadMode(jtv)
|
|
}
|
|
|
|
case "S3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProcessingStoppingCondition(v **types.ProcessingStoppingCondition, 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.ProcessingStoppingCondition
|
|
if *v == nil {
|
|
sv = &types.ProcessingStoppingCondition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MaxRuntimeInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingMaxRuntimeInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxRuntimeInSeconds = int32(i64)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProductionVariant(v **types.ProductionVariant, 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.ProductionVariant
|
|
if *v == nil {
|
|
sv = &types.ProductionVariant{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AcceleratorType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProductionVariantAcceleratorType to be of type string, got %T instead", value)
|
|
}
|
|
sv.AcceleratorType = types.ProductionVariantAcceleratorType(jtv)
|
|
}
|
|
|
|
case "CoreDumpConfig":
|
|
if err := awsAwsjson11_deserializeDocumentProductionVariantCoreDumpConfig(&sv.CoreDumpConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "InitialInstanceCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected InitialTaskCount to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.InitialInstanceCount = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "InitialVariantWeight":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.InitialVariantWeight = ptr.Float32(float32(f64))
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.InitialVariantWeight = ptr.Float32(float32(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected VariantWeight to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "InstanceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProductionVariantInstanceType to be of type string, got %T instead", value)
|
|
}
|
|
sv.InstanceType = types.ProductionVariantInstanceType(jtv)
|
|
}
|
|
|
|
case "ModelName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelName = ptr.String(jtv)
|
|
}
|
|
|
|
case "VariantName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected VariantName to be of type string, got %T instead", value)
|
|
}
|
|
sv.VariantName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProductionVariantCoreDumpConfig(v **types.ProductionVariantCoreDumpConfig, 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.ProductionVariantCoreDumpConfig
|
|
if *v == nil {
|
|
sv = &types.ProductionVariantCoreDumpConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DestinationS3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DestinationS3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.DestinationS3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProductionVariantList(v *[]types.ProductionVariant, 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.ProductionVariant
|
|
if *v == nil {
|
|
cv = []types.ProductionVariant{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ProductionVariant
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentProductionVariant(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProductionVariantStatus(v **types.ProductionVariantStatus, 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.ProductionVariantStatus
|
|
if *v == nil {
|
|
sv = &types.ProductionVariantStatus{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "StartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Status":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected VariantStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.Status = types.VariantStatus(jtv)
|
|
}
|
|
|
|
case "StatusMessage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected VariantStatusMessage to be of type string, got %T instead", value)
|
|
}
|
|
sv.StatusMessage = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProductionVariantStatusList(v *[]types.ProductionVariantStatus, 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.ProductionVariantStatus
|
|
if *v == nil {
|
|
cv = []types.ProductionVariantStatus{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ProductionVariantStatus
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentProductionVariantStatus(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProductionVariantSummary(v **types.ProductionVariantSummary, 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.ProductionVariantSummary
|
|
if *v == nil {
|
|
sv = &types.ProductionVariantSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CurrentInstanceCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TaskCount to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CurrentInstanceCount = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "CurrentWeight":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CurrentWeight = ptr.Float32(float32(f64))
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.CurrentWeight = ptr.Float32(float32(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected VariantWeight to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DeployedImages":
|
|
if err := awsAwsjson11_deserializeDocumentDeployedImages(&sv.DeployedImages, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DesiredInstanceCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TaskCount to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.DesiredInstanceCount = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "DesiredWeight":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.DesiredWeight = ptr.Float32(float32(f64))
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.DesiredWeight = ptr.Float32(float32(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected VariantWeight to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "VariantName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected VariantName to be of type string, got %T instead", value)
|
|
}
|
|
sv.VariantName = ptr.String(jtv)
|
|
}
|
|
|
|
case "VariantStatus":
|
|
if err := awsAwsjson11_deserializeDocumentProductionVariantStatusList(&sv.VariantStatus, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProductionVariantSummaryList(v *[]types.ProductionVariantSummary, 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.ProductionVariantSummary
|
|
if *v == nil {
|
|
cv = []types.ProductionVariantSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ProductionVariantSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentProductionVariantSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProductListings(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 String to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProfilerConfig(v **types.ProfilerConfig, 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.ProfilerConfig
|
|
if *v == nil {
|
|
sv = &types.ProfilerConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ProfilingIntervalInMilliseconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProfilingIntervalInMilliseconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ProfilingIntervalInMilliseconds = ptr.Int64(i64)
|
|
}
|
|
|
|
case "ProfilingParameters":
|
|
if err := awsAwsjson11_deserializeDocumentProfilingParameters(&sv.ProfilingParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "S3OutputPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3OutputPath = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProfilerRuleConfiguration(v **types.ProfilerRuleConfiguration, 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.ProfilerRuleConfiguration
|
|
if *v == nil {
|
|
sv = &types.ProfilerRuleConfiguration{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "InstanceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingInstanceType to be of type string, got %T instead", value)
|
|
}
|
|
sv.InstanceType = types.ProcessingInstanceType(jtv)
|
|
}
|
|
|
|
case "LocalPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DirectoryPath to be of type string, got %T instead", value)
|
|
}
|
|
sv.LocalPath = ptr.String(jtv)
|
|
}
|
|
|
|
case "RuleConfigurationName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RuleConfigurationName to be of type string, got %T instead", value)
|
|
}
|
|
sv.RuleConfigurationName = ptr.String(jtv)
|
|
}
|
|
|
|
case "RuleEvaluatorImage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AlgorithmImage to be of type string, got %T instead", value)
|
|
}
|
|
sv.RuleEvaluatorImage = ptr.String(jtv)
|
|
}
|
|
|
|
case "RuleParameters":
|
|
if err := awsAwsjson11_deserializeDocumentRuleParameters(&sv.RuleParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "S3OutputPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3OutputPath = ptr.String(jtv)
|
|
}
|
|
|
|
case "VolumeSizeInGB":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected OptionalVolumeSizeInGB to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.VolumeSizeInGB = int32(i64)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProfilerRuleConfigurations(v *[]types.ProfilerRuleConfiguration, 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.ProfilerRuleConfiguration
|
|
if *v == nil {
|
|
cv = []types.ProfilerRuleConfiguration{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ProfilerRuleConfiguration
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentProfilerRuleConfiguration(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProfilerRuleEvaluationStatus(v **types.ProfilerRuleEvaluationStatus, 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.ProfilerRuleEvaluationStatus
|
|
if *v == nil {
|
|
sv = &types.ProfilerRuleEvaluationStatus{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "RuleConfigurationName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RuleConfigurationName to be of type string, got %T instead", value)
|
|
}
|
|
sv.RuleConfigurationName = ptr.String(jtv)
|
|
}
|
|
|
|
case "RuleEvaluationJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RuleEvaluationJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "RuleEvaluationStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RuleEvaluationStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.RuleEvaluationStatus = types.RuleEvaluationStatus(jtv)
|
|
}
|
|
|
|
case "StatusDetails":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected StatusDetails to be of type string, got %T instead", value)
|
|
}
|
|
sv.StatusDetails = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProfilerRuleEvaluationStatuses(v *[]types.ProfilerRuleEvaluationStatus, 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.ProfilerRuleEvaluationStatus
|
|
if *v == nil {
|
|
cv = []types.ProfilerRuleEvaluationStatus{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ProfilerRuleEvaluationStatus
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentProfilerRuleEvaluationStatus(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProfilingParameters(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 ConfigValue to be of type string, got %T instead", value)
|
|
}
|
|
parsedVal = jtv
|
|
}
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProject(v **types.Project, 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.Project
|
|
if *v == nil {
|
|
sv = &types.Project{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ProjectArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProjectArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProjectDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProjectId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProjectId to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectId = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProjectName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProjectEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProjectStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProjectStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectStatus = types.ProjectStatus(jtv)
|
|
}
|
|
|
|
case "ServiceCatalogProvisionedProductDetails":
|
|
if err := awsAwsjson11_deserializeDocumentServiceCatalogProvisionedProductDetails(&sv.ServiceCatalogProvisionedProductDetails, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ServiceCatalogProvisioningDetails":
|
|
if err := awsAwsjson11_deserializeDocumentServiceCatalogProvisioningDetails(&sv.ServiceCatalogProvisioningDetails, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProjectSummary(v **types.ProjectSummary, 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.ProjectSummary
|
|
if *v == nil {
|
|
sv = &types.ProjectSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ProjectArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProjectArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProjectDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProjectId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProjectId to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectId = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProjectName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProjectEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProjectStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProjectStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectStatus = types.ProjectStatus(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProjectSummaryList(v *[]types.ProjectSummary, 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.ProjectSummary
|
|
if *v == nil {
|
|
cv = []types.ProjectSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ProjectSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentProjectSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPropertyNameSuggestion(v **types.PropertyNameSuggestion, 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.PropertyNameSuggestion
|
|
if *v == nil {
|
|
sv = &types.PropertyNameSuggestion{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "PropertyName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ResourcePropertyName to be of type string, got %T instead", value)
|
|
}
|
|
sv.PropertyName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPropertyNameSuggestionList(v *[]types.PropertyNameSuggestion, 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.PropertyNameSuggestion
|
|
if *v == nil {
|
|
cv = []types.PropertyNameSuggestion{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.PropertyNameSuggestion
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentPropertyNameSuggestion(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProvisioningParameter(v **types.ProvisioningParameter, 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.ProvisioningParameter
|
|
if *v == nil {
|
|
sv = &types.ProvisioningParameter{}
|
|
} 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 ProvisioningParameterKey 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 ProvisioningParameterValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.Value = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentProvisioningParameters(v *[]types.ProvisioningParameter, 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.ProvisioningParameter
|
|
if *v == nil {
|
|
cv = []types.ProvisioningParameter{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ProvisioningParameter
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentProvisioningParameter(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentPublicWorkforceTaskPrice(v **types.PublicWorkforceTaskPrice, 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.PublicWorkforceTaskPrice
|
|
if *v == nil {
|
|
sv = &types.PublicWorkforceTaskPrice{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AmountInUsd":
|
|
if err := awsAwsjson11_deserializeDocumentUSD(&sv.AmountInUsd, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentRealtimeInferenceInstanceTypes(v *[]types.ProductionVariantInstanceType, 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.ProductionVariantInstanceType
|
|
if *v == nil {
|
|
cv = []types.ProductionVariantInstanceType{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.ProductionVariantInstanceType
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProductionVariantInstanceType to be of type string, got %T instead", value)
|
|
}
|
|
col = types.ProductionVariantInstanceType(jtv)
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentRedshiftDatasetDefinition(v **types.RedshiftDatasetDefinition, 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.RedshiftDatasetDefinition
|
|
if *v == nil {
|
|
sv = &types.RedshiftDatasetDefinition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ClusterId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RedshiftClusterId to be of type string, got %T instead", value)
|
|
}
|
|
sv.ClusterId = ptr.String(jtv)
|
|
}
|
|
|
|
case "ClusterRoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ClusterRoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "Database":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RedshiftDatabase to be of type string, got %T instead", value)
|
|
}
|
|
sv.Database = ptr.String(jtv)
|
|
}
|
|
|
|
case "DbUser":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RedshiftUserName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DbUser = ptr.String(jtv)
|
|
}
|
|
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "OutputCompression":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RedshiftResultCompressionType to be of type string, got %T instead", value)
|
|
}
|
|
sv.OutputCompression = types.RedshiftResultCompressionType(jtv)
|
|
}
|
|
|
|
case "OutputFormat":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RedshiftResultFormat to be of type string, got %T instead", value)
|
|
}
|
|
sv.OutputFormat = types.RedshiftResultFormat(jtv)
|
|
}
|
|
|
|
case "OutputS3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.OutputS3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
case "QueryString":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RedshiftQueryString to be of type string, got %T instead", value)
|
|
}
|
|
sv.QueryString = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentRegisterModelStepMetadata(v **types.RegisterModelStepMetadata, 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.RegisterModelStepMetadata
|
|
if *v == nil {
|
|
sv = &types.RegisterModelStepMetadata{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Arn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.Arn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentRenderingError(v **types.RenderingError, 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.RenderingError
|
|
if *v == nil {
|
|
sv = &types.RenderingError{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Code":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.Code = ptr.String(jtv)
|
|
}
|
|
|
|
case "Message":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.Message = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentRenderingErrorList(v *[]types.RenderingError, 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.RenderingError
|
|
if *v == nil {
|
|
cv = []types.RenderingError{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.RenderingError
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentRenderingError(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentRepositoryAuthConfig(v **types.RepositoryAuthConfig, 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.RepositoryAuthConfig
|
|
if *v == nil {
|
|
sv = &types.RepositoryAuthConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "RepositoryCredentialsProviderArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RepositoryCredentialsProviderArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RepositoryCredentialsProviderArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentResolvedAttributes(v **types.ResolvedAttributes, 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.ResolvedAttributes
|
|
if *v == nil {
|
|
sv = &types.ResolvedAttributes{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AutoMLJobObjective":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLJobObjective(&sv.AutoMLJobObjective, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CompletionCriteria":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLJobCompletionCriteria(&sv.CompletionCriteria, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProblemType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProblemType to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProblemType = types.ProblemType(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentResourceConfig(v **types.ResourceConfig, 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.ResourceConfig
|
|
if *v == nil {
|
|
sv = &types.ResourceConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "InstanceCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingInstanceCount to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.InstanceCount = int32(i64)
|
|
}
|
|
|
|
case "InstanceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingInstanceType to be of type string, got %T instead", value)
|
|
}
|
|
sv.InstanceType = types.TrainingInstanceType(jtv)
|
|
}
|
|
|
|
case "VolumeKmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.VolumeKmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "VolumeSizeInGB":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected VolumeSizeInGB to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.VolumeSizeInGB = int32(i64)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentResourceInUse(v **types.ResourceInUse, 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.ResourceInUse
|
|
if *v == nil {
|
|
sv = &types.ResourceInUse{}
|
|
} 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 FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.Message = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentResourceLimitExceeded(v **types.ResourceLimitExceeded, 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.ResourceLimitExceeded
|
|
if *v == nil {
|
|
sv = &types.ResourceLimitExceeded{}
|
|
} 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 FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.Message = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentResourceLimits(v **types.ResourceLimits, 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.ResourceLimits
|
|
if *v == nil {
|
|
sv = &types.ResourceLimits{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MaxNumberOfTrainingJobs":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxNumberOfTrainingJobs to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxNumberOfTrainingJobs = int32(i64)
|
|
}
|
|
|
|
case "MaxParallelTrainingJobs":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxParallelTrainingJobs to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxParallelTrainingJobs = int32(i64)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentResourceNotFound(v **types.ResourceNotFound, 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.ResourceNotFound
|
|
if *v == nil {
|
|
sv = &types.ResourceNotFound{}
|
|
} 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 FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.Message = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentResourceSpec(v **types.ResourceSpec, 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.ResourceSpec
|
|
if *v == nil {
|
|
sv = &types.ResourceSpec{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "InstanceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppInstanceType to be of type string, got %T instead", value)
|
|
}
|
|
sv.InstanceType = types.AppInstanceType(jtv)
|
|
}
|
|
|
|
case "LifecycleConfigArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected StudioLifecycleConfigArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.LifecycleConfigArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "SageMakerImageArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.SageMakerImageArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "SageMakerImageVersionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageVersionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.SageMakerImageVersionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentResponseMIMETypes(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 ResponseMIMEType to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentRetryStrategy(v **types.RetryStrategy, 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.RetryStrategy
|
|
if *v == nil {
|
|
sv = &types.RetryStrategy{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MaximumRetryAttempts":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaximumRetryAttempts to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaximumRetryAttempts = int32(i64)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentRSessionAppSettings(v **types.RSessionAppSettings, 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.RSessionAppSettings
|
|
if *v == nil {
|
|
sv = &types.RSessionAppSettings{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentRStudioServerProAppSettings(v **types.RStudioServerProAppSettings, 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.RStudioServerProAppSettings
|
|
if *v == nil {
|
|
sv = &types.RStudioServerProAppSettings{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AccessStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RStudioServerProAccessStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.AccessStatus = types.RStudioServerProAccessStatus(jtv)
|
|
}
|
|
|
|
case "UserGroup":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RStudioServerProUserGroup to be of type string, got %T instead", value)
|
|
}
|
|
sv.UserGroup = types.RStudioServerProUserGroup(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentRStudioServerProDomainSettings(v **types.RStudioServerProDomainSettings, 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.RStudioServerProDomainSettings
|
|
if *v == nil {
|
|
sv = &types.RStudioServerProDomainSettings{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DefaultResourceSpec":
|
|
if err := awsAwsjson11_deserializeDocumentResourceSpec(&sv.DefaultResourceSpec, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DomainExecutionRoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.DomainExecutionRoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "RStudioConnectUrl":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.RStudioConnectUrl = ptr.String(jtv)
|
|
}
|
|
|
|
case "RStudioPackageManagerUrl":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.RStudioPackageManagerUrl = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentRuleParameters(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 ConfigValue to be of type string, got %T instead", value)
|
|
}
|
|
parsedVal = jtv
|
|
}
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentS3DataSource(v **types.S3DataSource, 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.S3DataSource
|
|
if *v == nil {
|
|
sv = &types.S3DataSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AttributeNames":
|
|
if err := awsAwsjson11_deserializeDocumentAttributeNames(&sv.AttributeNames, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "S3DataDistributionType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3DataDistribution to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3DataDistributionType = types.S3DataDistribution(jtv)
|
|
}
|
|
|
|
case "S3DataType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3DataType to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3DataType = types.S3DataType(jtv)
|
|
}
|
|
|
|
case "S3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentS3StorageConfig(v **types.S3StorageConfig, 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.S3StorageConfig
|
|
if *v == nil {
|
|
sv = &types.S3StorageConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "ResolvedOutputS3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.ResolvedOutputS3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentScheduleConfig(v **types.ScheduleConfig, 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.ScheduleConfig
|
|
if *v == nil {
|
|
sv = &types.ScheduleConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ScheduleExpression":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ScheduleExpression to be of type string, got %T instead", value)
|
|
}
|
|
sv.ScheduleExpression = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentSearchRecord(v **types.SearchRecord, 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.SearchRecord
|
|
if *v == nil {
|
|
sv = &types.SearchRecord{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Endpoint":
|
|
if err := awsAwsjson11_deserializeDocumentEndpoint(&sv.Endpoint, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Experiment":
|
|
if err := awsAwsjson11_deserializeDocumentExperiment(&sv.Experiment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "FeatureGroup":
|
|
if err := awsAwsjson11_deserializeDocumentFeatureGroup(&sv.FeatureGroup, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelPackage":
|
|
if err := awsAwsjson11_deserializeDocumentModelPackage(&sv.ModelPackage, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelPackageGroup":
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageGroup(&sv.ModelPackageGroup, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Pipeline":
|
|
if err := awsAwsjson11_deserializeDocumentPipeline(&sv.Pipeline, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "PipelineExecution":
|
|
if err := awsAwsjson11_deserializeDocumentPipelineExecution(&sv.PipelineExecution, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Project":
|
|
if err := awsAwsjson11_deserializeDocumentProject(&sv.Project, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrainingJob":
|
|
if err := awsAwsjson11_deserializeDocumentTrainingJob(&sv.TrainingJob, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Trial":
|
|
if err := awsAwsjson11_deserializeDocumentTrial(&sv.Trial, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrialComponent":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponent(&sv.TrialComponent, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentSearchResultsList(v *[]types.SearchRecord, 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.SearchRecord
|
|
if *v == nil {
|
|
cv = []types.SearchRecord{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.SearchRecord
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentSearchRecord(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentSecondaryStatusTransition(v **types.SecondaryStatusTransition, 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.SecondaryStatusTransition
|
|
if *v == nil {
|
|
sv = &types.SecondaryStatusTransition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "StartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Status":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SecondaryStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.Status = types.SecondaryStatus(jtv)
|
|
}
|
|
|
|
case "StatusMessage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value)
|
|
}
|
|
sv.StatusMessage = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentSecondaryStatusTransitions(v *[]types.SecondaryStatusTransition, 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.SecondaryStatusTransition
|
|
if *v == nil {
|
|
cv = []types.SecondaryStatusTransition{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.SecondaryStatusTransition
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentSecondaryStatusTransition(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentSecurityGroupIds(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 SecurityGroupId to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentServiceCatalogProvisionedProductDetails(v **types.ServiceCatalogProvisionedProductDetails, 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.ServiceCatalogProvisionedProductDetails
|
|
if *v == nil {
|
|
sv = &types.ServiceCatalogProvisionedProductDetails{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ProvisionedProductId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ServiceCatalogEntityId to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProvisionedProductId = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProvisionedProductStatusMessage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProvisionedProductStatusMessage to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProvisionedProductStatusMessage = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentServiceCatalogProvisioningDetails(v **types.ServiceCatalogProvisioningDetails, 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.ServiceCatalogProvisioningDetails
|
|
if *v == nil {
|
|
sv = &types.ServiceCatalogProvisioningDetails{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "PathId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ServiceCatalogEntityId to be of type string, got %T instead", value)
|
|
}
|
|
sv.PathId = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProductId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ServiceCatalogEntityId to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProductId = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProvisioningArtifactId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ServiceCatalogEntityId to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProvisioningArtifactId = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProvisioningParameters":
|
|
if err := awsAwsjson11_deserializeDocumentProvisioningParameters(&sv.ProvisioningParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentSharingSettings(v **types.SharingSettings, 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.SharingSettings
|
|
if *v == nil {
|
|
sv = &types.SharingSettings{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NotebookOutputOption":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookOutputOption to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotebookOutputOption = types.NotebookOutputOption(jtv)
|
|
}
|
|
|
|
case "S3KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3OutputPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3OutputPath = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentShuffleConfig(v **types.ShuffleConfig, 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.ShuffleConfig
|
|
if *v == nil {
|
|
sv = &types.ShuffleConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Seed":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected Seed to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Seed = i64
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentSourceAlgorithm(v **types.SourceAlgorithm, 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.SourceAlgorithm
|
|
if *v == nil {
|
|
sv = &types.SourceAlgorithm{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AlgorithmName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ArnOrName to be of type string, got %T instead", value)
|
|
}
|
|
sv.AlgorithmName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelDataUrl":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected Url to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelDataUrl = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentSourceAlgorithmList(v *[]types.SourceAlgorithm, 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.SourceAlgorithm
|
|
if *v == nil {
|
|
cv = []types.SourceAlgorithm{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.SourceAlgorithm
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentSourceAlgorithm(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentSourceAlgorithmSpecification(v **types.SourceAlgorithmSpecification, 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.SourceAlgorithmSpecification
|
|
if *v == nil {
|
|
sv = &types.SourceAlgorithmSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "SourceAlgorithms":
|
|
if err := awsAwsjson11_deserializeDocumentSourceAlgorithmList(&sv.SourceAlgorithms, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentSourceIpConfig(v **types.SourceIpConfig, 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.SourceIpConfig
|
|
if *v == nil {
|
|
sv = &types.SourceIpConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Cidrs":
|
|
if err := awsAwsjson11_deserializeDocumentCidrs(&sv.Cidrs, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentStoppingCondition(v **types.StoppingCondition, 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.StoppingCondition
|
|
if *v == nil {
|
|
sv = &types.StoppingCondition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MaxRuntimeInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxRuntimeInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxRuntimeInSeconds = int32(i64)
|
|
}
|
|
|
|
case "MaxWaitTimeInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxWaitTimeInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxWaitTimeInSeconds = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentStudioLifecycleConfigDetails(v **types.StudioLifecycleConfigDetails, 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.StudioLifecycleConfigDetails
|
|
if *v == nil {
|
|
sv = &types.StudioLifecycleConfigDetails{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "StudioLifecycleConfigAppType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected StudioLifecycleConfigAppType to be of type string, got %T instead", value)
|
|
}
|
|
sv.StudioLifecycleConfigAppType = types.StudioLifecycleConfigAppType(jtv)
|
|
}
|
|
|
|
case "StudioLifecycleConfigArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected StudioLifecycleConfigArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.StudioLifecycleConfigArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "StudioLifecycleConfigName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected StudioLifecycleConfigName to be of type string, got %T instead", value)
|
|
}
|
|
sv.StudioLifecycleConfigName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentStudioLifecycleConfigsList(v *[]types.StudioLifecycleConfigDetails, 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.StudioLifecycleConfigDetails
|
|
if *v == nil {
|
|
cv = []types.StudioLifecycleConfigDetails{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.StudioLifecycleConfigDetails
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentStudioLifecycleConfigDetails(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentSubnets(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 SubnetId to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentSubscribedWorkteam(v **types.SubscribedWorkteam, 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.SubscribedWorkteam
|
|
if *v == nil {
|
|
sv = &types.SubscribedWorkteam{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ListingId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.ListingId = ptr.String(jtv)
|
|
}
|
|
|
|
case "MarketplaceDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String200 to be of type string, got %T instead", value)
|
|
}
|
|
sv.MarketplaceDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "MarketplaceTitle":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String200 to be of type string, got %T instead", value)
|
|
}
|
|
sv.MarketplaceTitle = ptr.String(jtv)
|
|
}
|
|
|
|
case "SellerName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.SellerName = ptr.String(jtv)
|
|
}
|
|
|
|
case "WorkteamArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected WorkteamArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.WorkteamArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentSubscribedWorkteams(v *[]types.SubscribedWorkteam, 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.SubscribedWorkteam
|
|
if *v == nil {
|
|
cv = []types.SubscribedWorkteam{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.SubscribedWorkteam
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentSubscribedWorkteam(&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_deserializeDocumentTargetPlatform(v **types.TargetPlatform, 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.TargetPlatform
|
|
if *v == nil {
|
|
sv = &types.TargetPlatform{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Accelerator":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TargetPlatformAccelerator to be of type string, got %T instead", value)
|
|
}
|
|
sv.Accelerator = types.TargetPlatformAccelerator(jtv)
|
|
}
|
|
|
|
case "Arch":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TargetPlatformArch to be of type string, got %T instead", value)
|
|
}
|
|
sv.Arch = types.TargetPlatformArch(jtv)
|
|
}
|
|
|
|
case "Os":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TargetPlatformOs to be of type string, got %T instead", value)
|
|
}
|
|
sv.Os = types.TargetPlatformOs(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTaskKeywords(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 TaskKeyword to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTensorBoardAppSettings(v **types.TensorBoardAppSettings, 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.TensorBoardAppSettings
|
|
if *v == nil {
|
|
sv = &types.TensorBoardAppSettings{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DefaultResourceSpec":
|
|
if err := awsAwsjson11_deserializeDocumentResourceSpec(&sv.DefaultResourceSpec, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTensorBoardOutputConfig(v **types.TensorBoardOutputConfig, 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.TensorBoardOutputConfig
|
|
if *v == nil {
|
|
sv = &types.TensorBoardOutputConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "LocalPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DirectoryPath to be of type string, got %T instead", value)
|
|
}
|
|
sv.LocalPath = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3OutputPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3OutputPath = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrafficRoutingConfig(v **types.TrafficRoutingConfig, 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.TrafficRoutingConfig
|
|
if *v == nil {
|
|
sv = &types.TrafficRoutingConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CanarySize":
|
|
if err := awsAwsjson11_deserializeDocumentCapacitySize(&sv.CanarySize, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LinearStepSize":
|
|
if err := awsAwsjson11_deserializeDocumentCapacitySize(&sv.LinearStepSize, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Type":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrafficRoutingConfigType to be of type string, got %T instead", value)
|
|
}
|
|
sv.Type = types.TrafficRoutingConfigType(jtv)
|
|
}
|
|
|
|
case "WaitIntervalInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected WaitIntervalInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.WaitIntervalInSeconds = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrainingEnvironmentMap(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 TrainingEnvironmentValue to be of type string, got %T instead", value)
|
|
}
|
|
parsedVal = jtv
|
|
}
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrainingInstanceTypes(v *[]types.TrainingInstanceType, 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.TrainingInstanceType
|
|
if *v == nil {
|
|
cv = []types.TrainingInstanceType{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.TrainingInstanceType
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingInstanceType to be of type string, got %T instead", value)
|
|
}
|
|
col = types.TrainingInstanceType(jtv)
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrainingJob(v **types.TrainingJob, 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.TrainingJob
|
|
if *v == nil {
|
|
sv = &types.TrainingJob{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AlgorithmSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentAlgorithmSpecification(&sv.AlgorithmSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "AutoMLJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AutoMLJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "BillableTimeInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected BillableTimeInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.BillableTimeInSeconds = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "CheckpointConfig":
|
|
if err := awsAwsjson11_deserializeDocumentCheckpointConfig(&sv.CheckpointConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DebugHookConfig":
|
|
if err := awsAwsjson11_deserializeDocumentDebugHookConfig(&sv.DebugHookConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DebugRuleConfigurations":
|
|
if err := awsAwsjson11_deserializeDocumentDebugRuleConfigurations(&sv.DebugRuleConfigurations, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DebugRuleEvaluationStatuses":
|
|
if err := awsAwsjson11_deserializeDocumentDebugRuleEvaluationStatuses(&sv.DebugRuleEvaluationStatuses, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "EnableInterContainerTrafficEncryption":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableInterContainerTrafficEncryption = jtv
|
|
}
|
|
|
|
case "EnableManagedSpotTraining":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableManagedSpotTraining = jtv
|
|
}
|
|
|
|
case "EnableNetworkIsolation":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableNetworkIsolation = jtv
|
|
}
|
|
|
|
case "Environment":
|
|
if err := awsAwsjson11_deserializeDocumentTrainingEnvironmentMap(&sv.Environment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ExperimentConfig":
|
|
if err := awsAwsjson11_deserializeDocumentExperimentConfig(&sv.ExperimentConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "FinalMetricDataList":
|
|
if err := awsAwsjson11_deserializeDocumentFinalMetricDataList(&sv.FinalMetricDataList, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "HyperParameters":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameters(&sv.HyperParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "InputDataConfig":
|
|
if err := awsAwsjson11_deserializeDocumentInputDataConfig(&sv.InputDataConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LabelingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.LabelingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ModelArtifacts":
|
|
if err := awsAwsjson11_deserializeDocumentModelArtifacts(&sv.ModelArtifacts, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OutputDataConfig":
|
|
if err := awsAwsjson11_deserializeDocumentOutputDataConfig(&sv.OutputDataConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ResourceConfig":
|
|
if err := awsAwsjson11_deserializeDocumentResourceConfig(&sv.ResourceConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RetryStrategy":
|
|
if err := awsAwsjson11_deserializeDocumentRetryStrategy(&sv.RetryStrategy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "SecondaryStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SecondaryStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.SecondaryStatus = types.SecondaryStatus(jtv)
|
|
}
|
|
|
|
case "SecondaryStatusTransitions":
|
|
if err := awsAwsjson11_deserializeDocumentSecondaryStatusTransitions(&sv.SecondaryStatusTransitions, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "StoppingCondition":
|
|
if err := awsAwsjson11_deserializeDocumentStoppingCondition(&sv.StoppingCondition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TensorBoardOutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentTensorBoardOutputConfig(&sv.TensorBoardOutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrainingEndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TrainingEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "TrainingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobStatus = types.TrainingJobStatus(jtv)
|
|
}
|
|
|
|
case "TrainingStartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TrainingStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "TrainingTimeInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingTimeInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TrainingTimeInSeconds = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "TuningJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TuningJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "VpcConfig":
|
|
if err := awsAwsjson11_deserializeDocumentVpcConfig(&sv.VpcConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrainingJobDefinition(v **types.TrainingJobDefinition, 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.TrainingJobDefinition
|
|
if *v == nil {
|
|
sv = &types.TrainingJobDefinition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "HyperParameters":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameters(&sv.HyperParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "InputDataConfig":
|
|
if err := awsAwsjson11_deserializeDocumentInputDataConfig(&sv.InputDataConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OutputDataConfig":
|
|
if err := awsAwsjson11_deserializeDocumentOutputDataConfig(&sv.OutputDataConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ResourceConfig":
|
|
if err := awsAwsjson11_deserializeDocumentResourceConfig(&sv.ResourceConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "StoppingCondition":
|
|
if err := awsAwsjson11_deserializeDocumentStoppingCondition(&sv.StoppingCondition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrainingInputMode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingInputMode to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingInputMode = types.TrainingInputMode(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrainingJobStatusCounters(v **types.TrainingJobStatusCounters, 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.TrainingJobStatusCounters
|
|
if *v == nil {
|
|
sv = &types.TrainingJobStatusCounters{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Completed":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobStatusCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Completed = int32(i64)
|
|
}
|
|
|
|
case "InProgress":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobStatusCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.InProgress = int32(i64)
|
|
}
|
|
|
|
case "NonRetryableError":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobStatusCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.NonRetryableError = int32(i64)
|
|
}
|
|
|
|
case "RetryableError":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobStatusCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.RetryableError = int32(i64)
|
|
}
|
|
|
|
case "Stopped":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobStatusCounter to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Stopped = int32(i64)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrainingJobStepMetadata(v **types.TrainingJobStepMetadata, 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.TrainingJobStepMetadata
|
|
if *v == nil {
|
|
sv = &types.TrainingJobStepMetadata{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Arn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.Arn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrainingJobSummaries(v *[]types.TrainingJobSummary, 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.TrainingJobSummary
|
|
if *v == nil {
|
|
cv = []types.TrainingJobSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.TrainingJobSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentTrainingJobSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrainingJobSummary(v **types.TrainingJobSummary, 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.TrainingJobSummary
|
|
if *v == nil {
|
|
sv = &types.TrainingJobSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "TrainingEndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TrainingEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "TrainingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobStatus = types.TrainingJobStatus(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrainingSpecification(v **types.TrainingSpecification, 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.TrainingSpecification
|
|
if *v == nil {
|
|
sv = &types.TrainingSpecification{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MetricDefinitions":
|
|
if err := awsAwsjson11_deserializeDocumentMetricDefinitionList(&sv.MetricDefinitions, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SupportedHyperParameters":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterSpecifications(&sv.SupportedHyperParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SupportedTrainingInstanceTypes":
|
|
if err := awsAwsjson11_deserializeDocumentTrainingInstanceTypes(&sv.SupportedTrainingInstanceTypes, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SupportedTuningJobObjectiveMetrics":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterTuningJobObjectives(&sv.SupportedTuningJobObjectiveMetrics, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SupportsDistributedTraining":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.SupportsDistributedTraining = jtv
|
|
}
|
|
|
|
case "TrainingChannels":
|
|
if err := awsAwsjson11_deserializeDocumentChannelSpecifications(&sv.TrainingChannels, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrainingImage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContainerImage to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingImage = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingImageDigest":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageDigest to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingImageDigest = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTransformDataSource(v **types.TransformDataSource, 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.TransformDataSource
|
|
if *v == nil {
|
|
sv = &types.TransformDataSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "S3DataSource":
|
|
if err := awsAwsjson11_deserializeDocumentTransformS3DataSource(&sv.S3DataSource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTransformEnvironmentMap(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 TransformEnvironmentValue to be of type string, got %T instead", value)
|
|
}
|
|
parsedVal = jtv
|
|
}
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTransformInput(v **types.TransformInput, 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.TransformInput
|
|
if *v == nil {
|
|
sv = &types.TransformInput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CompressionType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CompressionType to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompressionType = types.CompressionType(jtv)
|
|
}
|
|
|
|
case "ContentType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContentType to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContentType = ptr.String(jtv)
|
|
}
|
|
|
|
case "DataSource":
|
|
if err := awsAwsjson11_deserializeDocumentTransformDataSource(&sv.DataSource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SplitType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SplitType to be of type string, got %T instead", value)
|
|
}
|
|
sv.SplitType = types.SplitType(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTransformInstanceTypes(v *[]types.TransformInstanceType, 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.TransformInstanceType
|
|
if *v == nil {
|
|
cv = []types.TransformInstanceType{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.TransformInstanceType
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TransformInstanceType to be of type string, got %T instead", value)
|
|
}
|
|
col = types.TransformInstanceType(jtv)
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTransformJob(v **types.TransformJob, 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.TransformJob
|
|
if *v == nil {
|
|
sv = &types.TransformJob{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AutoMLJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AutoMLJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "BatchStrategy":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected BatchStrategy to be of type string, got %T instead", value)
|
|
}
|
|
sv.BatchStrategy = types.BatchStrategy(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DataProcessing":
|
|
if err := awsAwsjson11_deserializeDocumentDataProcessing(&sv.DataProcessing, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Environment":
|
|
if err := awsAwsjson11_deserializeDocumentTransformEnvironmentMap(&sv.Environment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ExperimentConfig":
|
|
if err := awsAwsjson11_deserializeDocumentExperimentConfig(&sv.ExperimentConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "LabelingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.LabelingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "MaxConcurrentTransforms":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxConcurrentTransforms to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxConcurrentTransforms = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "MaxPayloadInMB":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxPayloadInMB to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxPayloadInMB = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "ModelClientConfig":
|
|
if err := awsAwsjson11_deserializeDocumentModelClientConfig(&sv.ModelClientConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelName = ptr.String(jtv)
|
|
}
|
|
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TransformEndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TransformEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "TransformInput":
|
|
if err := awsAwsjson11_deserializeDocumentTransformInput(&sv.TransformInput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TransformJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TransformJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TransformJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TransformJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TransformJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TransformJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TransformJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TransformJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.TransformJobStatus = types.TransformJobStatus(jtv)
|
|
}
|
|
|
|
case "TransformOutput":
|
|
if err := awsAwsjson11_deserializeDocumentTransformOutput(&sv.TransformOutput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TransformResources":
|
|
if err := awsAwsjson11_deserializeDocumentTransformResources(&sv.TransformResources, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TransformStartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TransformStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTransformJobDefinition(v **types.TransformJobDefinition, 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.TransformJobDefinition
|
|
if *v == nil {
|
|
sv = &types.TransformJobDefinition{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "BatchStrategy":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected BatchStrategy to be of type string, got %T instead", value)
|
|
}
|
|
sv.BatchStrategy = types.BatchStrategy(jtv)
|
|
}
|
|
|
|
case "Environment":
|
|
if err := awsAwsjson11_deserializeDocumentTransformEnvironmentMap(&sv.Environment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "MaxConcurrentTransforms":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxConcurrentTransforms to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxConcurrentTransforms = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "MaxPayloadInMB":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxPayloadInMB to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxPayloadInMB = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "TransformInput":
|
|
if err := awsAwsjson11_deserializeDocumentTransformInput(&sv.TransformInput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TransformOutput":
|
|
if err := awsAwsjson11_deserializeDocumentTransformOutput(&sv.TransformOutput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TransformResources":
|
|
if err := awsAwsjson11_deserializeDocumentTransformResources(&sv.TransformResources, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTransformJobStepMetadata(v **types.TransformJobStepMetadata, 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.TransformJobStepMetadata
|
|
if *v == nil {
|
|
sv = &types.TransformJobStepMetadata{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Arn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TransformJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.Arn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTransformJobSummaries(v *[]types.TransformJobSummary, 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.TransformJobSummary
|
|
if *v == nil {
|
|
cv = []types.TransformJobSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.TransformJobSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentTransformJobSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTransformJobSummary(v **types.TransformJobSummary, 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.TransformJobSummary
|
|
if *v == nil {
|
|
sv = &types.TransformJobSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "TransformEndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TransformEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "TransformJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TransformJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TransformJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TransformJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TransformJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TransformJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TransformJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TransformJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.TransformJobStatus = types.TransformJobStatus(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTransformOutput(v **types.TransformOutput, 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.TransformOutput
|
|
if *v == nil {
|
|
sv = &types.TransformOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Accept":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected Accept to be of type string, got %T instead", value)
|
|
}
|
|
sv.Accept = ptr.String(jtv)
|
|
}
|
|
|
|
case "AssembleWith":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AssemblyType to be of type string, got %T instead", value)
|
|
}
|
|
sv.AssembleWith = types.AssemblyType(jtv)
|
|
}
|
|
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "S3OutputPath":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3OutputPath = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTransformResources(v **types.TransformResources, 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.TransformResources
|
|
if *v == nil {
|
|
sv = &types.TransformResources{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "InstanceCount":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TransformInstanceCount to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.InstanceCount = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "InstanceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TransformInstanceType to be of type string, got %T instead", value)
|
|
}
|
|
sv.InstanceType = types.TransformInstanceType(jtv)
|
|
}
|
|
|
|
case "VolumeKmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.VolumeKmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTransformS3DataSource(v **types.TransformS3DataSource, 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.TransformS3DataSource
|
|
if *v == nil {
|
|
sv = &types.TransformS3DataSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "S3DataType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3DataType to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3DataType = types.S3DataType(jtv)
|
|
}
|
|
|
|
case "S3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.S3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrial(v **types.Trial, 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.Trial
|
|
if *v == nil {
|
|
sv = &types.Trial{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ExperimentName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExperimentName = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MetadataProperties":
|
|
if err := awsAwsjson11_deserializeDocumentMetadataProperties(&sv.MetadataProperties, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Source":
|
|
if err := awsAwsjson11_deserializeDocumentTrialSource(&sv.Source, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrialArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialComponentSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentSimpleSummaries(&sv.TrialComponentSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrialName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialComponent(v **types.TrialComponent, 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.TrialComponent
|
|
if *v == nil {
|
|
sv = &types.TrialComponent{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "EndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "InputArtifacts":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentArtifacts(&sv.InputArtifacts, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MetadataProperties":
|
|
if err := awsAwsjson11_deserializeDocumentMetadataProperties(&sv.MetadataProperties, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Metrics":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentMetricSummaries(&sv.Metrics, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OutputArtifacts":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentArtifacts(&sv.OutputArtifacts, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Parameters":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentParameters(&sv.Parameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Parents":
|
|
if err := awsAwsjson11_deserializeDocumentParents(&sv.Parents, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Source":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentSource(&sv.Source, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SourceDetail":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentSourceDetail(&sv.SourceDetail, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "StartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Status":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentStatus(&sv.Status, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrialComponentArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialComponentArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialComponentArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialComponentName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialComponentName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialComponentArtifact(v **types.TrialComponentArtifact, 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.TrialComponentArtifact
|
|
if *v == nil {
|
|
sv = &types.TrialComponentArtifact{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MediaType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MediaType to be of type string, got %T instead", value)
|
|
}
|
|
sv.MediaType = ptr.String(jtv)
|
|
}
|
|
|
|
case "Value":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialComponentArtifactValue to be of type string, got %T instead", value)
|
|
}
|
|
sv.Value = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialComponentArtifacts(v *map[string]types.TrialComponentArtifact, 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.TrialComponentArtifact
|
|
if *v == nil {
|
|
mv = map[string]types.TrialComponentArtifact{}
|
|
} else {
|
|
mv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
var parsedVal types.TrialComponentArtifact
|
|
mapVar := parsedVal
|
|
destAddr := &mapVar
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentArtifact(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
parsedVal = *destAddr
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialComponentMetricSummaries(v *[]types.TrialComponentMetricSummary, 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.TrialComponentMetricSummary
|
|
if *v == nil {
|
|
cv = []types.TrialComponentMetricSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.TrialComponentMetricSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentMetricSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialComponentMetricSummary(v **types.TrialComponentMetricSummary, 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.TrialComponentMetricSummary
|
|
if *v == nil {
|
|
sv = &types.TrialComponentMetricSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Avg":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Avg = ptr.Float64(f64)
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.Avg = ptr.Float64(f64)
|
|
|
|
default:
|
|
return fmt.Errorf("expected OptionalDouble to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Count":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected OptionalInteger to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Count = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "Last":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Last = ptr.Float64(f64)
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.Last = ptr.Float64(f64)
|
|
|
|
default:
|
|
return fmt.Errorf("expected OptionalDouble to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Max":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Max = ptr.Float64(f64)
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.Max = ptr.Float64(f64)
|
|
|
|
default:
|
|
return fmt.Errorf("expected OptionalDouble to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MetricName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MetricName to be of type string, got %T instead", value)
|
|
}
|
|
sv.MetricName = ptr.String(jtv)
|
|
}
|
|
|
|
case "Min":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Min = ptr.Float64(f64)
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.Min = ptr.Float64(f64)
|
|
|
|
default:
|
|
return fmt.Errorf("expected OptionalDouble to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "SourceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialComponentSourceArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "StdDev":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.StdDev = ptr.Float64(f64)
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.StdDev = ptr.Float64(f64)
|
|
|
|
default:
|
|
return fmt.Errorf("expected OptionalDouble to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "TimeStamp":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TimeStamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialComponentParameters(v *map[string]types.TrialComponentParameterValue, 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.TrialComponentParameterValue
|
|
if *v == nil {
|
|
mv = map[string]types.TrialComponentParameterValue{}
|
|
} else {
|
|
mv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
var parsedVal types.TrialComponentParameterValue
|
|
mapVar := parsedVal
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentParameterValue(&mapVar, value); err != nil {
|
|
return err
|
|
}
|
|
parsedVal = mapVar
|
|
mv[key] = parsedVal
|
|
|
|
}
|
|
*v = mv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialComponentParameterValue(v *types.TrialComponentParameterValue, 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 uv types.TrialComponentParameterValue
|
|
loop:
|
|
for key, value := range shape {
|
|
if value == nil {
|
|
continue
|
|
}
|
|
switch key {
|
|
case "NumberValue":
|
|
var mv float64
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
mv = f64
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
mv = f64
|
|
|
|
default:
|
|
return fmt.Errorf("expected DoubleParameterValue to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
uv = &types.TrialComponentParameterValueMemberNumberValue{Value: mv}
|
|
break loop
|
|
|
|
case "StringValue":
|
|
var mv string
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected StringParameterValue to be of type string, got %T instead", value)
|
|
}
|
|
mv = jtv
|
|
}
|
|
uv = &types.TrialComponentParameterValueMemberStringValue{Value: mv}
|
|
break loop
|
|
|
|
default:
|
|
uv = &types.UnknownUnionMember{Tag: key}
|
|
break loop
|
|
|
|
}
|
|
}
|
|
*v = uv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialComponentSimpleSummaries(v *[]types.TrialComponentSimpleSummary, 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.TrialComponentSimpleSummary
|
|
if *v == nil {
|
|
cv = []types.TrialComponentSimpleSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.TrialComponentSimpleSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentSimpleSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialComponentSimpleSummary(v **types.TrialComponentSimpleSummary, 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.TrialComponentSimpleSummary
|
|
if *v == nil {
|
|
sv = &types.TrialComponentSimpleSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "TrialComponentArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialComponentArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialComponentArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialComponentName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialComponentName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialComponentSource":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentSource(&sv.TrialComponentSource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialComponentSource(v **types.TrialComponentSource, 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.TrialComponentSource
|
|
if *v == nil {
|
|
sv = &types.TrialComponentSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "SourceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialComponentSourceArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "SourceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SourceType to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceType = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialComponentSourceDetail(v **types.TrialComponentSourceDetail, 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.TrialComponentSourceDetail
|
|
if *v == nil {
|
|
sv = &types.TrialComponentSourceDetail{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ProcessingJob":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingJob(&sv.ProcessingJob, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SourceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialComponentSourceArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingJob":
|
|
if err := awsAwsjson11_deserializeDocumentTrainingJob(&sv.TrainingJob, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TransformJob":
|
|
if err := awsAwsjson11_deserializeDocumentTransformJob(&sv.TransformJob, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialComponentStatus(v **types.TrialComponentStatus, 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.TrialComponentStatus
|
|
if *v == nil {
|
|
sv = &types.TrialComponentStatus{}
|
|
} 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 TrialComponentStatusMessage to be of type string, got %T instead", value)
|
|
}
|
|
sv.Message = ptr.String(jtv)
|
|
}
|
|
|
|
case "PrimaryStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialComponentPrimaryStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.PrimaryStatus = types.TrialComponentPrimaryStatus(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialComponentSummaries(v *[]types.TrialComponentSummary, 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.TrialComponentSummary
|
|
if *v == nil {
|
|
cv = []types.TrialComponentSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.TrialComponentSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialComponentSummary(v **types.TrialComponentSummary, 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.TrialComponentSummary
|
|
if *v == nil {
|
|
sv = &types.TrialComponentSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "EndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "StartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Status":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentStatus(&sv.Status, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrialComponentArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialComponentArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialComponentArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialComponentName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialComponentName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialComponentSource":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentSource(&sv.TrialComponentSource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialSource(v **types.TrialSource, 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.TrialSource
|
|
if *v == nil {
|
|
sv = &types.TrialSource{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "SourceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialSourceArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "SourceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SourceType to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceType = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialSummaries(v *[]types.TrialSummary, 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.TrialSummary
|
|
if *v == nil {
|
|
cv = []types.TrialSummary{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.TrialSummary
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentTrialSummary(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTrialSummary(v **types.TrialSummary, 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.TrialSummary
|
|
if *v == nil {
|
|
sv = &types.TrialSummary{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "TrialArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialSource":
|
|
if err := awsAwsjson11_deserializeDocumentTrialSource(&sv.TrialSource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTuningJobCompletionCriteria(v **types.TuningJobCompletionCriteria, 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.TuningJobCompletionCriteria
|
|
if *v == nil {
|
|
sv = &types.TuningJobCompletionCriteria{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "TargetObjectiveMetricValue":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TargetObjectiveMetricValue = ptr.Float32(float32(f64))
|
|
|
|
case string:
|
|
var f64 float64
|
|
switch {
|
|
case strings.EqualFold(jtv, "NaN"):
|
|
f64 = math.NaN()
|
|
|
|
case strings.EqualFold(jtv, "Infinity"):
|
|
f64 = math.Inf(1)
|
|
|
|
case strings.EqualFold(jtv, "-Infinity"):
|
|
f64 = math.Inf(-1)
|
|
|
|
default:
|
|
return fmt.Errorf("unknown JSON number value: %s", jtv)
|
|
|
|
}
|
|
sv.TargetObjectiveMetricValue = ptr.Float32(float32(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected TargetObjectiveMetricValue to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentTuningJobStepMetaData(v **types.TuningJobStepMetaData, 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.TuningJobStepMetaData
|
|
if *v == nil {
|
|
sv = &types.TuningJobStepMetaData{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Arn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.Arn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentUiConfig(v **types.UiConfig, 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.UiConfig
|
|
if *v == nil {
|
|
sv = &types.UiConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "HumanTaskUiArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HumanTaskUiArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.HumanTaskUiArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "UiTemplateS3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.UiTemplateS3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentUiTemplateInfo(v **types.UiTemplateInfo, 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.UiTemplateInfo
|
|
if *v == nil {
|
|
sv = &types.UiTemplateInfo{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ContentSha256":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TemplateContentSha256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContentSha256 = ptr.String(jtv)
|
|
}
|
|
|
|
case "Url":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TemplateUrl to be of type string, got %T instead", value)
|
|
}
|
|
sv.Url = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentUSD(v **types.USD, 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.USD
|
|
if *v == nil {
|
|
sv = &types.USD{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Cents":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected Cents to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Cents = int32(i64)
|
|
}
|
|
|
|
case "Dollars":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected Dollars to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Dollars = int32(i64)
|
|
}
|
|
|
|
case "TenthFractionsOfACent":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TenthFractionsOfACent to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TenthFractionsOfACent = int32(i64)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentUserContext(v **types.UserContext, 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.UserContext
|
|
if *v == nil {
|
|
sv = &types.UserContext{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DomainId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.DomainId = ptr.String(jtv)
|
|
}
|
|
|
|
case "UserProfileArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.UserProfileArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "UserProfileName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.UserProfileName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentUserProfileDetails(v **types.UserProfileDetails, 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.UserProfileDetails
|
|
if *v == nil {
|
|
sv = &types.UserProfileDetails{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DomainId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DomainId to be of type string, got %T instead", value)
|
|
}
|
|
sv.DomainId = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Status":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected UserProfileStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.Status = types.UserProfileStatus(jtv)
|
|
}
|
|
|
|
case "UserProfileName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected UserProfileName to be of type string, got %T instead", value)
|
|
}
|
|
sv.UserProfileName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentUserProfileList(v *[]types.UserProfileDetails, 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.UserProfileDetails
|
|
if *v == nil {
|
|
cv = []types.UserProfileDetails{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.UserProfileDetails
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentUserProfileDetails(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentUserSettings(v **types.UserSettings, 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.UserSettings
|
|
if *v == nil {
|
|
sv = &types.UserSettings{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ExecutionRole":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExecutionRole = ptr.String(jtv)
|
|
}
|
|
|
|
case "JupyterServerAppSettings":
|
|
if err := awsAwsjson11_deserializeDocumentJupyterServerAppSettings(&sv.JupyterServerAppSettings, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "KernelGatewayAppSettings":
|
|
if err := awsAwsjson11_deserializeDocumentKernelGatewayAppSettings(&sv.KernelGatewayAppSettings, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RSessionAppSettings":
|
|
if err := awsAwsjson11_deserializeDocumentRSessionAppSettings(&sv.RSessionAppSettings, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RStudioServerProAppSettings":
|
|
if err := awsAwsjson11_deserializeDocumentRStudioServerProAppSettings(&sv.RStudioServerProAppSettings, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SecurityGroups":
|
|
if err := awsAwsjson11_deserializeDocumentSecurityGroupIds(&sv.SecurityGroups, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SharingSettings":
|
|
if err := awsAwsjson11_deserializeDocumentSharingSettings(&sv.SharingSettings, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TensorBoardAppSettings":
|
|
if err := awsAwsjson11_deserializeDocumentTensorBoardAppSettings(&sv.TensorBoardAppSettings, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentVpcConfig(v **types.VpcConfig, 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.VpcConfig
|
|
if *v == nil {
|
|
sv = &types.VpcConfig{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "SecurityGroupIds":
|
|
if err := awsAwsjson11_deserializeDocumentVpcSecurityGroupIds(&sv.SecurityGroupIds, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Subnets":
|
|
if err := awsAwsjson11_deserializeDocumentSubnets(&sv.Subnets, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentVpcSecurityGroupIds(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 SecurityGroupId to be of type string, got %T instead", value)
|
|
}
|
|
col = jtv
|
|
}
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentWorkforce(v **types.Workforce, 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.Workforce
|
|
if *v == nil {
|
|
sv = &types.Workforce{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CognitoConfig":
|
|
if err := awsAwsjson11_deserializeDocumentCognitoConfig(&sv.CognitoConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreateDate":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreateDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastUpdatedDate":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastUpdatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "OidcConfig":
|
|
if err := awsAwsjson11_deserializeDocumentOidcConfigForResponse(&sv.OidcConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SourceIpConfig":
|
|
if err := awsAwsjson11_deserializeDocumentSourceIpConfig(&sv.SourceIpConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SubDomain":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.SubDomain = ptr.String(jtv)
|
|
}
|
|
|
|
case "WorkforceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected WorkforceArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.WorkforceArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "WorkforceName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected WorkforceName to be of type string, got %T instead", value)
|
|
}
|
|
sv.WorkforceName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentWorkforces(v *[]types.Workforce, 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.Workforce
|
|
if *v == nil {
|
|
cv = []types.Workforce{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.Workforce
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentWorkforce(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentWorkteam(v **types.Workteam, 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.Workteam
|
|
if *v == nil {
|
|
sv = &types.Workteam{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreateDate":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreateDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Description":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String200 to be of type string, got %T instead", value)
|
|
}
|
|
sv.Description = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastUpdatedDate":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastUpdatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MemberDefinitions":
|
|
if err := awsAwsjson11_deserializeDocumentMemberDefinitions(&sv.MemberDefinitions, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NotificationConfiguration":
|
|
if err := awsAwsjson11_deserializeDocumentNotificationConfiguration(&sv.NotificationConfiguration, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProductListingIds":
|
|
if err := awsAwsjson11_deserializeDocumentProductListings(&sv.ProductListingIds, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SubDomain":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.SubDomain = ptr.String(jtv)
|
|
}
|
|
|
|
case "WorkforceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected WorkforceArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.WorkforceArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "WorkteamArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected WorkteamArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.WorkteamArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "WorkteamName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected WorkteamName to be of type string, got %T instead", value)
|
|
}
|
|
sv.WorkteamName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeDocumentWorkteams(v *[]types.Workteam, 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.Workteam
|
|
if *v == nil {
|
|
cv = []types.Workteam{}
|
|
} else {
|
|
cv = *v
|
|
}
|
|
|
|
for _, value := range shape {
|
|
var col types.Workteam
|
|
destAddr := &col
|
|
if err := awsAwsjson11_deserializeDocumentWorkteam(&destAddr, value); err != nil {
|
|
return err
|
|
}
|
|
col = *destAddr
|
|
cv = append(cv, col)
|
|
|
|
}
|
|
*v = cv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentAddAssociationOutput(v **AddAssociationOutput, 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 *AddAssociationOutput
|
|
if *v == nil {
|
|
sv = &AddAssociationOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DestinationArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AssociationEntityArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.DestinationArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "SourceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AssociationEntityArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentAddTagsOutput(v **AddTagsOutput, 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 *AddTagsOutput
|
|
if *v == nil {
|
|
sv = &AddTagsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentAssociateTrialComponentOutput(v **AssociateTrialComponentOutput, 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 *AssociateTrialComponentOutput
|
|
if *v == nil {
|
|
sv = &AssociateTrialComponentOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "TrialArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialComponentArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialComponentArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialComponentArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentBatchDescribeModelPackageOutput(v **BatchDescribeModelPackageOutput, 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 *BatchDescribeModelPackageOutput
|
|
if *v == nil {
|
|
sv = &BatchDescribeModelPackageOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "BatchDescribeModelPackageErrorMap":
|
|
if err := awsAwsjson11_deserializeDocumentBatchDescribeModelPackageErrorMap(&sv.BatchDescribeModelPackageErrorMap, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelPackageSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageSummaries(&sv.ModelPackageSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateActionOutput(v **CreateActionOutput, 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 *CreateActionOutput
|
|
if *v == nil {
|
|
sv = &CreateActionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ActionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ActionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ActionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateAlgorithmOutput(v **CreateAlgorithmOutput, 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 *CreateAlgorithmOutput
|
|
if *v == nil {
|
|
sv = &CreateAlgorithmOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AlgorithmArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AlgorithmArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AlgorithmArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateAppImageConfigOutput(v **CreateAppImageConfigOutput, 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 *CreateAppImageConfigOutput
|
|
if *v == nil {
|
|
sv = &CreateAppImageConfigOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AppImageConfigArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppImageConfigArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AppImageConfigArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateAppOutput(v **CreateAppOutput, 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 *CreateAppOutput
|
|
if *v == nil {
|
|
sv = &CreateAppOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AppArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AppArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateArtifactOutput(v **CreateArtifactOutput, 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 *CreateArtifactOutput
|
|
if *v == nil {
|
|
sv = &CreateArtifactOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ArtifactArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ArtifactArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ArtifactArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateAutoMLJobOutput(v **CreateAutoMLJobOutput, 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 *CreateAutoMLJobOutput
|
|
if *v == nil {
|
|
sv = &CreateAutoMLJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AutoMLJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AutoMLJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateCodeRepositoryOutput(v **CreateCodeRepositoryOutput, 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 *CreateCodeRepositoryOutput
|
|
if *v == nil {
|
|
sv = &CreateCodeRepositoryOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CodeRepositoryArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CodeRepositoryArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.CodeRepositoryArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateCompilationJobOutput(v **CreateCompilationJobOutput, 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 *CreateCompilationJobOutput
|
|
if *v == nil {
|
|
sv = &CreateCompilationJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CompilationJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CompilationJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompilationJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateContextOutput(v **CreateContextOutput, 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 *CreateContextOutput
|
|
if *v == nil {
|
|
sv = &CreateContextOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ContextArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContextArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContextArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateDataQualityJobDefinitionOutput(v **CreateDataQualityJobDefinitionOutput, 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 *CreateDataQualityJobDefinitionOutput
|
|
if *v == nil {
|
|
sv = &CreateDataQualityJobDefinitionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "JobDefinitionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.JobDefinitionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateDomainOutput(v **CreateDomainOutput, 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 *CreateDomainOutput
|
|
if *v == nil {
|
|
sv = &CreateDomainOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DomainArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DomainArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.DomainArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "Url":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String1024 to be of type string, got %T instead", value)
|
|
}
|
|
sv.Url = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateEndpointConfigOutput(v **CreateEndpointConfigOutput, 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 *CreateEndpointConfigOutput
|
|
if *v == nil {
|
|
sv = &CreateEndpointConfigOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EndpointConfigArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointConfigArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointConfigArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateEndpointOutput(v **CreateEndpointOutput, 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 *CreateEndpointOutput
|
|
if *v == nil {
|
|
sv = &CreateEndpointOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EndpointArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateExperimentOutput(v **CreateExperimentOutput, 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 *CreateExperimentOutput
|
|
if *v == nil {
|
|
sv = &CreateExperimentOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ExperimentArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExperimentArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateFeatureGroupOutput(v **CreateFeatureGroupOutput, 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 *CreateFeatureGroupOutput
|
|
if *v == nil {
|
|
sv = &CreateFeatureGroupOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "FeatureGroupArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureGroupArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.FeatureGroupArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateFlowDefinitionOutput(v **CreateFlowDefinitionOutput, 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 *CreateFlowDefinitionOutput
|
|
if *v == nil {
|
|
sv = &CreateFlowDefinitionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "FlowDefinitionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FlowDefinitionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.FlowDefinitionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateHumanTaskUiOutput(v **CreateHumanTaskUiOutput, 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 *CreateHumanTaskUiOutput
|
|
if *v == nil {
|
|
sv = &CreateHumanTaskUiOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "HumanTaskUiArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HumanTaskUiArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.HumanTaskUiArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateHyperParameterTuningJobOutput(v **CreateHyperParameterTuningJobOutput, 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 *CreateHyperParameterTuningJobOutput
|
|
if *v == nil {
|
|
sv = &CreateHyperParameterTuningJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "HyperParameterTuningJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.HyperParameterTuningJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateImageOutput(v **CreateImageOutput, 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 *CreateImageOutput
|
|
if *v == nil {
|
|
sv = &CreateImageOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ImageArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateImageVersionOutput(v **CreateImageVersionOutput, 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 *CreateImageVersionOutput
|
|
if *v == nil {
|
|
sv = &CreateImageVersionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ImageVersionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageVersionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageVersionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateLabelingJobOutput(v **CreateLabelingJobOutput, 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 *CreateLabelingJobOutput
|
|
if *v == nil {
|
|
sv = &CreateLabelingJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "LabelingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.LabelingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateModelBiasJobDefinitionOutput(v **CreateModelBiasJobDefinitionOutput, 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 *CreateModelBiasJobDefinitionOutput
|
|
if *v == nil {
|
|
sv = &CreateModelBiasJobDefinitionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "JobDefinitionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.JobDefinitionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateModelExplainabilityJobDefinitionOutput(v **CreateModelExplainabilityJobDefinitionOutput, 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 *CreateModelExplainabilityJobDefinitionOutput
|
|
if *v == nil {
|
|
sv = &CreateModelExplainabilityJobDefinitionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "JobDefinitionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.JobDefinitionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateModelOutput(v **CreateModelOutput, 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 *CreateModelOutput
|
|
if *v == nil {
|
|
sv = &CreateModelOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ModelArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateModelPackageGroupOutput(v **CreateModelPackageGroupOutput, 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 *CreateModelPackageGroupOutput
|
|
if *v == nil {
|
|
sv = &CreateModelPackageGroupOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ModelPackageGroupArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageGroupArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateModelPackageOutput(v **CreateModelPackageOutput, 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 *CreateModelPackageOutput
|
|
if *v == nil {
|
|
sv = &CreateModelPackageOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ModelPackageArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateModelQualityJobDefinitionOutput(v **CreateModelQualityJobDefinitionOutput, 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 *CreateModelQualityJobDefinitionOutput
|
|
if *v == nil {
|
|
sv = &CreateModelQualityJobDefinitionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "JobDefinitionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.JobDefinitionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateMonitoringScheduleOutput(v **CreateMonitoringScheduleOutput, 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 *CreateMonitoringScheduleOutput
|
|
if *v == nil {
|
|
sv = &CreateMonitoringScheduleOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MonitoringScheduleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringScheduleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringScheduleArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateNotebookInstanceLifecycleConfigOutput(v **CreateNotebookInstanceLifecycleConfigOutput, 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 *CreateNotebookInstanceLifecycleConfigOutput
|
|
if *v == nil {
|
|
sv = &CreateNotebookInstanceLifecycleConfigOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NotebookInstanceLifecycleConfigArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceLifecycleConfigArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotebookInstanceLifecycleConfigArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateNotebookInstanceOutput(v **CreateNotebookInstanceOutput, 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 *CreateNotebookInstanceOutput
|
|
if *v == nil {
|
|
sv = &CreateNotebookInstanceOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NotebookInstanceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotebookInstanceArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreatePipelineOutput(v **CreatePipelineOutput, value interface{}) error {
|
|
if v == nil {
|
|
return fmt.Errorf("unexpected nil of type %T", v)
|
|
}
|
|
if value == nil {
|
|
return nil
|
|
}
|
|
|
|
shape, ok := value.(map[string]interface{})
|
|
if !ok {
|
|
return fmt.Errorf("unexpected JSON type %v", value)
|
|
}
|
|
|
|
var sv *CreatePipelineOutput
|
|
if *v == nil {
|
|
sv = &CreatePipelineOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "PipelineArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreatePresignedDomainUrlOutput(v **CreatePresignedDomainUrlOutput, 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 *CreatePresignedDomainUrlOutput
|
|
if *v == nil {
|
|
sv = &CreatePresignedDomainUrlOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AuthorizedUrl":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PresignedDomainUrl to be of type string, got %T instead", value)
|
|
}
|
|
sv.AuthorizedUrl = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreatePresignedNotebookInstanceUrlOutput(v **CreatePresignedNotebookInstanceUrlOutput, 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 *CreatePresignedNotebookInstanceUrlOutput
|
|
if *v == nil {
|
|
sv = &CreatePresignedNotebookInstanceUrlOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AuthorizedUrl":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceUrl to be of type string, got %T instead", value)
|
|
}
|
|
sv.AuthorizedUrl = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateProcessingJobOutput(v **CreateProcessingJobOutput, 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 *CreateProcessingJobOutput
|
|
if *v == nil {
|
|
sv = &CreateProcessingJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ProcessingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProcessingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateProjectOutput(v **CreateProjectOutput, 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 *CreateProjectOutput
|
|
if *v == nil {
|
|
sv = &CreateProjectOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ProjectArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProjectArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProjectId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProjectId to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectId = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateStudioLifecycleConfigOutput(v **CreateStudioLifecycleConfigOutput, 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 *CreateStudioLifecycleConfigOutput
|
|
if *v == nil {
|
|
sv = &CreateStudioLifecycleConfigOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "StudioLifecycleConfigArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected StudioLifecycleConfigArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.StudioLifecycleConfigArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateTrainingJobOutput(v **CreateTrainingJobOutput, 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 *CreateTrainingJobOutput
|
|
if *v == nil {
|
|
sv = &CreateTrainingJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "TrainingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateTransformJobOutput(v **CreateTransformJobOutput, 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 *CreateTransformJobOutput
|
|
if *v == nil {
|
|
sv = &CreateTransformJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "TransformJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TransformJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TransformJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateTrialComponentOutput(v **CreateTrialComponentOutput, 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 *CreateTrialComponentOutput
|
|
if *v == nil {
|
|
sv = &CreateTrialComponentOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "TrialComponentArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialComponentArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialComponentArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateTrialOutput(v **CreateTrialOutput, 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 *CreateTrialOutput
|
|
if *v == nil {
|
|
sv = &CreateTrialOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "TrialArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateUserProfileOutput(v **CreateUserProfileOutput, 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 *CreateUserProfileOutput
|
|
if *v == nil {
|
|
sv = &CreateUserProfileOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "UserProfileArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected UserProfileArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.UserProfileArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateWorkforceOutput(v **CreateWorkforceOutput, 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 *CreateWorkforceOutput
|
|
if *v == nil {
|
|
sv = &CreateWorkforceOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "WorkforceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected WorkforceArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.WorkforceArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentCreateWorkteamOutput(v **CreateWorkteamOutput, 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 *CreateWorkteamOutput
|
|
if *v == nil {
|
|
sv = &CreateWorkteamOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "WorkteamArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected WorkteamArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.WorkteamArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDeleteActionOutput(v **DeleteActionOutput, 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 *DeleteActionOutput
|
|
if *v == nil {
|
|
sv = &DeleteActionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ActionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ActionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ActionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDeleteArtifactOutput(v **DeleteArtifactOutput, 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 *DeleteArtifactOutput
|
|
if *v == nil {
|
|
sv = &DeleteArtifactOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ArtifactArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ArtifactArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ArtifactArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDeleteAssociationOutput(v **DeleteAssociationOutput, 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 *DeleteAssociationOutput
|
|
if *v == nil {
|
|
sv = &DeleteAssociationOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DestinationArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AssociationEntityArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.DestinationArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "SourceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AssociationEntityArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.SourceArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDeleteContextOutput(v **DeleteContextOutput, 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 *DeleteContextOutput
|
|
if *v == nil {
|
|
sv = &DeleteContextOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ContextArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContextArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContextArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDeleteExperimentOutput(v **DeleteExperimentOutput, 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 *DeleteExperimentOutput
|
|
if *v == nil {
|
|
sv = &DeleteExperimentOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ExperimentArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExperimentArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDeleteFlowDefinitionOutput(v **DeleteFlowDefinitionOutput, 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 *DeleteFlowDefinitionOutput
|
|
if *v == nil {
|
|
sv = &DeleteFlowDefinitionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDeleteHumanTaskUiOutput(v **DeleteHumanTaskUiOutput, 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 *DeleteHumanTaskUiOutput
|
|
if *v == nil {
|
|
sv = &DeleteHumanTaskUiOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDeleteImageOutput(v **DeleteImageOutput, 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 *DeleteImageOutput
|
|
if *v == nil {
|
|
sv = &DeleteImageOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDeleteImageVersionOutput(v **DeleteImageVersionOutput, 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 *DeleteImageVersionOutput
|
|
if *v == nil {
|
|
sv = &DeleteImageVersionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDeletePipelineOutput(v **DeletePipelineOutput, 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 *DeletePipelineOutput
|
|
if *v == nil {
|
|
sv = &DeletePipelineOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "PipelineArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDeleteTagsOutput(v **DeleteTagsOutput, 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 *DeleteTagsOutput
|
|
if *v == nil {
|
|
sv = &DeleteTagsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDeleteTrialComponentOutput(v **DeleteTrialComponentOutput, 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 *DeleteTrialComponentOutput
|
|
if *v == nil {
|
|
sv = &DeleteTrialComponentOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "TrialComponentArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialComponentArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialComponentArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDeleteTrialOutput(v **DeleteTrialOutput, 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 *DeleteTrialOutput
|
|
if *v == nil {
|
|
sv = &DeleteTrialOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "TrialArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDeleteWorkforceOutput(v **DeleteWorkforceOutput, 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 *DeleteWorkforceOutput
|
|
if *v == nil {
|
|
sv = &DeleteWorkforceOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDeleteWorkteamOutput(v **DeleteWorkteamOutput, 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 *DeleteWorkteamOutput
|
|
if *v == nil {
|
|
sv = &DeleteWorkteamOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Success":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Success to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.Success = jtv
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeActionOutput(v **DescribeActionOutput, 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 *DescribeActionOutput
|
|
if *v == nil {
|
|
sv = &DescribeActionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ActionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ActionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ActionArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ActionName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ActionName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ActionType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.ActionType = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Description":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.Description = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MetadataProperties":
|
|
if err := awsAwsjson11_deserializeDocumentMetadataProperties(&sv.MetadataProperties, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Properties":
|
|
if err := awsAwsjson11_deserializeDocumentLineageEntityParameters(&sv.Properties, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Source":
|
|
if err := awsAwsjson11_deserializeDocumentActionSource(&sv.Source, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Status":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ActionStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.Status = types.ActionStatus(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeAlgorithmOutput(v **DescribeAlgorithmOutput, 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 *DescribeAlgorithmOutput
|
|
if *v == nil {
|
|
sv = &DescribeAlgorithmOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AlgorithmArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AlgorithmArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AlgorithmArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "AlgorithmDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.AlgorithmDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "AlgorithmName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.AlgorithmName = ptr.String(jtv)
|
|
}
|
|
|
|
case "AlgorithmStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AlgorithmStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.AlgorithmStatus = types.AlgorithmStatus(jtv)
|
|
}
|
|
|
|
case "AlgorithmStatusDetails":
|
|
if err := awsAwsjson11_deserializeDocumentAlgorithmStatusDetails(&sv.AlgorithmStatusDetails, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CertifyForMarketplace":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected CertifyForMarketplace to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.CertifyForMarketplace = jtv
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "InferenceSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentInferenceSpecification(&sv.InferenceSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProductId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProductId to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProductId = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentTrainingSpecification(&sv.TrainingSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ValidationSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentAlgorithmValidationSpecification(&sv.ValidationSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeAppImageConfigOutput(v **DescribeAppImageConfigOutput, 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 *DescribeAppImageConfigOutput
|
|
if *v == nil {
|
|
sv = &DescribeAppImageConfigOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AppImageConfigArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppImageConfigArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AppImageConfigArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "AppImageConfigName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppImageConfigName to be of type string, got %T instead", value)
|
|
}
|
|
sv.AppImageConfigName = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "KernelGatewayImageConfig":
|
|
if err := awsAwsjson11_deserializeDocumentKernelGatewayImageConfig(&sv.KernelGatewayImageConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeAppOutput(v **DescribeAppOutput, 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 *DescribeAppOutput
|
|
if *v == nil {
|
|
sv = &DescribeAppOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AppArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AppArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "AppName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppName to be of type string, got %T instead", value)
|
|
}
|
|
sv.AppName = ptr.String(jtv)
|
|
}
|
|
|
|
case "AppType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppType to be of type string, got %T instead", value)
|
|
}
|
|
sv.AppType = types.AppType(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DomainId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DomainId to be of type string, got %T instead", value)
|
|
}
|
|
sv.DomainId = ptr.String(jtv)
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastHealthCheckTimestamp":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastHealthCheckTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastUserActivityTimestamp":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastUserActivityTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ResourceSpec":
|
|
if err := awsAwsjson11_deserializeDocumentResourceSpec(&sv.ResourceSpec, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Status":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.Status = types.AppStatus(jtv)
|
|
}
|
|
|
|
case "UserProfileName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected UserProfileName to be of type string, got %T instead", value)
|
|
}
|
|
sv.UserProfileName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeArtifactOutput(v **DescribeArtifactOutput, 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 *DescribeArtifactOutput
|
|
if *v == nil {
|
|
sv = &DescribeArtifactOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ArtifactArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ArtifactArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ArtifactArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ArtifactName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ArtifactName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ArtifactType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.ArtifactType = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MetadataProperties":
|
|
if err := awsAwsjson11_deserializeDocumentMetadataProperties(&sv.MetadataProperties, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Properties":
|
|
if err := awsAwsjson11_deserializeDocumentLineageEntityParameters(&sv.Properties, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Source":
|
|
if err := awsAwsjson11_deserializeDocumentArtifactSource(&sv.Source, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeAutoMLJobOutput(v **DescribeAutoMLJobOutput, 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 *DescribeAutoMLJobOutput
|
|
if *v == nil {
|
|
sv = &DescribeAutoMLJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AutoMLJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AutoMLJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "AutoMLJobArtifacts":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLJobArtifacts(&sv.AutoMLJobArtifacts, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "AutoMLJobConfig":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLJobConfig(&sv.AutoMLJobConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "AutoMLJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.AutoMLJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "AutoMLJobObjective":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLJobObjective(&sv.AutoMLJobObjective, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "AutoMLJobSecondaryStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobSecondaryStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.AutoMLJobSecondaryStatus = types.AutoMLJobSecondaryStatus(jtv)
|
|
}
|
|
|
|
case "AutoMLJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.AutoMLJobStatus = types.AutoMLJobStatus(jtv)
|
|
}
|
|
|
|
case "BestCandidate":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLCandidate(&sv.BestCandidate, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "EndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLFailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "GenerateCandidateDefinitionsOnly":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected GenerateCandidateDefinitionsOnly to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.GenerateCandidateDefinitionsOnly = jtv
|
|
}
|
|
|
|
case "InputDataConfig":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLInputDataConfig(&sv.InputDataConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ModelDeployConfig":
|
|
if err := awsAwsjson11_deserializeDocumentModelDeployConfig(&sv.ModelDeployConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelDeployResult":
|
|
if err := awsAwsjson11_deserializeDocumentModelDeployResult(&sv.ModelDeployResult, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OutputDataConfig":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLOutputDataConfig(&sv.OutputDataConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "PartialFailureReasons":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLPartialFailureReasons(&sv.PartialFailureReasons, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProblemType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProblemType to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProblemType = types.ProblemType(jtv)
|
|
}
|
|
|
|
case "ResolvedAttributes":
|
|
if err := awsAwsjson11_deserializeDocumentResolvedAttributes(&sv.ResolvedAttributes, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeCodeRepositoryOutput(v **DescribeCodeRepositoryOutput, 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 *DescribeCodeRepositoryOutput
|
|
if *v == nil {
|
|
sv = &DescribeCodeRepositoryOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CodeRepositoryArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CodeRepositoryArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.CodeRepositoryArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "CodeRepositoryName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.CodeRepositoryName = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "GitConfig":
|
|
if err := awsAwsjson11_deserializeDocumentGitConfig(&sv.GitConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeCompilationJobOutput(v **DescribeCompilationJobOutput, 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 *DescribeCompilationJobOutput
|
|
if *v == nil {
|
|
sv = &DescribeCompilationJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CompilationEndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CompilationEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "CompilationJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CompilationJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompilationJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "CompilationJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompilationJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "CompilationJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CompilationJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompilationJobStatus = types.CompilationJobStatus(jtv)
|
|
}
|
|
|
|
case "CompilationStartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CompilationStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "InferenceImage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected InferenceImage to be of type string, got %T instead", value)
|
|
}
|
|
sv.InferenceImage = ptr.String(jtv)
|
|
}
|
|
|
|
case "InputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentInputConfig(&sv.InputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ModelArtifacts":
|
|
if err := awsAwsjson11_deserializeDocumentModelArtifacts(&sv.ModelArtifacts, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelDigests":
|
|
if err := awsAwsjson11_deserializeDocumentModelDigests(&sv.ModelDigests, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentOutputConfig(&sv.OutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "StoppingCondition":
|
|
if err := awsAwsjson11_deserializeDocumentStoppingCondition(&sv.StoppingCondition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "VpcConfig":
|
|
if err := awsAwsjson11_deserializeDocumentNeoVpcConfig(&sv.VpcConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeContextOutput(v **DescribeContextOutput, 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 *DescribeContextOutput
|
|
if *v == nil {
|
|
sv = &DescribeContextOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ContextArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContextArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContextArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ContextName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContextName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ContextType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContextType = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Description":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.Description = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Properties":
|
|
if err := awsAwsjson11_deserializeDocumentLineageEntityParameters(&sv.Properties, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Source":
|
|
if err := awsAwsjson11_deserializeDocumentContextSource(&sv.Source, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeDataQualityJobDefinitionOutput(v **DescribeDataQualityJobDefinitionOutput, 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 *DescribeDataQualityJobDefinitionOutput
|
|
if *v == nil {
|
|
sv = &DescribeDataQualityJobDefinitionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DataQualityAppSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentDataQualityAppSpecification(&sv.DataQualityAppSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DataQualityBaselineConfig":
|
|
if err := awsAwsjson11_deserializeDocumentDataQualityBaselineConfig(&sv.DataQualityBaselineConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DataQualityJobInput":
|
|
if err := awsAwsjson11_deserializeDocumentDataQualityJobInput(&sv.DataQualityJobInput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DataQualityJobOutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringOutputConfig(&sv.DataQualityJobOutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "JobDefinitionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.JobDefinitionArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "JobDefinitionName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.JobDefinitionName = ptr.String(jtv)
|
|
}
|
|
|
|
case "JobResources":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringResources(&sv.JobResources, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NetworkConfig":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringNetworkConfig(&sv.NetworkConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "StoppingCondition":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringStoppingCondition(&sv.StoppingCondition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeDeviceFleetOutput(v **DescribeDeviceFleetOutput, 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 *DescribeDeviceFleetOutput
|
|
if *v == nil {
|
|
sv = &DescribeDeviceFleetOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Description":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DeviceFleetDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.Description = ptr.String(jtv)
|
|
}
|
|
|
|
case "DeviceFleetArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DeviceFleetArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.DeviceFleetArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "DeviceFleetName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DeviceFleetName = ptr.String(jtv)
|
|
}
|
|
|
|
case "IotRoleAlias":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected IotRoleAlias to be of type string, got %T instead", value)
|
|
}
|
|
sv.IotRoleAlias = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "OutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentEdgeOutputConfig(&sv.OutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeDeviceOutput(v **DescribeDeviceOutput, 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 *DescribeDeviceOutput
|
|
if *v == nil {
|
|
sv = &DescribeDeviceOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AgentVersion":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgeVersion to be of type string, got %T instead", value)
|
|
}
|
|
sv.AgentVersion = ptr.String(jtv)
|
|
}
|
|
|
|
case "Description":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DeviceDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.Description = ptr.String(jtv)
|
|
}
|
|
|
|
case "DeviceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DeviceArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.DeviceArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "DeviceFleetName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DeviceFleetName = ptr.String(jtv)
|
|
}
|
|
|
|
case "DeviceName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DeviceName = ptr.String(jtv)
|
|
}
|
|
|
|
case "IotThingName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ThingName to be of type string, got %T instead", value)
|
|
}
|
|
sv.IotThingName = ptr.String(jtv)
|
|
}
|
|
|
|
case "LatestHeartbeat":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LatestHeartbeat = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MaxModels":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected Integer to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxModels = int32(i64)
|
|
}
|
|
|
|
case "Models":
|
|
if err := awsAwsjson11_deserializeDocumentEdgeModels(&sv.Models, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "RegistrationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.RegistrationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeDomainOutput(v **DescribeDomainOutput, 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 *DescribeDomainOutput
|
|
if *v == nil {
|
|
sv = &DescribeDomainOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AppNetworkAccessType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppNetworkAccessType to be of type string, got %T instead", value)
|
|
}
|
|
sv.AppNetworkAccessType = types.AppNetworkAccessType(jtv)
|
|
}
|
|
|
|
case "AppSecurityGroupManagement":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppSecurityGroupManagement to be of type string, got %T instead", value)
|
|
}
|
|
sv.AppSecurityGroupManagement = types.AppSecurityGroupManagement(jtv)
|
|
}
|
|
|
|
case "AuthMode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AuthMode to be of type string, got %T instead", value)
|
|
}
|
|
sv.AuthMode = types.AuthMode(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DefaultUserSettings":
|
|
if err := awsAwsjson11_deserializeDocumentUserSettings(&sv.DefaultUserSettings, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DomainArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DomainArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.DomainArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "DomainId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DomainId to be of type string, got %T instead", value)
|
|
}
|
|
sv.DomainId = ptr.String(jtv)
|
|
}
|
|
|
|
case "DomainName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DomainName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DomainName = ptr.String(jtv)
|
|
}
|
|
|
|
case "DomainSettings":
|
|
if err := awsAwsjson11_deserializeDocumentDomainSettings(&sv.DomainSettings, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "HomeEfsFileSystemId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value)
|
|
}
|
|
sv.HomeEfsFileSystemId = ptr.String(jtv)
|
|
}
|
|
|
|
case "HomeEfsFileSystemKmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.HomeEfsFileSystemKmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "SecurityGroupIdForDomainBoundary":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SecurityGroupId to be of type string, got %T instead", value)
|
|
}
|
|
sv.SecurityGroupIdForDomainBoundary = ptr.String(jtv)
|
|
}
|
|
|
|
case "SingleSignOnManagedApplicationInstanceId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.SingleSignOnManagedApplicationInstanceId = ptr.String(jtv)
|
|
}
|
|
|
|
case "Status":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DomainStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.Status = types.DomainStatus(jtv)
|
|
}
|
|
|
|
case "SubnetIds":
|
|
if err := awsAwsjson11_deserializeDocumentSubnets(&sv.SubnetIds, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Url":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String1024 to be of type string, got %T instead", value)
|
|
}
|
|
sv.Url = ptr.String(jtv)
|
|
}
|
|
|
|
case "VpcId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected VpcId to be of type string, got %T instead", value)
|
|
}
|
|
sv.VpcId = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeEdgePackagingJobOutput(v **DescribeEdgePackagingJobOutput, 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 *DescribeEdgePackagingJobOutput
|
|
if *v == nil {
|
|
sv = &DescribeEdgePackagingJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CompilationJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.CompilationJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "EdgePackagingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgePackagingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.EdgePackagingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "EdgePackagingJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EdgePackagingJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "EdgePackagingJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgePackagingJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.EdgePackagingJobStatus = types.EdgePackagingJobStatus(jtv)
|
|
}
|
|
|
|
case "EdgePackagingJobStatusMessage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.EdgePackagingJobStatusMessage = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ModelArtifact":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelArtifact = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelSignature":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelSignature = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelVersion":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EdgeVersion to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelVersion = ptr.String(jtv)
|
|
}
|
|
|
|
case "OutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentEdgeOutputConfig(&sv.OutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "PresetDeploymentOutput":
|
|
if err := awsAwsjson11_deserializeDocumentEdgePresetDeploymentOutput(&sv.PresetDeploymentOutput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ResourceKey":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.ResourceKey = ptr.String(jtv)
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeEndpointConfigOutput(v **DescribeEndpointConfigOutput, 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 *DescribeEndpointConfigOutput
|
|
if *v == nil {
|
|
sv = &DescribeEndpointConfigOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AsyncInferenceConfig":
|
|
if err := awsAwsjson11_deserializeDocumentAsyncInferenceConfig(&sv.AsyncInferenceConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DataCaptureConfig":
|
|
if err := awsAwsjson11_deserializeDocumentDataCaptureConfig(&sv.DataCaptureConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "EndpointConfigArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointConfigArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointConfigArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "EndpointConfigName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointConfigName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointConfigName = ptr.String(jtv)
|
|
}
|
|
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProductionVariants":
|
|
if err := awsAwsjson11_deserializeDocumentProductionVariantList(&sv.ProductionVariants, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeEndpointOutput(v **DescribeEndpointOutput, 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 *DescribeEndpointOutput
|
|
if *v == nil {
|
|
sv = &DescribeEndpointOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AsyncInferenceConfig":
|
|
if err := awsAwsjson11_deserializeDocumentAsyncInferenceConfig(&sv.AsyncInferenceConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DataCaptureConfig":
|
|
if err := awsAwsjson11_deserializeDocumentDataCaptureConfigSummary(&sv.DataCaptureConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "EndpointArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "EndpointConfigName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointConfigName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointConfigName = ptr.String(jtv)
|
|
}
|
|
|
|
case "EndpointName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointName = ptr.String(jtv)
|
|
}
|
|
|
|
case "EndpointStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointStatus = types.EndpointStatus(jtv)
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastDeploymentConfig":
|
|
if err := awsAwsjson11_deserializeDocumentDeploymentConfig(&sv.LastDeploymentConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "PendingDeploymentSummary":
|
|
if err := awsAwsjson11_deserializeDocumentPendingDeploymentSummary(&sv.PendingDeploymentSummary, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProductionVariants":
|
|
if err := awsAwsjson11_deserializeDocumentProductionVariantSummaryList(&sv.ProductionVariants, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeExperimentOutput(v **DescribeExperimentOutput, 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 *DescribeExperimentOutput
|
|
if *v == nil {
|
|
sv = &DescribeExperimentOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Description":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.Description = ptr.String(jtv)
|
|
}
|
|
|
|
case "DisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ExperimentArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExperimentArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ExperimentName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExperimentName = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Source":
|
|
if err := awsAwsjson11_deserializeDocumentExperimentSource(&sv.Source, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeFeatureGroupOutput(v **DescribeFeatureGroupOutput, 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 *DescribeFeatureGroupOutput
|
|
if *v == nil {
|
|
sv = &DescribeFeatureGroupOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Description":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected Description to be of type string, got %T instead", value)
|
|
}
|
|
sv.Description = ptr.String(jtv)
|
|
}
|
|
|
|
case "EventTimeFeatureName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EventTimeFeatureName = ptr.String(jtv)
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "FeatureDefinitions":
|
|
if err := awsAwsjson11_deserializeDocumentFeatureDefinitions(&sv.FeatureDefinitions, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "FeatureGroupArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureGroupArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.FeatureGroupArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "FeatureGroupName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureGroupName to be of type string, got %T instead", value)
|
|
}
|
|
sv.FeatureGroupName = ptr.String(jtv)
|
|
}
|
|
|
|
case "FeatureGroupStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureGroupStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.FeatureGroupStatus = types.FeatureGroupStatus(jtv)
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "OfflineStoreConfig":
|
|
if err := awsAwsjson11_deserializeDocumentOfflineStoreConfig(&sv.OfflineStoreConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OfflineStoreStatus":
|
|
if err := awsAwsjson11_deserializeDocumentOfflineStoreStatus(&sv.OfflineStoreStatus, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OnlineStoreConfig":
|
|
if err := awsAwsjson11_deserializeDocumentOnlineStoreConfig(&sv.OnlineStoreConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RecordIdentifierFeatureName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FeatureName to be of type string, got %T instead", value)
|
|
}
|
|
sv.RecordIdentifierFeatureName = ptr.String(jtv)
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeFlowDefinitionOutput(v **DescribeFlowDefinitionOutput, 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 *DescribeFlowDefinitionOutput
|
|
if *v == nil {
|
|
sv = &DescribeFlowDefinitionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "FlowDefinitionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FlowDefinitionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.FlowDefinitionArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "FlowDefinitionName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FlowDefinitionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.FlowDefinitionName = ptr.String(jtv)
|
|
}
|
|
|
|
case "FlowDefinitionStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FlowDefinitionStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.FlowDefinitionStatus = types.FlowDefinitionStatus(jtv)
|
|
}
|
|
|
|
case "HumanLoopActivationConfig":
|
|
if err := awsAwsjson11_deserializeDocumentHumanLoopActivationConfig(&sv.HumanLoopActivationConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "HumanLoopConfig":
|
|
if err := awsAwsjson11_deserializeDocumentHumanLoopConfig(&sv.HumanLoopConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "HumanLoopRequestSource":
|
|
if err := awsAwsjson11_deserializeDocumentHumanLoopRequestSource(&sv.HumanLoopRequestSource, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentFlowDefinitionOutputConfig(&sv.OutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeHumanTaskUiOutput(v **DescribeHumanTaskUiOutput, 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 *DescribeHumanTaskUiOutput
|
|
if *v == nil {
|
|
sv = &DescribeHumanTaskUiOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "HumanTaskUiArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HumanTaskUiArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.HumanTaskUiArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "HumanTaskUiName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HumanTaskUiName to be of type string, got %T instead", value)
|
|
}
|
|
sv.HumanTaskUiName = ptr.String(jtv)
|
|
}
|
|
|
|
case "HumanTaskUiStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HumanTaskUiStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.HumanTaskUiStatus = types.HumanTaskUiStatus(jtv)
|
|
}
|
|
|
|
case "UiTemplate":
|
|
if err := awsAwsjson11_deserializeDocumentUiTemplateInfo(&sv.UiTemplate, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeHyperParameterTuningJobOutput(v **DescribeHyperParameterTuningJobOutput, 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 *DescribeHyperParameterTuningJobOutput
|
|
if *v == nil {
|
|
sv = &DescribeHyperParameterTuningJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "BestTrainingJob":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterTrainingJobSummary(&sv.BestTrainingJob, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "HyperParameterTuningEndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.HyperParameterTuningEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "HyperParameterTuningJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.HyperParameterTuningJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "HyperParameterTuningJobConfig":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterTuningJobConfig(&sv.HyperParameterTuningJobConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "HyperParameterTuningJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.HyperParameterTuningJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "HyperParameterTuningJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.HyperParameterTuningJobStatus = types.HyperParameterTuningJobStatus(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ObjectiveStatusCounters":
|
|
if err := awsAwsjson11_deserializeDocumentObjectiveStatusCounters(&sv.ObjectiveStatusCounters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OverallBestTrainingJob":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterTrainingJobSummary(&sv.OverallBestTrainingJob, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrainingJobDefinition":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterTrainingJobDefinition(&sv.TrainingJobDefinition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrainingJobDefinitions":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterTrainingJobDefinitions(&sv.TrainingJobDefinitions, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrainingJobStatusCounters":
|
|
if err := awsAwsjson11_deserializeDocumentTrainingJobStatusCounters(&sv.TrainingJobStatusCounters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "WarmStartConfig":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterTuningJobWarmStartConfig(&sv.WarmStartConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeImageOutput(v **DescribeImageOutput, 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 *DescribeImageOutput
|
|
if *v == nil {
|
|
sv = &DescribeImageOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Description":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.Description = ptr.String(jtv)
|
|
}
|
|
|
|
case "DisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageDisplayName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageStatus = types.ImageStatus(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeImageVersionOutput(v **DescribeImageVersionOutput, 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 *DescribeImageVersionOutput
|
|
if *v == nil {
|
|
sv = &DescribeImageVersionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "BaseImage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageBaseImage to be of type string, got %T instead", value)
|
|
}
|
|
sv.BaseImage = ptr.String(jtv)
|
|
}
|
|
|
|
case "ContainerImage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageContainerImage to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContainerImage = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageVersionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageVersionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageVersionArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ImageVersionStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageVersionStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageVersionStatus = types.ImageVersionStatus(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Version":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageVersionNumber to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.Version = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeLabelingJobOutput(v **DescribeLabelingJobOutput, 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 *DescribeLabelingJobOutput
|
|
if *v == nil {
|
|
sv = &DescribeLabelingJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "HumanTaskConfig":
|
|
if err := awsAwsjson11_deserializeDocumentHumanTaskConfig(&sv.HumanTaskConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "InputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobInputConfig(&sv.InputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "JobReferenceCode":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected JobReferenceCode to be of type string, got %T instead", value)
|
|
}
|
|
sv.JobReferenceCode = ptr.String(jtv)
|
|
}
|
|
|
|
case "LabelAttributeName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelAttributeName to be of type string, got %T instead", value)
|
|
}
|
|
sv.LabelAttributeName = ptr.String(jtv)
|
|
}
|
|
|
|
case "LabelCategoryConfigS3Uri":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value)
|
|
}
|
|
sv.LabelCategoryConfigS3Uri = ptr.String(jtv)
|
|
}
|
|
|
|
case "LabelCounters":
|
|
if err := awsAwsjson11_deserializeDocumentLabelCounters(&sv.LabelCounters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LabelingJobAlgorithmsConfig":
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobAlgorithmsConfig(&sv.LabelingJobAlgorithmsConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LabelingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.LabelingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "LabelingJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelingJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.LabelingJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "LabelingJobOutput":
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobOutput(&sv.LabelingJobOutput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LabelingJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelingJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.LabelingJobStatus = types.LabelingJobStatus(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "OutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobOutputConfig(&sv.OutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "StoppingConditions":
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobStoppingConditions(&sv.StoppingConditions, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeModelBiasJobDefinitionOutput(v **DescribeModelBiasJobDefinitionOutput, 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 *DescribeModelBiasJobDefinitionOutput
|
|
if *v == nil {
|
|
sv = &DescribeModelBiasJobDefinitionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "JobDefinitionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.JobDefinitionArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "JobDefinitionName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.JobDefinitionName = ptr.String(jtv)
|
|
}
|
|
|
|
case "JobResources":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringResources(&sv.JobResources, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelBiasAppSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentModelBiasAppSpecification(&sv.ModelBiasAppSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelBiasBaselineConfig":
|
|
if err := awsAwsjson11_deserializeDocumentModelBiasBaselineConfig(&sv.ModelBiasBaselineConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelBiasJobInput":
|
|
if err := awsAwsjson11_deserializeDocumentModelBiasJobInput(&sv.ModelBiasJobInput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelBiasJobOutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringOutputConfig(&sv.ModelBiasJobOutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NetworkConfig":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringNetworkConfig(&sv.NetworkConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "StoppingCondition":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringStoppingCondition(&sv.StoppingCondition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeModelExplainabilityJobDefinitionOutput(v **DescribeModelExplainabilityJobDefinitionOutput, 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 *DescribeModelExplainabilityJobDefinitionOutput
|
|
if *v == nil {
|
|
sv = &DescribeModelExplainabilityJobDefinitionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "JobDefinitionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.JobDefinitionArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "JobDefinitionName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.JobDefinitionName = ptr.String(jtv)
|
|
}
|
|
|
|
case "JobResources":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringResources(&sv.JobResources, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelExplainabilityAppSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentModelExplainabilityAppSpecification(&sv.ModelExplainabilityAppSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelExplainabilityBaselineConfig":
|
|
if err := awsAwsjson11_deserializeDocumentModelExplainabilityBaselineConfig(&sv.ModelExplainabilityBaselineConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelExplainabilityJobInput":
|
|
if err := awsAwsjson11_deserializeDocumentModelExplainabilityJobInput(&sv.ModelExplainabilityJobInput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelExplainabilityJobOutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringOutputConfig(&sv.ModelExplainabilityJobOutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NetworkConfig":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringNetworkConfig(&sv.NetworkConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "StoppingCondition":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringStoppingCondition(&sv.StoppingCondition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeModelOutput(v **DescribeModelOutput, 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 *DescribeModelOutput
|
|
if *v == nil {
|
|
sv = &DescribeModelOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Containers":
|
|
if err := awsAwsjson11_deserializeDocumentContainerDefinitionList(&sv.Containers, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "EnableNetworkIsolation":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableNetworkIsolation = jtv
|
|
}
|
|
|
|
case "ExecutionRoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExecutionRoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "InferenceExecutionConfig":
|
|
if err := awsAwsjson11_deserializeDocumentInferenceExecutionConfig(&sv.InferenceExecutionConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelName = ptr.String(jtv)
|
|
}
|
|
|
|
case "PrimaryContainer":
|
|
if err := awsAwsjson11_deserializeDocumentContainerDefinition(&sv.PrimaryContainer, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "VpcConfig":
|
|
if err := awsAwsjson11_deserializeDocumentVpcConfig(&sv.VpcConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeModelPackageGroupOutput(v **DescribeModelPackageGroupOutput, 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 *DescribeModelPackageGroupOutput
|
|
if *v == nil {
|
|
sv = &DescribeModelPackageGroupOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ModelPackageGroupArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageGroupArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageGroupDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageGroupName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageGroupStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageGroupStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupStatus = types.ModelPackageGroupStatus(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeModelPackageOutput(v **DescribeModelPackageOutput, 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 *DescribeModelPackageOutput
|
|
if *v == nil {
|
|
sv = &DescribeModelPackageOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ApprovalDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ApprovalDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.ApprovalDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "CertifyForMarketplace":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected CertifyForMarketplace to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.CertifyForMarketplace = jtv
|
|
}
|
|
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "CustomerMetadataProperties":
|
|
if err := awsAwsjson11_deserializeDocumentCustomerMetadataMap(&sv.CustomerMetadataProperties, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "InferenceSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentInferenceSpecification(&sv.InferenceSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MetadataProperties":
|
|
if err := awsAwsjson11_deserializeDocumentMetadataProperties(&sv.MetadataProperties, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelApprovalStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelApprovalStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelApprovalStatus = types.ModelApprovalStatus(jtv)
|
|
}
|
|
|
|
case "ModelMetrics":
|
|
if err := awsAwsjson11_deserializeDocumentModelMetrics(&sv.ModelMetrics, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelPackageArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageGroupName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ModelPackageStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageStatus = types.ModelPackageStatus(jtv)
|
|
}
|
|
|
|
case "ModelPackageStatusDetails":
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageStatusDetails(&sv.ModelPackageStatusDetails, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelPackageVersion":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageVersion to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ModelPackageVersion = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "SourceAlgorithmSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentSourceAlgorithmSpecification(&sv.SourceAlgorithmSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ValidationSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageValidationSpecification(&sv.ValidationSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeModelQualityJobDefinitionOutput(v **DescribeModelQualityJobDefinitionOutput, 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 *DescribeModelQualityJobDefinitionOutput
|
|
if *v == nil {
|
|
sv = &DescribeModelQualityJobDefinitionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "JobDefinitionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.JobDefinitionArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "JobDefinitionName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringJobDefinitionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.JobDefinitionName = ptr.String(jtv)
|
|
}
|
|
|
|
case "JobResources":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringResources(&sv.JobResources, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelQualityAppSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentModelQualityAppSpecification(&sv.ModelQualityAppSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelQualityBaselineConfig":
|
|
if err := awsAwsjson11_deserializeDocumentModelQualityBaselineConfig(&sv.ModelQualityBaselineConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelQualityJobInput":
|
|
if err := awsAwsjson11_deserializeDocumentModelQualityJobInput(&sv.ModelQualityJobInput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelQualityJobOutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringOutputConfig(&sv.ModelQualityJobOutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NetworkConfig":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringNetworkConfig(&sv.NetworkConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "StoppingCondition":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringStoppingCondition(&sv.StoppingCondition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeMonitoringScheduleOutput(v **DescribeMonitoringScheduleOutput, 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 *DescribeMonitoringScheduleOutput
|
|
if *v == nil {
|
|
sv = &DescribeMonitoringScheduleOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "EndpointName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointName to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointName = ptr.String(jtv)
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastMonitoringExecutionSummary":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringExecutionSummary(&sv.LastMonitoringExecutionSummary, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "MonitoringScheduleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringScheduleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringScheduleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "MonitoringScheduleConfig":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringScheduleConfig(&sv.MonitoringScheduleConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "MonitoringScheduleName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringScheduleName to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringScheduleName = ptr.String(jtv)
|
|
}
|
|
|
|
case "MonitoringScheduleStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ScheduleStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringScheduleStatus = types.ScheduleStatus(jtv)
|
|
}
|
|
|
|
case "MonitoringType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringType to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringType = types.MonitoringType(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeNotebookInstanceLifecycleConfigOutput(v **DescribeNotebookInstanceLifecycleConfigOutput, 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 *DescribeNotebookInstanceLifecycleConfigOutput
|
|
if *v == nil {
|
|
sv = &DescribeNotebookInstanceLifecycleConfigOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "NotebookInstanceLifecycleConfigArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceLifecycleConfigArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotebookInstanceLifecycleConfigArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "NotebookInstanceLifecycleConfigName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceLifecycleConfigName to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotebookInstanceLifecycleConfigName = ptr.String(jtv)
|
|
}
|
|
|
|
case "OnCreate":
|
|
if err := awsAwsjson11_deserializeDocumentNotebookInstanceLifecycleConfigList(&sv.OnCreate, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OnStart":
|
|
if err := awsAwsjson11_deserializeDocumentNotebookInstanceLifecycleConfigList(&sv.OnStart, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeNotebookInstanceOutput(v **DescribeNotebookInstanceOutput, 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 *DescribeNotebookInstanceOutput
|
|
if *v == nil {
|
|
sv = &DescribeNotebookInstanceOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AcceleratorTypes":
|
|
if err := awsAwsjson11_deserializeDocumentNotebookInstanceAcceleratorTypes(&sv.AcceleratorTypes, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "AdditionalCodeRepositories":
|
|
if err := awsAwsjson11_deserializeDocumentAdditionalCodeRepositoryNamesOrUrls(&sv.AdditionalCodeRepositories, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DefaultCodeRepository":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CodeRepositoryNameOrUrl to be of type string, got %T instead", value)
|
|
}
|
|
sv.DefaultCodeRepository = ptr.String(jtv)
|
|
}
|
|
|
|
case "DirectInternetAccess":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DirectInternetAccess to be of type string, got %T instead", value)
|
|
}
|
|
sv.DirectInternetAccess = types.DirectInternetAccess(jtv)
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "InstanceType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected InstanceType to be of type string, got %T instead", value)
|
|
}
|
|
sv.InstanceType = types.InstanceType(jtv)
|
|
}
|
|
|
|
case "KmsKeyId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value)
|
|
}
|
|
sv.KmsKeyId = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "NetworkInterfaceId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NetworkInterfaceId to be of type string, got %T instead", value)
|
|
}
|
|
sv.NetworkInterfaceId = ptr.String(jtv)
|
|
}
|
|
|
|
case "NotebookInstanceArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotebookInstanceArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "NotebookInstanceLifecycleConfigName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceLifecycleConfigName to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotebookInstanceLifecycleConfigName = ptr.String(jtv)
|
|
}
|
|
|
|
case "NotebookInstanceName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceName to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotebookInstanceName = ptr.String(jtv)
|
|
}
|
|
|
|
case "NotebookInstanceStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.NotebookInstanceStatus = types.NotebookInstanceStatus(jtv)
|
|
}
|
|
|
|
case "PlatformIdentifier":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PlatformIdentifier to be of type string, got %T instead", value)
|
|
}
|
|
sv.PlatformIdentifier = ptr.String(jtv)
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "RootAccess":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RootAccess to be of type string, got %T instead", value)
|
|
}
|
|
sv.RootAccess = types.RootAccess(jtv)
|
|
}
|
|
|
|
case "SecurityGroups":
|
|
if err := awsAwsjson11_deserializeDocumentSecurityGroupIds(&sv.SecurityGroups, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "SubnetId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SubnetId to be of type string, got %T instead", value)
|
|
}
|
|
sv.SubnetId = ptr.String(jtv)
|
|
}
|
|
|
|
case "Url":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceUrl to be of type string, got %T instead", value)
|
|
}
|
|
sv.Url = ptr.String(jtv)
|
|
}
|
|
|
|
case "VolumeSizeInGB":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected NotebookInstanceVolumeSizeInGB to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.VolumeSizeInGB = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribePipelineDefinitionForExecutionOutput(v **DescribePipelineDefinitionForExecutionOutput, 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 *DescribePipelineDefinitionForExecutionOutput
|
|
if *v == nil {
|
|
sv = &DescribePipelineDefinitionForExecutionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "PipelineDefinition":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineDefinition to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineDefinition = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribePipelineExecutionOutput(v **DescribePipelineExecutionOutput, 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 *DescribePipelineExecutionOutput
|
|
if *v == nil {
|
|
sv = &DescribePipelineExecutionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionFailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "PipelineArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineExecutionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineExecutionDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineExecutionDisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionName to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionDisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineExecutionStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionStatus = types.PipelineExecutionStatus(jtv)
|
|
}
|
|
|
|
case "PipelineExperimentConfig":
|
|
if err := awsAwsjson11_deserializeDocumentPipelineExperimentConfig(&sv.PipelineExperimentConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribePipelineOutput(v **DescribePipelineOutput, 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 *DescribePipelineOutput
|
|
if *v == nil {
|
|
sv = &DescribePipelineOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastRunTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastRunTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "PipelineArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineDefinition":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineDefinition to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineDefinition = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineDisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineName to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineDisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineName to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineName = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineStatus = types.PipelineStatus(jtv)
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeProcessingJobOutput(v **DescribeProcessingJobOutput, 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 *DescribeProcessingJobOutput
|
|
if *v == nil {
|
|
sv = &DescribeProcessingJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AppSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentAppSpecification(&sv.AppSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "AutoMLJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AutoMLJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Environment":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingEnvironmentMap(&sv.Environment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ExitMessage":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExitMessage to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExitMessage = ptr.String(jtv)
|
|
}
|
|
|
|
case "ExperimentConfig":
|
|
if err := awsAwsjson11_deserializeDocumentExperimentConfig(&sv.ExperimentConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MonitoringScheduleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringScheduleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringScheduleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "NetworkConfig":
|
|
if err := awsAwsjson11_deserializeDocumentNetworkConfig(&sv.NetworkConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProcessingEndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ProcessingEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ProcessingInputs":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingInputs(&sv.ProcessingInputs, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProcessingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProcessingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProcessingJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProcessingJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProcessingJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProcessingJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProcessingJobStatus = types.ProcessingJobStatus(jtv)
|
|
}
|
|
|
|
case "ProcessingOutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingOutputConfig(&sv.ProcessingOutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProcessingResources":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingResources(&sv.ProcessingResources, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProcessingStartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ProcessingStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "StoppingCondition":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingStoppingCondition(&sv.StoppingCondition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrainingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeProjectOutput(v **DescribeProjectOutput, 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 *DescribeProjectOutput
|
|
if *v == nil {
|
|
sv = &DescribeProjectOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ProjectArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProjectArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProjectDescription":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectDescription = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProjectId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProjectId to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectId = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProjectName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProjectEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProjectStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProjectStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectStatus = types.ProjectStatus(jtv)
|
|
}
|
|
|
|
case "ServiceCatalogProvisionedProductDetails":
|
|
if err := awsAwsjson11_deserializeDocumentServiceCatalogProvisionedProductDetails(&sv.ServiceCatalogProvisionedProductDetails, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ServiceCatalogProvisioningDetails":
|
|
if err := awsAwsjson11_deserializeDocumentServiceCatalogProvisioningDetails(&sv.ServiceCatalogProvisioningDetails, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeStudioLifecycleConfigOutput(v **DescribeStudioLifecycleConfigOutput, 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 *DescribeStudioLifecycleConfigOutput
|
|
if *v == nil {
|
|
sv = &DescribeStudioLifecycleConfigOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "StudioLifecycleConfigAppType":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected StudioLifecycleConfigAppType to be of type string, got %T instead", value)
|
|
}
|
|
sv.StudioLifecycleConfigAppType = types.StudioLifecycleConfigAppType(jtv)
|
|
}
|
|
|
|
case "StudioLifecycleConfigArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected StudioLifecycleConfigArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.StudioLifecycleConfigArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "StudioLifecycleConfigContent":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected StudioLifecycleConfigContent to be of type string, got %T instead", value)
|
|
}
|
|
sv.StudioLifecycleConfigContent = ptr.String(jtv)
|
|
}
|
|
|
|
case "StudioLifecycleConfigName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected StudioLifecycleConfigName to be of type string, got %T instead", value)
|
|
}
|
|
sv.StudioLifecycleConfigName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeSubscribedWorkteamOutput(v **DescribeSubscribedWorkteamOutput, 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 *DescribeSubscribedWorkteamOutput
|
|
if *v == nil {
|
|
sv = &DescribeSubscribedWorkteamOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "SubscribedWorkteam":
|
|
if err := awsAwsjson11_deserializeDocumentSubscribedWorkteam(&sv.SubscribedWorkteam, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeTrainingJobOutput(v **DescribeTrainingJobOutput, 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 *DescribeTrainingJobOutput
|
|
if *v == nil {
|
|
sv = &DescribeTrainingJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AlgorithmSpecification":
|
|
if err := awsAwsjson11_deserializeDocumentAlgorithmSpecification(&sv.AlgorithmSpecification, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "AutoMLJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AutoMLJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "BillableTimeInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected BillableTimeInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.BillableTimeInSeconds = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "CheckpointConfig":
|
|
if err := awsAwsjson11_deserializeDocumentCheckpointConfig(&sv.CheckpointConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DebugHookConfig":
|
|
if err := awsAwsjson11_deserializeDocumentDebugHookConfig(&sv.DebugHookConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DebugRuleConfigurations":
|
|
if err := awsAwsjson11_deserializeDocumentDebugRuleConfigurations(&sv.DebugRuleConfigurations, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "DebugRuleEvaluationStatuses":
|
|
if err := awsAwsjson11_deserializeDocumentDebugRuleEvaluationStatuses(&sv.DebugRuleEvaluationStatuses, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "EnableInterContainerTrafficEncryption":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableInterContainerTrafficEncryption = jtv
|
|
}
|
|
|
|
case "EnableManagedSpotTraining":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableManagedSpotTraining = jtv
|
|
}
|
|
|
|
case "EnableNetworkIsolation":
|
|
if value != nil {
|
|
jtv, ok := value.(bool)
|
|
if !ok {
|
|
return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value)
|
|
}
|
|
sv.EnableNetworkIsolation = jtv
|
|
}
|
|
|
|
case "Environment":
|
|
if err := awsAwsjson11_deserializeDocumentTrainingEnvironmentMap(&sv.Environment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ExperimentConfig":
|
|
if err := awsAwsjson11_deserializeDocumentExperimentConfig(&sv.ExperimentConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "FinalMetricDataList":
|
|
if err := awsAwsjson11_deserializeDocumentFinalMetricDataList(&sv.FinalMetricDataList, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "HyperParameters":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameters(&sv.HyperParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "InputDataConfig":
|
|
if err := awsAwsjson11_deserializeDocumentInputDataConfig(&sv.InputDataConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LabelingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.LabelingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "ModelArtifacts":
|
|
if err := awsAwsjson11_deserializeDocumentModelArtifacts(&sv.ModelArtifacts, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OutputDataConfig":
|
|
if err := awsAwsjson11_deserializeDocumentOutputDataConfig(&sv.OutputDataConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProfilerConfig":
|
|
if err := awsAwsjson11_deserializeDocumentProfilerConfig(&sv.ProfilerConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProfilerRuleConfigurations":
|
|
if err := awsAwsjson11_deserializeDocumentProfilerRuleConfigurations(&sv.ProfilerRuleConfigurations, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProfilerRuleEvaluationStatuses":
|
|
if err := awsAwsjson11_deserializeDocumentProfilerRuleEvaluationStatuses(&sv.ProfilerRuleEvaluationStatuses, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ProfilingStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProfilingStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProfilingStatus = types.ProfilingStatus(jtv)
|
|
}
|
|
|
|
case "ResourceConfig":
|
|
if err := awsAwsjson11_deserializeDocumentResourceConfig(&sv.ResourceConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RetryStrategy":
|
|
if err := awsAwsjson11_deserializeDocumentRetryStrategy(&sv.RetryStrategy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RoleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.RoleArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "SecondaryStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SecondaryStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.SecondaryStatus = types.SecondaryStatus(jtv)
|
|
}
|
|
|
|
case "SecondaryStatusTransitions":
|
|
if err := awsAwsjson11_deserializeDocumentSecondaryStatusTransitions(&sv.SecondaryStatusTransitions, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "StoppingCondition":
|
|
if err := awsAwsjson11_deserializeDocumentStoppingCondition(&sv.StoppingCondition, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TensorBoardOutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentTensorBoardOutputConfig(&sv.TensorBoardOutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrainingEndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TrainingEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "TrainingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobStatus = types.TrainingJobStatus(jtv)
|
|
}
|
|
|
|
case "TrainingStartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TrainingStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "TrainingTimeInSeconds":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingTimeInSeconds to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TrainingTimeInSeconds = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "TuningJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected HyperParameterTuningJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TuningJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "VpcConfig":
|
|
if err := awsAwsjson11_deserializeDocumentVpcConfig(&sv.VpcConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeTransformJobOutput(v **DescribeTransformJobOutput, 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 *DescribeTransformJobOutput
|
|
if *v == nil {
|
|
sv = &DescribeTransformJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AutoMLJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AutoMLJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AutoMLJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "BatchStrategy":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected BatchStrategy to be of type string, got %T instead", value)
|
|
}
|
|
sv.BatchStrategy = types.BatchStrategy(jtv)
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DataProcessing":
|
|
if err := awsAwsjson11_deserializeDocumentDataProcessing(&sv.DataProcessing, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Environment":
|
|
if err := awsAwsjson11_deserializeDocumentTransformEnvironmentMap(&sv.Environment, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ExperimentConfig":
|
|
if err := awsAwsjson11_deserializeDocumentExperimentConfig(&sv.ExperimentConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "LabelingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected LabelingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.LabelingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "MaxConcurrentTransforms":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxConcurrentTransforms to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxConcurrentTransforms = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "MaxPayloadInMB":
|
|
if value != nil {
|
|
jtv, ok := value.(json.Number)
|
|
if !ok {
|
|
return fmt.Errorf("expected MaxPayloadInMB to be json.Number, got %T instead", value)
|
|
}
|
|
i64, err := jtv.Int64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.MaxPayloadInMB = ptr.Int32(int32(i64))
|
|
}
|
|
|
|
case "ModelClientConfig":
|
|
if err := awsAwsjson11_deserializeDocumentModelClientConfig(&sv.ModelClientConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TransformEndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TransformEndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "TransformInput":
|
|
if err := awsAwsjson11_deserializeDocumentTransformInput(&sv.TransformInput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TransformJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TransformJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TransformJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TransformJobName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TransformJobName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TransformJobName = ptr.String(jtv)
|
|
}
|
|
|
|
case "TransformJobStatus":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TransformJobStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.TransformJobStatus = types.TransformJobStatus(jtv)
|
|
}
|
|
|
|
case "TransformOutput":
|
|
if err := awsAwsjson11_deserializeDocumentTransformOutput(&sv.TransformOutput, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TransformResources":
|
|
if err := awsAwsjson11_deserializeDocumentTransformResources(&sv.TransformResources, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TransformStartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.TransformStartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeTrialComponentOutput(v **DescribeTrialComponentOutput, 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 *DescribeTrialComponentOutput
|
|
if *v == nil {
|
|
sv = &DescribeTrialComponentOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "EndTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "InputArtifacts":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentArtifacts(&sv.InputArtifacts, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MetadataProperties":
|
|
if err := awsAwsjson11_deserializeDocumentMetadataProperties(&sv.MetadataProperties, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Metrics":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentMetricSummaries(&sv.Metrics, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OutputArtifacts":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentArtifacts(&sv.OutputArtifacts, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Parameters":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentParameters(&sv.Parameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Source":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentSource(&sv.Source, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "StartTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "Status":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentStatus(&sv.Status, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrialComponentArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialComponentArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialComponentArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialComponentName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialComponentName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeTrialOutput(v **DescribeTrialOutput, 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 *DescribeTrialOutput
|
|
if *v == nil {
|
|
sv = &DescribeTrialOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreatedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.CreatedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DisplayName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DisplayName = ptr.String(jtv)
|
|
}
|
|
|
|
case "ExperimentName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExperimentName = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedBy":
|
|
if err := awsAwsjson11_deserializeDocumentUserContext(&sv.LastModifiedBy, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "MetadataProperties":
|
|
if err := awsAwsjson11_deserializeDocumentMetadataProperties(&sv.MetadataProperties, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Source":
|
|
if err := awsAwsjson11_deserializeDocumentTrialSource(&sv.Source, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "TrialArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentEntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialName = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeUserProfileOutput(v **DescribeUserProfileOutput, 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 *DescribeUserProfileOutput
|
|
if *v == nil {
|
|
sv = &DescribeUserProfileOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CreationTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected CreationTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "DomainId":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DomainId to be of type string, got %T instead", value)
|
|
}
|
|
sv.DomainId = ptr.String(jtv)
|
|
}
|
|
|
|
case "FailureReason":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value)
|
|
}
|
|
sv.FailureReason = ptr.String(jtv)
|
|
}
|
|
|
|
case "HomeEfsFileSystemUid":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EfsUid to be of type string, got %T instead", value)
|
|
}
|
|
sv.HomeEfsFileSystemUid = ptr.String(jtv)
|
|
}
|
|
|
|
case "LastModifiedTime":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected LastModifiedTime to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
case "SingleSignOnUserIdentifier":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SingleSignOnUserIdentifier to be of type string, got %T instead", value)
|
|
}
|
|
sv.SingleSignOnUserIdentifier = ptr.String(jtv)
|
|
}
|
|
|
|
case "SingleSignOnUserValue":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String256 to be of type string, got %T instead", value)
|
|
}
|
|
sv.SingleSignOnUserValue = ptr.String(jtv)
|
|
}
|
|
|
|
case "Status":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected UserProfileStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.Status = types.UserProfileStatus(jtv)
|
|
}
|
|
|
|
case "UserProfileArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected UserProfileArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.UserProfileArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "UserProfileName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected UserProfileName to be of type string, got %T instead", value)
|
|
}
|
|
sv.UserProfileName = ptr.String(jtv)
|
|
}
|
|
|
|
case "UserSettings":
|
|
if err := awsAwsjson11_deserializeDocumentUserSettings(&sv.UserSettings, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeWorkforceOutput(v **DescribeWorkforceOutput, 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 *DescribeWorkforceOutput
|
|
if *v == nil {
|
|
sv = &DescribeWorkforceOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Workforce":
|
|
if err := awsAwsjson11_deserializeDocumentWorkforce(&sv.Workforce, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDescribeWorkteamOutput(v **DescribeWorkteamOutput, 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 *DescribeWorkteamOutput
|
|
if *v == nil {
|
|
sv = &DescribeWorkteamOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Workteam":
|
|
if err := awsAwsjson11_deserializeDocumentWorkteam(&sv.Workteam, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDisableSagemakerServicecatalogPortfolioOutput(v **DisableSagemakerServicecatalogPortfolioOutput, 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 *DisableSagemakerServicecatalogPortfolioOutput
|
|
if *v == nil {
|
|
sv = &DisableSagemakerServicecatalogPortfolioOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentDisassociateTrialComponentOutput(v **DisassociateTrialComponentOutput, 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 *DisassociateTrialComponentOutput
|
|
if *v == nil {
|
|
sv = &DisassociateTrialComponentOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "TrialArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialComponentArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialComponentArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialComponentArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentEnableSagemakerServicecatalogPortfolioOutput(v **EnableSagemakerServicecatalogPortfolioOutput, 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 *EnableSagemakerServicecatalogPortfolioOutput
|
|
if *v == nil {
|
|
sv = &EnableSagemakerServicecatalogPortfolioOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentGetDeviceFleetReportOutput(v **GetDeviceFleetReportOutput, 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 *GetDeviceFleetReportOutput
|
|
if *v == nil {
|
|
sv = &GetDeviceFleetReportOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AgentVersions":
|
|
if err := awsAwsjson11_deserializeDocumentAgentVersions(&sv.AgentVersions, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "Description":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DeviceFleetDescription to be of type string, got %T instead", value)
|
|
}
|
|
sv.Description = ptr.String(jtv)
|
|
}
|
|
|
|
case "DeviceFleetArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DeviceFleetArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.DeviceFleetArn = ptr.String(jtv)
|
|
}
|
|
|
|
case "DeviceFleetName":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EntityName to be of type string, got %T instead", value)
|
|
}
|
|
sv.DeviceFleetName = ptr.String(jtv)
|
|
}
|
|
|
|
case "DeviceStats":
|
|
if err := awsAwsjson11_deserializeDocumentDeviceStats(&sv.DeviceStats, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ModelStats":
|
|
if err := awsAwsjson11_deserializeDocumentEdgeModelStats(&sv.ModelStats, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "OutputConfig":
|
|
if err := awsAwsjson11_deserializeDocumentEdgeOutputConfig(&sv.OutputConfig, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "ReportGenerated":
|
|
if value != nil {
|
|
switch jtv := value.(type) {
|
|
case json.Number:
|
|
f64, err := jtv.Float64()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
sv.ReportGenerated = ptr.Time(smithytime.ParseEpochSeconds(f64))
|
|
|
|
default:
|
|
return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
|
|
|
|
}
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentGetModelPackageGroupPolicyOutput(v **GetModelPackageGroupPolicyOutput, 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 *GetModelPackageGroupPolicyOutput
|
|
if *v == nil {
|
|
sv = &GetModelPackageGroupPolicyOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ResourcePolicy":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PolicyString to be of type string, got %T instead", value)
|
|
}
|
|
sv.ResourcePolicy = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentGetSagemakerServicecatalogPortfolioStatusOutput(v **GetSagemakerServicecatalogPortfolioStatusOutput, 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 *GetSagemakerServicecatalogPortfolioStatusOutput
|
|
if *v == nil {
|
|
sv = &GetSagemakerServicecatalogPortfolioStatusOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Status":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected SagemakerServicecatalogStatus to be of type string, got %T instead", value)
|
|
}
|
|
sv.Status = types.SagemakerServicecatalogStatus(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentGetSearchSuggestionsOutput(v **GetSearchSuggestionsOutput, 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 *GetSearchSuggestionsOutput
|
|
if *v == nil {
|
|
sv = &GetSearchSuggestionsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "PropertyNameSuggestions":
|
|
if err := awsAwsjson11_deserializeDocumentPropertyNameSuggestionList(&sv.PropertyNameSuggestions, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListActionsOutput(v **ListActionsOutput, 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 *ListActionsOutput
|
|
if *v == nil {
|
|
sv = &ListActionsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ActionSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentActionSummaries(&sv.ActionSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListAlgorithmsOutput(v **ListAlgorithmsOutput, 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 *ListAlgorithmsOutput
|
|
if *v == nil {
|
|
sv = &ListAlgorithmsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AlgorithmSummaryList":
|
|
if err := awsAwsjson11_deserializeDocumentAlgorithmSummaryList(&sv.AlgorithmSummaryList, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListAppImageConfigsOutput(v **ListAppImageConfigsOutput, 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 *ListAppImageConfigsOutput
|
|
if *v == nil {
|
|
sv = &ListAppImageConfigsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AppImageConfigs":
|
|
if err := awsAwsjson11_deserializeDocumentAppImageConfigList(&sv.AppImageConfigs, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListAppsOutput(v **ListAppsOutput, 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 *ListAppsOutput
|
|
if *v == nil {
|
|
sv = &ListAppsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Apps":
|
|
if err := awsAwsjson11_deserializeDocumentAppList(&sv.Apps, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListArtifactsOutput(v **ListArtifactsOutput, 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 *ListArtifactsOutput
|
|
if *v == nil {
|
|
sv = &ListArtifactsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ArtifactSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentArtifactSummaries(&sv.ArtifactSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListAssociationsOutput(v **ListAssociationsOutput, 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 *ListAssociationsOutput
|
|
if *v == nil {
|
|
sv = &ListAssociationsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AssociationSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentAssociationSummaries(&sv.AssociationSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListAutoMLJobsOutput(v **ListAutoMLJobsOutput, 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 *ListAutoMLJobsOutput
|
|
if *v == nil {
|
|
sv = &ListAutoMLJobsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AutoMLJobSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLJobSummaries(&sv.AutoMLJobSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListCandidatesForAutoMLJobOutput(v **ListCandidatesForAutoMLJobOutput, 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 *ListCandidatesForAutoMLJobOutput
|
|
if *v == nil {
|
|
sv = &ListCandidatesForAutoMLJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Candidates":
|
|
if err := awsAwsjson11_deserializeDocumentAutoMLCandidates(&sv.Candidates, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListCodeRepositoriesOutput(v **ListCodeRepositoriesOutput, 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 *ListCodeRepositoriesOutput
|
|
if *v == nil {
|
|
sv = &ListCodeRepositoriesOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CodeRepositorySummaryList":
|
|
if err := awsAwsjson11_deserializeDocumentCodeRepositorySummaryList(&sv.CodeRepositorySummaryList, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListCompilationJobsOutput(v **ListCompilationJobsOutput, 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 *ListCompilationJobsOutput
|
|
if *v == nil {
|
|
sv = &ListCompilationJobsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CompilationJobSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentCompilationJobSummaries(&sv.CompilationJobSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListContextsOutput(v **ListContextsOutput, 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 *ListContextsOutput
|
|
if *v == nil {
|
|
sv = &ListContextsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ContextSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentContextSummaries(&sv.ContextSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListDataQualityJobDefinitionsOutput(v **ListDataQualityJobDefinitionsOutput, 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 *ListDataQualityJobDefinitionsOutput
|
|
if *v == nil {
|
|
sv = &ListDataQualityJobDefinitionsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "JobDefinitionSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringJobDefinitionSummaryList(&sv.JobDefinitionSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListDeviceFleetsOutput(v **ListDeviceFleetsOutput, 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 *ListDeviceFleetsOutput
|
|
if *v == nil {
|
|
sv = &ListDeviceFleetsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DeviceFleetSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentDeviceFleetSummaries(&sv.DeviceFleetSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListDevicesOutput(v **ListDevicesOutput, 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 *ListDevicesOutput
|
|
if *v == nil {
|
|
sv = &ListDevicesOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DeviceSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentDeviceSummaries(&sv.DeviceSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListDomainsOutput(v **ListDomainsOutput, 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 *ListDomainsOutput
|
|
if *v == nil {
|
|
sv = &ListDomainsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Domains":
|
|
if err := awsAwsjson11_deserializeDocumentDomainList(&sv.Domains, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListEdgePackagingJobsOutput(v **ListEdgePackagingJobsOutput, 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 *ListEdgePackagingJobsOutput
|
|
if *v == nil {
|
|
sv = &ListEdgePackagingJobsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EdgePackagingJobSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentEdgePackagingJobSummaries(&sv.EdgePackagingJobSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListEndpointConfigsOutput(v **ListEndpointConfigsOutput, 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 *ListEndpointConfigsOutput
|
|
if *v == nil {
|
|
sv = &ListEndpointConfigsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EndpointConfigs":
|
|
if err := awsAwsjson11_deserializeDocumentEndpointConfigSummaryList(&sv.EndpointConfigs, 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_deserializeOpDocumentListEndpointsOutput(v **ListEndpointsOutput, 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 *ListEndpointsOutput
|
|
if *v == nil {
|
|
sv = &ListEndpointsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Endpoints":
|
|
if err := awsAwsjson11_deserializeDocumentEndpointSummaryList(&sv.Endpoints, 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_deserializeOpDocumentListExperimentsOutput(v **ListExperimentsOutput, 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 *ListExperimentsOutput
|
|
if *v == nil {
|
|
sv = &ListExperimentsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ExperimentSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentExperimentSummaries(&sv.ExperimentSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListFeatureGroupsOutput(v **ListFeatureGroupsOutput, 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 *ListFeatureGroupsOutput
|
|
if *v == nil {
|
|
sv = &ListFeatureGroupsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "FeatureGroupSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentFeatureGroupSummaries(&sv.FeatureGroupSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListFlowDefinitionsOutput(v **ListFlowDefinitionsOutput, 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 *ListFlowDefinitionsOutput
|
|
if *v == nil {
|
|
sv = &ListFlowDefinitionsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "FlowDefinitionSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentFlowDefinitionSummaries(&sv.FlowDefinitionSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListHumanTaskUisOutput(v **ListHumanTaskUisOutput, 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 *ListHumanTaskUisOutput
|
|
if *v == nil {
|
|
sv = &ListHumanTaskUisOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "HumanTaskUiSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentHumanTaskUiSummaries(&sv.HumanTaskUiSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListHyperParameterTuningJobsOutput(v **ListHyperParameterTuningJobsOutput, 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 *ListHyperParameterTuningJobsOutput
|
|
if *v == nil {
|
|
sv = &ListHyperParameterTuningJobsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "HyperParameterTuningJobSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterTuningJobSummaries(&sv.HyperParameterTuningJobSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListImagesOutput(v **ListImagesOutput, 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 *ListImagesOutput
|
|
if *v == nil {
|
|
sv = &ListImagesOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Images":
|
|
if err := awsAwsjson11_deserializeDocumentImages(&sv.Images, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListImageVersionsOutput(v **ListImageVersionsOutput, 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 *ListImageVersionsOutput
|
|
if *v == nil {
|
|
sv = &ListImageVersionsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ImageVersions":
|
|
if err := awsAwsjson11_deserializeDocumentImageVersions(&sv.ImageVersions, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListLabelingJobsForWorkteamOutput(v **ListLabelingJobsForWorkteamOutput, 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 *ListLabelingJobsForWorkteamOutput
|
|
if *v == nil {
|
|
sv = &ListLabelingJobsForWorkteamOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "LabelingJobSummaryList":
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobForWorkteamSummaryList(&sv.LabelingJobSummaryList, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListLabelingJobsOutput(v **ListLabelingJobsOutput, 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 *ListLabelingJobsOutput
|
|
if *v == nil {
|
|
sv = &ListLabelingJobsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "LabelingJobSummaryList":
|
|
if err := awsAwsjson11_deserializeDocumentLabelingJobSummaryList(&sv.LabelingJobSummaryList, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListModelBiasJobDefinitionsOutput(v **ListModelBiasJobDefinitionsOutput, 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 *ListModelBiasJobDefinitionsOutput
|
|
if *v == nil {
|
|
sv = &ListModelBiasJobDefinitionsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "JobDefinitionSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringJobDefinitionSummaryList(&sv.JobDefinitionSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListModelExplainabilityJobDefinitionsOutput(v **ListModelExplainabilityJobDefinitionsOutput, 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 *ListModelExplainabilityJobDefinitionsOutput
|
|
if *v == nil {
|
|
sv = &ListModelExplainabilityJobDefinitionsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "JobDefinitionSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringJobDefinitionSummaryList(&sv.JobDefinitionSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListModelPackageGroupsOutput(v **ListModelPackageGroupsOutput, 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 *ListModelPackageGroupsOutput
|
|
if *v == nil {
|
|
sv = &ListModelPackageGroupsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ModelPackageGroupSummaryList":
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageGroupSummaryList(&sv.ModelPackageGroupSummaryList, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListModelPackagesOutput(v **ListModelPackagesOutput, 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 *ListModelPackagesOutput
|
|
if *v == nil {
|
|
sv = &ListModelPackagesOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ModelPackageSummaryList":
|
|
if err := awsAwsjson11_deserializeDocumentModelPackageSummaryList(&sv.ModelPackageSummaryList, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListModelQualityJobDefinitionsOutput(v **ListModelQualityJobDefinitionsOutput, 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 *ListModelQualityJobDefinitionsOutput
|
|
if *v == nil {
|
|
sv = &ListModelQualityJobDefinitionsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "JobDefinitionSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringJobDefinitionSummaryList(&sv.JobDefinitionSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListModelsOutput(v **ListModelsOutput, 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 *ListModelsOutput
|
|
if *v == nil {
|
|
sv = &ListModelsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Models":
|
|
if err := awsAwsjson11_deserializeDocumentModelSummaryList(&sv.Models, 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_deserializeOpDocumentListMonitoringExecutionsOutput(v **ListMonitoringExecutionsOutput, 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 *ListMonitoringExecutionsOutput
|
|
if *v == nil {
|
|
sv = &ListMonitoringExecutionsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MonitoringExecutionSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringExecutionSummaryList(&sv.MonitoringExecutionSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListMonitoringSchedulesOutput(v **ListMonitoringSchedulesOutput, 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 *ListMonitoringSchedulesOutput
|
|
if *v == nil {
|
|
sv = &ListMonitoringSchedulesOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MonitoringScheduleSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentMonitoringScheduleSummaryList(&sv.MonitoringScheduleSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListNotebookInstanceLifecycleConfigsOutput(v **ListNotebookInstanceLifecycleConfigsOutput, 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 *ListNotebookInstanceLifecycleConfigsOutput
|
|
if *v == nil {
|
|
sv = &ListNotebookInstanceLifecycleConfigsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "NotebookInstanceLifecycleConfigs":
|
|
if err := awsAwsjson11_deserializeDocumentNotebookInstanceLifecycleConfigSummaryList(&sv.NotebookInstanceLifecycleConfigs, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListNotebookInstancesOutput(v **ListNotebookInstancesOutput, 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 *ListNotebookInstancesOutput
|
|
if *v == nil {
|
|
sv = &ListNotebookInstancesOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "NotebookInstances":
|
|
if err := awsAwsjson11_deserializeDocumentNotebookInstanceSummaryList(&sv.NotebookInstances, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListPipelineExecutionsOutput(v **ListPipelineExecutionsOutput, value interface{}) error {
|
|
if v == nil {
|
|
return fmt.Errorf("unexpected nil of type %T", v)
|
|
}
|
|
if value == nil {
|
|
return nil
|
|
}
|
|
|
|
shape, ok := value.(map[string]interface{})
|
|
if !ok {
|
|
return fmt.Errorf("unexpected JSON type %v", value)
|
|
}
|
|
|
|
var sv *ListPipelineExecutionsOutput
|
|
if *v == nil {
|
|
sv = &ListPipelineExecutionsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineExecutionSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentPipelineExecutionSummaryList(&sv.PipelineExecutionSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListPipelineExecutionStepsOutput(v **ListPipelineExecutionStepsOutput, 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 *ListPipelineExecutionStepsOutput
|
|
if *v == nil {
|
|
sv = &ListPipelineExecutionStepsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineExecutionSteps":
|
|
if err := awsAwsjson11_deserializeDocumentPipelineExecutionStepList(&sv.PipelineExecutionSteps, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListPipelineParametersForExecutionOutput(v **ListPipelineParametersForExecutionOutput, 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 *ListPipelineParametersForExecutionOutput
|
|
if *v == nil {
|
|
sv = &ListPipelineParametersForExecutionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineParameters":
|
|
if err := awsAwsjson11_deserializeDocumentParameterList(&sv.PipelineParameters, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListPipelinesOutput(v **ListPipelinesOutput, value interface{}) error {
|
|
if v == nil {
|
|
return fmt.Errorf("unexpected nil of type %T", v)
|
|
}
|
|
if value == nil {
|
|
return nil
|
|
}
|
|
|
|
shape, ok := value.(map[string]interface{})
|
|
if !ok {
|
|
return fmt.Errorf("unexpected JSON type %v", value)
|
|
}
|
|
|
|
var sv *ListPipelinesOutput
|
|
if *v == nil {
|
|
sv = &ListPipelinesOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "PipelineSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentPipelineSummaryList(&sv.PipelineSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListProcessingJobsOutput(v **ListProcessingJobsOutput, 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 *ListProcessingJobsOutput
|
|
if *v == nil {
|
|
sv = &ListProcessingJobsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProcessingJobSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentProcessingJobSummaries(&sv.ProcessingJobSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput, 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 *ListProjectsOutput
|
|
if *v == nil {
|
|
sv = &ListProjectsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "ProjectSummaryList":
|
|
if err := awsAwsjson11_deserializeDocumentProjectSummaryList(&sv.ProjectSummaryList, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListStudioLifecycleConfigsOutput(v **ListStudioLifecycleConfigsOutput, 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 *ListStudioLifecycleConfigsOutput
|
|
if *v == nil {
|
|
sv = &ListStudioLifecycleConfigsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "StudioLifecycleConfigs":
|
|
if err := awsAwsjson11_deserializeDocumentStudioLifecycleConfigsList(&sv.StudioLifecycleConfigs, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListSubscribedWorkteamsOutput(v **ListSubscribedWorkteamsOutput, 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 *ListSubscribedWorkteamsOutput
|
|
if *v == nil {
|
|
sv = &ListSubscribedWorkteamsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "SubscribedWorkteams":
|
|
if err := awsAwsjson11_deserializeDocumentSubscribedWorkteams(&sv.SubscribedWorkteams, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListTagsOutput(v **ListTagsOutput, 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 *ListTagsOutput
|
|
if *v == nil {
|
|
sv = &ListTagsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "Tags":
|
|
if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListTrainingJobsForHyperParameterTuningJobOutput(v **ListTrainingJobsForHyperParameterTuningJobOutput, 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 *ListTrainingJobsForHyperParameterTuningJobOutput
|
|
if *v == nil {
|
|
sv = &ListTrainingJobsForHyperParameterTuningJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingJobSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentHyperParameterTrainingJobSummaries(&sv.TrainingJobSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListTrainingJobsOutput(v **ListTrainingJobsOutput, 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 *ListTrainingJobsOutput
|
|
if *v == nil {
|
|
sv = &ListTrainingJobsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrainingJobSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentTrainingJobSummaries(&sv.TrainingJobSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListTransformJobsOutput(v **ListTransformJobsOutput, 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 *ListTransformJobsOutput
|
|
if *v == nil {
|
|
sv = &ListTransformJobsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "TransformJobSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentTransformJobSummaries(&sv.TransformJobSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListTrialComponentsOutput(v **ListTrialComponentsOutput, 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 *ListTrialComponentsOutput
|
|
if *v == nil {
|
|
sv = &ListTrialComponentsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialComponentSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentTrialComponentSummaries(&sv.TrialComponentSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListTrialsOutput(v **ListTrialsOutput, 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 *ListTrialsOutput
|
|
if *v == nil {
|
|
sv = &ListTrialsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "TrialSummaries":
|
|
if err := awsAwsjson11_deserializeDocumentTrialSummaries(&sv.TrialSummaries, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListUserProfilesOutput(v **ListUserProfilesOutput, 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 *ListUserProfilesOutput
|
|
if *v == nil {
|
|
sv = &ListUserProfilesOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "UserProfiles":
|
|
if err := awsAwsjson11_deserializeDocumentUserProfileList(&sv.UserProfiles, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListWorkforcesOutput(v **ListWorkforcesOutput, 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 *ListWorkforcesOutput
|
|
if *v == nil {
|
|
sv = &ListWorkforcesOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "Workforces":
|
|
if err := awsAwsjson11_deserializeDocumentWorkforces(&sv.Workforces, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentListWorkteamsOutput(v **ListWorkteamsOutput, 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 *ListWorkteamsOutput
|
|
if *v == nil {
|
|
sv = &ListWorkteamsOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "Workteams":
|
|
if err := awsAwsjson11_deserializeDocumentWorkteams(&sv.Workteams, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentPutModelPackageGroupPolicyOutput(v **PutModelPackageGroupPolicyOutput, 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 *PutModelPackageGroupPolicyOutput
|
|
if *v == nil {
|
|
sv = &PutModelPackageGroupPolicyOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ModelPackageGroupArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageGroupArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageGroupArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentRenderUiTemplateOutput(v **RenderUiTemplateOutput, 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 *RenderUiTemplateOutput
|
|
if *v == nil {
|
|
sv = &RenderUiTemplateOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Errors":
|
|
if err := awsAwsjson11_deserializeDocumentRenderingErrorList(&sv.Errors, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
case "RenderedContent":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected String to be of type string, got %T instead", value)
|
|
}
|
|
sv.RenderedContent = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentRetryPipelineExecutionOutput(v **RetryPipelineExecutionOutput, 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 *RetryPipelineExecutionOutput
|
|
if *v == nil {
|
|
sv = &RetryPipelineExecutionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "PipelineExecutionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentSearchOutput(v **SearchOutput, 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 *SearchOutput
|
|
if *v == nil {
|
|
sv = &SearchOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "NextToken":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
|
|
}
|
|
sv.NextToken = ptr.String(jtv)
|
|
}
|
|
|
|
case "Results":
|
|
if err := awsAwsjson11_deserializeDocumentSearchResultsList(&sv.Results, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentSendPipelineExecutionStepFailureOutput(v **SendPipelineExecutionStepFailureOutput, 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 *SendPipelineExecutionStepFailureOutput
|
|
if *v == nil {
|
|
sv = &SendPipelineExecutionStepFailureOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "PipelineExecutionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentSendPipelineExecutionStepSuccessOutput(v **SendPipelineExecutionStepSuccessOutput, 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 *SendPipelineExecutionStepSuccessOutput
|
|
if *v == nil {
|
|
sv = &SendPipelineExecutionStepSuccessOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "PipelineExecutionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentStartPipelineExecutionOutput(v **StartPipelineExecutionOutput, value interface{}) error {
|
|
if v == nil {
|
|
return fmt.Errorf("unexpected nil of type %T", v)
|
|
}
|
|
if value == nil {
|
|
return nil
|
|
}
|
|
|
|
shape, ok := value.(map[string]interface{})
|
|
if !ok {
|
|
return fmt.Errorf("unexpected JSON type %v", value)
|
|
}
|
|
|
|
var sv *StartPipelineExecutionOutput
|
|
if *v == nil {
|
|
sv = &StartPipelineExecutionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "PipelineExecutionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentStopPipelineExecutionOutput(v **StopPipelineExecutionOutput, value interface{}) error {
|
|
if v == nil {
|
|
return fmt.Errorf("unexpected nil of type %T", v)
|
|
}
|
|
if value == nil {
|
|
return nil
|
|
}
|
|
|
|
shape, ok := value.(map[string]interface{})
|
|
if !ok {
|
|
return fmt.Errorf("unexpected JSON type %v", value)
|
|
}
|
|
|
|
var sv *StopPipelineExecutionOutput
|
|
if *v == nil {
|
|
sv = &StopPipelineExecutionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "PipelineExecutionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateActionOutput(v **UpdateActionOutput, 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 *UpdateActionOutput
|
|
if *v == nil {
|
|
sv = &UpdateActionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ActionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ActionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ActionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateAppImageConfigOutput(v **UpdateAppImageConfigOutput, 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 *UpdateAppImageConfigOutput
|
|
if *v == nil {
|
|
sv = &UpdateAppImageConfigOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "AppImageConfigArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected AppImageConfigArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.AppImageConfigArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateArtifactOutput(v **UpdateArtifactOutput, 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 *UpdateArtifactOutput
|
|
if *v == nil {
|
|
sv = &UpdateArtifactOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ArtifactArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ArtifactArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ArtifactArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateCodeRepositoryOutput(v **UpdateCodeRepositoryOutput, 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 *UpdateCodeRepositoryOutput
|
|
if *v == nil {
|
|
sv = &UpdateCodeRepositoryOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "CodeRepositoryArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected CodeRepositoryArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.CodeRepositoryArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateContextOutput(v **UpdateContextOutput, 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 *UpdateContextOutput
|
|
if *v == nil {
|
|
sv = &UpdateContextOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ContextArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ContextArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ContextArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateDomainOutput(v **UpdateDomainOutput, 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 *UpdateDomainOutput
|
|
if *v == nil {
|
|
sv = &UpdateDomainOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "DomainArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected DomainArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.DomainArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateEndpointOutput(v **UpdateEndpointOutput, 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 *UpdateEndpointOutput
|
|
if *v == nil {
|
|
sv = &UpdateEndpointOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EndpointArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateEndpointWeightsAndCapacitiesOutput(v **UpdateEndpointWeightsAndCapacitiesOutput, 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 *UpdateEndpointWeightsAndCapacitiesOutput
|
|
if *v == nil {
|
|
sv = &UpdateEndpointWeightsAndCapacitiesOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "EndpointArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected EndpointArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.EndpointArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateExperimentOutput(v **UpdateExperimentOutput, 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 *UpdateExperimentOutput
|
|
if *v == nil {
|
|
sv = &UpdateExperimentOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ExperimentArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ExperimentArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ExperimentArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateImageOutput(v **UpdateImageOutput, 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 *UpdateImageOutput
|
|
if *v == nil {
|
|
sv = &UpdateImageOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ImageArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ImageArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ImageArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateModelPackageOutput(v **UpdateModelPackageOutput, 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 *UpdateModelPackageOutput
|
|
if *v == nil {
|
|
sv = &UpdateModelPackageOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ModelPackageArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ModelPackageArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ModelPackageArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateMonitoringScheduleOutput(v **UpdateMonitoringScheduleOutput, 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 *UpdateMonitoringScheduleOutput
|
|
if *v == nil {
|
|
sv = &UpdateMonitoringScheduleOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "MonitoringScheduleArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected MonitoringScheduleArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.MonitoringScheduleArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateNotebookInstanceLifecycleConfigOutput(v **UpdateNotebookInstanceLifecycleConfigOutput, 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 *UpdateNotebookInstanceLifecycleConfigOutput
|
|
if *v == nil {
|
|
sv = &UpdateNotebookInstanceLifecycleConfigOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateNotebookInstanceOutput(v **UpdateNotebookInstanceOutput, 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 *UpdateNotebookInstanceOutput
|
|
if *v == nil {
|
|
sv = &UpdateNotebookInstanceOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdatePipelineExecutionOutput(v **UpdatePipelineExecutionOutput, 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 *UpdatePipelineExecutionOutput
|
|
if *v == nil {
|
|
sv = &UpdatePipelineExecutionOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "PipelineExecutionArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineExecutionArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineExecutionArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdatePipelineOutput(v **UpdatePipelineOutput, value interface{}) error {
|
|
if v == nil {
|
|
return fmt.Errorf("unexpected nil of type %T", v)
|
|
}
|
|
if value == nil {
|
|
return nil
|
|
}
|
|
|
|
shape, ok := value.(map[string]interface{})
|
|
if !ok {
|
|
return fmt.Errorf("unexpected JSON type %v", value)
|
|
}
|
|
|
|
var sv *UpdatePipelineOutput
|
|
if *v == nil {
|
|
sv = &UpdatePipelineOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "PipelineArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected PipelineArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.PipelineArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateProjectOutput(v **UpdateProjectOutput, 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 *UpdateProjectOutput
|
|
if *v == nil {
|
|
sv = &UpdateProjectOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "ProjectArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected ProjectArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.ProjectArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateTrainingJobOutput(v **UpdateTrainingJobOutput, 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 *UpdateTrainingJobOutput
|
|
if *v == nil {
|
|
sv = &UpdateTrainingJobOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "TrainingJobArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrainingJobArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrainingJobArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateTrialComponentOutput(v **UpdateTrialComponentOutput, 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 *UpdateTrialComponentOutput
|
|
if *v == nil {
|
|
sv = &UpdateTrialComponentOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "TrialComponentArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialComponentArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialComponentArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateTrialOutput(v **UpdateTrialOutput, 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 *UpdateTrialOutput
|
|
if *v == nil {
|
|
sv = &UpdateTrialOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "TrialArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected TrialArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.TrialArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateUserProfileOutput(v **UpdateUserProfileOutput, 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 *UpdateUserProfileOutput
|
|
if *v == nil {
|
|
sv = &UpdateUserProfileOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "UserProfileArn":
|
|
if value != nil {
|
|
jtv, ok := value.(string)
|
|
if !ok {
|
|
return fmt.Errorf("expected UserProfileArn to be of type string, got %T instead", value)
|
|
}
|
|
sv.UserProfileArn = ptr.String(jtv)
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateWorkforceOutput(v **UpdateWorkforceOutput, 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 *UpdateWorkforceOutput
|
|
if *v == nil {
|
|
sv = &UpdateWorkforceOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Workforce":
|
|
if err := awsAwsjson11_deserializeDocumentWorkforce(&sv.Workforce, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|
|
|
|
func awsAwsjson11_deserializeOpDocumentUpdateWorkteamOutput(v **UpdateWorkteamOutput, 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 *UpdateWorkteamOutput
|
|
if *v == nil {
|
|
sv = &UpdateWorkteamOutput{}
|
|
} else {
|
|
sv = *v
|
|
}
|
|
|
|
for key, value := range shape {
|
|
switch key {
|
|
case "Workteam":
|
|
if err := awsAwsjson11_deserializeDocumentWorkteam(&sv.Workteam, value); err != nil {
|
|
return err
|
|
}
|
|
|
|
default:
|
|
_, _ = key, value
|
|
|
|
}
|
|
}
|
|
*v = sv
|
|
return nil
|
|
}
|