diff --git a/models/protocol_tests/generate.go b/models/protocol_tests/generate.go index 7fd48bed9e8..3df2acfa2ee 100644 --- a/models/protocol_tests/generate.go +++ b/models/protocol_tests/generate.go @@ -383,6 +383,7 @@ func generateTestSuite(filename string) string { svcPrefix := inout + "Service" + strconv.Itoa(i+1) suite.API.Metadata.ServiceAbbreviation = svcPrefix + "ProtocolTest" suite.API.Operations = map[string]*api.Operation{} + for idx, c := range suite.Cases { c.Given.ExportedName = svcPrefix + "TestCaseOperation" + strconv.Itoa(idx+1) suite.API.Operations[c.Given.ExportedName] = c.Given @@ -395,6 +396,9 @@ func generateTestSuite(filename string) string { suite.API.Setup() suite.API.Metadata.EndpointPrefix = suite.API.PackageName() + // TODO until generated marshalers are all supported + suite.API.EnableSelectGeneratedMarshalers() + // Sort in order for deterministic test generation names := make([]string, 0, len(suite.API.Shapes)) for n := range suite.API.Shapes { diff --git a/private/model/api/api.go b/private/model/api/api.go index 157bb53ba56..bb9ff640e22 100644 --- a/private/model/api/api.go +++ b/private/model/api/api.go @@ -46,6 +46,10 @@ type API struct { // Set to true to not generate struct field accessors NoGenStructFieldAccessors bool + // Set to true to not generate (un)marshalers + NoGenMarshalers bool + NoGenUnmarshalers bool + SvcClientImportPath string initialized bool @@ -272,6 +276,9 @@ func (a *API) APIGoCode() string { a.imports["github.com/aws/aws-sdk-go/private/protocol/"+a.ProtocolPackage()] = true a.imports["github.com/aws/aws-sdk-go/private/protocol"] = true } + if !a.NoGenMarshalers || !a.NoGenUnmarshalers { + a.imports["github.com/aws/aws-sdk-go/private/protocol"] = true + } for _, op := range a.Operations { if op.AuthType == "none" { diff --git a/private/model/api/customization_passes.go b/private/model/api/customization_passes.go index a17e22b6aa3..05aa05e9c85 100644 --- a/private/model/api/customization_passes.go +++ b/private/model/api/customization_passes.go @@ -47,6 +47,21 @@ func (a *API) customizationPasses() { if fn := svcCustomizations[a.PackageName()]; fn != nil { fn(a) } + + // TODO until generated marshalers are all supported + a.EnableSelectGeneratedMarshalers() +} + +func (a *API) EnableSelectGeneratedMarshalers() { + // Selectivily enable generated marshalers as available + a.NoGenMarshalers = true + a.NoGenUnmarshalers = true + + // Enable generated marshalers + switch a.Metadata.Protocol { + case "rest-xml", "rest-json": + a.NoGenMarshalers = false + } } // s3Customizations customizes the API generation to replace values specific to S3. diff --git a/private/model/api/passes.go b/private/model/api/passes.go index 2668bcbd0bb..675e2d7678f 100644 --- a/private/model/api/passes.go +++ b/private/model/api/passes.go @@ -61,6 +61,15 @@ func (a *API) resolveReferences() { o.ErrorRefs[i].Shape.IsError = true } } + + for _, s := range a.Shapes { + switch s.Type { + case "list": + s.MemberRef.Shape.UsedInList = true + case "map": + s.ValueRef.Shape.UsedInMap = true + } + } } // A referenceResolver provides a way to resolve shape references to diff --git a/private/model/api/shape.go b/private/model/api/shape.go index 539d7910898..9964fa672ee 100644 --- a/private/model/api/shape.go +++ b/private/model/api/shape.go @@ -78,6 +78,9 @@ type Shape struct { OrigShapeName string `json:"-"` + UsedInMap bool + UsedInList bool + // Defines if the shape is a placeholder and should not be used directly Placeholder bool @@ -185,10 +188,18 @@ func (s *Shape) GoStructValueType(name string, ref *ShapeRef) string { return v } +func (s *Shape) IsRefPayload(name string) bool { + return s.Payload == name +} + +func (s *Shape) IsRefPayloadReader(name string, ref *ShapeRef) bool { + return (ref.Streaming || ref.Shape.Streaming) && s.IsRefPayload(name) +} + // GoStructType returns the type of a struct field based on the API // model definition. func (s *Shape) GoStructType(name string, ref *ShapeRef) string { - if (ref.Streaming || ref.Shape.Streaming) && s.Payload == name { + if s.IsRefPayloadReader(name, ref) { rtype := "io.ReadSeeker" if strings.HasSuffix(s.ShapeName, "Output") { rtype = "io.ReadCloser" @@ -513,7 +524,9 @@ func (s *Shape) NestedShape() *Shape { } var structShapeTmpl = template.Must(template.New("StructShape").Funcs(template.FuncMap{ - "GetCrosslinkURL": GetCrosslinkURL, + "GetCrosslinkURL": GetCrosslinkURL, + "MarshalShapeGoCode": MarshalShapeGoCode, + "UnmarshalShapeGoCode": UnmarshalShapeGoCode, }).Parse(` {{ .Docstring }} {{ if ne $.OrigShapeName "" -}} @@ -597,6 +610,13 @@ func (s *{{ $builderShapeName }}) get{{ $name }}() (v {{ $context.GoStructValueT {{ end }} {{ end }} + +{{ if not $.API.NoGenMarshalers -}} +{{ MarshalShapeGoCode $ }} +{{- end }} +{{ if not $.API.NoGenUnmarshalers -}} +{{ UnmarshalShapeGoCode $ }} +{{- end }} `)) var enumShapeTmpl = template.Must(template.New("EnumShape").Parse(` diff --git a/private/model/api/shape_marshal.go b/private/model/api/shape_marshal.go new file mode 100644 index 00000000000..81195c62484 --- /dev/null +++ b/private/model/api/shape_marshal.go @@ -0,0 +1,518 @@ +// +build codegen + +package api + +import ( + "bytes" + "fmt" + "strings" + "text/template" +) + +// MarshalShapeGoCode renders the shape's MarshalFields method with marshalers +// for each field within the shape. A string is returned of the rendered Go code. +// +// Will panic if error. +func MarshalShapeGoCode(s *Shape) string { + w := &bytes.Buffer{} + if err := marshalShapeTmpl.Execute(w, s); err != nil { + panic(fmt.Sprintf("failed to render shape's fields marshaler, %v", err)) + } + + return w.String() +} + +// MarshalShapeRefGoCode renders protocol encode for the shape ref's type. +// +// Will panic if error. +func MarshalShapeRefGoCode(refName string, ref *ShapeRef, context *Shape) string { + if ref.XMLAttribute { + return "// Skipping " + refName + " XML Attribute." + } + if context.IsRefPayloadReader(refName, ref) { + if strings.HasSuffix(context.ShapeName, "Output") { + return "// Skipping " + refName + " Output type's body not valid." + } + } + + mRef := marshalShapeRef{ + Name: refName, + Ref: ref, + Context: context, + } + + switch mRef.Location() { + case "StatusCode": + return "// ignoring invalid encode state, StatusCode. " + refName + } + + w := &bytes.Buffer{} + if err := marshalShapeRefTmpl.ExecuteTemplate(w, "encode field", mRef); err != nil { + panic(fmt.Sprintf("failed to marshal shape ref, %s, %v", ref.Shape.Type, err)) + } + + return w.String() +} + +var marshalShapeTmpl = template.Must(template.New("marshalShapeTmpl").Funcs( + map[string]interface{}{ + "MarshalShapeRefGoCode": MarshalShapeRefGoCode, + }, +).Parse(` +{{ $shapeName := $.ShapeName -}} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *{{ $shapeName }}) MarshalFields(e protocol.FieldEncoder) error { + {{ range $name, $ref := $.MemberRefs -}} + {{ MarshalShapeRefGoCode $name $ref $ }} + {{ end }} + return nil +} + +{{ if $.UsedInList -}} +func encode{{ $shapeName }}List(vs []*{{ $shapeName }}) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} +{{- end }} + +{{ if $.UsedInMap -}} +func encode{{ $shapeName }}Map(vs map[string]*{{ $shapeName }}) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} +{{- end }} +`)) + +var marshalShapeRefTmpl = template.Must(template.New("marshalShapeRefTmpl").Parse(` +{{ define "encode field" -}} + {{ if $.IsIdempotencyToken -}} + {{ template "idempotency token" $ }} + { + v := {{ $.Name }} + {{ else -}} + if {{ template "is ref set" $ }} { + v := {{ template "ref value" $ }} + {{- end }} + {{ if $.HasAttributes -}} + {{ template "attributes" $ }} + {{- end }} + e.Set{{ $.MarshalerType }}(protocol.{{ $.Location }}Target, "{{ $.LocationName }}", {{ template "marshaler" $ }}, {{ template "metadata" $ }}) + } +{{- end }} + +{{ define "marshaler" -}} + {{- if $.IsShapeType "list" -}} + {{- $helperName := $.EncodeHelperName "list" -}} + {{- if $helperName -}} + {{ $helperName }} + {{- else -}} + func(le protocol.ListEncoder) { + {{ $memberRef := $.ListMemberRef -}} + for _, item := range v { + v := {{ if $memberRef.Ref.UseIndirection }}*{{ end }}item + le.ListAdd{{ $memberRef.MarshalerType }}({{ template "marshaler" $memberRef }}) + } + } + {{- end -}} + {{- else if $.IsShapeType "map" -}} + {{- $helperName := $.EncodeHelperName "map" -}} + {{- if $helperName -}} + {{ $helperName }} + {{- else -}} + func(me protocol.MapEncoder) { + {{ $valueRef := $.MapValueRef -}} + for k, item := range v { + v := {{ if $valueRef.Ref.UseIndirection }}*{{ end }}item + me.MapSet{{ $valueRef.MarshalerType }}(k, {{ template "marshaler" $valueRef }}) + } + } + {{- end -}} + {{- else if $.IsShapeType "structure" -}} + v + {{- else if $.IsShapeType "timestamp" -}} + protocol.TimeValue{V: v, Format: {{ $.TimeFormat }} } + {{- else if $.IsShapeType "jsonvalue" -}} + protocol.JSONValue{V: v {{ if eq $.Location "Header" }}, Base64: true{{ end }} } + {{- else if $.IsPayloadStream -}} + protocol.{{ $.GoType }}{{ $.MarshalerType }}{V:v} + {{- else -}} + protocol.{{ $.GoType }}{{ $.MarshalerType }}(v) + {{- end -}} +{{- end }} + +{{ define "metadata" -}} + protocol.Metadata{ + {{- if $.IsFlattened -}} + Flatten: true, + {{- end -}} + + {{- if $.HasAttributes -}} + Attributes: attrs, + {{- end -}} + + {{- if $.XMLNamespacePrefix -}} + XMLNamespacePrefix: "{{ $.XMLNamespacePrefix }}", + {{- end -}} + + {{- if $.XMLNamespaceURI -}} + XMLNamespaceURI: "{{ $.XMLNamespaceURI }}", + {{- end -}} + + {{- if $.ListLocationName -}} + ListLocationName: "{{ $.ListLocationName }}", + {{- end -}} + + {{- if $.MapLocationNameKey -}} + MapLocationNameKey: "{{ $.MapLocationNameKey }}", + {{- end -}} + + {{- if $.MapLocationNameValue -}} + MapLocationNameValue: "{{ $.MapLocationNameValue }}", + {{- end -}} + } +{{- end }} + +{{ define "ref value" -}} + {{ if $.Ref.UseIndirection }}*{{ end }}s.{{ $.Name }} +{{- end}} + +{{ define "is ref set" -}} + {{ $isList := $.IsShapeType "list" -}} + {{ $isMap := $.IsShapeType "map" -}} + {{- if or $isList $isMap -}} + len(s.{{ $.Name }}) > 0 + {{- else -}} + s.{{ $.Name }} != nil + {{- end -}} +{{- end }} + +{{ define "attributes" -}} + attrs := make([]protocol.Attribute, 0, {{ $.NumAttributes }}) + + {{ range $name, $child := $.ChildrenRefs -}} + {{ if $child.Ref.XMLAttribute -}} + if s.{{ $.Name }}.{{ $name }} != nil { + v := {{ if $child.Ref.UseIndirection }}*{{ end }}s.{{ $.Name }}.{{ $name }} + attrs = append(attrs, protocol.Attribute{Name: "{{ $child.LocationName }}", Value: {{ template "marshaler" $child }}, Meta: {{ template "metadata" $child }}}) + } + {{- end }} + {{- end }} +{{- end }} + +{{ define "idempotency token" -}} + var {{ $.Name }} string + if {{ template "is ref set" $ }} { + {{ $.Name }} = {{ template "ref value" $ }} + } else { + {{ $.Name }} = protocol.GetIdempotencyToken() + } +{{- end }} +`)) + +type marshalShapeRef struct { + Name string + Ref *ShapeRef + Context *Shape +} + +func (r marshalShapeRef) ListMemberRef() marshalShapeRef { + return marshalShapeRef{ + Name: r.Name + "ListMember", + Ref: &r.Ref.Shape.MemberRef, + Context: r.Ref.Shape, + } +} +func (r marshalShapeRef) MapValueRef() marshalShapeRef { + return marshalShapeRef{ + Name: r.Name + "MapValue", + Ref: &r.Ref.Shape.ValueRef, + Context: r.Ref.Shape, + } +} +func (r marshalShapeRef) ChildrenRefs() map[string]marshalShapeRef { + children := map[string]marshalShapeRef{} + + for name, ref := range r.Ref.Shape.MemberRefs { + children[name] = marshalShapeRef{ + Name: name, + Ref: ref, + Context: r.Ref.Shape, + } + } + + return children +} +func (r marshalShapeRef) IsShapeType(typ string) bool { + return r.Ref.Shape.Type == typ +} +func (r marshalShapeRef) IsPayloadStream() bool { + return r.Context.IsRefPayloadReader(r.Name, r.Ref) +} +func (r marshalShapeRef) MarshalerType() string { + switch r.Ref.Shape.Type { + case "list": + return "List" + case "map": + return "Map" + case "structure": + return "Fields" + default: + // Streams have a special case + if r.Context.IsRefPayload(r.Name) { + return "Stream" + } + return "Value" + } +} +func (r marshalShapeRef) EncodeHelperName(typ string) string { + if r.Ref.Shape.Type != typ { + return "" + } + + var memberRef marshalShapeRef + switch r.Ref.Shape.Type { + case "map": + memberRef = r.MapValueRef() + case "list": + memberRef = r.ListMemberRef() + default: + return "" + } + + switch memberRef.Ref.Shape.Type { + case "list", "map": + return "" + case "structure": + shapeName := memberRef.Ref.Shape.ShapeName + return "encode" + shapeName + strings.Title(typ) + "(v)" + default: + return "protocol.Encode" + memberRef.GoType() + strings.Title(typ) + "(v)" + } +} +func (r marshalShapeRef) GoType() string { + switch r.Ref.Shape.Type { + case "boolean": + return "Bool" + case "string", "character": + return "String" + case "integer", "long": + return "Int64" + case "float", "double": + return "Float64" + case "timestamp": + return "Time" + case "jsonvalue": + return "JSONValue" + case "blob": + if r.Context.IsRefPayloadReader(r.Name, r.Ref) { + if strings.HasSuffix(r.Context.ShapeName, "Output") { + return "ReadCloser" + } + return "ReadSeeker" + } + return "Bytes" + default: + panic(fmt.Sprintf("unknown marshal shape ref type, %s", r.Ref.Shape.Type)) + } +} +func (r marshalShapeRef) Location() string { + var loc string + if l := r.Ref.Location; len(l) > 0 { + loc = l + } else if l := r.Ref.Shape.Location; len(l) > 0 { + loc = l + } + + switch loc { + case "querystring": + return "Query" + case "header": + return "Header" + case "headers": // headers means key is header prefix + return "Headers" + case "uri": + return "Path" + case "statusCode": + return "StatusCode" + default: + if len(loc) != 0 { + panic(fmt.Sprintf("unknown marshal shape ref location, %s", loc)) + } + + if r.Context.IsRefPayload(r.Name) { + return "Payload" + } + + return "Body" + } +} +func (r marshalShapeRef) LocationName() string { + if l := r.Ref.QueryName; len(l) > 0 { + // Special case for EC2 query + return l + } + + locName := r.Name + if l := r.Ref.LocationName; len(l) > 0 { + locName = l + } else if l := r.Ref.Shape.LocationName; len(l) > 0 { + locName = l + } + + return locName +} +func (r marshalShapeRef) IsFlattened() bool { + return r.Ref.Flattened || r.Ref.Shape.Flattened +} +func (r marshalShapeRef) XMLNamespacePrefix() string { + if v := r.Ref.XMLNamespace.Prefix; len(v) != 0 { + return v + } + return r.Ref.Shape.XMLNamespace.Prefix +} +func (r marshalShapeRef) XMLNamespaceURI() string { + if v := r.Ref.XMLNamespace.URI; len(v) != 0 { + return v + } + return r.Ref.Shape.XMLNamespace.URI +} +func (r marshalShapeRef) ListLocationName() string { + if v := r.Ref.Shape.MemberRef.LocationName; len(v) > 0 { + if !(r.Ref.Shape.Flattened || r.Ref.Flattened) { + return v + } + } + return "" +} +func (r marshalShapeRef) MapLocationNameKey() string { + return r.Ref.Shape.KeyRef.LocationName +} +func (r marshalShapeRef) MapLocationNameValue() string { + return r.Ref.Shape.ValueRef.LocationName +} +func (r marshalShapeRef) HasAttributes() bool { + for _, ref := range r.Ref.Shape.MemberRefs { + if ref.XMLAttribute { + return true + } + } + return false +} +func (r marshalShapeRef) NumAttributes() (n int) { + for _, ref := range r.Ref.Shape.MemberRefs { + if ref.XMLAttribute { + n++ + } + } + return n +} +func (r marshalShapeRef) IsIdempotencyToken() bool { + return r.Ref.IdempotencyToken || r.Ref.Shape.IdempotencyToken +} +func (r marshalShapeRef) TimeFormat() string { + switch r.Location() { + case "Header", "Headers": + return "protocol.RFC822TimeFromat" + default: + switch r.Context.API.Metadata.Protocol { + case "json", "rest-json": + return "protocol.UnixTimeFormat" + case "rest-xml", "ec2", "query": + return "protocol.ISO8601TimeFormat" + default: + panic(fmt.Sprintf("unable to determine time format for %s ref", r.Name)) + } + } +} + +// UnmarshalShapeGoCode renders the shape's UnmarshalAWS method with unmarshalers +// for each field within the shape. A string is returned of the rendered Go code. +// +// Will panic if error. +func UnmarshalShapeGoCode(s *Shape) string { + w := &bytes.Buffer{} + if err := unmarshalShapeTmpl.Execute(w, s); err != nil { + panic(fmt.Sprintf("failed to render shape's fields unmarshaler, %v", err)) + } + + return w.String() +} + +var unmarshalShapeTmpl = template.Must(template.New("unmarshalShapeTmpl").Funcs( + template.FuncMap{ + "UnmarshalShapeRefGoCode": UnmarshalShapeRefGoCode, + }, +).Parse(` +{{ $shapeName := $.ShapeName -}} + +// UnmarshalAWS decodes the AWS API shape using the passed in protocol decoder. +func (s *{{ $shapeName }}) UnmarshalAWS(d protocol.FieldDecoder) { + {{ range $name, $ref := $.MemberRefs -}} + {{ UnmarshalShapeRefGoCode $name $ref $ }} + {{ end }} +} + +{{ if $.UsedInList -}} +func decode{{ $shapeName }}List(vsp *[]*{{ $shapeName }}) func(int, protocol.ListDecoder) { + return func(n int, ld protocol.ListDecoder) { + vs := make([]{{ $shapeName }}, n) + *vsp = make([]*{{ $shapeName }}, n) + for i := 0; i < n; i++ { + ld.ListGetUnmarshaler(&vs[i]) + (*vsp)[i] = &vs[i] + } + } +} +{{- end }} + +{{ if $.UsedInMap -}} +func decode{{ $shapeName }}Map(vsp *map[string]*{{ $shapeName }}) func([]string, protocol.MapDecoder) { + return func(ks []string, md protocol.MapDecoder) { + vs := make(map[string]*{{ $shapeName }}, n) + for _, k range ks { + v := &{{ $shapeName }}{} + md.MapGetUnmarshaler(k, v) + vs[k] = v + } + } +} +{{- end }} +`)) + +// UnmarshalShapeRefGoCode generates the Go code to unmarshal an API shape. +func UnmarshalShapeRefGoCode(refName string, ref *ShapeRef, context *Shape) string { + if ref.XMLAttribute { + return "// Skipping " + refName + " XML Attribute." + } + + mRef := marshalShapeRef{ + Name: refName, + Ref: ref, + Context: context, + } + + switch mRef.Location() { + case "Path": + return "// ignoring invalid decode state, Path. " + refName + case "Query": + return "// ignoring invalid decode state, Query. " + refName + } + + w := &bytes.Buffer{} + if err := unmarshalShapeRefTmpl.ExecuteTemplate(w, "decode", mRef); err != nil { + panic(fmt.Sprintf("failed to decode shape ref, %s, %v", ref.Shape.Type, err)) + } + + return w.String() +} + +var unmarshalShapeRefTmpl = template.Must(template.New("unmarshalShapeRefTmpl").Parse(` +// Decode {{ $.Name }} {{ $.GoType }} {{ $.MarshalerType }} to {{ $.Location }} at {{ $.LocationName }} +`)) diff --git a/private/protocol/decode.go b/private/protocol/decode.go new file mode 100644 index 00000000000..58f240b2f53 --- /dev/null +++ b/private/protocol/decode.go @@ -0,0 +1,112 @@ +package protocol + +import ( + "io" + "time" +) + +// FieldUnmarshaler used by protocol unmarshaling to unmarshal a type's nested fields. +type FieldUnmarshaler interface { + UnmarshalFields(FieldDecoder) error +} + +// A FieldValue is a value that will be unmarshalered from the decoder to +// a concrete value. +type FieldValue interface{} + +// ListDecoder provides the interface for unmarshaling list elements from the +// underlying decoder. +type ListDecoder interface { + ListGet(fn func(v FieldValue)) + ListGetList(fn func(n int, ld ListDecoder)) + ListGetMap(fn func(ks []string, md MapDecoder)) + ListGetFields(m FieldUnmarshaler) +} + +// MapDecoder provides the interface for unmarshaling map elements from the +// underlying decoder. The map key the value is retrieved from is k. +type MapDecoder interface { + MapGet(k string, fn func(v FieldValue)) + MapGetList(k string, fn func(n int, ld ListDecoder)) + MapGetMap(k string, fn func(ks []string, fd FieldDecoder)) + MapGetFields(k string, fn func() FieldUnmarshaler) +} + +// FieldDecoder provides the interface for unmarshaling values from a type. The +// value is retrieved from the location referenced to by the Target. The field +// name that the value is retrieved from is k. +type FieldDecoder interface { + Get(t Target, k string, fn func(v FieldValue), meta Metadata) + GetList(t Target, k string, fn func(n int, ld ListDecoder), meta Metadata) + GetMap(t Target, k string, fn func(ks []string, md MapDecoder), meta Metadata) + GetFields(t Target, k string, fn func() FieldUnmarshaler, meta Metadata) +} + +// DecodeBool converts a FieldValue into a bool pointer, updating the value +// pointed to by the input. +func DecodeBool(vp **bool) func(FieldValue) { + return func(v FieldValue) { + *vp = new(bool) + **vp = v.(bool) + } +} + +// DecodeString converts a FieldValue into a string pointer, updating the value +// pointed to by the input. +func DecodeString(vp **string) func(FieldValue) { + return func(v FieldValue) { + *vp = new(string) + **vp = v.(string) + } +} + +// DecodeInt64 converts a FieldValue into an int64 pointer, updating the value +// pointed to by the input. +func DecodeInt64(vp **int64) func(FieldValue) { + return func(v FieldValue) { + *vp = new(int64) + **vp = v.(int64) + } +} + +// DecodeFloat64 converts a FieldValue into a float64 pointer, updating the value +// pointed to by the input. +func DecodeFloat64(vp **float64) func(FieldValue) { + return func(v FieldValue) { + *vp = new(float64) + **vp = v.(float64) + } +} + +// DecodeTime converts a FieldValue into a time pointer, updating the value +// pointed to by the input. +func DecodeTime(vp **time.Time) func(FieldValue) { + return func(v FieldValue) { + *vp = new(time.Time) + **vp = v.(time.Time) + } +} + +// DecodeBytes converts a FieldValue into a bytes slice, updating the value +// pointed to by the input. +func DecodeBytes(vp *[]byte) func(FieldValue) { + return func(v FieldValue) { + *vp = v.([]byte) + } +} + +// DecodeReadCloser converts a FieldValue into an io.ReadCloser, updating the value +// pointed to by the input. +func DecodeReadCloser(vp *io.ReadCloser) func(FieldValue) { + return func(v FieldValue) { + *vp = v.(io.ReadCloser) + } +} + +// DecodeReadSeeker converts a FieldValue into an io.ReadCloser, updating the value +// pointed to by the input. +func DecodeReadSeeker(vp *io.ReadSeeker) func(FieldValue) { + return func(v FieldValue) { + *vp = v.(io.ReadSeeker) + } +} diff --git a/private/protocol/encode.go b/private/protocol/encode.go new file mode 100644 index 00000000000..09096658baa --- /dev/null +++ b/private/protocol/encode.go @@ -0,0 +1,166 @@ +package protocol + +import ( + "io" + "time" +) + +// A FieldMarshaler interface is used to marshal struct fields when encoding. +type FieldMarshaler interface { + MarshalFields(FieldEncoder) error +} + +// ValueMarshaler provides a generic type for all encoding field values to be +// passed into a encoder's methods with. +type ValueMarshaler interface { + MarshalValue() (string, error) + MarshalValueBuf([]byte) ([]byte, error) +} + +// A StreamMarshaler interface is used to marshal a stream when encoding. +type StreamMarshaler interface { + MarshalStream() (io.ReadSeeker, error) +} + +// A ListEncoder provides the interface for encoders that will encode List elements. +type ListEncoder interface { + ListAddValue(v ValueMarshaler) + ListAddList(fn func(ListEncoder)) + ListAddMap(fn func(MapEncoder)) + ListAddFields(m FieldMarshaler) +} + +// A MapEncoder provides the interface for encoders that will encode map elements. +type MapEncoder interface { + MapSetValue(k string, v ValueMarshaler) + MapSetList(k string, fn func(ListEncoder)) + MapSetMap(k string, fn func(MapEncoder)) + MapSetFields(k string, m FieldMarshaler) +} + +// A FieldEncoder provides the interface for encoding struct field members. +type FieldEncoder interface { + SetValue(t Target, k string, v ValueMarshaler, meta Metadata) + SetStream(t Target, k string, v StreamMarshaler, meta Metadata) + SetList(t Target, k string, fn func(ListEncoder), meta Metadata) + SetMap(t Target, k string, fn func(MapEncoder), meta Metadata) + SetFields(t Target, k string, m FieldMarshaler, meta Metadata) +} + +// EncodeStringList returns a function that will add the slice's values to +// a list Encoder. +func EncodeStringList(vs []*string) func(ListEncoder) { + return func(le ListEncoder) { + for _, v := range vs { + le.ListAddValue(StringValue(*v)) + } + } +} + +// EncodeStringMap returns a function that will add the map's values to +// a map Encoder. +func EncodeStringMap(vs map[string]*string) func(MapEncoder) { + return func(me MapEncoder) { + for k, v := range vs { + me.MapSetValue(k, StringValue(*v)) + } + } +} + +// EncodeInt64List returns a function that will add the slice's values to +// a list Encoder. +func EncodeInt64List(vs []*int64) func(ListEncoder) { + return func(le ListEncoder) { + for _, v := range vs { + le.ListAddValue(Int64Value(*v)) + } + } +} + +// EncodeInt64Map returns a function that will add the map's values to +// a map Encoder. +func EncodeInt64Map(vs map[string]*int64) func(MapEncoder) { + return func(me MapEncoder) { + for k, v := range vs { + me.MapSetValue(k, Int64Value(*v)) + } + } +} + +// EncodeFloat64List returns a function that will add the slice's values to +// a list Encoder. +func EncodeFloat64List(vs []*float64) func(ListEncoder) { + return func(le ListEncoder) { + for _, v := range vs { + le.ListAddValue(Float64Value(*v)) + } + } +} + +// EncodeFloat64Map returns a function that will add the map's values to +// a map Encoder. +func EncodeFloat64Map(vs map[string]*float64) func(MapEncoder) { + return func(me MapEncoder) { + for k, v := range vs { + me.MapSetValue(k, Float64Value(*v)) + } + } +} + +// EncodeBoolList returns a function that will add the slice's values to +// a list Encoder. +func EncodeBoolList(vs []*bool) func(ListEncoder) { + return func(le ListEncoder) { + for _, v := range vs { + le.ListAddValue(BoolValue(*v)) + } + } +} + +// EncodeBoolMap returns a function that will add the map's values to +// a map Encoder. +func EncodeBoolMap(vs map[string]*bool) func(MapEncoder) { + return func(me MapEncoder) { + for k, v := range vs { + me.MapSetValue(k, BoolValue(*v)) + } + } +} + +// EncodeTimeList returns a function that will add the slice's values to +// a list Encoder. +func EncodeTimeList(vs []*time.Time) func(ListEncoder) { + return func(le ListEncoder) { + for _, v := range vs { + le.ListAddValue(TimeValue{V: *v}) + } + } +} + +// EncodeTimeMap returns a function that will add the map's values to +// a map Encoder. +func EncodeTimeMap(vs map[string]*time.Time) func(MapEncoder) { + return func(me MapEncoder) { + for k, v := range vs { + me.MapSetValue(k, TimeValue{V: *v}) + } + } +} + +// A FieldBuffer provides buffering of fields so the number of +// allocations are reduced by providng a persistent buffer that is +// used between fields. +type FieldBuffer struct { + buf []byte +} + +// GetValue will retrieve the ValueMarshaler's value by appending the +// value to the buffer. Will return the buffer that was populated. +// +// This buffer is only valid until the next time GetValue is called. +func (b *FieldBuffer) GetValue(m ValueMarshaler) ([]byte, error) { + v, err := m.MarshalValueBuf(b.buf) + b.buf = v + b.buf = b.buf[0:0] + return v, err +} diff --git a/private/protocol/fields.go b/private/protocol/fields.go new file mode 100644 index 00000000000..f21a627702c --- /dev/null +++ b/private/protocol/fields.go @@ -0,0 +1,208 @@ +package protocol + +import ( + "bytes" + "encoding/base64" + "encoding/json" + "io" + "strconv" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" +) + +// BoolValue provies encoding of bool for AWS protocols. +type BoolValue bool + +// MarshalValue formats the value into a string for encoding. +func (v BoolValue) MarshalValue() (string, error) { + return strconv.FormatBool(bool(v)), nil +} + +// MarshalValueBuf formats the value into a byte slice for encoding. +// If there is enough room in the passed in slice v will be appended to it. +// +// Will reset the length of the passed in slice to 0. +func (v BoolValue) MarshalValueBuf(b []byte) ([]byte, error) { + b = b[0:0] + return strconv.AppendBool(b, bool(v)), nil +} + +// BytesValue provies encoding of string for AWS protocols. +type BytesValue string + +// MarshalValue formats the value into a string for encoding. +func (v BytesValue) MarshalValue() (string, error) { + return base64.StdEncoding.EncodeToString([]byte(v)), nil +} + +// MarshalValueBuf formats the value into a byte slice for encoding. +// If there is enough room in the passed in slice v will be appended to it. +// +// Will reset the length of the passed in slice to 0. +func (v BytesValue) MarshalValueBuf(b []byte) ([]byte, error) { + b = b[0:0] + m := []byte(v) + + n := base64.StdEncoding.EncodedLen(len(m)) + if cap(b) < n { + b = make([]byte, n) + } + base64.StdEncoding.Encode(b, m) + return b, nil +} + +// StringValue provies encoding of string for AWS protocols. +type StringValue string + +// MarshalValue formats the value into a string for encoding. +func (v StringValue) MarshalValue() (string, error) { + return string(v), nil +} + +// MarshalValueBuf formats the value into a byte slice for encoding. +// If there is enough room in the passed in slice v will be appended to it. +// +// Will reset the length of the passed in slice to 0. +func (v StringValue) MarshalValueBuf(b []byte) ([]byte, error) { + b = b[0:0] + return append(b, v...), nil +} + +// Int64Value provies encoding of int64 for AWS protocols. +type Int64Value int64 + +// MarshalValue formats the value into a string for encoding. +func (v Int64Value) MarshalValue() (string, error) { + return strconv.FormatInt(int64(v), 10), nil +} + +// MarshalValueBuf formats the value into a byte slice for encoding. +// If there is enough room in the passed in slice v will be appended to it. +// +// Will reset the length of the passed in slice to 0. +func (v Int64Value) MarshalValueBuf(b []byte) ([]byte, error) { + b = b[0:0] + return strconv.AppendInt(b, int64(v), 10), nil +} + +// Float64Value provies encoding of float64 for AWS protocols. +type Float64Value float64 + +// MarshalValue formats the value into a string for encoding. +func (v Float64Value) MarshalValue() (string, error) { + return strconv.FormatFloat(float64(v), 'f', -1, 64), nil +} + +// MarshalValueBuf formats the value into a byte slice for encoding. +// If there is enough room in the passed in slice v will be appended to it. +// +// Will reset the length of the passed in slice to 0. +func (v Float64Value) MarshalValueBuf(b []byte) ([]byte, error) { + b = b[0:0] + return strconv.AppendFloat(b, float64(v), 'f', -1, 64), nil +} + +// JSONValue provies encoding of aws.JSONValues for AWS protocols. +type JSONValue struct { + V aws.JSONValue + Base64 bool +} + +// MarshalValue formats the value into a string for encoding. +func (v JSONValue) MarshalValue() (string, error) { + b, err := json.Marshal(v.V) + if err != nil { + return "", err + } + + if v.Base64 { + return base64.StdEncoding.EncodeToString(b), nil + } + + return string(b), nil +} + +// MarshalValueBuf formats the value into a byte slice for encoding. +// If there is enough room in the passed in slice v will be appended to it. +// +// Will reset the length of the passed in slice to 0. +func (v JSONValue) MarshalValueBuf(b []byte) ([]byte, error) { + b = b[0:0] + + m, err := json.Marshal(v.V) + if err != nil { + return nil, err + } + + if v.Base64 { + return BytesValue(m).MarshalValueBuf(b) + } + + return append(b, m...), nil +} + +// Time formats for protocol time fields. +const ( + ISO8601TimeFormat = "2006-01-02T15:04:05Z" // ISO 8601 formated time. + RFC822TimeFromat = "Mon, 2 Jan 2006 15:04:05 GMT" // RFC822 formatted time. + UnixTimeFormat = "unix time format" // Special case for Unix time +) + +// TimeValue provies encoding of time.Time for AWS protocols. +type TimeValue struct { + V time.Time + Format string +} + +// MarshalValue formats the value into a string givin a format for encoding. +func (v TimeValue) MarshalValue() (string, error) { + t := time.Time(v.V) + + if v.Format == UnixTimeFormat { + return strconv.FormatInt(t.UTC().Unix(), 10), nil + } + return t.UTC().Format(v.Format), nil +} + +// MarshalValueBuf formats the value into a byte slice for encoding. +// If there is enough room in the passed in slice v will be appended to it. +// +// Will reset the length of the passed in slice to 0. +func (v TimeValue) MarshalValueBuf(b []byte) ([]byte, error) { + b = b[0:0] + + m, err := v.MarshalValue() + if err != nil { + return nil, err + } + + return append(b, m...), nil +} + +// A ReadSeekerStream wrapps an io.ReadSeeker to be used as a StreamMarshaler. +type ReadSeekerStream struct { + V io.ReadSeeker +} + +// MarshalStream returns the wrapped io.ReadSeeker for encoding. +func (v ReadSeekerStream) MarshalStream() (io.ReadSeeker, error) { + return v.V, nil +} + +// A BytesStream aliases a byte slice to be used as a StreamMarshaler. +type BytesStream []byte + +// MarshalStream marshals a byte slice into an io.ReadSeeker for encoding. +func (v BytesStream) MarshalStream() (io.ReadSeeker, error) { + return bytes.NewReader([]byte(v)), nil +} + +// A StringStream aliases a string to be used as a StreamMarshaler. +type StringStream string + +// MarshalStream marshals a string into an io.ReadSeeker for encoding. +func (v StringStream) MarshalStream() (io.ReadSeeker, error) { + return strings.NewReader(string(v)), nil +} diff --git a/private/protocol/header_encoder.go b/private/protocol/header_encoder.go new file mode 100644 index 00000000000..b653234b36f --- /dev/null +++ b/private/protocol/header_encoder.go @@ -0,0 +1,106 @@ +package protocol + +import ( + "fmt" + "net/http" +) + +// HeaderMapEncoder builds a map valu +type HeaderMapEncoder struct { + Prefix string + Header http.Header + Err error +} + +// MapSetValue adds a single value to the header. +func (e *HeaderMapEncoder) MapSetValue(k string, v ValueMarshaler) { + if e.Err != nil { + return + } + + str, err := v.MarshalValue() + if err != nil { + e.Err = err + return + } + + if len(e.Prefix) > 0 { + k = e.Prefix + k + } + + e.Header.Set(k, str) +} + +// MapSetList executes the passed in callback with a list encoder based on +// the context of this HeaderMapEncoder. +func (e *HeaderMapEncoder) MapSetList(k string, fn func(le ListEncoder)) { + if e.Err != nil { + return + } + + if len(e.Prefix) > 0 { + k = e.Prefix + k + } + + nested := HeaderListEncoder{Key: k, Header: e.Header} + fn(&nested) + e.Err = nested.Err +} + +// MapSetMap sets the header element with nested maps appending the +// passed in k to the prefix if one was set. +func (e *HeaderMapEncoder) MapSetMap(k string, fn func(me MapEncoder)) { + if e.Err != nil { + return + } + + if len(e.Prefix) > 0 { + k = e.Prefix + k + } + + nested := HeaderMapEncoder{Prefix: k, Header: e.Header} + fn(&nested) + e.Err = nested.Err +} + +// MapSetFields Is not implemented, query map of FieldMarshaler is undefined. +func (e *HeaderMapEncoder) MapSetFields(k string, m FieldMarshaler) { + e.Err = fmt.Errorf("header map encoder MapSetFields not supported, %s", k) +} + +// HeaderListEncoder will encode list values nested into a header key. +type HeaderListEncoder struct { + Key string + Header http.Header + Err error +} + +// ListAddValue encodes an individual list value into the header. +func (e *HeaderListEncoder) ListAddValue(v ValueMarshaler) { + if e.Err != nil { + return + } + + str, err := v.MarshalValue() + if err != nil { + e.Err = err + return + } + + e.Header.Add(e.Key, str) +} + +// ListAddList Is not implemented, header list of list is undefined. +func (e *HeaderListEncoder) ListAddList(fn func(ListEncoder)) { + e.Err = fmt.Errorf("header list encoder ListAddList not supported, %s", e.Key) +} + +// ListAddMap Is not implemented, header list of map is undefined. +func (e *HeaderListEncoder) ListAddMap(fn func(MapEncoder)) { + e.Err = fmt.Errorf("header list encoder ListAddMap not supported, %s", e.Key) +} + +// ListAddFields Is not implemented, query list of FieldMarshaler is undefined. +func (e *HeaderListEncoder) ListAddFields(m FieldMarshaler) { + e.Err = fmt.Errorf("header list encoder ListAddFields not supported, %s", e.Key) +} diff --git a/private/protocol/json/encode.go b/private/protocol/json/encode.go new file mode 100644 index 00000000000..816d466143f --- /dev/null +++ b/private/protocol/json/encode.go @@ -0,0 +1,271 @@ +package json + +import ( + "bytes" + "fmt" + "io" + + "github.com/aws/aws-sdk-go/private/protocol" +) + +// An Encoder provides encoding of the AWS JSON protocol. This encoder will will +// write all content to JSON. Only supports body and payload targets. +type Encoder struct { + encoder + root bool +} + +// NewEncoder creates a new encoder for encoding AWS JSON protocol. Only encodes +// fields into the JSON body, and error is returned if target is anything other +// than Body or Payload. +func NewEncoder() *Encoder { + e := &Encoder{ + encoder: encoder{ + buf: bytes.NewBuffer([]byte{'{'}), + fieldBuf: &protocol.FieldBuffer{}, + }, + root: true, + } + + return e +} + +// Encode returns the encoded XMl reader. An error will be returned if one was +// encountered while building the JSON body. +func (e *Encoder) Encode() (io.ReadSeeker, error) { + b, err := e.encode() + if err != nil { + return nil, err + } + + if len(b) == 2 { + // Account for first starting object in buffer + return nil, nil + } + + return bytes.NewReader(b), nil +} + +// SetValue sets an individual value to the JSON body. +func (e *Encoder) SetValue(t protocol.Target, k string, v protocol.ValueMarshaler, meta protocol.Metadata) { + e.writeSep() + e.writeKey(k) + e.writeValue(v) +} + +// SetStream is not supported for JSON protocol marshaling. +func (e *Encoder) SetStream(t protocol.Target, k string, v protocol.StreamMarshaler, meta protocol.Metadata) { + if e.err != nil { + return + } + e.err = fmt.Errorf("json encoder SetStream not supported, %s, %s", t, k) +} + +// SetList creates an JSON list and calls the passed in fn callback with a list encoder. +func (e *Encoder) SetList(t protocol.Target, k string, fn func(le protocol.ListEncoder), meta protocol.Metadata) { + e.writeSep() + e.writeKey(k) + e.writeList(func(enc encoder) error { + nested := listEncoder{encoder: enc} + fn(&nested) + return nested.err + }) +} + +// SetMap creates an JSON map and calls the passed in fn callback with a map encoder. +func (e *Encoder) SetMap(t protocol.Target, k string, fn func(me protocol.MapEncoder), meta protocol.Metadata) { + e.writeSep() + e.writeKey(k) + e.writeObject(func(enc encoder) error { + nested := mapEncoder{encoder: enc} + fn(&nested) + return nested.err + }) +} + +// SetFields sets the nested fields to the JSON body. +func (e *Encoder) SetFields(t protocol.Target, k string, m protocol.FieldMarshaler, meta protocol.Metadata) { + if t == protocol.PayloadTarget { + // Ignore payload key and only marshal body without wrapping in object first. + nested := Encoder{ + encoder: encoder{ + buf: e.encoder.buf, + fieldBuf: e.encoder.fieldBuf, + }, + } + m.MarshalFields(&nested) + e.err = nested.err + return + } + + e.writeSep() + e.writeKey(k) + e.writeObject(func(enc encoder) error { + nested := Encoder{encoder: enc} + m.MarshalFields(&nested) + return nested.err + }) +} + +// A listEncoder encodes elements within a list for the JSON encoder. +type listEncoder struct { + encoder +} + +// ListAddValue will add the value to the list. +func (e *listEncoder) ListAddValue(v protocol.ValueMarshaler) { + e.writeSep() + e.writeValue(v) +} + +// ListAddList adds a list nested within another list. +func (e *listEncoder) ListAddList(fn func(le protocol.ListEncoder)) { + e.writeSep() + e.writeList(func(enc encoder) error { + nested := listEncoder{encoder: enc} + fn(&nested) + return nested.err + }) +} + +// ListAddMap adds a map nested within a list. +func (e *listEncoder) ListAddMap(fn func(me protocol.MapEncoder)) { + e.writeSep() + e.writeObject(func(enc encoder) error { + nested := mapEncoder{encoder: enc} + fn(&nested) + return nested.err + }) +} + +// ListAddFields will set the nested type's fields to the list. +func (e *listEncoder) ListAddFields(m protocol.FieldMarshaler) { + e.writeSep() + e.writeObject(func(enc encoder) error { + nested := Encoder{encoder: enc} + m.MarshalFields(&nested) + return nested.err + }) +} + +// A mapEncoder encodes key values pair map values for the JSON encoder. +type mapEncoder struct { + encoder +} + +// MapSetValue sets a map value. +func (e *mapEncoder) MapSetValue(k string, v protocol.ValueMarshaler) { + e.writeSep() + e.writeKey(k) + e.writeValue(v) +} + +// MapSetList encodes a list nested within the map. +func (e *mapEncoder) MapSetList(k string, fn func(le protocol.ListEncoder)) { + e.writeSep() + e.writeKey(k) + e.writeList(func(enc encoder) error { + nested := listEncoder{encoder: enc} + fn(&nested) + return nested.err + }) +} + +// MapSetMap encodes a map nested within another map. +func (e *mapEncoder) MapSetMap(k string, fn func(me protocol.MapEncoder)) { + e.writeSep() + e.writeKey(k) + e.writeObject(func(enc encoder) error { + nested := mapEncoder{encoder: enc} + fn(&nested) + return nested.err + }) +} + +// MapSetFields will set the nested type's fields under the map. +func (e *mapEncoder) MapSetFields(k string, m protocol.FieldMarshaler) { + e.writeSep() + e.writeKey(k) + e.writeObject(func(enc encoder) error { + nested := Encoder{encoder: enc} + m.MarshalFields(&nested) + return nested.err + }) +} + +type encoder struct { + buf *bytes.Buffer + fieldBuf *protocol.FieldBuffer + started bool + err error +} + +func (e encoder) encode() ([]byte, error) { + if e.err != nil { + return nil, e.err + } + + // Close the root object + e.buf.WriteByte('}') + + return e.buf.Bytes(), nil +} + +func (e *encoder) writeSep() { + if e.started { + e.buf.WriteByte(',') + } else { + e.started = true + } + +} +func (e *encoder) writeKey(k string) { + e.buf.WriteByte('"') + e.buf.WriteString(k) // TODO escape? + e.buf.WriteByte('"') + e.buf.WriteByte(':') +} + +func (e *encoder) writeValue(v protocol.ValueMarshaler) { + if e.err != nil { + return + } + + b, err := e.fieldBuf.GetValue(v) + if err != nil { + e.err = err + return + } + + var asStr bool + switch v.(type) { + case protocol.StringValue, protocol.BytesValue: + asStr = true + } + + if asStr { + escapeStringBytes(e.buf, b) + } else { + e.buf.Write(b) + } +} + +func (e *encoder) writeList(fn func(encoder) error) { + if e.err != nil { + return + } + + e.buf.WriteByte('[') + e.err = fn(encoder{buf: e.buf, fieldBuf: e.fieldBuf}) + e.buf.WriteByte(']') +} + +func (e *encoder) writeObject(fn func(encoder) error) { + if e.err != nil { + return + } + + e.buf.WriteByte('{') + e.err = fn(encoder{buf: e.buf, fieldBuf: e.fieldBuf}) + e.buf.WriteByte('}') +} diff --git a/private/protocol/json/encode_test.go b/private/protocol/json/encode_test.go new file mode 100644 index 00000000000..2d90b621928 --- /dev/null +++ b/private/protocol/json/encode_test.go @@ -0,0 +1,302 @@ +package json + +import ( + "io" + "io/ioutil" + "testing" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/awstesting" + "github.com/aws/aws-sdk-go/private/protocol" +) + +func TestEncodeNestedShape(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + Nested: &nestedShape{ + Value: aws.String("expected value"), + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `{"nested":{"value":"expected value"}}` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeMapString(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + MapStr: map[string]*string{ + "abc": aws.String("123"), + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `{"mapstr":{"abc":"123"}}` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeMapShape(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + MapShape: map[string]*nestedShape{ + "abc": {Value: aws.String("1")}, + "123": {IntVal: aws.Int64(123)}, + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `{"mapShape":{"abc":{"value":"1"},"123":{"intval":123}}}` + + awstesting.AssertJSON(t, expect, string(b), "expect bodies to match") +} +func TestEncodeListString(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + ListStr: []*string{ + aws.String("abc"), + aws.String("123"), + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `{"liststr":["abc","123"]}` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeListFlatten(t *testing.T) { + // TODO no JSON flatten +} +func TestEncodeListFlattened(t *testing.T) { + // TODO No json flatten +} +func TestEncodeListNamed(t *testing.T) { + // TODO no json named +} +func TestEncodeListShape(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + ListShape: []*nestedShape{ + {Value: aws.String("abc")}, + {Value: aws.String("123")}, + {IntVal: aws.Int64(123)}, + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `{"listShape":[{"value":"abc"},{"value":"123"},{"intval":123}]}` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} + +type baseShape struct { + Payload *payloadShape +} + +func (s *baseShape) MarshalFields(e protocol.FieldEncoder) error { + if s.Payload != nil { + e.SetFields(protocol.PayloadTarget, "payload", s.Payload, protocol.Metadata{}) + } + return nil +} + +type payloadShape struct { + Value *string + IntVal *int64 + TimeVal *time.Time + Nested *nestedShape + MapStr map[string]*string + MapFlatten map[string]*string + MapNamed map[string]*string + MapShape map[string]*nestedShape + MapFlattenShape map[string]*nestedShape + MapNamedShape map[string]*nestedShape + ListStr []*string + ListFlatten []*string + ListNamed []*string + ListShape []*nestedShape + ListFlattenShape []*nestedShape + ListNamedShape []*nestedShape +} + +func (s *payloadShape) MarshalFields(e protocol.FieldEncoder) error { + if s.Value != nil { + e.SetValue(protocol.BodyTarget, "value", protocol.StringValue(*s.Value), protocol.Metadata{}) + } + if s.IntVal != nil { + e.SetValue(protocol.BodyTarget, "intval", protocol.Int64Value(*s.IntVal), protocol.Metadata{}) + } + if s.TimeVal != nil { + e.SetValue(protocol.BodyTarget, "timeval", protocol.TimeValue{ + V: *s.TimeVal, Format: protocol.UnixTimeFormat, + }, protocol.Metadata{}) + } + if s.Nested != nil { + e.SetFields(protocol.BodyTarget, "nested", s.Nested, protocol.Metadata{}) + } + if len(s.MapStr) > 0 { + e.SetMap(protocol.BodyTarget, "mapstr", func(me protocol.MapEncoder) { + for k, v := range s.MapStr { + me.MapSetValue(k, protocol.StringValue(*v)) + } + }, protocol.Metadata{}) + } + if len(s.MapFlatten) > 0 { + e.SetMap(protocol.BodyTarget, "mapFlatten", func(me protocol.MapEncoder) { + for k, v := range s.MapFlatten { + me.MapSetValue(k, protocol.StringValue(*v)) + } + }, protocol.Metadata{ + Flatten: true, + }) + } + if len(s.MapNamed) > 0 { + e.SetMap(protocol.BodyTarget, "mapNamed", func(me protocol.MapEncoder) { + for k, v := range s.MapNamed { + me.MapSetValue(k, protocol.StringValue(*v)) + } + }, protocol.Metadata{ + MapLocationNameKey: "namedKey", MapLocationNameValue: "namedValue", + }) + } + if len(s.MapShape) > 0 { + e.SetMap(protocol.BodyTarget, "mapShape", encodeNestedShapeMap(s.MapShape), protocol.Metadata{}) + } + if len(s.MapFlattenShape) > 0 { + e.SetMap(protocol.BodyTarget, "mapFlattenShape", encodeNestedShapeMap(s.MapFlattenShape), protocol.Metadata{ + Flatten: true, + }) + } + if len(s.MapNamedShape) > 0 { + e.SetMap(protocol.BodyTarget, "mapNamedShape", encodeNestedShapeMap(s.MapNamedShape), protocol.Metadata{ + MapLocationNameKey: "namedKey", MapLocationNameValue: "namedValue", + }) + } + if len(s.ListStr) > 0 { + e.SetList(protocol.BodyTarget, "liststr", func(le protocol.ListEncoder) { + for _, v := range s.ListStr { + le.ListAddValue(protocol.StringValue(*v)) + } + }, protocol.Metadata{}) + } + if len(s.ListFlatten) > 0 { + e.SetList(protocol.BodyTarget, "listFlatten", func(le protocol.ListEncoder) { + for _, v := range s.ListFlatten { + le.ListAddValue(protocol.StringValue(*v)) + } + }, protocol.Metadata{ + Flatten: true, + }) + } + if len(s.ListNamed) > 0 { + e.SetList(protocol.BodyTarget, "listNamed", func(le protocol.ListEncoder) { + for _, v := range s.ListNamed { + le.ListAddValue(protocol.StringValue(*v)) + } + }, protocol.Metadata{ + ListLocationName: "namedMember", + }) + } + if len(s.ListShape) > 0 { + e.SetList(protocol.BodyTarget, "listShape", encodeNestedShapeList(s.ListShape), protocol.Metadata{}) + } + if len(s.ListFlattenShape) > 0 { + e.SetList(protocol.BodyTarget, "listFlattenShape", encodeNestedShapeList(s.ListFlattenShape), protocol.Metadata{ + Flatten: true, + }) + } + if len(s.ListNamedShape) > 0 { + e.SetList(protocol.BodyTarget, "listNamedShape", encodeNestedShapeList(s.ListNamedShape), protocol.Metadata{ + ListLocationName: "namedMember", + }) + } + return nil +} + +type nestedShape struct { + Value *string + IntVal *int64 + Prefixed *string +} + +func (s *nestedShape) MarshalFields(e protocol.FieldEncoder) error { + if s.Value != nil { + e.SetValue(protocol.BodyTarget, "value", protocol.StringValue(*s.Value), protocol.Metadata{}) + } + if s.IntVal != nil { + e.SetValue(protocol.BodyTarget, "intval", protocol.Int64Value(*s.IntVal), protocol.Metadata{}) + } + if s.Prefixed != nil { + e.SetValue(protocol.BodyTarget, "prefixed", protocol.StringValue(*s.Prefixed), protocol.Metadata{}) + } + return nil +} +func encodeNestedShapeMap(vs map[string]*nestedShape) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} +func encodeNestedShapeList(vs []*nestedShape) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + +func encode(s baseShape) (io.ReadSeeker, error) { + e := NewEncoder() + s.MarshalFields(e) + return e.Encode() +} diff --git a/private/protocol/json/escape.go b/private/protocol/json/escape.go new file mode 100644 index 00000000000..d984d0cdca1 --- /dev/null +++ b/private/protocol/json/escape.go @@ -0,0 +1,198 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Copied and modified from Go 1.8 stdlib's encoding/json/#safeSet + +package json + +import ( + "bytes" + "unicode/utf8" +) + +// safeSet holds the value true if the ASCII character with the given array +// position can be represented inside a JSON string without any further +// escaping. +// +// All values are true except for the ASCII control characters (0-31), the +// double quote ("), and the backslash character ("\"). +var safeSet = [utf8.RuneSelf]bool{ + ' ': true, + '!': true, + '"': false, + '#': true, + '$': true, + '%': true, + '&': true, + '\'': true, + '(': true, + ')': true, + '*': true, + '+': true, + ',': true, + '-': true, + '.': true, + '/': true, + '0': true, + '1': true, + '2': true, + '3': true, + '4': true, + '5': true, + '6': true, + '7': true, + '8': true, + '9': true, + ':': true, + ';': true, + '<': true, + '=': true, + '>': true, + '?': true, + '@': true, + 'A': true, + 'B': true, + 'C': true, + 'D': true, + 'E': true, + 'F': true, + 'G': true, + 'H': true, + 'I': true, + 'J': true, + 'K': true, + 'L': true, + 'M': true, + 'N': true, + 'O': true, + 'P': true, + 'Q': true, + 'R': true, + 'S': true, + 'T': true, + 'U': true, + 'V': true, + 'W': true, + 'X': true, + 'Y': true, + 'Z': true, + '[': true, + '\\': false, + ']': true, + '^': true, + '_': true, + '`': true, + 'a': true, + 'b': true, + 'c': true, + 'd': true, + 'e': true, + 'f': true, + 'g': true, + 'h': true, + 'i': true, + 'j': true, + 'k': true, + 'l': true, + 'm': true, + 'n': true, + 'o': true, + 'p': true, + 'q': true, + 'r': true, + 's': true, + 't': true, + 'u': true, + 'v': true, + 'w': true, + 'x': true, + 'y': true, + 'z': true, + '{': true, + '|': true, + '}': true, + '~': true, + '\u007f': true, +} + +// copied from Go 1.8 stdlib's encoding/json/#hex +var hex = "0123456789abcdef" + +// escapeStringBytes escapes and writes the passed in string bytes to the dst +// buffer +// +// Copied and modifed from Go 1.8 stdlib's encodeing/json/#encodeState.stringBytes +func escapeStringBytes(e *bytes.Buffer, s []byte) { + e.WriteByte('"') + start := 0 + for i := 0; i < len(s); { + if b := s[i]; b < utf8.RuneSelf { + if safeSet[b] { + i++ + continue + } + if start < i { + e.Write(s[start:i]) + } + switch b { + case '\\', '"': + e.WriteByte('\\') + e.WriteByte(b) + case '\n': + e.WriteByte('\\') + e.WriteByte('n') + case '\r': + e.WriteByte('\\') + e.WriteByte('r') + case '\t': + e.WriteByte('\\') + e.WriteByte('t') + default: + // This encodes bytes < 0x20 except for \t, \n and \r. + // If escapeHTML is set, it also escapes <, >, and & + // because they can lead to security holes when + // user-controlled strings are rendered into JSON + // and served to some browsers. + e.WriteString(`\u00`) + e.WriteByte(hex[b>>4]) + e.WriteByte(hex[b&0xF]) + } + i++ + start = i + continue + } + c, size := utf8.DecodeRune(s[i:]) + if c == utf8.RuneError && size == 1 { + if start < i { + e.Write(s[start:i]) + } + e.WriteString(`\ufffd`) + i += size + start = i + continue + } + // U+2028 is LINE SEPARATOR. + // U+2029 is PARAGRAPH SEPARATOR. + // They are both technically valid characters in JSON strings, + // but don't work in JSONP, which has to be evaluated as JavaScript, + // and can lead to security holes there. It is valid JSON to + // escape them, so we do so unconditionally. + // See http://timelessrepo.com/json-isnt-a-javascript-subset for discussion. + if c == '\u2028' || c == '\u2029' { + if start < i { + e.Write(s[start:i]) + } + e.WriteString(`\u202`) + e.WriteByte(hex[c&0xF]) + i += size + start = i + continue + } + i += size + } + if start < len(s) { + e.Write(s[start:]) + } + e.WriteByte('"') +} diff --git a/private/protocol/metadata.go b/private/protocol/metadata.go new file mode 100644 index 00000000000..3a94fd02f0f --- /dev/null +++ b/private/protocol/metadata.go @@ -0,0 +1,24 @@ +package protocol + +// An Attribute is a FieldValue that resides within the imediant context of +// another field. Such as XML attribute for tags. +type Attribute struct { + Name string + Value ValueMarshaler + Meta Metadata +} + +// Metadata is a collection of configuration flags for encoders to render the +// output. +type Metadata struct { + Attributes []Attribute + + Flatten bool + + ListLocationName string + MapLocationNameKey string + MapLocationNameValue string + + XMLNamespacePrefix string + XMLNamespaceURI string +} diff --git a/private/protocol/path_replace.go b/private/protocol/path_replace.go new file mode 100644 index 00000000000..ae64a17dbf8 --- /dev/null +++ b/private/protocol/path_replace.go @@ -0,0 +1,136 @@ +package protocol + +import ( + "bytes" + "fmt" +) + +const ( + uriTokenStart = '{' + uriTokenStop = '}' + uriTokenSkip = '+' +) + +func bufCap(b []byte, n int) []byte { + if cap(b) < n { + return make([]byte, 0, n) + } + + return b[0:0] +} + +// PathReplace replaces path elements using field buffers +type PathReplace struct { + // May mutate path slice + path []byte + rawPath []byte + fieldBuf []byte +} + +// NewPathReplace creats a built PathReplace value that can be used to replace +// path elements. +func NewPathReplace(path string) PathReplace { + return PathReplace{ + path: []byte(path), + rawPath: []byte(path), + } +} + +// Encode returns an unescaped path, and escaped path. +func (r *PathReplace) Encode() (path string, rawPath string) { + return string(r.path), string(r.rawPath) +} + +// ReplaceElement replaces a single element in the path string. +func (r *PathReplace) ReplaceElement(key, val string) (err error) { + r.path, r.fieldBuf, err = replacePathElement(r.path, r.fieldBuf, key, val, false) + r.rawPath, r.fieldBuf, err = replacePathElement(r.rawPath, r.fieldBuf, key, val, true) + return err +} + +func replacePathElement(path, fieldBuf []byte, key, val string, escape bool) ([]byte, []byte, error) { + fieldBuf = bufCap(fieldBuf, len(key)+3) // { [+] } + fieldBuf = append(fieldBuf, uriTokenStart) + fieldBuf = append(fieldBuf, key...) + + start := bytes.Index(path, fieldBuf) + end := start + len(fieldBuf) + if start < 0 || len(path[end:]) == 0 { + // TODO what to do about error? + return path, fieldBuf, fmt.Errorf("invalid path index, start=%d,end=%d. %s", start, end, path) + } + + encodeSep := true + if path[end] == uriTokenSkip { + // '+' token means do not escape slashes + encodeSep = false + end++ + } + + if escape { + val = escapePath(val, encodeSep) + } + + if path[end] != uriTokenStop { + return path, fieldBuf, fmt.Errorf("invalid path element, does not contain token stop, %s", path) + } + end++ + + fieldBuf = bufCap(fieldBuf, len(val)) + fieldBuf = append(fieldBuf, val...) + + keyLen := end - start + valLen := len(fieldBuf) + + if keyLen == valLen { + copy(path[start:], fieldBuf) + return path, fieldBuf, nil + } + + newLen := len(path) + (valLen - keyLen) + if len(path) < newLen { + path = path[:cap(path)] + } + if cap(path) < newLen { + newURI := make([]byte, newLen) + copy(newURI, path) + path = newURI + } + + // shift + copy(path[start+valLen:], path[end:]) + path = path[:newLen] + copy(path[start:], fieldBuf) + + return path, fieldBuf, nil +} + +// copied from rest.EscapePath +// escapes part of a URL path in Amazon style +func escapePath(path string, encodeSep bool) string { + var buf bytes.Buffer + for i := 0; i < len(path); i++ { + c := path[i] + if noEscape[c] || (c == '/' && !encodeSep) { + buf.WriteByte(c) + } else { + fmt.Fprintf(&buf, "%%%02X", c) + } + } + return buf.String() +} + +var noEscape [256]bool + +func init() { + for i := 0; i < len(noEscape); i++ { + // AWS expects every character except these to be escaped + noEscape[i] = (i >= 'A' && i <= 'Z') || + (i >= 'a' && i <= 'z') || + (i >= '0' && i <= '9') || + i == '-' || + i == '.' || + i == '_' || + i == '~' + } +} diff --git a/private/protocol/path_replace_test.go b/private/protocol/path_replace_test.go new file mode 100644 index 00000000000..e1e4f385885 --- /dev/null +++ b/private/protocol/path_replace_test.go @@ -0,0 +1,74 @@ +package protocol + +import "testing" + +func TestPathReplace(t *testing.T) { + cases := []struct { + Orig, ExpPath, ExpRawPath, Key, Val string + }{ + { + Orig: "/{bucket}/{key+}", + ExpPath: "/123/{key+}", + ExpRawPath: "/123/{key+}", + Key: "bucket", Val: "123", + }, + { + Orig: "/{bucket}/{key+}", + ExpPath: "/{bucket}/abc", + ExpRawPath: "/{bucket}/abc", + Key: "key", Val: "abc", + }, + { + Orig: "/{bucket}/{key+}", + ExpPath: "/{bucket}/a/b/c", + ExpRawPath: "/{bucket}/a/b/c", + Key: "key", Val: "a/b/c", + }, + { + Orig: "/{bucket}/{key+}", + ExpPath: "/1/2/3/{key+}", + ExpRawPath: "/1%2F2%2F3/{key+}", + Key: "bucket", Val: "1/2/3", + }, + { + Orig: "/{bucket}/{key+}", + ExpPath: "/reallylongvaluegoesheregrowingarray/{key+}", + ExpRawPath: "/reallylongvaluegoesheregrowingarray/{key+}", + Key: "bucket", Val: "reallylongvaluegoesheregrowingarray", + }, + } + + for i, c := range cases { + r := NewPathReplace(c.Orig) + + r.ReplaceElement(c.Key, c.Val) + path, rawPath := r.Encode() + if e, a := c.ExpPath, path; a != e { + t.Errorf("%d, expect uri path to be %q got %q", i, e, a) + } + if e, a := c.ExpRawPath, rawPath; a != e { + t.Errorf("%d, expect uri raw path to be %q got %q", i, e, a) + } + } +} + +func TestPathReplace_Multiple(t *testing.T) { + const ( + origURI = "/{bucket}/{key+}" + expPath = "/something/123/other/thing" + expRawPath = "/something%2F123/other/thing" + ) + + r := NewPathReplace(origURI) + + r.ReplaceElement("bucket", "something/123") + r.ReplaceElement("key", "other/thing") + + path, rawPath := r.Encode() + if e, a := expPath, path; a != e { + t.Errorf("expect uri path to be %q got %q", e, a) + } + if e, a := expRawPath, rawPath; a != e { + t.Errorf("expect uri path to be %q got %q", e, a) + } +} diff --git a/private/protocol/query_encoder.go b/private/protocol/query_encoder.go new file mode 100644 index 00000000000..72dc75a9a29 --- /dev/null +++ b/private/protocol/query_encoder.go @@ -0,0 +1,105 @@ +package protocol + +import ( + "fmt" + "net/url" +) + +// QueryMapEncoder builds a query string. +type QueryMapEncoder struct { + Prefix string + Query url.Values + Err error +} + +// MapSetValue adds a single value to the query. +func (e *QueryMapEncoder) MapSetValue(k string, v ValueMarshaler) { + if e.Err != nil { + return + } + + str, err := v.MarshalValue() + if err != nil { + e.Err = err + return + } + + if len(e.Prefix) > 0 { + k = e.Prefix + k + } + + e.Query.Add(k, str) +} + +// MapSetList executes the passed in callback with a list encoder based on +// the context of this QueryMapEncoder. +func (e *QueryMapEncoder) MapSetList(k string, fn func(le ListEncoder)) { + if e.Err != nil { + return + } + + if len(e.Prefix) > 0 { + k = e.Prefix + k + } + + nested := QueryListEncoder{Key: k, Query: e.Query} + fn(&nested) + e.Err = nested.Err +} + +// MapSetMap sets the query string element with nested maps appending the +// passed in k to the prefix if one was set. +func (e *QueryMapEncoder) MapSetMap(k string, fn func(me MapEncoder)) { + if e.Err != nil { + return + } + + if len(e.Prefix) > 0 { + k = e.Prefix + k + } + + nested := QueryMapEncoder{Prefix: k, Query: e.Query} + e.Err = nested.Err +} + +// MapSetFields Is not implemented, query map of map is undefined. +func (e *QueryMapEncoder) MapSetFields(k string, m FieldMarshaler) { + e.Err = fmt.Errorf("query map encoder MapSetFields not supported, %s", e.Prefix) +} + +// QueryListEncoder will encode list values nested into a query key. +type QueryListEncoder struct { + Key string + Query url.Values + Err error +} + +// ListAddValue encodes an individual list value into the querystring. +func (e *QueryListEncoder) ListAddValue(v ValueMarshaler) { + if e.Err != nil { + return + } + + str, err := v.MarshalValue() + if err != nil { + e.Err = err + return + } + + e.Query.Add(e.Key, str) +} + +// ListAddList Is not implemented, query list of list is undefined. +func (e *QueryListEncoder) ListAddList(fn func(le ListEncoder)) { + e.Err = fmt.Errorf("query list encoder ListAddList not supported, %s", e.Key) +} + +// ListAddMap Is not implemented, query list of map is undefined. +func (e *QueryListEncoder) ListAddMap(fn func(fe MapEncoder)) { + e.Err = fmt.Errorf("query list encoder ListAddMap not supported, %s", e.Key) +} + +// ListAddFields Is not implemented, query list of FieldMarshaler is undefined. +func (e *QueryListEncoder) ListAddFields(m FieldMarshaler) { + e.Err = fmt.Errorf("query list encoder ListAddFields not supported, %s", e.Key) +} diff --git a/private/protocol/rest/encode.go b/private/protocol/rest/encode.go new file mode 100644 index 00000000000..b5ab6740b2d --- /dev/null +++ b/private/protocol/rest/encode.go @@ -0,0 +1,150 @@ +package rest + +import ( + "fmt" + "io" + "net/http" + "net/url" + + "github.com/aws/aws-sdk-go/private/protocol" +) + +// An Encoder provides encoding of REST URI path, query, and header components +// of an HTTP request. Can also encode a stream as the payload. +// +// Does not support SetFields. +type Encoder struct { + req *http.Request + + path protocol.PathReplace + + query url.Values + header http.Header + + payload io.ReadSeeker + + err error +} + +// NewEncoder creates a new encoder from the passed in request. All query and +// header values will be added on top of the request's existing values. Overwriting +// duplicate values. +func NewEncoder(req *http.Request) *Encoder { + e := &Encoder{ + req: req, + + path: protocol.NewPathReplace(req.URL.Path), + query: req.URL.Query(), + header: req.Header, + } + + return e +} + +// Encode will return the request and body if one was set. If the body +// payload was not set the io.ReadSeeker will be nil. +// +// returns any error if one occured while encoding the API's parameters. +func (e *Encoder) Encode() (*http.Request, io.ReadSeeker, error) { + if e.err != nil { + return nil, nil, e.err + } + + e.req.URL.Path, e.req.URL.RawPath = e.path.Encode() + e.req.URL.RawQuery = e.query.Encode() + e.req.Header = e.header + + return e.req, e.payload, nil +} + +// SetValue will set a value to the header, path, query. +// +// If the request's method is GET all BodyTarget values will be written to +// the query string. +func (e *Encoder) SetValue(t protocol.Target, k string, v protocol.ValueMarshaler, meta protocol.Metadata) { + if e.err != nil { + return + } + + var str string + str, e.err = v.MarshalValue() + if e.err != nil { + return + } + + switch t { + case protocol.HeaderTarget: + e.header.Set(k, str) + case protocol.PathTarget: + e.path.ReplaceElement(k, str) + case protocol.QueryTarget: + e.query.Set(k, str) + case protocol.BodyTarget: + if e.req.Method != "GET" { + e.err = fmt.Errorf("body target not supported for rest non-GET methods %s, %s", t, k) + return + } + e.query.Set(k, str) + default: + e.err = fmt.Errorf("unknown SetValue rest encode target, %s, %s", t, k) + } +} + +// SetStream will set the stream to the payload of the request. +func (e *Encoder) SetStream(t protocol.Target, k string, v protocol.StreamMarshaler, meta protocol.Metadata) { + if e.err != nil { + return + } + + switch t { + case protocol.PayloadTarget: + e.payload, e.err = v.MarshalStream() + default: + e.err = fmt.Errorf("unknown SetStream rest encode target, %s, %s", t, k) + } +} + +// SetList will set the nested list values to the header or query. +func (e *Encoder) SetList(t protocol.Target, k string, fn func(le protocol.ListEncoder), meta protocol.Metadata) { + if e.err != nil { + return + } + + switch t { + case protocol.QueryTarget: + nested := protocol.QueryListEncoder{Key: k, Query: e.query} + fn(&nested) + e.err = nested.Err + case protocol.HeaderTarget: + nested := protocol.HeaderListEncoder{Key: k, Header: e.header} + fn(&nested) + e.err = nested.Err + default: + e.err = fmt.Errorf("unknown SetList rest encode target, %s, %s", t, k) + } +} + +// SetMap will set the nested map values to the header or query. +func (e *Encoder) SetMap(t protocol.Target, k string, fn func(fe protocol.MapEncoder), meta protocol.Metadata) { + if e.err != nil { + return + } + + switch t { + case protocol.QueryTarget: + nested := protocol.QueryMapEncoder{Query: e.query} + fn(&nested) + e.err = nested.Err + case protocol.HeadersTarget: + nested := protocol.HeaderMapEncoder{Prefix: k, Header: e.header} + fn(&nested) + e.err = nested.Err + default: + e.err = fmt.Errorf("unknown SetMap rest encode target, %s, %s", t, k) + } +} + +// SetFields is not supported for REST encoder. +func (e *Encoder) SetFields(t protocol.Target, k string, m protocol.FieldMarshaler, meta protocol.Metadata) { + e.err = fmt.Errorf("rest encoder SetFields not supported, %s, %s", t, k) +} diff --git a/private/protocol/rest/encode_test.go b/private/protocol/rest/encode_test.go new file mode 100644 index 00000000000..488abf1b131 --- /dev/null +++ b/private/protocol/rest/encode_test.go @@ -0,0 +1,357 @@ +package rest + +import ( + "io" + "io/ioutil" + "net/http" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/private/protocol" +) + +type shape struct { + HeaderValue *string + PathValue *string + QueryValue *string + QueryList []*string + HeadersMap map[string]*string + QueryMap map[string]*string + QueryMapList map[string][]*string + BodyValue *string + PayloadString *string + PayloadBytes []byte + PayloadReader io.ReadSeeker +} + +func (s *shape) MarshalAWS(e protocol.FieldEncoder) { + if s.HeaderValue != nil { + e.SetValue(protocol.HeaderTarget, "header-value", protocol.StringValue(*s.HeaderValue), protocol.Metadata{}) + } + if s.PathValue != nil { + e.SetValue(protocol.PathTarget, "key", protocol.StringValue(*s.PathValue), protocol.Metadata{}) + } + if s.QueryValue != nil { + e.SetValue(protocol.QueryTarget, "queryKey", protocol.StringValue(*s.QueryValue), protocol.Metadata{}) + } + if len(s.QueryList) > 0 { + e.SetList(protocol.QueryTarget, "queryKey", func(le protocol.ListEncoder) { + for _, v := range s.QueryList { + le.ListAddValue(protocol.StringValue(*v)) + } + }, protocol.Metadata{}) + } + if len(s.HeadersMap) > 0 { + e.SetMap(protocol.HeadersTarget, "prefix-", func(me protocol.MapEncoder) { + for k, v := range s.HeadersMap { + me.MapSetValue(k, protocol.StringValue(*v)) + } + }, protocol.Metadata{}) + } + if len(s.QueryMap) > 0 { + e.SetMap(protocol.QueryTarget, "unused", func(me protocol.MapEncoder) { + for k, v := range s.QueryMap { + me.MapSetValue(k, protocol.StringValue(*v)) + } + }, protocol.Metadata{}) + } + if len(s.QueryMapList) > 0 { + e.SetMap(protocol.QueryTarget, "unused", func(me protocol.MapEncoder) { + for k, v := range s.QueryMapList { + me.MapSetList(k, func(le protocol.ListEncoder) { + for _, v := range v { + le.ListAddValue(protocol.StringValue(*v)) + } + }) + } + }, protocol.Metadata{}) + } + if s.BodyValue != nil { + e.SetValue(protocol.BodyTarget, "bodyValue", protocol.StringValue(*s.BodyValue), protocol.Metadata{}) + } + if s.PayloadString != nil { + e.SetStream(protocol.PayloadTarget, "payloadString", protocol.StringStream(*s.PayloadString), protocol.Metadata{}) + } + if s.PayloadBytes != nil { + e.SetStream(protocol.PayloadTarget, "payloadBytes", protocol.BytesStream(s.PayloadBytes), protocol.Metadata{}) + } + if s.PayloadReader != nil { + e.SetStream(protocol.PayloadTarget, "payloadReader", protocol.ReadSeekerStream{V: s.PayloadReader}, protocol.Metadata{}) + } +} + +func TestSetHeaderValue(t *testing.T) { + req, body, err := encode("GET", "/path", shape{ + HeaderValue: aws.String("thevalue"), + }) + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if body != nil { + t.Errorf("expect no body, got %v", body) + } + + if e, a := "thevalue", req.Header.Get("header-value"); e != a { + t.Errorf("expect %s header value, got %s", e, a) + } +} + +func TestSetPathValue(t *testing.T) { + req, body, err := encode("GET", "/{key}", shape{ + PathValue: aws.String("value"), + }) + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if body != nil { + t.Errorf("expect no body, got %v", body) + } + + if e, a := "/value", req.URL.Path; e != a { + t.Errorf("expect %s path, got %s", e, a) + } +} + +func TestSetQueryValue(t *testing.T) { + req, body, err := encode("GET", "/path", shape{ + QueryValue: aws.String("queryValue"), + }) + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if body != nil { + t.Errorf("expect no body, got %v", body) + } + + query := req.URL.Query() + if e, a := 1, len(query); e != a { + t.Errorf("expect %d query values, got %d", e, a) + } + if e, a := "queryValue", query.Get("queryKey"); e != a { + t.Errorf("expect %s for 'queryKey' querystring, got %s", e, a) + } +} + +func TestSetBody(t *testing.T) { + req, body, err := encode("GET", "/path", shape{ + BodyValue: aws.String("a value"), + }) + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if body != nil { + t.Errorf("expect no body, got %v", body) + } + + query := req.URL.Query() + if e, a := 1, len(query); e != a { + t.Errorf("expect %d query values, got %d", e, a) + } + if e, a := "a value", query.Get("bodyValue"); e != a { + t.Errorf("expect %s for 'bodyValue' querystring, got %s", e, a) + } +} + +func TestSetBody_Error(t *testing.T) { + req, body, err := encode("POST", "/path", shape{ + BodyValue: aws.String("a value"), + }) + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "body target not supported", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %q to be in error %q, was not", e, a) + } + + if body != nil { + t.Errorf("expect no body, got %v", body) + } + if req != nil { + t.Errorf("expect no req, got %v", req) + } +} + +func TestSetQueryList(t *testing.T) { + req, body, err := encode("GET", "/path", shape{ + QueryList: []*string{aws.String("a"), aws.String("b")}, + }) + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if body != nil { + t.Errorf("expect no body, got %v", body) + } + + query := req.URL.Query() + if e, a := 1, len(query); e != a { + t.Errorf("expect %d query values, got %d", e, a) + } + vs, ok := query["queryKey"] + if !ok { + t.Fatalf("expect queryKey to exist, was not found") + } + for i, v := range []string{"a", "b"} { + if e, a := v, vs[i]; e != a { + t.Errorf("expect %s for 'queryKey[%d]' querystring, got %s", e, i, a) + } + } +} + +func TestSetHeadersMap(t *testing.T) { + req, body, err := encode("GET", "/path", shape{ + HeadersMap: map[string]*string{ + "abc": aws.String("123"), + "else": aws.String("other"), + }, + }) + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if body != nil { + t.Errorf("expect no body, got %v", body) + } + + if e, a := 2, len(req.Header); e != a { + t.Errorf("expect %d header values, got %d", e, a) + } + for k, v := range map[string]string{"abc": "123", "else": "other"} { + if e, a := v, req.Header.Get("prefix-"+k); e != a { + t.Errorf("expect %s for 'prefix-%s' header, got %s", e, k, a) + } + } +} + +func TestSetQueryMap(t *testing.T) { + req, body, err := encode("GET", "/path", shape{ + QueryMap: map[string]*string{ + "a": aws.String("abc"), + "b": aws.String("123"), + }, + }) + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if body != nil { + t.Errorf("expect no body, got %v", body) + } + + query := req.URL.Query() + if e, a := 2, len(query); e != a { + t.Errorf("expect %d query values, got %d", e, a) + } + for k, v := range map[string]string{"a": "abc", "b": "123"} { + if e, a := v, query.Get(k); e != a { + t.Errorf("expect %s for '%s' querystring, got %s", e, k, a) + } + } +} + +func TestSetQueryMapList(t *testing.T) { + req, body, err := encode("GET", "/path", shape{ + QueryMapList: map[string][]*string{ + "a": {aws.String("a1"), aws.String("a2")}, + "b": {aws.String("b1"), aws.String("b2")}, + }, + }) + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + if body != nil { + t.Errorf("expect no body, got %v", body) + } + + query := req.URL.Query() + if e, a := 2, len(query); e != a { + t.Errorf("expect %d query values, got %d", e, a) + } + for k, vs := range map[string][]string{"a": []string{"a1", "a2"}, "b": []string{"b1", "b2"}} { + as, ok := query[k] + if !ok { + t.Fatalf("expect %s to exist, was not", k) + } + for i, v := range vs { + if e, a := v, as[i]; e != a { + t.Errorf("expect %s for '%s' querystring, got %s", e, k, a) + } + } + } +} + +func TestSetPayloadString(t *testing.T) { + _, body, err := encode("POST", "/path", shape{ + PayloadString: aws.String("a value"), + }) + + if err != nil { + t.Fatalf("expect no encode error, got %v", err) + } + if body == nil { + t.Fatalf("expect body, got none") + } + + b, err := ioutil.ReadAll(body) + if err != nil { + t.Fatalf("expect no body read error, got %v", err) + } + if e, a := "a value", string(b); e != a { + t.Errorf("expect %s body, got %s", e, a) + } +} +func TestSetPayloadBytes(t *testing.T) { + _, body, err := encode("POST", "/path", shape{ + PayloadBytes: []byte("a value"), + }) + + if err != nil { + t.Fatalf("expect no encode error, got %v", err) + } + if body == nil { + t.Fatalf("expect body, got none") + } + + b, err := ioutil.ReadAll(body) + if err != nil { + t.Fatalf("expect no body read error, got %v", err) + } + if e, a := "a value", string(b); e != a { + t.Errorf("expect %s body, got %s", e, a) + } +} +func TestSetPayloadReader(t *testing.T) { + _, body, err := encode("POST", "/path", shape{ + PayloadReader: strings.NewReader("a value"), + }) + + if err != nil { + t.Fatalf("expect no encode error, got %v", err) + } + if body == nil { + t.Fatalf("expect body, got none") + } + + b, err := ioutil.ReadAll(body) + if err != nil { + t.Fatalf("expect no body read error, got %v", err) + } + if e, a := "a value", string(b); e != a { + t.Errorf("expect %s body, got %s", e, a) + } +} + +func encode(method, path string, s shape) (*http.Request, io.ReadSeeker, error) { + origReq, _ := http.NewRequest(method, "https://service.amazonaws.com"+path, nil) + + e := NewEncoder(origReq) + s.MarshalAWS(e) + return e.Encode() +} diff --git a/private/protocol/restjson/build_test.go b/private/protocol/restjson/build_test.go index 100b6ded943..916d4f315cf 100644 --- a/private/protocol/restjson/build_test.go +++ b/private/protocol/restjson/build_test.go @@ -178,10 +178,22 @@ type InputService1TestShapeInputService1TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService1TestShapeInputService1TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService1TestShapeInputService1TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService1TestShapeInputService1TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService2ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -324,10 +336,27 @@ func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetPipeline return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService2TestShapeInputService2TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.PipelineId != nil { + v := *s.PipelineId + + e.SetValue(protocol.PathTarget, "PipelineId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService2TestShapeInputService2TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService2TestShapeInputService2TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService3ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -470,10 +499,27 @@ func (s *InputService3TestShapeInputService3TestCaseOperation1Input) SetFoo(v st return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService3TestShapeInputService3TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := *s.Foo + + e.SetValue(protocol.PathTarget, "PipelineId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService3TestShapeInputService3TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService3TestShapeInputService3TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService4ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -616,10 +662,27 @@ func (s *InputService4TestShapeInputService4TestCaseOperation1Input) SetItems(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService4TestShapeInputService4TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.QueryTarget, "item", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + type InputService4TestShapeInputService4TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService4TestShapeInputService4TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService5ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -770,10 +833,32 @@ func (s *InputService5TestShapeInputService5TestCaseOperation1Input) SetQueryDoc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService5TestShapeInputService5TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.PipelineId != nil { + v := *s.PipelineId + + e.SetValue(protocol.PathTarget, "PipelineId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.QueryDoc) > 0 { + v := s.QueryDoc + + e.SetMap(protocol.QueryTarget, "QueryDoc", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + type InputService5TestShapeInputService5TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService5TestShapeInputService5TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService6ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -924,10 +1009,37 @@ func (s *InputService6TestShapeInputService6TestCaseOperation1Input) SetQueryDoc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService6TestShapeInputService6TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.PipelineId != nil { + v := *s.PipelineId + + e.SetValue(protocol.PathTarget, "PipelineId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.QueryDoc) > 0 { + v := s.QueryDoc + + e.SetMap(protocol.QueryTarget, "QueryDoc", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + + return nil +} + type InputService6TestShapeInputService6TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService6TestShapeInputService6TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService7ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1133,6 +1245,12 @@ type InputService7TestShapeInputService7TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService7TestShapeInputService7TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService7TestShapeInputService7TestCaseOperation2Input struct { _ struct{} `type:"structure"` @@ -1145,10 +1263,27 @@ func (s *InputService7TestShapeInputService7TestCaseOperation2Input) SetBoolQuer return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService7TestShapeInputService7TestCaseOperation2Input) MarshalFields(e protocol.FieldEncoder) error { + if s.BoolQuery != nil { + v := *s.BoolQuery + + e.SetValue(protocol.QueryTarget, "bool-query", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService7TestShapeInputService7TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService7TestShapeInputService7TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService8ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1307,10 +1442,37 @@ func (s *InputService8TestShapeInputService8TestCaseOperation1Input) SetPipeline return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService8TestShapeInputService8TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Ascending != nil { + v := *s.Ascending + + e.SetValue(protocol.QueryTarget, "Ascending", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageToken != nil { + v := *s.PageToken + + e.SetValue(protocol.QueryTarget, "PageToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PipelineId != nil { + v := *s.PipelineId + + e.SetValue(protocol.PathTarget, "PipelineId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService8TestShapeInputService8TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService8TestShapeInputService8TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService9ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1477,10 +1639,42 @@ func (s *InputService9TestShapeInputService9TestCaseOperation1Input) SetPipeline return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService9TestShapeInputService9TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Ascending != nil { + v := *s.Ascending + + e.SetValue(protocol.QueryTarget, "Ascending", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Config != nil { + v := s.Config + + e.SetFields(protocol.BodyTarget, "Config", v, protocol.Metadata{}) + } + if s.PageToken != nil { + v := *s.PageToken + + e.SetValue(protocol.QueryTarget, "PageToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PipelineId != nil { + v := *s.PipelineId + + e.SetValue(protocol.PathTarget, "PipelineId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService9TestShapeInputService9TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService9TestShapeInputService9TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService9TestShapeStructType struct { _ struct{} `type:"structure"` @@ -1501,6 +1695,22 @@ func (s *InputService9TestShapeStructType) SetB(v string) *InputService9TestShap return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService9TestShapeStructType) MarshalFields(e protocol.FieldEncoder) error { + if s.A != nil { + v := *s.A + + e.SetValue(protocol.BodyTarget, "A", protocol.StringValue(v), protocol.Metadata{}) + } + if s.B != nil { + v := *s.B + + e.SetValue(protocol.BodyTarget, "B", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // InputService10ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1675,10 +1885,47 @@ func (s *InputService10TestShapeInputService10TestCaseOperation1Input) SetPipeli return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService10TestShapeInputService10TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Ascending != nil { + v := *s.Ascending + + e.SetValue(protocol.QueryTarget, "Ascending", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.HeaderTarget, "x-amz-checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Config != nil { + v := s.Config + + e.SetFields(protocol.BodyTarget, "Config", v, protocol.Metadata{}) + } + if s.PageToken != nil { + v := *s.PageToken + + e.SetValue(protocol.QueryTarget, "PageToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PipelineId != nil { + v := *s.PipelineId + + e.SetValue(protocol.PathTarget, "PipelineId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService10TestShapeInputService10TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService10TestShapeInputService10TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService10TestShapeStructType struct { _ struct{} `type:"structure"` @@ -1699,6 +1946,22 @@ func (s *InputService10TestShapeStructType) SetB(v string) *InputService10TestSh return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService10TestShapeStructType) MarshalFields(e protocol.FieldEncoder) error { + if s.A != nil { + v := *s.A + + e.SetValue(protocol.BodyTarget, "A", protocol.StringValue(v), protocol.Metadata{}) + } + if s.B != nil { + v := *s.B + + e.SetValue(protocol.BodyTarget, "B", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // InputService11ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1871,10 +2134,37 @@ func (s *InputService11TestShapeInputService11TestCaseOperation1Input) SetVaultN return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService11TestShapeInputService11TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := s.Body + + e.SetStream(protocol.PayloadTarget, "body", protocol.ReadSeekerStream{V: v}, protocol.Metadata{}) + } + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.HeaderTarget, "x-amz-sha256-tree-hash", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService11TestShapeInputService11TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService11TestShapeInputService11TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService12ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -2040,10 +2330,32 @@ func (s *InputService12TestShapeInputService12TestCaseOperation1Input) SetFoo(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService12TestShapeInputService12TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Bar != nil { + v := s.Bar + + e.SetValue(protocol.BodyTarget, "Bar", protocol.BytesValue(v), protocol.Metadata{}) + } + if s.Foo != nil { + v := *s.Foo + + e.SetValue(protocol.PathTarget, "Foo", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService12TestShapeInputService12TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService12TestShapeInputService12TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService13ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -2249,6 +2561,12 @@ type InputService13TestShapeInputService13TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService13TestShapeInputService13TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService13TestShapeInputService13TestCaseOperation2Input struct { _ struct{} `type:"structure" payload:"Foo"` @@ -2261,10 +2579,27 @@ func (s *InputService13TestShapeInputService13TestCaseOperation2Input) SetFoo(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService13TestShapeInputService13TestCaseOperation2Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := s.Foo + + e.SetStream(protocol.PayloadTarget, "foo", protocol.BytesStream(v), protocol.Metadata{}) + } + + return nil +} + type InputService13TestShapeInputService13TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService13TestShapeInputService13TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService14ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -2478,10 +2813,27 @@ func (s *InputService14TestShapeFooShape) SetBaz(v string) *InputService14TestSh return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService14TestShapeFooShape) MarshalFields(e protocol.FieldEncoder) error { + if s.Baz != nil { + v := *s.Baz + + e.SetValue(protocol.BodyTarget, "baz", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService14TestShapeInputService14TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService14TestShapeInputService14TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService14TestShapeInputService14TestCaseOperation2Input struct { _ struct{} `type:"structure" payload:"Foo"` @@ -2494,10 +2846,27 @@ func (s *InputService14TestShapeInputService14TestCaseOperation2Input) SetFoo(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService14TestShapeInputService14TestCaseOperation2Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := s.Foo + + e.SetFields(protocol.PayloadTarget, "foo", v, protocol.Metadata{}) + } + + return nil +} + type InputService14TestShapeInputService14TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService14TestShapeInputService14TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService15ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -2703,6 +3072,12 @@ type InputService15TestShapeInputService15TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService15TestShapeInputService15TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService15TestShapeInputService15TestCaseOperation2Input struct { _ struct{} `type:"structure"` @@ -2715,10 +3090,27 @@ func (s *InputService15TestShapeInputService15TestCaseOperation2Input) SetFoo(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService15TestShapeInputService15TestCaseOperation2Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := *s.Foo + + e.SetValue(protocol.QueryTarget, "param-name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService15TestShapeInputService15TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService15TestShapeInputService15TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService16ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -3208,22 +3600,52 @@ type InputService16TestShapeInputService16TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService16TestShapeInputService16TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService16TestShapeInputService16TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService16TestShapeInputService16TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService16TestShapeInputService16TestCaseOperation3Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService16TestShapeInputService16TestCaseOperation3Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService16TestShapeInputService16TestCaseOperation4Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService16TestShapeInputService16TestCaseOperation4Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService16TestShapeInputService16TestCaseOperation5Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService16TestShapeInputService16TestCaseOperation5Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService16TestShapeInputService16TestCaseOperation6Input struct { _ struct{} `type:"structure"` @@ -3236,10 +3658,27 @@ func (s *InputService16TestShapeInputService16TestCaseOperation6Input) SetRecurs return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService16TestShapeInputService16TestCaseOperation6Input) MarshalFields(e protocol.FieldEncoder) error { + if s.RecursiveStruct != nil { + v := s.RecursiveStruct + + e.SetFields(protocol.BodyTarget, "RecursiveStruct", v, protocol.Metadata{}) + } + + return nil +} + type InputService16TestShapeInputService16TestCaseOperation6Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService16TestShapeInputService16TestCaseOperation6Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService16TestShapeRecursiveStructType struct { _ struct{} `type:"structure"` @@ -3276,6 +3715,48 @@ func (s *InputService16TestShapeRecursiveStructType) SetRecursiveStruct(v *Input return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService16TestShapeRecursiveStructType) MarshalFields(e protocol.FieldEncoder) error { + if s.NoRecurse != nil { + v := *s.NoRecurse + + e.SetValue(protocol.BodyTarget, "NoRecurse", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.RecursiveList) > 0 { + v := s.RecursiveList + + e.SetList(protocol.BodyTarget, "RecursiveList", encodeInputService16TestShapeRecursiveStructTypeList(v), protocol.Metadata{}) + } + if len(s.RecursiveMap) > 0 { + v := s.RecursiveMap + + e.SetMap(protocol.BodyTarget, "RecursiveMap", encodeInputService16TestShapeRecursiveStructTypeMap(v), protocol.Metadata{}) + } + if s.RecursiveStruct != nil { + v := s.RecursiveStruct + + e.SetFields(protocol.BodyTarget, "RecursiveStruct", v, protocol.Metadata{}) + } + + return nil +} + +func encodeInputService16TestShapeRecursiveStructTypeList(vs []*InputService16TestShapeRecursiveStructType) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + +func encodeInputService16TestShapeRecursiveStructTypeMap(vs map[string]*InputService16TestShapeRecursiveStructType) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // InputService17ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -3481,6 +3962,12 @@ type InputService17TestShapeInputService17TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService17TestShapeInputService17TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService17TestShapeInputService17TestCaseOperation2Input struct { _ struct{} `type:"structure"` @@ -3501,10 +3988,32 @@ func (s *InputService17TestShapeInputService17TestCaseOperation2Input) SetTimeAr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService17TestShapeInputService17TestCaseOperation2Input) MarshalFields(e protocol.FieldEncoder) error { + if s.TimeArg != nil { + v := *s.TimeArg + + e.SetValue(protocol.BodyTarget, "TimeArg", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.TimeArgInHeader != nil { + v := *s.TimeArgInHeader + + e.SetValue(protocol.HeaderTarget, "x-amz-timearg", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + + return nil +} + type InputService17TestShapeInputService17TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService17TestShapeInputService17TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService18ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -3647,10 +4156,27 @@ func (s *InputService18TestShapeInputService18TestCaseOperation1Input) SetTimeAr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService18TestShapeInputService18TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.TimeArg != nil { + v := *s.TimeArg + + e.SetValue(protocol.BodyTarget, "timestamp_location", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + + return nil +} + type InputService18TestShapeInputService18TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService18TestShapeInputService18TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService19ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -3793,10 +4319,27 @@ func (s *InputService19TestShapeInputService19TestCaseOperation1Input) SetFoo(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService19TestShapeInputService19TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := *s.Foo + + e.SetStream(protocol.PayloadTarget, "foo", protocol.StringStream(v), protocol.Metadata{}) + } + + return nil +} + type InputService19TestShapeInputService19TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService19TestShapeInputService19TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService20ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -4002,6 +4545,12 @@ type InputService20TestShapeInputService20TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService20TestShapeInputService20TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService20TestShapeInputService20TestCaseOperation2Input struct { _ struct{} `type:"structure"` @@ -4014,10 +4563,33 @@ func (s *InputService20TestShapeInputService20TestCaseOperation2Input) SetToken( return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService20TestShapeInputService20TestCaseOperation2Input) MarshalFields(e protocol.FieldEncoder) error { + var Token string + if s.Token != nil { + Token = *s.Token + } else { + Token = protocol.GetIdempotencyToken() + } + { + v := Token + + e.SetValue(protocol.BodyTarget, "Token", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService20TestShapeInputService20TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService20TestShapeInputService20TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService21ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -4310,14 +4882,42 @@ func (s *InputService21TestShapeBodyStructure) SetBodyListField(v []aws.JSONValu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService21TestShapeBodyStructure) MarshalFields(e protocol.FieldEncoder) error { + if s.BodyField != nil { + v := s.BodyField + + e.SetValue(protocol.BodyTarget, "BodyField", protocol.JSONValue{V: v}, protocol.Metadata{}) + } + if len(s.BodyListField) > 0 { + v := s.BodyListField + + e.SetList(protocol.BodyTarget, "BodyListField", protocol.EncodeJSONValueList(v), protocol.Metadata{}) + } + + return nil +} + type InputService21TestShapeInputService21TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService21TestShapeInputService21TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService21TestShapeInputService21TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService21TestShapeInputService21TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService21TestShapeInputService21TestCaseOperation3Input struct { _ struct{} `type:"structure" payload:"Body"` @@ -4346,10 +4946,37 @@ func (s *InputService21TestShapeInputService21TestCaseOperation3Input) SetQueryF return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService21TestShapeInputService21TestCaseOperation3Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := s.Body + + e.SetFields(protocol.PayloadTarget, "Body", v, protocol.Metadata{}) + } + if s.HeaderField != nil { + v := s.HeaderField + + e.SetValue(protocol.HeaderTarget, "X-Amz-Foo", protocol.JSONValue{V: v, Base64: true}, protocol.Metadata{}) + } + if s.QueryField != nil { + v := s.QueryField + + e.SetValue(protocol.QueryTarget, "Bar", protocol.JSONValue{V: v}, protocol.Metadata{}) + } + + return nil +} + type InputService21TestShapeInputService21TestCaseOperation3Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService21TestShapeInputService21TestCaseOperation3Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // // Tests begin here // diff --git a/private/protocol/restjson/encode.go b/private/protocol/restjson/encode.go new file mode 100644 index 00000000000..4bb6461e720 --- /dev/null +++ b/private/protocol/restjson/encode.go @@ -0,0 +1,162 @@ +package restjson + +import ( + "bytes" + "fmt" + "io" + "net/http" + + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/json" + "github.com/aws/aws-sdk-go/private/protocol/rest" +) + +// An Encoder provides encoding of the AWS RESTJSON protocol. This encoder combindes +// the JSON and REST encoders deligating to them for their associated targets. +// +// It is invalid to set a JSON and stream payload on the same encoder. +type Encoder struct { + method string + reqEncoder *rest.Encoder + bodyEncoder *json.Encoder + + buf *bytes.Buffer + err error +} + +// NewEncoder creates a new encoder for encoding the AWS RESTJSON protocol. +// The request passed in will be the base the path, query, and headers encoded +// will be set on top of. +func NewEncoder(req *http.Request) *Encoder { + e := &Encoder{ + method: req.Method, + reqEncoder: rest.NewEncoder(req), + bodyEncoder: json.NewEncoder(), + } + + return e +} + +// Encode returns the encoded request, and body payload. If no payload body was +// set nil will be returned. If an error occurred while encoding the API an +// error will be returned. +func (e *Encoder) Encode() (*http.Request, io.ReadSeeker, error) { + req, payloadBody, err := e.reqEncoder.Encode() + if err != nil { + return nil, nil, err + } + + jsonBody, err := e.bodyEncoder.Encode() + if err != nil { + return nil, nil, err + } + + havePayload := payloadBody != nil + haveJSON := jsonBody != nil + + if havePayload == haveJSON && haveJSON { + return nil, nil, fmt.Errorf("unexpected JSON body and request payload for AWSMarshaler") + } + + body := payloadBody + if body == nil { + body = jsonBody + } + + return req, body, err +} + +// SetValue will set a value to the header, path, query, or body. +// +// If the request's method is GET all BodyTarget values will be written to +// the query string. +func (e *Encoder) SetValue(t protocol.Target, k string, v protocol.ValueMarshaler, meta protocol.Metadata) { + if e.err != nil { + return + } + + switch t { + case protocol.PathTarget: + fallthrough + case protocol.QueryTarget: + fallthrough + case protocol.HeaderTarget: + e.reqEncoder.SetValue(t, k, v, meta) + case protocol.BodyTarget: + fallthrough + case protocol.PayloadTarget: + if e.method == "GET" { + e.reqEncoder.SetValue(t, k, v, meta) + } else { + e.bodyEncoder.SetValue(t, k, v, meta) + } + default: + e.err = fmt.Errorf("unknown SetValue restjson encode target, %s, %s", t, k) + } +} + +// SetStream will set the stream to the payload of the request. +func (e *Encoder) SetStream(t protocol.Target, k string, v protocol.StreamMarshaler, meta protocol.Metadata) { + if e.err != nil { + return + } + + switch t { + case protocol.PayloadTarget: + e.reqEncoder.SetStream(t, k, v, meta) + default: + e.err = fmt.Errorf("invalid target %s, for SetStream, must be PayloadTarget", t) + } +} + +// SetList will set the nested list values to the header, query, or body. +func (e *Encoder) SetList(t protocol.Target, k string, fn func(le protocol.ListEncoder), meta protocol.Metadata) { + if e.err != nil { + return + } + + switch t { + case protocol.HeaderTarget: + fallthrough + case protocol.QueryTarget: + e.reqEncoder.SetList(t, k, fn, meta) + case protocol.BodyTarget: + e.bodyEncoder.SetList(t, k, fn, meta) + default: + e.err = fmt.Errorf("unknown SetList restjson encode target, %s, %s", t, k) + } +} + +// SetMap will set the nested map values to the header, query, or body. +func (e *Encoder) SetMap(t protocol.Target, k string, fn func(me protocol.MapEncoder), meta protocol.Metadata) { + if e.err != nil { + return + } + + switch t { + case protocol.QueryTarget: + fallthrough + case protocol.HeadersTarget: + e.reqEncoder.SetMap(t, k, fn, meta) + case protocol.BodyTarget: + e.bodyEncoder.SetMap(t, k, fn, meta) + default: + e.err = fmt.Errorf("unknown SetMap restjson encode target, %s, %s", t, k) + } +} + +// SetFields will set the nested type's fields to the body. +func (e *Encoder) SetFields(t protocol.Target, k string, m protocol.FieldMarshaler, meta protocol.Metadata) { + if e.err != nil { + return + } + + switch t { + case protocol.PayloadTarget: + fallthrough + case protocol.BodyTarget: + e.bodyEncoder.SetFields(t, k, m, meta) + default: + e.err = fmt.Errorf("unknown SetMarshaler restjson encode target, %s, %s", t, k) + } +} diff --git a/private/protocol/restjson/encode_test.go b/private/protocol/restjson/encode_test.go new file mode 100644 index 00000000000..56238e17750 --- /dev/null +++ b/private/protocol/restjson/encode_test.go @@ -0,0 +1,111 @@ +package restjson + +import ( + "io" + "io/ioutil" + "net/http" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/private/protocol" +) + +func TestEncodeNestedShape(t *testing.T) { + _, reader, err := encode("PUT", "/path", shape{ + NestedShape: &nestedShape{ + Value: aws.String("some value"), + }, + }) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + b, err := ioutil.ReadAll(reader) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `{"nestedShape":{"value":"some value"}}` + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} + +func TestEncodePayloadShape(t *testing.T) { + _, reader, err := encode("PUT", "/path", shape{ + PayloadShape: &nestedShape{ + Value: aws.String("some value"), + }, + }) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + b, err := ioutil.ReadAll(reader) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `{"value":"some value"}` + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} + +func TestEncodePayloadStream(t *testing.T) { + _, reader, err := encode("PUT", "/path", shape{ + PayloadStream: strings.NewReader("some value"), + }) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + b, err := ioutil.ReadAll(reader) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := "some value" + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} + +type shape struct { + NestedShape *nestedShape + PayloadShape *nestedShape + PayloadStream io.ReadSeeker +} + +func (s *shape) MarshalFields(e protocol.FieldEncoder) error { + if s.NestedShape != nil { + e.SetFields(protocol.BodyTarget, "nestedShape", s.NestedShape, protocol.Metadata{}) + } + if s.PayloadShape != nil { + e.SetFields(protocol.PayloadTarget, "payloadShape", s.PayloadShape, protocol.Metadata{}) + } + if s.PayloadStream != nil { + e.SetStream(protocol.PayloadTarget, "payloadReader", protocol.ReadSeekerStream{V: s.PayloadStream}, protocol.Metadata{}) + } + return nil +} + +type nestedShape struct { + Value *string +} + +func (s *nestedShape) MarshalFields(e protocol.FieldEncoder) error { + if s.Value != nil { + e.SetValue(protocol.BodyTarget, "value", protocol.StringValue(*s.Value), protocol.Metadata{}) + } + return nil +} + +func encode(method, path string, s shape) (*http.Request, io.ReadSeeker, error) { + origReq, _ := http.NewRequest(method, "https://service.amazonaws.com"+path, nil) + + e := NewEncoder(origReq) + s.MarshalFields(e) + return e.Encode() +} diff --git a/private/protocol/restjson/restjson.go b/private/protocol/restjson/restjson.go index b1d5294ad93..cfd2f8259f2 100644 --- a/private/protocol/restjson/restjson.go +++ b/private/protocol/restjson/restjson.go @@ -7,11 +7,13 @@ package restjson import ( "encoding/json" + "io" "io/ioutil" "strings" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" "github.com/aws/aws-sdk-go/private/protocol/rest" ) @@ -30,6 +32,25 @@ var UnmarshalErrorHandler = request.NamedHandler{Name: "awssdk.restjson.Unmarsha // Build builds a request for the REST JSON protocol. func Build(r *request.Request) { + if m, ok := r.Params.(protocol.FieldMarshaler); ok { + e := NewEncoder(r.HTTPRequest) + + m.MarshalFields(e) + + var body io.ReadSeeker + var err error + r.HTTPRequest, body, err = e.Encode() + if err != nil { + r.Error = awserr.New(request.ErrCodeSerialization, "failed to encode rest JSON request", err) + return + } + if body != nil { + r.SetReaderBody(body) + } + return + } + + // Fall back to old reflection based marshaler rest.Build(r) if t := rest.PayloadType(r.Params); t == "structure" || t == "" { diff --git a/private/protocol/restjson/unmarshal_test.go b/private/protocol/restjson/unmarshal_test.go index a65ee73c5a2..4d2d701aac8 100644 --- a/private/protocol/restjson/unmarshal_test.go +++ b/private/protocol/restjson/unmarshal_test.go @@ -175,6 +175,12 @@ type OutputService1TestShapeOutputService1TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService1TestShapeOutputService1TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService1TestShapeOutputService1TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -267,6 +273,63 @@ func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) SetTrueB return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService1TestShapeOutputService1TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if s.Char != nil { + v := *s.Char + + e.SetValue(protocol.BodyTarget, "Char", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Double != nil { + v := *s.Double + + e.SetValue(protocol.BodyTarget, "Double", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.FalseBool != nil { + v := *s.FalseBool + + e.SetValue(protocol.BodyTarget, "FalseBool", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Float != nil { + v := *s.Float + + e.SetValue(protocol.BodyTarget, "Float", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.ImaHeader != nil { + v := *s.ImaHeader + + e.SetValue(protocol.HeaderTarget, "ImaHeader", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ImaHeaderLocation != nil { + v := *s.ImaHeaderLocation + + e.SetValue(protocol.HeaderTarget, "X-Foo", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Long != nil { + v := *s.Long + + e.SetValue(protocol.BodyTarget, "Long", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Num != nil { + v := *s.Num + + e.SetValue(protocol.BodyTarget, "Num", protocol.Int64Value(v), protocol.Metadata{}) + } + // ignoring invalid encode state, StatusCode. Status + if s.Str != nil { + v := *s.Str + + e.SetValue(protocol.BodyTarget, "Str", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrueBool != nil { + v := *s.TrueBool + + e.SetValue(protocol.BodyTarget, "TrueBool", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // OutputService2ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -407,10 +470,27 @@ func (s *OutputService2TestShapeBlobContainer) SetFoo(v []byte) *OutputService2T return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService2TestShapeBlobContainer) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := s.Foo + + e.SetValue(protocol.BodyTarget, "foo", protocol.BytesValue(v), protocol.Metadata{}) + } + + return nil +} + type OutputService2TestShapeOutputService2TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService2TestShapeOutputService2TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService2TestShapeOutputService2TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -432,6 +512,22 @@ func (s *OutputService2TestShapeOutputService2TestCaseOperation1Output) SetStruc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService2TestShapeOutputService2TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if s.BlobMember != nil { + v := s.BlobMember + + e.SetValue(protocol.BodyTarget, "BlobMember", protocol.BytesValue(v), protocol.Metadata{}) + } + if s.StructMember != nil { + v := s.StructMember + + e.SetFields(protocol.BodyTarget, "StructMember", v, protocol.Metadata{}) + } + + return nil +} + // OutputService3ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -563,6 +659,12 @@ type OutputService3TestShapeOutputService3TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService3TestShapeOutputService3TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService3TestShapeOutputService3TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -583,6 +685,22 @@ func (s *OutputService3TestShapeOutputService3TestCaseOperation1Output) SetTimeM return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService3TestShapeOutputService3TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if s.StructMember != nil { + v := s.StructMember + + e.SetFields(protocol.BodyTarget, "StructMember", v, protocol.Metadata{}) + } + if s.TimeMember != nil { + v := *s.TimeMember + + e.SetValue(protocol.BodyTarget, "TimeMember", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + + return nil +} + type OutputService3TestShapeTimeContainer struct { _ struct{} `type:"structure"` @@ -595,6 +713,17 @@ func (s *OutputService3TestShapeTimeContainer) SetFoo(v time.Time) *OutputServic return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService3TestShapeTimeContainer) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := *s.Foo + + e.SetValue(protocol.BodyTarget, "foo", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + + return nil +} + // OutputService4ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -726,6 +855,12 @@ type OutputService4TestShapeOutputService4TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService4TestShapeOutputService4TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService4TestShapeOutputService4TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -738,6 +873,17 @@ func (s *OutputService4TestShapeOutputService4TestCaseOperation1Output) SetListM return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService4TestShapeOutputService4TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ListMember) > 0 { + v := s.ListMember + + e.SetList(protocol.BodyTarget, "ListMember", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // OutputService5ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -869,6 +1015,12 @@ type OutputService5TestShapeOutputService5TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService5TestShapeOutputService5TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService5TestShapeOutputService5TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -881,6 +1033,17 @@ func (s *OutputService5TestShapeOutputService5TestCaseOperation1Output) SetListM return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService5TestShapeOutputService5TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ListMember) > 0 { + v := s.ListMember + + e.SetList(protocol.BodyTarget, "ListMember", encodeOutputService5TestShapeSingleStructList(v), protocol.Metadata{}) + } + + return nil +} + type OutputService5TestShapeSingleStruct struct { _ struct{} `type:"structure"` @@ -893,6 +1056,25 @@ func (s *OutputService5TestShapeSingleStruct) SetFoo(v string) *OutputService5Te return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService5TestShapeSingleStruct) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := *s.Foo + + e.SetValue(protocol.BodyTarget, "Foo", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeOutputService5TestShapeSingleStructList(vs []*OutputService5TestShapeSingleStruct) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // OutputService6ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1024,6 +1206,12 @@ type OutputService6TestShapeOutputService6TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService6TestShapeOutputService6TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService6TestShapeOutputService6TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -1036,6 +1224,22 @@ func (s *OutputService6TestShapeOutputService6TestCaseOperation1Output) SetMapMe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService6TestShapeOutputService6TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if len(s.MapMember) > 0 { + v := s.MapMember + + e.SetMap(protocol.BodyTarget, "MapMember", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeInt64List(v)) + } + }, protocol.Metadata{}) + } + + return nil +} + // OutputService7ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1167,6 +1371,12 @@ type OutputService7TestShapeOutputService7TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService7TestShapeOutputService7TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService7TestShapeOutputService7TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -1179,6 +1389,17 @@ func (s *OutputService7TestShapeOutputService7TestCaseOperation1Output) SetMapMe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService7TestShapeOutputService7TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if len(s.MapMember) > 0 { + v := s.MapMember + + e.SetMap(protocol.BodyTarget, "MapMember", protocol.EncodeTimeMap(v), protocol.Metadata{}) + } + + return nil +} + // OutputService8ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1310,6 +1531,12 @@ type OutputService8TestShapeOutputService8TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService8TestShapeOutputService8TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService8TestShapeOutputService8TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -1322,6 +1549,17 @@ func (s *OutputService8TestShapeOutputService8TestCaseOperation1Output) SetStrTy return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService8TestShapeOutputService8TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if s.StrType != nil { + v := *s.StrType + + e.SetValue(protocol.BodyTarget, "StrType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // OutputService9ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1453,6 +1691,12 @@ type OutputService9TestShapeOutputService9TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService9TestShapeOutputService9TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService9TestShapeOutputService9TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -1473,6 +1717,22 @@ func (s *OutputService9TestShapeOutputService9TestCaseOperation1Output) SetPrefi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService9TestShapeOutputService9TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AllHeaders) > 0 { + v := s.AllHeaders + + e.SetMap(protocol.HeadersTarget, "AllHeaders", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if len(s.PrefixedHeaders) > 0 { + v := s.PrefixedHeaders + + e.SetMap(protocol.HeadersTarget, "X-", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // OutputService10ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1612,10 +1872,27 @@ func (s *OutputService10TestShapeBodyStructure) SetFoo(v string) *OutputService1 return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService10TestShapeBodyStructure) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := *s.Foo + + e.SetValue(protocol.BodyTarget, "Foo", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type OutputService10TestShapeOutputService10TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService10TestShapeOutputService10TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService10TestShapeOutputService10TestCaseOperation1Output struct { _ struct{} `type:"structure" payload:"Data"` @@ -1636,6 +1913,22 @@ func (s *OutputService10TestShapeOutputService10TestCaseOperation1Output) SetHea return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService10TestShapeOutputService10TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if s.Data != nil { + v := s.Data + + e.SetFields(protocol.PayloadTarget, "Data", v, protocol.Metadata{}) + } + if s.Header != nil { + v := *s.Header + + e.SetValue(protocol.HeaderTarget, "X-Foo", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // OutputService11ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1767,6 +2060,12 @@ type OutputService11TestShapeOutputService11TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService11TestShapeOutputService11TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService11TestShapeOutputService11TestCaseOperation1Output struct { _ struct{} `type:"structure" payload:"Stream"` @@ -1779,6 +2078,17 @@ func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetStr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if s.Stream != nil { + v := s.Stream + + e.SetStream(protocol.PayloadTarget, "Stream", protocol.BytesStream(v), protocol.Metadata{}) + } + + return nil +} + // OutputService12ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -2046,14 +2356,32 @@ type OutputService12TestShapeOutputService12TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService12TestShapeOutputService12TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService12TestShapeOutputService12TestCaseOperation2Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService12TestShapeOutputService12TestCaseOperation2Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService12TestShapeOutputService12TestCaseOperation3Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService12TestShapeOutputService12TestCaseOperation3Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService12TestShapeOutputService12TestCaseOperation3Output struct { _ struct{} `type:"structure"` @@ -2082,6 +2410,27 @@ func (s *OutputService12TestShapeOutputService12TestCaseOperation3Output) SetHea return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService12TestShapeOutputService12TestCaseOperation3Output) MarshalFields(e protocol.FieldEncoder) error { + if s.BodyField != nil { + v := s.BodyField + + e.SetValue(protocol.BodyTarget, "BodyField", protocol.JSONValue{V: v}, protocol.Metadata{}) + } + if len(s.BodyListField) > 0 { + v := s.BodyListField + + e.SetList(protocol.BodyTarget, "BodyListField", protocol.EncodeJSONValueList(v), protocol.Metadata{}) + } + if s.HeaderField != nil { + v := s.HeaderField + + e.SetValue(protocol.HeaderTarget, "X-Amz-Foo", protocol.JSONValue{V: v, Base64: true}, protocol.Metadata{}) + } + + return nil +} + // // Tests begin here // diff --git a/private/protocol/restxml/build_test.go b/private/protocol/restxml/build_test.go index 4342cbc2304..69397994635 100644 --- a/private/protocol/restxml/build_test.go +++ b/private/protocol/restxml/build_test.go @@ -320,6 +320,12 @@ type InputService1TestShapeInputService1TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService1TestShapeInputService1TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService1TestShapeInputService1TestCaseOperation2Input struct { _ struct{} `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"` @@ -340,18 +346,52 @@ func (s *InputService1TestShapeInputService1TestCaseOperation2Input) SetName(v s return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService1TestShapeInputService1TestCaseOperation2Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService1TestShapeInputService1TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService1TestShapeInputService1TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService1TestShapeInputService1TestCaseOperation3Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService1TestShapeInputService1TestCaseOperation3Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService1TestShapeInputService1TestCaseOperation3Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService1TestShapeInputService1TestCaseOperation3Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService2ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -518,10 +558,42 @@ func (s *InputService2TestShapeInputService2TestCaseOperation1Input) SetThird(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService2TestShapeInputService2TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.First != nil { + v := *s.First + + e.SetValue(protocol.BodyTarget, "First", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Fourth != nil { + v := *s.Fourth + + e.SetValue(protocol.BodyTarget, "Fourth", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Second != nil { + v := *s.Second + + e.SetValue(protocol.BodyTarget, "Second", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Third != nil { + v := *s.Third + + e.SetValue(protocol.BodyTarget, "Third", protocol.Float64Value(v), protocol.Metadata{}) + } + + return nil +} + type InputService2TestShapeInputService2TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService2TestShapeInputService2TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService3ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -727,6 +799,12 @@ type InputService3TestShapeInputService3TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService3TestShapeInputService3TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService3TestShapeInputService3TestCaseOperation2Input struct { _ struct{} `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"` @@ -747,10 +825,32 @@ func (s *InputService3TestShapeInputService3TestCaseOperation2Input) SetSubStruc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService3TestShapeInputService3TestCaseOperation2Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubStructure != nil { + v := s.SubStructure + + e.SetFields(protocol.BodyTarget, "SubStructure", v, protocol.Metadata{}) + } + + return nil +} + type InputService3TestShapeInputService3TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService3TestShapeInputService3TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService3TestShapeSubStructure struct { _ struct{} `type:"structure"` @@ -771,6 +871,22 @@ func (s *InputService3TestShapeSubStructure) SetFoo(v string) *InputService3Test return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService3TestShapeSubStructure) MarshalFields(e protocol.FieldEncoder) error { + if s.Bar != nil { + v := *s.Bar + + e.SetValue(protocol.BodyTarget, "Bar", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Foo != nil { + v := *s.Foo + + e.SetValue(protocol.BodyTarget, "Foo", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // InputService4ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -921,10 +1037,32 @@ func (s *InputService4TestShapeInputService4TestCaseOperation1Input) SetSubStruc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService4TestShapeInputService4TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubStructure != nil { + v := s.SubStructure + + e.SetFields(protocol.BodyTarget, "SubStructure", v, protocol.Metadata{}) + } + + return nil +} + type InputService4TestShapeInputService4TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService4TestShapeInputService4TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService4TestShapeSubStructure struct { _ struct{} `type:"structure"` @@ -945,6 +1083,22 @@ func (s *InputService4TestShapeSubStructure) SetFoo(v string) *InputService4Test return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService4TestShapeSubStructure) MarshalFields(e protocol.FieldEncoder) error { + if s.Bar != nil { + v := *s.Bar + + e.SetValue(protocol.BodyTarget, "Bar", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Foo != nil { + v := *s.Foo + + e.SetValue(protocol.BodyTarget, "Foo", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // InputService5ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1087,10 +1241,27 @@ func (s *InputService5TestShapeInputService5TestCaseOperation1Input) SetListPara return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService5TestShapeInputService5TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ListParam) > 0 { + v := s.ListParam + + e.SetList(protocol.BodyTarget, "ListParam", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + type InputService5TestShapeInputService5TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService5TestShapeInputService5TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService6ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1233,10 +1404,27 @@ func (s *InputService6TestShapeInputService6TestCaseOperation1Input) SetListPara return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService6TestShapeInputService6TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ListParam) > 0 { + v := s.ListParam + + e.SetList(protocol.BodyTarget, "AlternateName", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "NotMember"}) + } + + return nil +} + type InputService6TestShapeInputService6TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService6TestShapeInputService6TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService7ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1379,10 +1567,27 @@ func (s *InputService7TestShapeInputService7TestCaseOperation1Input) SetListPara return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService7TestShapeInputService7TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ListParam) > 0 { + v := s.ListParam + + e.SetList(protocol.BodyTarget, "ListParam", protocol.EncodeStringList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + type InputService7TestShapeInputService7TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService7TestShapeInputService7TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService8ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1525,10 +1730,27 @@ func (s *InputService8TestShapeInputService8TestCaseOperation1Input) SetListPara return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService8TestShapeInputService8TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ListParam) > 0 { + v := s.ListParam + + e.SetList(protocol.BodyTarget, "item", protocol.EncodeStringList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + type InputService8TestShapeInputService8TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService8TestShapeInputService8TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService9ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1671,10 +1893,27 @@ func (s *InputService9TestShapeInputService9TestCaseOperation1Input) SetListPara return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService9TestShapeInputService9TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ListParam) > 0 { + v := s.ListParam + + e.SetList(protocol.BodyTarget, "item", encodeInputService9TestShapeSingleFieldStructList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + type InputService9TestShapeInputService9TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService9TestShapeInputService9TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService9TestShapeSingleFieldStruct struct { _ struct{} `type:"structure"` @@ -1687,6 +1926,25 @@ func (s *InputService9TestShapeSingleFieldStruct) SetElement(v string) *InputSer return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService9TestShapeSingleFieldStruct) MarshalFields(e protocol.FieldEncoder) error { + if s.Element != nil { + v := *s.Element + + e.SetValue(protocol.BodyTarget, "value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeInputService9TestShapeSingleFieldStructList(vs []*InputService9TestShapeSingleFieldStruct) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // InputService10ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1829,10 +2087,27 @@ func (s *InputService10TestShapeInputService10TestCaseOperation1Input) SetStruct return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService10TestShapeInputService10TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.StructureParam != nil { + v := s.StructureParam + + e.SetFields(protocol.BodyTarget, "StructureParam", v, protocol.Metadata{}) + } + + return nil +} + type InputService10TestShapeInputService10TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService10TestShapeInputService10TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService10TestShapeStructureShape struct { _ struct{} `type:"structure"` @@ -1854,6 +2129,22 @@ func (s *InputService10TestShapeStructureShape) SetT(v time.Time) *InputService1 return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService10TestShapeStructureShape) MarshalFields(e protocol.FieldEncoder) error { + if s.B != nil { + v := s.B + + e.SetValue(protocol.BodyTarget, "b", protocol.BytesValue(v), protocol.Metadata{}) + } + if s.T != nil { + v := *s.T + + e.SetValue(protocol.BodyTarget, "t", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + + return nil +} + // InputService11ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1996,10 +2287,27 @@ func (s *InputService11TestShapeInputService11TestCaseOperation1Input) SetFoo(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService11TestShapeInputService11TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Foo) > 0 { + v := s.Foo + + e.SetMap(protocol.HeadersTarget, "x-foo-", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + type InputService11TestShapeInputService11TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService11TestShapeInputService11TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService12ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -2142,10 +2450,27 @@ func (s *InputService12TestShapeInputService12TestCaseOperation1Input) SetItems( return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService12TestShapeInputService12TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.QueryTarget, "item", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + type InputService12TestShapeInputService12TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService12TestShapeInputService12TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService13ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -2296,10 +2621,32 @@ func (s *InputService13TestShapeInputService13TestCaseOperation1Input) SetQueryD return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService13TestShapeInputService13TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.PipelineId != nil { + v := *s.PipelineId + + e.SetValue(protocol.PathTarget, "PipelineId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.QueryDoc) > 0 { + v := s.QueryDoc + + e.SetMap(protocol.QueryTarget, "QueryDoc", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + type InputService13TestShapeInputService13TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService13TestShapeInputService13TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService14ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -2450,10 +2797,37 @@ func (s *InputService14TestShapeInputService14TestCaseOperation1Input) SetQueryD return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService14TestShapeInputService14TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.PipelineId != nil { + v := *s.PipelineId + + e.SetValue(protocol.PathTarget, "PipelineId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.QueryDoc) > 0 { + v := s.QueryDoc + + e.SetMap(protocol.QueryTarget, "QueryDoc", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + + return nil +} + type InputService14TestShapeInputService14TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService14TestShapeInputService14TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService15ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -2659,6 +3033,12 @@ type InputService15TestShapeInputService15TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService15TestShapeInputService15TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService15TestShapeInputService15TestCaseOperation2Input struct { _ struct{} `type:"structure"` @@ -2671,10 +3051,27 @@ func (s *InputService15TestShapeInputService15TestCaseOperation2Input) SetBoolQu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService15TestShapeInputService15TestCaseOperation2Input) MarshalFields(e protocol.FieldEncoder) error { + if s.BoolQuery != nil { + v := *s.BoolQuery + + e.SetValue(protocol.QueryTarget, "bool-query", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService15TestShapeInputService15TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService15TestShapeInputService15TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService16ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -2817,10 +3214,27 @@ func (s *InputService16TestShapeInputService16TestCaseOperation1Input) SetFoo(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService16TestShapeInputService16TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := *s.Foo + + e.SetStream(protocol.PayloadTarget, "foo", protocol.StringStream(v), protocol.Metadata{}) + } + + return nil +} + type InputService16TestShapeInputService16TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService16TestShapeInputService16TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService17ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -3026,6 +3440,12 @@ type InputService17TestShapeInputService17TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService17TestShapeInputService17TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService17TestShapeInputService17TestCaseOperation2Input struct { _ struct{} `type:"structure" payload:"Foo"` @@ -3038,10 +3458,27 @@ func (s *InputService17TestShapeInputService17TestCaseOperation2Input) SetFoo(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService17TestShapeInputService17TestCaseOperation2Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := s.Foo + + e.SetStream(protocol.PayloadTarget, "foo", protocol.BytesStream(v), protocol.Metadata{}) + } + + return nil +} + type InputService17TestShapeInputService17TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService17TestShapeInputService17TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService18ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -3397,18 +3834,47 @@ func (s *InputService18TestShapeFooShape) SetBaz(v string) *InputService18TestSh return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService18TestShapeFooShape) MarshalFields(e protocol.FieldEncoder) error { + if s.Baz != nil { + v := *s.Baz + + e.SetValue(protocol.BodyTarget, "baz", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService18TestShapeInputService18TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService18TestShapeInputService18TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService18TestShapeInputService18TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService18TestShapeInputService18TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService18TestShapeInputService18TestCaseOperation3Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService18TestShapeInputService18TestCaseOperation3Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService18TestShapeInputService18TestCaseOperation4Input struct { _ struct{} `type:"structure" payload:"Foo"` @@ -3421,10 +3887,27 @@ func (s *InputService18TestShapeInputService18TestCaseOperation4Input) SetFoo(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService18TestShapeInputService18TestCaseOperation4Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := s.Foo + + e.SetFields(protocol.PayloadTarget, "foo", v, protocol.Metadata{}) + } + + return nil +} + type InputService18TestShapeInputService18TestCaseOperation4Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService18TestShapeInputService18TestCaseOperation4Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService19ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -3567,6 +4050,22 @@ func (s *InputService19TestShapeGrant) SetGrantee(v *InputService19TestShapeGran return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService19TestShapeGrant) MarshalFields(e protocol.FieldEncoder) error { + if s.Grantee != nil { + v := s.Grantee + attrs := make([]protocol.Attribute, 0, 1) + + if s.Grantee.Type != nil { + v := *s.Grantee.Type + attrs = append(attrs, protocol.Attribute{Name: "xsi:type", Value: protocol.StringValue(v), Meta: protocol.Metadata{}}) + } + e.SetFields(protocol.BodyTarget, "Grantee", v, protocol.Metadata{Attributes: attrs, XMLNamespacePrefix: "xsi", XMLNamespaceURI: "http://www.w3.org/2001/XMLSchema-instance"}) + } + + return nil +} + type InputService19TestShapeGrantee struct { _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"` @@ -3587,6 +4086,18 @@ func (s *InputService19TestShapeGrantee) SetType(v string) *InputService19TestSh return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService19TestShapeGrantee) MarshalFields(e protocol.FieldEncoder) error { + if s.EmailAddress != nil { + v := *s.EmailAddress + + e.SetValue(protocol.BodyTarget, "EmailAddress", protocol.StringValue(v), protocol.Metadata{}) + } + // Skipping Type XML Attribute. + + return nil +} + type InputService19TestShapeInputService19TestCaseOperation1Input struct { _ struct{} `type:"structure" payload:"Grant"` @@ -3599,10 +4110,27 @@ func (s *InputService19TestShapeInputService19TestCaseOperation1Input) SetGrant( return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService19TestShapeInputService19TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Grant != nil { + v := s.Grant + + e.SetFields(protocol.PayloadTarget, "Grant", v, protocol.Metadata{}) + } + + return nil +} + type InputService19TestShapeInputService19TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService19TestShapeInputService19TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService20ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -3753,10 +4281,32 @@ func (s *InputService20TestShapeInputService20TestCaseOperation1Input) SetKey(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService20TestShapeInputService20TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService20TestShapeInputService20TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService20TestShapeInputService20TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService21ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -3962,6 +4512,12 @@ type InputService21TestShapeInputService21TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService21TestShapeInputService21TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService21TestShapeInputService21TestCaseOperation2Input struct { _ struct{} `type:"structure"` @@ -3974,10 +4530,27 @@ func (s *InputService21TestShapeInputService21TestCaseOperation2Input) SetFoo(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService21TestShapeInputService21TestCaseOperation2Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := *s.Foo + + e.SetValue(protocol.QueryTarget, "param-name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService21TestShapeInputService21TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService21TestShapeInputService21TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService22ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -4467,22 +5040,52 @@ type InputService22TestShapeInputService22TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService22TestShapeInputService22TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService22TestShapeInputService22TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService22TestShapeInputService22TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService22TestShapeInputService22TestCaseOperation3Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService22TestShapeInputService22TestCaseOperation3Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService22TestShapeInputService22TestCaseOperation4Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService22TestShapeInputService22TestCaseOperation4Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService22TestShapeInputService22TestCaseOperation5Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService22TestShapeInputService22TestCaseOperation5Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService22TestShapeInputService22TestCaseOperation6Input struct { _ struct{} `locationName:"OperationRequest" type:"structure" xmlURI:"https://foo/"` @@ -4495,10 +5098,27 @@ func (s *InputService22TestShapeInputService22TestCaseOperation6Input) SetRecurs return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService22TestShapeInputService22TestCaseOperation6Input) MarshalFields(e protocol.FieldEncoder) error { + if s.RecursiveStruct != nil { + v := s.RecursiveStruct + + e.SetFields(protocol.BodyTarget, "RecursiveStruct", v, protocol.Metadata{}) + } + + return nil +} + type InputService22TestShapeInputService22TestCaseOperation6Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService22TestShapeInputService22TestCaseOperation6Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService22TestShapeRecursiveStructType struct { _ struct{} `type:"structure"` @@ -4535,6 +5155,48 @@ func (s *InputService22TestShapeRecursiveStructType) SetRecursiveStruct(v *Input return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService22TestShapeRecursiveStructType) MarshalFields(e protocol.FieldEncoder) error { + if s.NoRecurse != nil { + v := *s.NoRecurse + + e.SetValue(protocol.BodyTarget, "NoRecurse", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.RecursiveList) > 0 { + v := s.RecursiveList + + e.SetList(protocol.BodyTarget, "RecursiveList", encodeInputService22TestShapeRecursiveStructTypeList(v), protocol.Metadata{}) + } + if len(s.RecursiveMap) > 0 { + v := s.RecursiveMap + + e.SetMap(protocol.BodyTarget, "RecursiveMap", encodeInputService22TestShapeRecursiveStructTypeMap(v), protocol.Metadata{}) + } + if s.RecursiveStruct != nil { + v := s.RecursiveStruct + + e.SetFields(protocol.BodyTarget, "RecursiveStruct", v, protocol.Metadata{}) + } + + return nil +} + +func encodeInputService22TestShapeRecursiveStructTypeList(vs []*InputService22TestShapeRecursiveStructType) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + +func encodeInputService22TestShapeRecursiveStructTypeMap(vs map[string]*InputService22TestShapeRecursiveStructType) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // InputService23ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -4677,10 +5339,27 @@ func (s *InputService23TestShapeInputService23TestCaseOperation1Input) SetTimeAr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService23TestShapeInputService23TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + if s.TimeArgInHeader != nil { + v := *s.TimeArgInHeader + + e.SetValue(protocol.HeaderTarget, "x-amz-timearg", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + + return nil +} + type InputService23TestShapeInputService23TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService23TestShapeInputService23TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // InputService24ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -4886,6 +5565,12 @@ type InputService24TestShapeInputService24TestCaseOperation1Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService24TestShapeInputService24TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type InputService24TestShapeInputService24TestCaseOperation2Input struct { _ struct{} `type:"structure"` @@ -4898,10 +5583,33 @@ func (s *InputService24TestShapeInputService24TestCaseOperation2Input) SetToken( return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService24TestShapeInputService24TestCaseOperation2Input) MarshalFields(e protocol.FieldEncoder) error { + var Token string + if s.Token != nil { + Token = *s.Token + } else { + Token = protocol.GetIdempotencyToken() + } + { + v := Token + + e.SetValue(protocol.BodyTarget, "Token", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type InputService24TestShapeInputService24TestCaseOperation2Output struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputService24TestShapeInputService24TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // // Tests begin here // diff --git a/private/protocol/restxml/encode.go b/private/protocol/restxml/encode.go new file mode 100644 index 00000000000..b8c619cdaf7 --- /dev/null +++ b/private/protocol/restxml/encode.go @@ -0,0 +1,160 @@ +package restxml + +import ( + "bytes" + "fmt" + "io" + "net/http" + + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/rest" + "github.com/aws/aws-sdk-go/private/protocol/xml" +) + +// An Encoder provides encoding of the AWS RESTXML protocol. This encoder combindes +// the XML and REST encoders deligating to them for their associated targets. +// +// It is invalid to set a XML and stream payload on the same encoder. +type Encoder struct { + method string + reqEncoder *rest.Encoder + bodyEncoder *xml.Encoder + + buf *bytes.Buffer + err error +} + +// NewEncoder creates a new encoder for encoding the AWS RESTXML protocol. +// The request passed in will be the base the path, query, and headers encoded +// will be set on top of. +func NewEncoder(req *http.Request) *Encoder { + e := &Encoder{ + method: req.Method, + reqEncoder: rest.NewEncoder(req), + bodyEncoder: xml.NewEncoder(), + } + + return e +} + +// Encode returns the encoded request, and body payload. If no payload body was +// set nil will be returned. If an error occurred while encoding the API an +// error will be returned. +func (e *Encoder) Encode() (*http.Request, io.ReadSeeker, error) { + req, payloadBody, err := e.reqEncoder.Encode() + if err != nil { + return nil, nil, err + } + + xmlBody, err := e.bodyEncoder.Encode() + if err != nil { + return nil, nil, err + } + + havePayload := payloadBody != nil + haveXML := xmlBody != nil + + if havePayload == haveXML && haveXML { + return nil, nil, fmt.Errorf("unexpected XML body and request payload for AWSMarshaler") + } + + body := payloadBody + if body == nil { + body = xmlBody + } + + return req, body, err +} + +// SetValue will set a value to the header, path, query, or body. +// +// If the request's method is GET all BodyTarget values will be written to +// the query string. +func (e *Encoder) SetValue(t protocol.Target, k string, v protocol.ValueMarshaler, meta protocol.Metadata) { + if e.err != nil { + return + } + + switch t { + case protocol.PathTarget: + fallthrough + case protocol.QueryTarget: + fallthrough + case protocol.HeaderTarget: + e.reqEncoder.SetValue(t, k, v, meta) + case protocol.BodyTarget: + if e.method == "GET" { + e.reqEncoder.SetValue(t, k, v, meta) + } else { + e.bodyEncoder.SetValue(t, k, v, meta) + } + default: + e.err = fmt.Errorf("unknown SetValue restxml encode target, %s, %s", t, k) + } +} + +// SetStream will set the stream to the payload of the request. +func (e *Encoder) SetStream(t protocol.Target, k string, v protocol.StreamMarshaler, meta protocol.Metadata) { + if e.err != nil { + return + } + + switch t { + case protocol.PayloadTarget: + e.reqEncoder.SetStream(t, k, v, meta) + default: + e.err = fmt.Errorf("invalid target %s, for SetStream, must be PayloadTarget", t) + } +} + +// SetList will set the nested list values to the header, query, or body. +func (e *Encoder) SetList(t protocol.Target, k string, fn func(le protocol.ListEncoder), meta protocol.Metadata) { + if e.err != nil { + return + } + + switch t { + case protocol.HeaderTarget: + fallthrough + case protocol.QueryTarget: + e.reqEncoder.SetList(t, k, fn, meta) + case protocol.BodyTarget: + e.bodyEncoder.SetList(t, k, fn, meta) + default: + e.err = fmt.Errorf("unknown SetList restxml encode target, %s, %s", t, k) + } +} + +// SetMap will set the nested map values to the header, query, or body. +func (e *Encoder) SetMap(t protocol.Target, k string, fn func(me protocol.MapEncoder), meta protocol.Metadata) { + if e.err != nil { + return + } + + switch t { + case protocol.QueryTarget: + fallthrough + case protocol.HeadersTarget: + e.reqEncoder.SetMap(t, k, fn, meta) + case protocol.BodyTarget: + e.bodyEncoder.SetMap(t, k, fn, meta) + default: + e.err = fmt.Errorf("unknown SetMap restxml encode target, %s, %s", t, k) + } +} + +// SetFields will set the nested type's fields to the body. +func (e *Encoder) SetFields(t protocol.Target, k string, m protocol.FieldMarshaler, meta protocol.Metadata) { + if e.err != nil { + return + } + + switch t { + case protocol.PayloadTarget: + fallthrough + case protocol.BodyTarget: + e.bodyEncoder.SetFields(t, k, m, meta) + default: + e.err = fmt.Errorf("unknown SetMarshaler restxml encode target, %s, %s", t, k) + } +} diff --git a/private/protocol/restxml/encode_test.go b/private/protocol/restxml/encode_test.go new file mode 100644 index 00000000000..c71d1004a52 --- /dev/null +++ b/private/protocol/restxml/encode_test.go @@ -0,0 +1,86 @@ +package restxml + +import ( + "io" + "io/ioutil" + "net/http" + "strings" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/private/protocol" +) + +func TestEncodeNestedShape(t *testing.T) { + _, reader, err := encode("PUT", "/path", shape{ + PayloadShape: &nestedShape{ + Value: aws.String("some value"), + }, + }) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + b, err := ioutil.ReadAll(reader) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `some value` + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} + +func TestEncodeNestedStream(t *testing.T) { + _, reader, err := encode("PUT", "/path", shape{ + PayloadStream: strings.NewReader("some value"), + }) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + b, err := ioutil.ReadAll(reader) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := "some value" + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} + +type shape struct { + PayloadShape *nestedShape + PayloadStream io.ReadSeeker +} + +func (s *shape) MarshalFields(e protocol.FieldEncoder) error { + if s.PayloadShape != nil { + e.SetFields(protocol.PayloadTarget, "payloadShape", s.PayloadShape, protocol.Metadata{}) + } + if s.PayloadStream != nil { + e.SetStream(protocol.PayloadTarget, "payloadReader", protocol.ReadSeekerStream{V: s.PayloadStream}, protocol.Metadata{}) + } + return nil +} + +type nestedShape struct { + Value *string +} + +func (s *nestedShape) MarshalFields(e protocol.FieldEncoder) error { + if s.Value != nil { + e.SetValue(protocol.BodyTarget, "value", protocol.StringValue(*s.Value), protocol.Metadata{}) + } + return nil +} + +func encode(method, path string, s shape) (*http.Request, io.ReadSeeker, error) { + origReq, _ := http.NewRequest(method, "https://service.amazonaws.com"+path, nil) + + e := NewEncoder(origReq) + s.MarshalFields(e) + return e.Encode() +} diff --git a/private/protocol/restxml/restxml.go b/private/protocol/restxml/restxml.go index 7bdf4c8538f..cc967fa8bc2 100644 --- a/private/protocol/restxml/restxml.go +++ b/private/protocol/restxml/restxml.go @@ -8,9 +8,11 @@ package restxml import ( "bytes" "encoding/xml" + "io" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" "github.com/aws/aws-sdk-go/private/protocol/query" "github.com/aws/aws-sdk-go/private/protocol/rest" "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil" @@ -30,13 +32,32 @@ var UnmarshalErrorHandler = request.NamedHandler{Name: "awssdk.restxml.Unmarshal // Build builds a request payload for the REST XML protocol. func Build(r *request.Request) { + if m, ok := r.Params.(protocol.FieldMarshaler); ok { + e := NewEncoder(r.HTTPRequest) + + m.MarshalFields(e) + + var body io.ReadSeeker + var err error + r.HTTPRequest, body, err = e.Encode() + if err != nil { + r.Error = awserr.New(request.ErrCodeSerialization, "failed to encode rest XML request", err) + return + } + if body != nil { + r.SetReaderBody(body) + } + return + } + + // Fall back to old reflection based marshaler rest.Build(r) if t := rest.PayloadType(r.Params); t == "structure" || t == "" { var buf bytes.Buffer err := xmlutil.BuildXML(r.Params, xml.NewEncoder(&buf)) if err != nil { - r.Error = awserr.New("SerializationError", "failed to encode rest XML request", err) + r.Error = awserr.New(request.ErrCodeSerialization, "failed to encode rest XML request", err) return } r.SetBufferBody(buf.Bytes()) diff --git a/private/protocol/restxml/unmarshal_test.go b/private/protocol/restxml/unmarshal_test.go index b835dcea4bd..013a7af04b0 100644 --- a/private/protocol/restxml/unmarshal_test.go +++ b/private/protocol/restxml/unmarshal_test.go @@ -243,10 +243,22 @@ type OutputService1TestShapeOutputService1TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService1TestShapeOutputService1TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService1TestShapeOutputService1TestCaseOperation2Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService1TestShapeOutputService1TestCaseOperation2Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService1TestShapeOutputService1TestCaseOperation2Output struct { _ struct{} `type:"structure"` @@ -339,6 +351,67 @@ func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) SetTrueB return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService1TestShapeOutputService1TestCaseOperation2Output) MarshalFields(e protocol.FieldEncoder) error { + if s.Char != nil { + v := *s.Char + + e.SetValue(protocol.BodyTarget, "Char", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Double != nil { + v := *s.Double + + e.SetValue(protocol.BodyTarget, "Double", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.FalseBool != nil { + v := *s.FalseBool + + e.SetValue(protocol.BodyTarget, "FalseBool", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Float != nil { + v := *s.Float + + e.SetValue(protocol.BodyTarget, "Float", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.ImaHeader != nil { + v := *s.ImaHeader + + e.SetValue(protocol.HeaderTarget, "ImaHeader", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ImaHeaderLocation != nil { + v := *s.ImaHeaderLocation + + e.SetValue(protocol.HeaderTarget, "X-Foo", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Long != nil { + v := *s.Long + + e.SetValue(protocol.BodyTarget, "Long", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Num != nil { + v := *s.Num + + e.SetValue(protocol.BodyTarget, "FooNum", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Str != nil { + v := *s.Str + + e.SetValue(protocol.BodyTarget, "Str", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Timestamp != nil { + v := *s.Timestamp + + e.SetValue(protocol.BodyTarget, "Timestamp", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.TrueBool != nil { + v := *s.TrueBool + + e.SetValue(protocol.BodyTarget, "TrueBool", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // OutputService2ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -470,6 +543,12 @@ type OutputService2TestShapeOutputService2TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService2TestShapeOutputService2TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService2TestShapeOutputService2TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -483,6 +562,17 @@ func (s *OutputService2TestShapeOutputService2TestCaseOperation1Output) SetBlob( return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService2TestShapeOutputService2TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if s.Blob != nil { + v := s.Blob + + e.SetValue(protocol.BodyTarget, "Blob", protocol.BytesValue(v), protocol.Metadata{}) + } + + return nil +} + // OutputService3ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -614,6 +704,12 @@ type OutputService3TestShapeOutputService3TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService3TestShapeOutputService3TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService3TestShapeOutputService3TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -626,6 +722,17 @@ func (s *OutputService3TestShapeOutputService3TestCaseOperation1Output) SetListM return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService3TestShapeOutputService3TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ListMember) > 0 { + v := s.ListMember + + e.SetList(protocol.BodyTarget, "ListMember", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // OutputService4ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -757,6 +864,12 @@ type OutputService4TestShapeOutputService4TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService4TestShapeOutputService4TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService4TestShapeOutputService4TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -769,6 +882,17 @@ func (s *OutputService4TestShapeOutputService4TestCaseOperation1Output) SetListM return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService4TestShapeOutputService4TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ListMember) > 0 { + v := s.ListMember + + e.SetList(protocol.BodyTarget, "ListMember", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "item"}) + } + + return nil +} + // OutputService5ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -900,6 +1024,12 @@ type OutputService5TestShapeOutputService5TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService5TestShapeOutputService5TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService5TestShapeOutputService5TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -912,6 +1042,17 @@ func (s *OutputService5TestShapeOutputService5TestCaseOperation1Output) SetListM return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService5TestShapeOutputService5TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ListMember) > 0 { + v := s.ListMember + + e.SetList(protocol.BodyTarget, "ListMember", protocol.EncodeStringList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // OutputService6ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1043,6 +1184,12 @@ type OutputService6TestShapeOutputService6TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService6TestShapeOutputService6TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService6TestShapeOutputService6TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -1055,6 +1202,17 @@ func (s *OutputService6TestShapeOutputService6TestCaseOperation1Output) SetMap(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService6TestShapeOutputService6TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Map) > 0 { + v := s.Map + + e.SetMap(protocol.BodyTarget, "Map", encodeOutputService6TestShapeSingleStructureMap(v), protocol.Metadata{}) + } + + return nil +} + type OutputService6TestShapeSingleStructure struct { _ struct{} `type:"structure"` @@ -1067,6 +1225,25 @@ func (s *OutputService6TestShapeSingleStructure) SetFoo(v string) *OutputService return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService6TestShapeSingleStructure) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := *s.Foo + + e.SetValue(protocol.BodyTarget, "foo", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeOutputService6TestShapeSingleStructureMap(vs map[string]*OutputService6TestShapeSingleStructure) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // OutputService7ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1198,6 +1375,12 @@ type OutputService7TestShapeOutputService7TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService7TestShapeOutputService7TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService7TestShapeOutputService7TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -1210,6 +1393,17 @@ func (s *OutputService7TestShapeOutputService7TestCaseOperation1Output) SetMap(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService7TestShapeOutputService7TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Map) > 0 { + v := s.Map + + e.SetMap(protocol.BodyTarget, "Map", protocol.EncodeStringMap(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // OutputService8ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1341,6 +1535,12 @@ type OutputService8TestShapeOutputService8TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService8TestShapeOutputService8TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService8TestShapeOutputService8TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -1353,6 +1553,17 @@ func (s *OutputService8TestShapeOutputService8TestCaseOperation1Output) SetMap(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService8TestShapeOutputService8TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Map) > 0 { + v := s.Map + + e.SetMap(protocol.BodyTarget, "Map", protocol.EncodeStringMap(v), protocol.Metadata{MapLocationNameKey: "foo", MapLocationNameValue: "bar"}) + } + + return nil +} + // OutputService9ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1484,6 +1695,12 @@ type OutputService9TestShapeOutputService9TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService9TestShapeOutputService9TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService9TestShapeOutputService9TestCaseOperation1Output struct { _ struct{} `type:"structure" payload:"Data"` @@ -1504,6 +1721,22 @@ func (s *OutputService9TestShapeOutputService9TestCaseOperation1Output) SetHeade return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService9TestShapeOutputService9TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if s.Data != nil { + v := s.Data + + e.SetFields(protocol.PayloadTarget, "Data", v, protocol.Metadata{}) + } + if s.Header != nil { + v := *s.Header + + e.SetValue(protocol.HeaderTarget, "X-Foo", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type OutputService9TestShapeSingleStructure struct { _ struct{} `type:"structure"` @@ -1516,6 +1749,17 @@ func (s *OutputService9TestShapeSingleStructure) SetFoo(v string) *OutputService return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService9TestShapeSingleStructure) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := *s.Foo + + e.SetValue(protocol.BodyTarget, "Foo", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // OutputService10ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1647,6 +1891,12 @@ type OutputService10TestShapeOutputService10TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService10TestShapeOutputService10TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService10TestShapeOutputService10TestCaseOperation1Output struct { _ struct{} `type:"structure" payload:"Stream"` @@ -1659,6 +1909,17 @@ func (s *OutputService10TestShapeOutputService10TestCaseOperation1Output) SetStr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService10TestShapeOutputService10TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if s.Stream != nil { + v := s.Stream + + e.SetStream(protocol.PayloadTarget, "Stream", protocol.BytesStream(v), protocol.Metadata{}) + } + + return nil +} + // OutputService11ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1790,6 +2051,12 @@ type OutputService11TestShapeOutputService11TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService11TestShapeOutputService11TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService11TestShapeOutputService11TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -1866,6 +2133,57 @@ func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) SetTru return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService11TestShapeOutputService11TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if s.Char != nil { + v := *s.Char + + e.SetValue(protocol.HeaderTarget, "x-char", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Double != nil { + v := *s.Double + + e.SetValue(protocol.HeaderTarget, "x-double", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.FalseBool != nil { + v := *s.FalseBool + + e.SetValue(protocol.HeaderTarget, "x-false-bool", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Float != nil { + v := *s.Float + + e.SetValue(protocol.HeaderTarget, "x-float", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.Integer != nil { + v := *s.Integer + + e.SetValue(protocol.HeaderTarget, "x-int", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Long != nil { + v := *s.Long + + e.SetValue(protocol.HeaderTarget, "x-long", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Str != nil { + v := *s.Str + + e.SetValue(protocol.HeaderTarget, "x-str", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Timestamp != nil { + v := *s.Timestamp + + e.SetValue(protocol.HeaderTarget, "x-timestamp", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if s.TrueBool != nil { + v := *s.TrueBool + + e.SetValue(protocol.HeaderTarget, "x-true-bool", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // OutputService12ProtocolTest provides the API operation methods for making requests to // . See this package's package overview docs // for details on the service. @@ -1997,6 +2315,12 @@ type OutputService12TestShapeOutputService12TestCaseOperation1Input struct { _ struct{} `type:"structure"` } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService12TestShapeOutputService12TestCaseOperation1Input) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type OutputService12TestShapeOutputService12TestCaseOperation1Output struct { _ struct{} `type:"structure"` @@ -2009,6 +2333,17 @@ func (s *OutputService12TestShapeOutputService12TestCaseOperation1Output) SetFoo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputService12TestShapeOutputService12TestCaseOperation1Output) MarshalFields(e protocol.FieldEncoder) error { + if s.Foo != nil { + v := *s.Foo + + e.SetValue(protocol.BodyTarget, "Foo", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // // Tests begin here // diff --git a/private/protocol/target.go b/private/protocol/target.go new file mode 100644 index 00000000000..36e65d32a3b --- /dev/null +++ b/private/protocol/target.go @@ -0,0 +1,38 @@ +package protocol + +import "fmt" + +// Target is the encode and decode targets of protocol marshaling. +type Target int + +// The protocol marshaling targets. +const ( + PathTarget Target = iota + QueryTarget + HeaderTarget + HeadersTarget + StatusCodeTarget + BodyTarget + PayloadTarget +) + +func (e Target) String() string { + switch e { + case PathTarget: + return "Path" + case QueryTarget: + return "Query" + case HeaderTarget: + return "Header" + case HeadersTarget: + return "Headers" + case StatusCodeTarget: + return "StatusCode" + case BodyTarget: + return "Body" + case PayloadTarget: + return "Payload" + default: + panic(fmt.Sprintf("// unknown encoding target, %d", e)) + } +} diff --git a/private/protocol/xml/encode.go b/private/protocol/xml/encode.go new file mode 100644 index 00000000000..dd3799d74c6 --- /dev/null +++ b/private/protocol/xml/encode.go @@ -0,0 +1,374 @@ +package xml + +import ( + "bytes" + "encoding/xml" + "fmt" + "io" + + "github.com/aws/aws-sdk-go/private/protocol" +) + +// An Encoder provides encoding of the AWS XML protocol. This encoder will will +// write all content to XML. Only supports body and payload targets. +type Encoder struct { + encoder *xml.Encoder + encodedBuf *bytes.Buffer + fieldBuf protocol.FieldBuffer + err error +} + +// NewEncoder creates a new encoder for encoding AWS XML protocol. Only encodes +// fields into the XML body, and error is returned if target is anything other +// than Body or Payload. +func NewEncoder() *Encoder { + encodedBuf := bytes.NewBuffer(nil) + return &Encoder{ + encodedBuf: encodedBuf, + encoder: xml.NewEncoder(encodedBuf), + } +} + +// Encode returns the encoded XMl reader. An error will be returned if one was +// encountered while building the XML body. +func (e *Encoder) Encode() (io.ReadSeeker, error) { + if e.err != nil { + return nil, e.err + } + + if err := e.encoder.Flush(); err != nil { + return nil, fmt.Errorf("unable to marshal XML, %v", err) + } + + if e.encodedBuf.Len() == 0 { + return nil, nil + } + + return bytes.NewReader(e.encodedBuf.Bytes()), e.err +} + +// SetValue sets an individual value to the XML body. +func (e *Encoder) SetValue(t protocol.Target, k string, v protocol.ValueMarshaler, meta protocol.Metadata) { + if e.err != nil { + return + } + if t != protocol.BodyTarget && t != protocol.PayloadTarget { + e.err = fmt.Errorf(" invalid target %s for xml encoder SetValue, %s", t, k) + return + } + + e.err = addValueToken(e.encoder, &e.fieldBuf, k, v, meta) +} + +// SetStream is not supported for XML protocol marshaling. +func (e *Encoder) SetStream(t protocol.Target, k string, v protocol.StreamMarshaler, meta protocol.Metadata) { + e.err = fmt.Errorf("xml encoder SetStream not supported, %s, %s", t, k) +} + +// SetList creates an XML list and calls the passed in fn callback with a list encoder. +func (e *Encoder) SetList(t protocol.Target, k string, fn func(le protocol.ListEncoder), meta protocol.Metadata) { + if e.err != nil { + return + } + if t != protocol.BodyTarget && t != protocol.PayloadTarget { + e.err = fmt.Errorf(" invalid target %s for xml encoder SetValue, %s", t, k) + return + } + + le := ListEncoder{Base: e, + Flatten: meta.Flatten, + ListName: meta.ListLocationName, + } + if v := meta.ListLocationName; len(v) == 0 { + if le.Flatten { + le.ListName = k + } else { + le.ListName = "member" + } + } + + var tok xml.StartElement + if !le.Flatten { + tok, e.err = xmlStartElem(k, meta) + if e.err != nil { + return + } + e.encoder.EncodeToken(tok) + } + + fn(&le) + + if !le.Flatten { + e.encoder.EncodeToken(xml.EndElement{Name: tok.Name}) + } +} + +// SetMap creates an XML map and calls the passed in fn callback with a map encoder. +func (e *Encoder) SetMap(t protocol.Target, k string, fn func(me protocol.MapEncoder), meta protocol.Metadata) { + if e.err != nil { + return + } + if t != protocol.BodyTarget && t != protocol.PayloadTarget { + e.err = fmt.Errorf(" invalid target %s for xml encoder SetValue, %s", t, k) + return + } + + me := MapEncoder{Base: e, + Flatten: meta.Flatten, + KeyName: meta.MapLocationNameKey, + ValueName: meta.MapLocationNameValue, + } + + tok, err := xmlStartElem(k, meta) + if err != nil { + e.err = err + return + } + + e.encoder.EncodeToken(tok) + + fn(&me) + + e.encoder.EncodeToken(xml.EndElement{Name: tok.Name}) +} + +// SetFields sets the nested fields to the XML body. +func (e *Encoder) SetFields(t protocol.Target, k string, m protocol.FieldMarshaler, meta protocol.Metadata) { + if e.err != nil { + return + } + if t != protocol.BodyTarget && t != protocol.PayloadTarget { + e.err = fmt.Errorf(" invalid target %s for xml encoder SetFields, %s", t, k) + return + } + + tok, err := xmlStartElem(k, meta) + if err != nil { + e.err = err + return + } + + e.encoder.EncodeToken(tok) + m.MarshalFields(e) + e.encoder.EncodeToken(xml.EndElement{Name: tok.Name}) +} + +// A ListEncoder encodes elements within a list for the XML encoder. +type ListEncoder struct { + Base *Encoder + Flatten bool + ListName string + err error +} + +// ListAddValue will add the value to the list. +func (e *ListEncoder) ListAddValue(v protocol.ValueMarshaler) { + if e.err != nil { + return + } + + e.err = addValueToken(e.Base.encoder, &e.Base.fieldBuf, e.ListName, v, protocol.Metadata{}) +} + +// ListAddList is not supported for XML encoder. +func (e *ListEncoder) ListAddList(fn func(le protocol.ListEncoder)) { + e.err = fmt.Errorf("xml encoder ListAddList not supported, %s", e.ListName) +} + +// ListAddMap is not supported for XML encoder. +func (e *ListEncoder) ListAddMap(fn func(me protocol.MapEncoder)) { + e.err = fmt.Errorf("xml encoder ListAddMap not supported, %s", e.ListName) +} + +// ListAddFields will set the nested type's fields to the list. +func (e *ListEncoder) ListAddFields(m protocol.FieldMarshaler) { + if e.err != nil { + return + } + + var tok xml.StartElement + tok, e.err = xmlStartElem(e.ListName, protocol.Metadata{}) + if e.err != nil { + return + } + + e.Base.encoder.EncodeToken(tok) + m.MarshalFields(e.Base) + e.Base.encoder.EncodeToken(xml.EndElement{Name: tok.Name}) +} + +// A MapEncoder encodes key values pair map values for the XML encoder. +type MapEncoder struct { + Base *Encoder + Flatten bool + KeyName string + ValueName string + err error +} + +// MapSetValue sets a map value. +func (e *MapEncoder) MapSetValue(k string, v protocol.ValueMarshaler) { + if e.err != nil { + return + } + + var tok xml.StartElement + if !e.Flatten { + tok, e.err = xmlStartElem("entry", protocol.Metadata{}) + if e.err != nil { + return + } + e.Base.encoder.EncodeToken(tok) + } + + keyName, valueName := e.KeyName, e.ValueName + if len(keyName) == 0 { + keyName = "key" + } + if len(valueName) == 0 { + valueName = "value" + } + + e.err = addValueToken(e.Base.encoder, &e.Base.fieldBuf, keyName, protocol.StringValue(k), protocol.Metadata{}) + if e.err != nil { + return + } + + e.err = addValueToken(e.Base.encoder, &e.Base.fieldBuf, valueName, v, protocol.Metadata{}) + if e.err != nil { + return + } + + if !e.Flatten { + e.Base.encoder.EncodeToken(xml.EndElement{Name: tok.Name}) + } +} + +// MapSetList is not supported. +func (e *MapEncoder) MapSetList(k string, fn func(le protocol.ListEncoder)) { + e.err = fmt.Errorf("xml map encoder MapSetList not supported, %s", k) +} + +// MapSetMap is not supported. +func (e *MapEncoder) MapSetMap(k string, fn func(me protocol.MapEncoder)) { + e.err = fmt.Errorf("xml map encoder MapSetMap not supported, %s", k) +} + +// MapSetFields will set the nested type's fields under the map. +func (e *MapEncoder) MapSetFields(k string, m protocol.FieldMarshaler) { + if e.err != nil { + return + } + + var tok xml.StartElement + if !e.Flatten { + tok, e.err = xmlStartElem("entry", protocol.Metadata{}) + if e.err != nil { + return + } + e.Base.encoder.EncodeToken(tok) + } + + keyName, valueName := e.KeyName, e.ValueName + if len(keyName) == 0 { + keyName = "key" + } + if len(valueName) == 0 { + valueName = "value" + } + + e.err = addValueToken(e.Base.encoder, &e.Base.fieldBuf, keyName, protocol.StringValue(k), protocol.Metadata{}) + if e.err != nil { + return + } + + valTok, err := xmlStartElem(valueName, protocol.Metadata{}) + if err != nil { + e.err = err + return + } + e.Base.encoder.EncodeToken(valTok) + + m.MarshalFields(e.Base) + + e.Base.encoder.EncodeToken(xml.EndElement{Name: valTok.Name}) + + if !e.Flatten { + e.Base.encoder.EncodeToken(xml.EndElement{Name: tok.Name}) + } +} + +func addValueToken(e *xml.Encoder, fieldBuf *protocol.FieldBuffer, k string, v protocol.ValueMarshaler, meta protocol.Metadata) error { + b, err := fieldBuf.GetValue(v) + if err != nil { + return err + } + + tok, err := xmlStartElem(k, meta) + if err != nil { + return err + } + + e.EncodeToken(tok) + e.EncodeToken(xml.CharData(b)) + e.EncodeToken(xml.EndElement{Name: tok.Name}) + + return nil +} + +func xmlStartElem(k string, meta protocol.Metadata) (xml.StartElement, error) { + tok := xml.StartElement{Name: xmlName(k, meta)} + attrs, err := buildAttributes(meta) + if err != nil { + return xml.StartElement{}, err + } + tok.Attr = attrs + + return tok, nil +} + +func xmlName(k string, meta protocol.Metadata) xml.Name { + name := xml.Name{Local: k} + + // TODO need to do something with namespace? + // if len(meta.XMLNamespacePrefix) > 0 && len(meta.XMLNamespaceURI) { + // name.Space = prefix + // } + + return name +} + +func buildAttributes(meta protocol.Metadata) ([]xml.Attr, error) { + n := len(meta.Attributes) + if len(meta.XMLNamespaceURI) > 0 { + n++ + } + + if n == 0 { + return nil, nil + } + + attrs := make([]xml.Attr, n) + + for _, a := range meta.Attributes { + str, err := a.Value.MarshalValue() + if err != nil { + return nil, err + } + + attrs = append(attrs, xml.Attr{Name: xmlName(a.Name, a.Meta), Value: str}) + } + + if uri := meta.XMLNamespaceURI; len(uri) > 0 { + attr := xml.Attr{ + Name: xml.Name{Local: "xmlns"}, + Value: uri, + } + if p := meta.XMLNamespacePrefix; len(p) > 0 { + attr.Name.Local += ":" + p + } + attrs = append(attrs, attr) + } + + return attrs, nil +} diff --git a/private/protocol/xml/encode_test.go b/private/protocol/xml/encode_test.go new file mode 100644 index 00000000000..eda5fed7341 --- /dev/null +++ b/private/protocol/xml/encode_test.go @@ -0,0 +1,549 @@ +package xml + +import ( + "io" + "io/ioutil" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/private/protocol" +) + +func TestEncodeAttribute(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + AttrValue: aws.String("value"), + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} + +func TestEncodeNamespace(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + Namespace: &nestedShape{ + Prefixed: aws.String("abc"), + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `abc` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} + +func TestEncodeNestedShape(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + Nested: &nestedShape{ + Value: aws.String("expected value"), + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `expected value` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeMapString(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + MapStr: map[string]*string{ + "abc": aws.String("123"), + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `abc123` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeMapFlatten(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + MapFlatten: map[string]*string{ + "abc": aws.String("123"), + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `abc123` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeMapNamed(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + MapNamed: map[string]*string{ + "abc": aws.String("123"), + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `abc123` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeMapShape(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + MapShape: map[string]*nestedShape{ + "abc": {Value: aws.String("1")}, + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `abc1` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeMapFlattenShape(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + MapFlattenShape: map[string]*nestedShape{ + "abc": {Value: aws.String("1")}, + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `abc1` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeMapNamedShape(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + MapNamedShape: map[string]*nestedShape{ + "abc": {Value: aws.String("1")}, + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `abc1` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeListString(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + ListStr: []*string{ + aws.String("abc"), + aws.String("123"), + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `abc123` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeListFlatten(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + ListFlatten: []*string{ + aws.String("abc"), + aws.String("123"), + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `abc123` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeListFlattened(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + ListFlatten: []*string{ + aws.String("abc"), + aws.String("123"), + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `abc123` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeListNamed(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + ListNamed: []*string{ + aws.String("abc"), + aws.String("123"), + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `abc123` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeListShape(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + ListShape: []*nestedShape{ + {Value: aws.String("abc")}, + {Value: aws.String("123")}, + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `abc123` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeListFlattenShape(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + ListFlattenShape: []*nestedShape{ + {Value: aws.String("abc")}, + {Value: aws.String("123")}, + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `abc123` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} +func TestEncodeListNamedShape(t *testing.T) { + r, err := encode(baseShape{ + Payload: &payloadShape{ + ListNamedShape: []*nestedShape{ + {Value: aws.String("abc")}, + {Value: aws.String("123")}, + }, + }, + }) + if err != nil { + t.Fatalf("expect no marshal error, %v", err) + } + + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatalf("expect no read error, %v", err) + } + + expect := `abc123` + + if e, a := expect, string(b); e != a { + t.Errorf("expect bodies to match, did not.\n,\tExpect:\n%s\n\tActual:\n%s\n", e, a) + } +} + +type baseShape struct { + Payload *payloadShape +} + +func (s *baseShape) MarshalFields(e protocol.FieldEncoder) error { + if s.Payload != nil { + attrs := make([]protocol.Attribute, 0, 1) + if s.Payload.AttrValue != nil { + attrs = append(attrs, protocol.Attribute{ + Name: "attrkey", + Value: protocol.StringValue(*s.Payload.AttrValue), + Meta: protocol.Metadata{}, + }) + } + e.SetFields(protocol.PayloadTarget, "payload", s.Payload, protocol.Metadata{Attributes: attrs}) + } + return nil +} + +type payloadShape struct { + AttrValue *string + Namespace *nestedShape + Nested *nestedShape + MapStr map[string]*string + MapFlatten map[string]*string + MapNamed map[string]*string + MapShape map[string]*nestedShape + MapFlattenShape map[string]*nestedShape + MapNamedShape map[string]*nestedShape + ListStr []*string + ListFlatten []*string + ListNamed []*string + ListShape []*nestedShape + ListFlattenShape []*nestedShape + ListNamedShape []*nestedShape +} + +func (s *payloadShape) MarshalFields(e protocol.FieldEncoder) error { + // Attribute values are skipped + if s.Namespace != nil { + e.SetFields(protocol.BodyTarget, "namespace", s.Namespace, protocol.Metadata{ + XMLNamespaceURI: "https://example.com", XMLNamespacePrefix: "prefix", + }) + } + if s.Nested != nil { + e.SetFields(protocol.BodyTarget, "nested", s.Nested, protocol.Metadata{}) + } + if len(s.MapStr) > 0 { + e.SetMap(protocol.BodyTarget, "mapstr", func(me protocol.MapEncoder) { + for k, v := range s.MapStr { + me.MapSetValue(k, protocol.StringValue(*v)) + } + }, protocol.Metadata{}) + } + if len(s.MapFlatten) > 0 { + e.SetMap(protocol.BodyTarget, "mapFlatten", func(me protocol.MapEncoder) { + for k, v := range s.MapFlatten { + me.MapSetValue(k, protocol.StringValue(*v)) + } + }, protocol.Metadata{ + Flatten: true, + }) + } + if len(s.MapNamed) > 0 { + e.SetMap(protocol.BodyTarget, "mapNamed", func(me protocol.MapEncoder) { + for k, v := range s.MapNamed { + me.MapSetValue(k, protocol.StringValue(*v)) + } + }, protocol.Metadata{ + MapLocationNameKey: "namedKey", MapLocationNameValue: "namedValue", + }) + } + if len(s.MapShape) > 0 { + e.SetMap(protocol.BodyTarget, "mapShape", encodeNestedShapeMap(s.MapShape), protocol.Metadata{}) + } + if len(s.MapFlattenShape) > 0 { + e.SetMap(protocol.BodyTarget, "mapFlattenShape", encodeNestedShapeMap(s.MapFlattenShape), protocol.Metadata{ + Flatten: true, + }) + } + if len(s.MapNamedShape) > 0 { + e.SetMap(protocol.BodyTarget, "mapNamedShape", encodeNestedShapeMap(s.MapNamedShape), protocol.Metadata{ + MapLocationNameKey: "namedKey", MapLocationNameValue: "namedValue", + }) + } + if len(s.ListStr) > 0 { + e.SetList(protocol.BodyTarget, "liststr", func(le protocol.ListEncoder) { + for _, v := range s.ListStr { + le.ListAddValue(protocol.StringValue(*v)) + } + }, protocol.Metadata{}) + } + if len(s.ListFlatten) > 0 { + e.SetList(protocol.BodyTarget, "listFlatten", func(le protocol.ListEncoder) { + for _, v := range s.ListFlatten { + le.ListAddValue(protocol.StringValue(*v)) + } + }, protocol.Metadata{ + Flatten: true, + }) + } + if len(s.ListNamed) > 0 { + e.SetList(protocol.BodyTarget, "listNamed", func(le protocol.ListEncoder) { + for _, v := range s.ListNamed { + le.ListAddValue(protocol.StringValue(*v)) + } + }, protocol.Metadata{ + ListLocationName: "namedMember", + }) + } + if len(s.ListShape) > 0 { + e.SetList(protocol.BodyTarget, "listShape", encodeNestedShapeList(s.ListShape), protocol.Metadata{}) + } + if len(s.ListFlattenShape) > 0 { + e.SetList(protocol.BodyTarget, "listFlattenShape", encodeNestedShapeList(s.ListFlattenShape), protocol.Metadata{ + Flatten: true, + }) + } + if len(s.ListNamedShape) > 0 { + e.SetList(protocol.BodyTarget, "listNamedShape", encodeNestedShapeList(s.ListNamedShape), protocol.Metadata{ + ListLocationName: "namedMember", + }) + } + return nil +} + +type nestedShape struct { + Value *string + Prefixed *string +} + +func (s *nestedShape) MarshalFields(e protocol.FieldEncoder) error { + if s.Value != nil { + e.SetValue(protocol.BodyTarget, "value", protocol.StringValue(*s.Value), protocol.Metadata{}) + } + if s.Prefixed != nil { + e.SetValue(protocol.BodyTarget, "prefixed", protocol.StringValue(*s.Prefixed), protocol.Metadata{ + XMLNamespacePrefix: "prefix", + }) + } + return nil +} +func encodeNestedShapeMap(vs map[string]*nestedShape) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} +func encodeNestedShapeList(vs []*nestedShape) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + +func encode(s baseShape) (io.ReadSeeker, error) { + e := NewEncoder() + s.MarshalFields(e) + return e.Encode() +} diff --git a/service/apigateway/api.go b/service/apigateway/api.go index 47f1bbce921..c9760d27e47 100644 --- a/service/apigateway/api.go +++ b/service/apigateway/api.go @@ -10596,6 +10596,22 @@ func (s *AccessLogSettings) SetFormat(v string) *AccessLogSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AccessLogSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.DestinationArn != nil { + v := *s.DestinationArn + + e.SetValue(protocol.BodyTarget, "destinationArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Format != nil { + v := *s.Format + + e.SetValue(protocol.BodyTarget, "format", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents an AWS account that is associated with Amazon API Gateway. // // To view the account info, call GET on this resource. @@ -10683,6 +10699,32 @@ func (s *Account) SetThrottleSettings(v *ThrottleSettings) *Account { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Account) MarshalFields(e protocol.FieldEncoder) error { + if s.ApiKeyVersion != nil { + v := *s.ApiKeyVersion + + e.SetValue(protocol.BodyTarget, "apiKeyVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CloudwatchRoleArn != nil { + v := *s.CloudwatchRoleArn + + e.SetValue(protocol.BodyTarget, "cloudwatchRoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Features) > 0 { + v := s.Features + + e.SetList(protocol.BodyTarget, "features", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.ThrottleSettings != nil { + v := s.ThrottleSettings + + e.SetFields(protocol.BodyTarget, "throttleSettings", v, protocol.Metadata{}) + } + + return nil +} + // A resource that can be distributed to callers for executing Method resources // that require an API key. API keys can be mapped to any Stage on any RestApi, // which indicates that the callers with the API key can make requests to that @@ -10785,6 +10827,65 @@ func (s *ApiKey) SetValue(v string) *ApiKey { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ApiKey) MarshalFields(e protocol.FieldEncoder) error { + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.CustomerId != nil { + v := *s.CustomerId + + e.SetValue(protocol.BodyTarget, "customerId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.StageKeys) > 0 { + v := s.StageKeys + + e.SetList(protocol.BodyTarget, "stageKeys", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeApiKeyList(vs []*ApiKey) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // API stage name of the associated API stage in a usage plan. type ApiStage struct { _ struct{} `type:"structure"` @@ -10818,6 +10919,30 @@ func (s *ApiStage) SetStage(v string) *ApiStage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ApiStage) MarshalFields(e protocol.FieldEncoder) error { + if s.ApiId != nil { + v := *s.ApiId + + e.SetValue(protocol.BodyTarget, "apiId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Stage != nil { + v := *s.Stage + + e.SetValue(protocol.BodyTarget, "stage", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeApiStageList(vs []*ApiStage) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Represents an authorization layer for methods. If enabled on a method, API // Gateway will activate the authorizer when a client calls the method. // @@ -10968,6 +11093,70 @@ func (s *Authorizer) SetType(v string) *Authorizer { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Authorizer) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthType != nil { + v := *s.AuthType + + e.SetValue(protocol.BodyTarget, "authType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AuthorizerCredentials != nil { + v := *s.AuthorizerCredentials + + e.SetValue(protocol.BodyTarget, "authorizerCredentials", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AuthorizerResultTtlInSeconds != nil { + v := *s.AuthorizerResultTtlInSeconds + + e.SetValue(protocol.BodyTarget, "authorizerResultTtlInSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.AuthorizerUri != nil { + v := *s.AuthorizerUri + + e.SetValue(protocol.BodyTarget, "authorizerUri", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentitySource != nil { + v := *s.IdentitySource + + e.SetValue(protocol.BodyTarget, "identitySource", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityValidationExpression != nil { + v := *s.IdentityValidationExpression + + e.SetValue(protocol.BodyTarget, "identityValidationExpression", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.ProviderARNs) > 0 { + v := s.ProviderARNs + + e.SetList(protocol.BodyTarget, "providerARNs", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeAuthorizerList(vs []*Authorizer) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Represents the base path that callers of the API must provide as part of // the URL after the domain name. // @@ -11016,6 +11205,35 @@ func (s *BasePathMapping) SetStage(v string) *BasePathMapping { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BasePathMapping) MarshalFields(e protocol.FieldEncoder) error { + if s.BasePath != nil { + v := *s.BasePath + + e.SetValue(protocol.BodyTarget, "basePath", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.BodyTarget, "restApiId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Stage != nil { + v := *s.Stage + + e.SetValue(protocol.BodyTarget, "stage", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeBasePathMappingList(vs []*BasePathMapping) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Represents a client certificate used to configure client-side SSL authentication // while sending requests to the integration endpoint. // @@ -11083,6 +11301,45 @@ func (s *ClientCertificate) SetPemEncodedCertificate(v string) *ClientCertificat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ClientCertificate) MarshalFields(e protocol.FieldEncoder) error { + if s.ClientCertificateId != nil { + v := *s.ClientCertificateId + + e.SetValue(protocol.BodyTarget, "clientCertificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ExpirationDate != nil { + v := *s.ExpirationDate + + e.SetValue(protocol.BodyTarget, "expirationDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.PemEncodedCertificate != nil { + v := *s.PemEncodedCertificate + + e.SetValue(protocol.BodyTarget, "pemEncodedCertificate", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeClientCertificateList(vs []*ClientCertificate) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Request to create an ApiKey resource. type CreateApiKeyInput struct { _ struct{} `type:"structure"` @@ -11163,6 +11420,47 @@ func (s *CreateApiKeyInput) SetValue(v string) *CreateApiKeyInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateApiKeyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CustomerId != nil { + v := *s.CustomerId + + e.SetValue(protocol.BodyTarget, "customerId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.GenerateDistinctId != nil { + v := *s.GenerateDistinctId + + e.SetValue(protocol.BodyTarget, "generateDistinctId", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.StageKeys) > 0 { + v := s.StageKeys + + e.SetList(protocol.BodyTarget, "stageKeys", encodeStageKeyList(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to add a new Authorizer to an existing RestApi resource. type CreateAuthorizerInput struct { _ struct{} `type:"structure"` @@ -11335,6 +11633,62 @@ func (s *CreateAuthorizerInput) SetType(v string) *CreateAuthorizerInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateAuthorizerInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthType != nil { + v := *s.AuthType + + e.SetValue(protocol.BodyTarget, "authType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AuthorizerCredentials != nil { + v := *s.AuthorizerCredentials + + e.SetValue(protocol.BodyTarget, "authorizerCredentials", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AuthorizerResultTtlInSeconds != nil { + v := *s.AuthorizerResultTtlInSeconds + + e.SetValue(protocol.BodyTarget, "authorizerResultTtlInSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.AuthorizerUri != nil { + v := *s.AuthorizerUri + + e.SetValue(protocol.BodyTarget, "authorizerUri", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentitySource != nil { + v := *s.IdentitySource + + e.SetValue(protocol.BodyTarget, "identitySource", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityValidationExpression != nil { + v := *s.IdentityValidationExpression + + e.SetValue(protocol.BodyTarget, "identityValidationExpression", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.ProviderARNs) > 0 { + v := s.ProviderARNs + + e.SetList(protocol.BodyTarget, "providerARNs", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Requests Amazon API Gateway to create a new BasePathMapping resource. type CreateBasePathMappingInput struct { _ struct{} `type:"structure"` @@ -11411,6 +11765,32 @@ func (s *CreateBasePathMappingInput) SetStage(v string) *CreateBasePathMappingIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateBasePathMappingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BasePath != nil { + v := *s.BasePath + + e.SetValue(protocol.BodyTarget, "basePath", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.PathTarget, "domain_name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.BodyTarget, "restApiId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Stage != nil { + v := *s.Stage + + e.SetValue(protocol.BodyTarget, "stage", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Requests Amazon API Gateway to create a Deployment resource. type CreateDeploymentInput struct { _ struct{} `type:"structure"` @@ -11507,6 +11887,47 @@ func (s *CreateDeploymentInput) SetVariables(v map[string]*string) *CreateDeploy return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDeploymentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CacheClusterEnabled != nil { + v := *s.CacheClusterEnabled + + e.SetValue(protocol.BodyTarget, "cacheClusterEnabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.CacheClusterSize != nil { + v := *s.CacheClusterSize + + e.SetValue(protocol.BodyTarget, "cacheClusterSize", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StageDescription != nil { + v := *s.StageDescription + + e.SetValue(protocol.BodyTarget, "stageDescription", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StageName != nil { + v := *s.StageName + + e.SetValue(protocol.BodyTarget, "stageName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Variables) > 0 { + v := s.Variables + + e.SetMap(protocol.BodyTarget, "variables", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // Creates a new documentation part of a given API. type CreateDocumentationPartInput struct { _ struct{} `type:"structure"` @@ -11582,6 +12003,27 @@ func (s *CreateDocumentationPartInput) SetRestApiId(v string) *CreateDocumentati return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDocumentationPartInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Location != nil { + v := s.Location + + e.SetFields(protocol.BodyTarget, "location", v, protocol.Metadata{}) + } + if s.Properties != nil { + v := *s.Properties + + e.SetValue(protocol.BodyTarget, "properties", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Creates a new documentation version of a given API. type CreateDocumentationVersionInput struct { _ struct{} `type:"structure"` @@ -11653,6 +12095,32 @@ func (s *CreateDocumentationVersionInput) SetStageName(v string) *CreateDocument return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDocumentationVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DocumentationVersion != nil { + v := *s.DocumentationVersion + + e.SetValue(protocol.BodyTarget, "documentationVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StageName != nil { + v := *s.StageName + + e.SetValue(protocol.BodyTarget, "stageName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request to create a new domain name. type CreateDomainNameInput struct { _ struct{} `type:"structure"` @@ -11779,6 +12247,57 @@ func (s *CreateDomainNameInput) SetRegionalCertificateName(v string) *CreateDoma return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDomainNameInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateArn != nil { + v := *s.CertificateArn + + e.SetValue(protocol.BodyTarget, "certificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateBody != nil { + v := *s.CertificateBody + + e.SetValue(protocol.BodyTarget, "certificateBody", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateChain != nil { + v := *s.CertificateChain + + e.SetValue(protocol.BodyTarget, "certificateChain", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateName != nil { + v := *s.CertificateName + + e.SetValue(protocol.BodyTarget, "certificateName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificatePrivateKey != nil { + v := *s.CertificatePrivateKey + + e.SetValue(protocol.BodyTarget, "certificatePrivateKey", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.BodyTarget, "domainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EndpointConfiguration != nil { + v := s.EndpointConfiguration + + e.SetFields(protocol.BodyTarget, "endpointConfiguration", v, protocol.Metadata{}) + } + if s.RegionalCertificateArn != nil { + v := *s.RegionalCertificateArn + + e.SetValue(protocol.BodyTarget, "regionalCertificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RegionalCertificateName != nil { + v := *s.RegionalCertificateName + + e.SetValue(protocol.BodyTarget, "regionalCertificateName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to add a new Model to an existing RestApi resource. type CreateModelInput struct { _ struct{} `type:"structure"` @@ -11865,6 +12384,37 @@ func (s *CreateModelInput) SetSchema(v string) *CreateModelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateModelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.BodyTarget, "contentType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Schema != nil { + v := *s.Schema + + e.SetValue(protocol.BodyTarget, "schema", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Creates a RequestValidator of a given RestApi. type CreateRequestValidatorInput struct { _ struct{} `type:"structure"` @@ -11933,14 +12483,40 @@ func (s *CreateRequestValidatorInput) SetValidateRequestParameters(v bool) *Crea return s } -// Requests Amazon API Gateway to create a Resource resource. -type CreateResourceInput struct { - _ struct{} `type:"structure"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateRequestValidatorInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name - // The parent resource's identifier. - // - // ParentId is a required field - ParentId *string `location:"uri" locationName:"parent_id" type:"string" required:"true"` + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ValidateRequestBody != nil { + v := *s.ValidateRequestBody + + e.SetValue(protocol.BodyTarget, "validateRequestBody", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ValidateRequestParameters != nil { + v := *s.ValidateRequestParameters + + e.SetValue(protocol.BodyTarget, "validateRequestParameters", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + +// Requests Amazon API Gateway to create a Resource resource. +type CreateResourceInput struct { + _ struct{} `type:"structure"` + + // The parent resource's identifier. + // + // ParentId is a required field + ParentId *string `location:"uri" locationName:"parent_id" type:"string" required:"true"` // The last path segment for this resource. // @@ -12000,6 +12576,27 @@ func (s *CreateResourceInput) SetRestApiId(v string) *CreateResourceInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateResourceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ParentId != nil { + v := *s.ParentId + + e.SetValue(protocol.PathTarget, "parent_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PathPart != nil { + v := *s.PathPart + + e.SetValue(protocol.BodyTarget, "pathPart", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The POST Request to add a new RestApi resource to your collection. type CreateRestApiInput struct { _ struct{} `type:"structure"` @@ -12086,6 +12683,42 @@ func (s *CreateRestApiInput) SetVersion(v string) *CreateRestApiInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateRestApiInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.BinaryMediaTypes) > 0 { + v := s.BinaryMediaTypes + + e.SetList(protocol.BodyTarget, "binaryMediaTypes", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.CloneFrom != nil { + v := *s.CloneFrom + + e.SetValue(protocol.BodyTarget, "cloneFrom", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EndpointConfiguration != nil { + v := s.EndpointConfiguration + + e.SetFields(protocol.BodyTarget, "endpointConfiguration", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Requests Amazon API Gateway to create a Stage resource. type CreateStageInput struct { _ struct{} `type:"structure"` @@ -12200,6 +12833,52 @@ func (s *CreateStageInput) SetVariables(v map[string]*string) *CreateStageInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateStageInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CacheClusterEnabled != nil { + v := *s.CacheClusterEnabled + + e.SetValue(protocol.BodyTarget, "cacheClusterEnabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.CacheClusterSize != nil { + v := *s.CacheClusterSize + + e.SetValue(protocol.BodyTarget, "cacheClusterSize", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeploymentId != nil { + v := *s.DeploymentId + + e.SetValue(protocol.BodyTarget, "deploymentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DocumentationVersion != nil { + v := *s.DocumentationVersion + + e.SetValue(protocol.BodyTarget, "documentationVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StageName != nil { + v := *s.StageName + + e.SetValue(protocol.BodyTarget, "stageName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Variables) > 0 { + v := s.Variables + + e.SetMap(protocol.BodyTarget, "variables", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // The POST request to create a usage plan with the name, description, throttle // limits and quota limits, as well as the associated API stages, specified // in the payload. @@ -12277,6 +12956,37 @@ func (s *CreateUsagePlanInput) SetThrottle(v *ThrottleSettings) *CreateUsagePlan return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateUsagePlanInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ApiStages) > 0 { + v := s.ApiStages + + e.SetList(protocol.BodyTarget, "apiStages", encodeApiStageList(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Quota != nil { + v := s.Quota + + e.SetFields(protocol.BodyTarget, "quota", v, protocol.Metadata{}) + } + if s.Throttle != nil { + v := s.Throttle + + e.SetFields(protocol.BodyTarget, "throttle", v, protocol.Metadata{}) + } + + return nil +} + // The POST request to create a usage plan key for adding an existing API key // to a usage plan. type CreateUsagePlanKeyInput struct { @@ -12346,6 +13056,27 @@ func (s *CreateUsagePlanKeyInput) SetUsagePlanId(v string) *CreateUsagePlanKeyIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateUsagePlanKeyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.KeyId != nil { + v := *s.KeyId + + e.SetValue(protocol.BodyTarget, "keyId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyType != nil { + v := *s.KeyType + + e.SetValue(protocol.BodyTarget, "keyType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UsagePlanId != nil { + v := *s.UsagePlanId + + e.SetValue(protocol.PathTarget, "usageplanId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request to delete the ApiKey resource. type DeleteApiKeyInput struct { _ struct{} `type:"structure"` @@ -12385,6 +13116,17 @@ func (s *DeleteApiKeyInput) SetApiKey(v string) *DeleteApiKeyInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteApiKeyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApiKey != nil { + v := *s.ApiKey + + e.SetValue(protocol.PathTarget, "api_Key", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteApiKeyOutput struct { _ struct{} `type:"structure"` } @@ -12399,6 +13141,12 @@ func (s DeleteApiKeyOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteApiKeyOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Request to delete an existing Authorizer resource. type DeleteAuthorizerInput struct { _ struct{} `type:"structure"` @@ -12452,6 +13200,22 @@ func (s *DeleteAuthorizerInput) SetRestApiId(v string) *DeleteAuthorizerInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteAuthorizerInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthorizerId != nil { + v := *s.AuthorizerId + + e.SetValue(protocol.PathTarget, "authorizer_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteAuthorizerOutput struct { _ struct{} `type:"structure"` } @@ -12466,6 +13230,12 @@ func (s DeleteAuthorizerOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteAuthorizerOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A request to delete the BasePathMapping resource. type DeleteBasePathMappingInput struct { _ struct{} `type:"structure"` @@ -12519,6 +13289,22 @@ func (s *DeleteBasePathMappingInput) SetDomainName(v string) *DeleteBasePathMapp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBasePathMappingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BasePath != nil { + v := *s.BasePath + + e.SetValue(protocol.PathTarget, "base_path", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.PathTarget, "domain_name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteBasePathMappingOutput struct { _ struct{} `type:"structure"` } @@ -12533,6 +13319,12 @@ func (s DeleteBasePathMappingOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBasePathMappingOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A request to delete the ClientCertificate resource. type DeleteClientCertificateInput struct { _ struct{} `type:"structure"` @@ -12572,6 +13364,17 @@ func (s *DeleteClientCertificateInput) SetClientCertificateId(v string) *DeleteC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteClientCertificateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ClientCertificateId != nil { + v := *s.ClientCertificateId + + e.SetValue(protocol.PathTarget, "clientcertificate_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteClientCertificateOutput struct { _ struct{} `type:"structure"` } @@ -12586,6 +13389,12 @@ func (s DeleteClientCertificateOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteClientCertificateOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Requests Amazon API Gateway to delete a Deployment resource. type DeleteDeploymentInput struct { _ struct{} `type:"structure"` @@ -12639,6 +13448,22 @@ func (s *DeleteDeploymentInput) SetRestApiId(v string) *DeleteDeploymentInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDeploymentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeploymentId != nil { + v := *s.DeploymentId + + e.SetValue(protocol.PathTarget, "deployment_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteDeploymentOutput struct { _ struct{} `type:"structure"` } @@ -12653,6 +13478,12 @@ func (s DeleteDeploymentOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDeploymentOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Deletes an existing documentation part of an API. type DeleteDocumentationPartInput struct { _ struct{} `type:"structure"` @@ -12706,6 +13537,22 @@ func (s *DeleteDocumentationPartInput) SetRestApiId(v string) *DeleteDocumentati return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDocumentationPartInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DocumentationPartId != nil { + v := *s.DocumentationPartId + + e.SetValue(protocol.PathTarget, "part_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteDocumentationPartOutput struct { _ struct{} `type:"structure"` } @@ -12720,6 +13567,12 @@ func (s DeleteDocumentationPartOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDocumentationPartOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Deletes an existing documentation version of an API. type DeleteDocumentationVersionInput struct { _ struct{} `type:"structure"` @@ -12773,6 +13626,22 @@ func (s *DeleteDocumentationVersionInput) SetRestApiId(v string) *DeleteDocument return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDocumentationVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DocumentationVersion != nil { + v := *s.DocumentationVersion + + e.SetValue(protocol.PathTarget, "doc_version", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteDocumentationVersionOutput struct { _ struct{} `type:"structure"` } @@ -12787,6 +13656,12 @@ func (s DeleteDocumentationVersionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDocumentationVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A request to delete the DomainName resource. type DeleteDomainNameInput struct { _ struct{} `type:"structure"` @@ -12826,6 +13701,17 @@ func (s *DeleteDomainNameInput) SetDomainName(v string) *DeleteDomainNameInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDomainNameInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.PathTarget, "domain_name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteDomainNameOutput struct { _ struct{} `type:"structure"` } @@ -12840,6 +13726,12 @@ func (s DeleteDomainNameOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDomainNameOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Clears any customization of a GatewayResponse of a specified response type // on the given RestApi and resets it with the default settings. type DeleteGatewayResponseInput struct { @@ -12914,6 +13806,22 @@ func (s *DeleteGatewayResponseInput) SetRestApiId(v string) *DeleteGatewayRespon return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteGatewayResponseInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ResponseType != nil { + v := *s.ResponseType + + e.SetValue(protocol.PathTarget, "response_type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteGatewayResponseOutput struct { _ struct{} `type:"structure"` } @@ -12928,6 +13836,12 @@ func (s DeleteGatewayResponseOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteGatewayResponseOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Represents a delete integration request. type DeleteIntegrationInput struct { _ struct{} `type:"structure"` @@ -12995,6 +13909,27 @@ func (s *DeleteIntegrationInput) SetRestApiId(v string) *DeleteIntegrationInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteIntegrationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteIntegrationOutput struct { _ struct{} `type:"structure"` } @@ -13009,6 +13944,12 @@ func (s DeleteIntegrationOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteIntegrationOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Represents a delete integration response request. type DeleteIntegrationResponseInput struct { _ struct{} `type:"structure"` @@ -13090,6 +14031,32 @@ func (s *DeleteIntegrationResponseInput) SetStatusCode(v string) *DeleteIntegrat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteIntegrationResponseInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.PathTarget, "status_code", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteIntegrationResponseOutput struct { _ struct{} `type:"structure"` } @@ -13104,6 +14071,12 @@ func (s DeleteIntegrationResponseOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteIntegrationResponseOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Request to delete an existing Method resource. type DeleteMethodInput struct { _ struct{} `type:"structure"` @@ -13171,6 +14144,27 @@ func (s *DeleteMethodInput) SetRestApiId(v string) *DeleteMethodInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteMethodInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteMethodOutput struct { _ struct{} `type:"structure"` } @@ -13185,6 +14179,12 @@ func (s DeleteMethodOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteMethodOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A request to delete an existing MethodResponse resource. type DeleteMethodResponseInput struct { _ struct{} `type:"structure"` @@ -13266,6 +14266,32 @@ func (s *DeleteMethodResponseInput) SetStatusCode(v string) *DeleteMethodRespons return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteMethodResponseInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.PathTarget, "status_code", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteMethodResponseOutput struct { _ struct{} `type:"structure"` } @@ -13280,6 +14306,12 @@ func (s DeleteMethodResponseOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteMethodResponseOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Request to delete an existing model in an existing RestApi resource. type DeleteModelInput struct { _ struct{} `type:"structure"` @@ -13333,12 +14365,28 @@ func (s *DeleteModelInput) SetRestApiId(v string) *DeleteModelInput { return s } -type DeleteModelOutput struct { - _ struct{} `type:"structure"` -} +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteModelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ModelName != nil { + v := *s.ModelName -// String returns the string representation -func (s DeleteModelOutput) String() string { + e.SetValue(protocol.PathTarget, "model_name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +type DeleteModelOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteModelOutput) String() string { return awsutil.Prettify(s) } @@ -13347,6 +14395,12 @@ func (s DeleteModelOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteModelOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Deletes a specified RequestValidator of a given RestApi. type DeleteRequestValidatorInput struct { _ struct{} `type:"structure"` @@ -13400,6 +14454,22 @@ func (s *DeleteRequestValidatorInput) SetRestApiId(v string) *DeleteRequestValid return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteRequestValidatorInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RequestValidatorId != nil { + v := *s.RequestValidatorId + + e.SetValue(protocol.PathTarget, "requestvalidator_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteRequestValidatorOutput struct { _ struct{} `type:"structure"` } @@ -13414,6 +14484,12 @@ func (s DeleteRequestValidatorOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteRequestValidatorOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Request to delete a Resource. type DeleteResourceInput struct { _ struct{} `type:"structure"` @@ -13467,6 +14543,22 @@ func (s *DeleteResourceInput) SetRestApiId(v string) *DeleteResourceInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteResourceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteResourceOutput struct { _ struct{} `type:"structure"` } @@ -13481,6 +14573,12 @@ func (s DeleteResourceOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteResourceOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Request to delete the specified API from your collection. type DeleteRestApiInput struct { _ struct{} `type:"structure"` @@ -13520,6 +14618,17 @@ func (s *DeleteRestApiInput) SetRestApiId(v string) *DeleteRestApiInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteRestApiInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteRestApiOutput struct { _ struct{} `type:"structure"` } @@ -13534,6 +14643,12 @@ func (s DeleteRestApiOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteRestApiOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Requests Amazon API Gateway to delete a Stage resource. type DeleteStageInput struct { _ struct{} `type:"structure"` @@ -13587,6 +14702,22 @@ func (s *DeleteStageInput) SetStageName(v string) *DeleteStageInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteStageInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StageName != nil { + v := *s.StageName + + e.SetValue(protocol.PathTarget, "stage_name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteStageOutput struct { _ struct{} `type:"structure"` } @@ -13601,6 +14732,12 @@ func (s DeleteStageOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteStageOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The DELETE request to delete a usage plan of a given plan Id. type DeleteUsagePlanInput struct { _ struct{} `type:"structure"` @@ -13640,6 +14777,17 @@ func (s *DeleteUsagePlanInput) SetUsagePlanId(v string) *DeleteUsagePlanInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteUsagePlanInput) MarshalFields(e protocol.FieldEncoder) error { + if s.UsagePlanId != nil { + v := *s.UsagePlanId + + e.SetValue(protocol.PathTarget, "usageplanId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The DELETE request to delete a usage plan key and remove the underlying API // key from the associated usage plan. type DeleteUsagePlanKeyInput struct { @@ -13695,6 +14843,22 @@ func (s *DeleteUsagePlanKeyInput) SetUsagePlanId(v string) *DeleteUsagePlanKeyIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteUsagePlanKeyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.KeyId != nil { + v := *s.KeyId + + e.SetValue(protocol.PathTarget, "keyId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UsagePlanId != nil { + v := *s.UsagePlanId + + e.SetValue(protocol.PathTarget, "usageplanId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteUsagePlanKeyOutput struct { _ struct{} `type:"structure"` } @@ -13709,6 +14873,12 @@ func (s DeleteUsagePlanKeyOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteUsagePlanKeyOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type DeleteUsagePlanOutput struct { _ struct{} `type:"structure"` } @@ -13723,6 +14893,12 @@ func (s DeleteUsagePlanOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteUsagePlanOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // An immutable representation of a RestApi resource that can be called by users // using Stages. A deployment must be associated with a Stage for it to be callable // over the Internet. @@ -13784,6 +14960,45 @@ func (s *Deployment) SetId(v string) *Deployment { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Deployment) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ApiSummary) > 0 { + v := s.ApiSummary + + e.SetMap(protocol.BodyTarget, "apiSummary", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetMap(k, encodeMethodSnapshotMap(v)) + } + }, protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDeploymentList(vs []*Deployment) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A documentation part for a targeted API entity. // // A documentation part consists of a content map (properties) and a target @@ -13851,6 +15066,35 @@ func (s *DocumentationPart) SetProperties(v string) *DocumentationPart { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DocumentationPart) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Location != nil { + v := s.Location + + e.SetFields(protocol.BodyTarget, "location", v, protocol.Metadata{}) + } + if s.Properties != nil { + v := *s.Properties + + e.SetValue(protocol.BodyTarget, "properties", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDocumentationPartList(vs []*DocumentationPart) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Specifies the target API entity to which the documentation applies. type DocumentationPartLocation struct { _ struct{} `type:"structure"` @@ -13951,6 +15195,37 @@ func (s *DocumentationPartLocation) SetType(v string) *DocumentationPartLocation return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DocumentationPartLocation) MarshalFields(e protocol.FieldEncoder) error { + if s.Method != nil { + v := *s.Method + + e.SetValue(protocol.BodyTarget, "method", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Path != nil { + v := *s.Path + + e.SetValue(protocol.BodyTarget, "path", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.BodyTarget, "statusCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A snapshot of the documentation of an API. // // Publishing API documentation involves creating a documentation version associated @@ -14000,6 +15275,35 @@ func (s *DocumentationVersion) SetVersion(v string) *DocumentationVersion { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DocumentationVersion) MarshalFields(e protocol.FieldEncoder) error { + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDocumentationVersionList(vs []*DocumentationVersion) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Represents a custom domain name as a user-friendly host name of an API (RestApi). // // When you deploy an API, Amazon API Gateway creates a default host name for @@ -14144,6 +15448,75 @@ func (s *DomainName) SetRegionalHostedZoneId(v string) *DomainName { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DomainName) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateArn != nil { + v := *s.CertificateArn + + e.SetValue(protocol.BodyTarget, "certificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateName != nil { + v := *s.CertificateName + + e.SetValue(protocol.BodyTarget, "certificateName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateUploadDate != nil { + v := *s.CertificateUploadDate + + e.SetValue(protocol.BodyTarget, "certificateUploadDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.DistributionDomainName != nil { + v := *s.DistributionDomainName + + e.SetValue(protocol.BodyTarget, "distributionDomainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DistributionHostedZoneId != nil { + v := *s.DistributionHostedZoneId + + e.SetValue(protocol.BodyTarget, "distributionHostedZoneId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.BodyTarget, "domainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EndpointConfiguration != nil { + v := s.EndpointConfiguration + + e.SetFields(protocol.BodyTarget, "endpointConfiguration", v, protocol.Metadata{}) + } + if s.RegionalCertificateArn != nil { + v := *s.RegionalCertificateArn + + e.SetValue(protocol.BodyTarget, "regionalCertificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RegionalCertificateName != nil { + v := *s.RegionalCertificateName + + e.SetValue(protocol.BodyTarget, "regionalCertificateName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RegionalDomainName != nil { + v := *s.RegionalDomainName + + e.SetValue(protocol.BodyTarget, "regionalDomainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RegionalHostedZoneId != nil { + v := *s.RegionalHostedZoneId + + e.SetValue(protocol.BodyTarget, "regionalHostedZoneId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDomainNameList(vs []*DomainName) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The endpoint configuration to indicate the types of endpoints an API (RestApi) // or its custom domain name (DomainName) has. type EndpointConfiguration struct { @@ -14172,6 +15545,17 @@ func (s *EndpointConfiguration) SetTypes(v []*string) *EndpointConfiguration { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EndpointConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Types) > 0 { + v := s.Types + + e.SetList(protocol.BodyTarget, "types", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Request to flush authorizer cache entries on a specified stage. type FlushStageAuthorizersCacheInput struct { _ struct{} `type:"structure"` @@ -14225,6 +15609,22 @@ func (s *FlushStageAuthorizersCacheInput) SetStageName(v string) *FlushStageAuth return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FlushStageAuthorizersCacheInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StageName != nil { + v := *s.StageName + + e.SetValue(protocol.PathTarget, "stage_name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type FlushStageAuthorizersCacheOutput struct { _ struct{} `type:"structure"` } @@ -14239,6 +15639,12 @@ func (s FlushStageAuthorizersCacheOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FlushStageAuthorizersCacheOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Requests Amazon API Gateway to flush a stage's cache. type FlushStageCacheInput struct { _ struct{} `type:"structure"` @@ -14292,6 +15698,22 @@ func (s *FlushStageCacheInput) SetStageName(v string) *FlushStageCacheInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FlushStageCacheInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StageName != nil { + v := *s.StageName + + e.SetValue(protocol.PathTarget, "stage_name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type FlushStageCacheOutput struct { _ struct{} `type:"structure"` } @@ -14306,6 +15728,12 @@ func (s FlushStageCacheOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FlushStageCacheOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A request to generate a ClientCertificate resource. type GenerateClientCertificateInput struct { _ struct{} `type:"structure"` @@ -14330,6 +15758,17 @@ func (s *GenerateClientCertificateInput) SetDescription(v string) *GenerateClien return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GenerateClientCertificateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Requests Amazon API Gateway to get information about the current Account // resource. type GetAccountInput struct { @@ -14346,6 +15785,12 @@ func (s GetAccountInput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAccountInput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A request to get information about the current ApiKey resource. type GetApiKeyInput struct { _ struct{} `type:"structure"` @@ -14395,6 +15840,22 @@ func (s *GetApiKeyInput) SetIncludeValue(v bool) *GetApiKeyInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetApiKeyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApiKey != nil { + v := *s.ApiKey + + e.SetValue(protocol.PathTarget, "api_Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IncludeValue != nil { + v := *s.IncludeValue + + e.SetValue(protocol.QueryTarget, "includeValue", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // A request to get information about the current ApiKeys resource. type GetApiKeysInput struct { _ struct{} `type:"structure"` @@ -14457,6 +15918,37 @@ func (s *GetApiKeysInput) SetPosition(v string) *GetApiKeysInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetApiKeysInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CustomerId != nil { + v := *s.CustomerId + + e.SetValue(protocol.QueryTarget, "customerId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IncludeValues != nil { + v := *s.IncludeValues + + e.SetValue(protocol.QueryTarget, "includeValues", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NameQuery != nil { + v := *s.NameQuery + + e.SetValue(protocol.QueryTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents a collection of API keys as represented by an ApiKeys resource. // // Use API Keys (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-api-keys.html) @@ -14501,6 +15993,27 @@ func (s *GetApiKeysOutput) SetWarnings(v []*string) *GetApiKeysOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetApiKeysOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeApiKeyList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Warnings) > 0 { + v := s.Warnings + + e.SetList(protocol.BodyTarget, "warnings", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Request to describe an existing Authorizer resource. type GetAuthorizerInput struct { _ struct{} `type:"structure"` @@ -14554,6 +16067,22 @@ func (s *GetAuthorizerInput) SetRestApiId(v string) *GetAuthorizerInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAuthorizerInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthorizerId != nil { + v := *s.AuthorizerId + + e.SetValue(protocol.PathTarget, "authorizer_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to describe an existing Authorizers resource. type GetAuthorizersInput struct { _ struct{} `type:"structure"` @@ -14611,7 +16140,28 @@ func (s *GetAuthorizersInput) SetRestApiId(v string) *GetAuthorizersInput { return s } -// Represents a collection of Authorizer resources. +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAuthorizersInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +// Represents a collection of Authorizer resources. // // Enable custom authorization (http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html) type GetAuthorizersOutput struct { @@ -14645,6 +16195,22 @@ func (s *GetAuthorizersOutput) SetPosition(v string) *GetAuthorizersOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAuthorizersOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeAuthorizerList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to describe a BasePathMapping resource. type GetBasePathMappingInput struct { _ struct{} `type:"structure"` @@ -14701,6 +16267,22 @@ func (s *GetBasePathMappingInput) SetDomainName(v string) *GetBasePathMappingInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBasePathMappingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BasePath != nil { + v := *s.BasePath + + e.SetValue(protocol.PathTarget, "base_path", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.PathTarget, "domain_name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request to get information about a collection of BasePathMapping resources. type GetBasePathMappingsInput struct { _ struct{} `type:"structure"` @@ -14759,6 +16341,27 @@ func (s *GetBasePathMappingsInput) SetPosition(v string) *GetBasePathMappingsInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBasePathMappingsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.PathTarget, "domain_name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents a collection of BasePathMapping resources. // // Use Custom Domain Names (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) @@ -14793,6 +16396,22 @@ func (s *GetBasePathMappingsOutput) SetPosition(v string) *GetBasePathMappingsOu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBasePathMappingsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeBasePathMappingList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request to get information about the current ClientCertificate resource. type GetClientCertificateInput struct { _ struct{} `type:"structure"` @@ -14832,6 +16451,17 @@ func (s *GetClientCertificateInput) SetClientCertificateId(v string) *GetClientC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetClientCertificateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ClientCertificateId != nil { + v := *s.ClientCertificateId + + e.SetValue(protocol.PathTarget, "clientcertificate_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request to get information about a collection of ClientCertificate resources. type GetClientCertificatesInput struct { _ struct{} `type:"structure"` @@ -14866,6 +16496,22 @@ func (s *GetClientCertificatesInput) SetPosition(v string) *GetClientCertificate return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetClientCertificatesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents a collection of ClientCertificate resources. // // Use Client-Side Certificate (http://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) @@ -14900,6 +16546,22 @@ func (s *GetClientCertificatesOutput) SetPosition(v string) *GetClientCertificat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetClientCertificatesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeClientCertificateList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Requests Amazon API Gateway to get information about a Deployment resource. type GetDeploymentInput struct { _ struct{} `type:"structure"` @@ -14968,6 +16630,27 @@ func (s *GetDeploymentInput) SetRestApiId(v string) *GetDeploymentInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDeploymentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeploymentId != nil { + v := *s.DeploymentId + + e.SetValue(protocol.PathTarget, "deployment_id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Embed) > 0 { + v := s.Embed + + e.SetList(protocol.QueryTarget, "embed", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Requests Amazon API Gateway to get information about a Deployments collection. type GetDeploymentsInput struct { _ struct{} `type:"structure"` @@ -15026,6 +16709,27 @@ func (s *GetDeploymentsInput) SetRestApiId(v string) *GetDeploymentsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDeploymentsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents a collection resource that contains zero or more references to // your existing deployments, and links that guide you on how to interact with // your collection. The collection offers a paginated view of the contained @@ -15069,6 +16773,22 @@ func (s *GetDeploymentsOutput) SetPosition(v string) *GetDeploymentsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDeploymentsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeDeploymentList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Gets a specified documentation part of a given API. type GetDocumentationPartInput struct { _ struct{} `type:"structure"` @@ -15122,6 +16842,22 @@ func (s *GetDocumentationPartInput) SetRestApiId(v string) *GetDocumentationPart return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDocumentationPartInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DocumentationPartId != nil { + v := *s.DocumentationPartId + + e.SetValue(protocol.PathTarget, "part_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Gets the documentation parts of an API. The result may be filtered by the // type, name, or path of API entities (targets). type GetDocumentationPartsInput struct { @@ -15218,6 +16954,47 @@ func (s *GetDocumentationPartsInput) SetType(v string) *GetDocumentationPartsInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDocumentationPartsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.LocationStatus != nil { + v := *s.LocationStatus + + e.SetValue(protocol.QueryTarget, "locationStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NameQuery != nil { + v := *s.NameQuery + + e.SetValue(protocol.QueryTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Path != nil { + v := *s.Path + + e.SetValue(protocol.QueryTarget, "path", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.QueryTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The collection of documentation parts of an API. // // Documenting an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), DocumentationPart @@ -15252,6 +17029,22 @@ func (s *GetDocumentationPartsOutput) SetPosition(v string) *GetDocumentationPar return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDocumentationPartsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeDocumentationPartList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Gets a documentation snapshot of an API. type GetDocumentationVersionInput struct { _ struct{} `type:"structure"` @@ -15305,6 +17098,22 @@ func (s *GetDocumentationVersionInput) SetRestApiId(v string) *GetDocumentationV return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDocumentationVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DocumentationVersion != nil { + v := *s.DocumentationVersion + + e.SetValue(protocol.PathTarget, "doc_version", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Gets the documentation versions of an API. type GetDocumentationVersionsInput struct { _ struct{} `type:"structure"` @@ -15362,6 +17171,27 @@ func (s *GetDocumentationVersionsInput) SetRestApiId(v string) *GetDocumentation return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDocumentationVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The collection of documentation snapshots of an API. // // Use the DocumentationVersions to manage documentation snapshots associated @@ -15400,6 +17230,22 @@ func (s *GetDocumentationVersionsOutput) SetPosition(v string) *GetDocumentation return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDocumentationVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeDocumentationVersionList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to get the name of a DomainName resource. type GetDomainNameInput struct { _ struct{} `type:"structure"` @@ -15439,6 +17285,17 @@ func (s *GetDomainNameInput) SetDomainName(v string) *GetDomainNameInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDomainNameInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.PathTarget, "domain_name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to describe a collection of DomainName resources. type GetDomainNamesInput struct { _ struct{} `type:"structure"` @@ -15473,6 +17330,22 @@ func (s *GetDomainNamesInput) SetPosition(v string) *GetDomainNamesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDomainNamesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents a collection of DomainName resources. // // Use Client-Side Certificate (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) @@ -15507,6 +17380,22 @@ func (s *GetDomainNamesOutput) SetPosition(v string) *GetDomainNamesOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDomainNamesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeDomainNameList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request a new export of a RestApi for a particular Stage. type GetExportInput struct { _ struct{} `type:"structure"` @@ -15600,6 +17489,37 @@ func (s *GetExportInput) SetStageName(v string) *GetExportInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetExportInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Accepts != nil { + v := *s.Accepts + + e.SetValue(protocol.HeaderTarget, "Accept", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ExportType != nil { + v := *s.ExportType + + e.SetValue(protocol.PathTarget, "export_type", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Parameters) > 0 { + v := s.Parameters + + e.SetMap(protocol.QueryTarget, "parameters", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StageName != nil { + v := *s.StageName + + e.SetValue(protocol.PathTarget, "stage_name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The binary blob response to GetExport, which contains the generated SDK. type GetExportOutput struct { _ struct{} `type:"structure" payload:"Body"` @@ -15643,6 +17563,27 @@ func (s *GetExportOutput) SetContentType(v string) *GetExportOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetExportOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := s.Body + + e.SetStream(protocol.PayloadTarget, "body", protocol.BytesStream(v), protocol.Metadata{}) + } + if s.ContentDisposition != nil { + v := *s.ContentDisposition + + e.SetValue(protocol.HeaderTarget, "Content-Disposition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Gets a GatewayResponse of a specified response type on the given RestApi. type GetGatewayResponseInput struct { _ struct{} `type:"structure"` @@ -15716,6 +17657,22 @@ func (s *GetGatewayResponseInput) SetRestApiId(v string) *GetGatewayResponseInpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetGatewayResponseInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ResponseType != nil { + v := *s.ResponseType + + e.SetValue(protocol.PathTarget, "response_type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Gets the GatewayResponses collection on the given RestApi. If an API developer // has not added any definitions for gateway responses, the result will be the // Amazon API Gateway-generated default GatewayResponses collection for the @@ -15778,6 +17735,27 @@ func (s *GetGatewayResponsesInput) SetRestApiId(v string) *GetGatewayResponsesIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetGatewayResponsesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The collection of the GatewayResponse instances of a RestApi as a responseType-to-GatewayResponse // object map of key-value pairs. As such, pagination is not supported for querying // this collection. @@ -15969,6 +17947,22 @@ func (s *GetGatewayResponsesOutput) SetPosition(v string) *GetGatewayResponsesOu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetGatewayResponsesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeUpdateGatewayResponseOutputList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents a request to get the integration configuration. type GetIntegrationInput struct { _ struct{} `type:"structure"` @@ -16036,6 +18030,27 @@ func (s *GetIntegrationInput) SetRestApiId(v string) *GetIntegrationInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetIntegrationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents a get integration response request. type GetIntegrationResponseInput struct { _ struct{} `type:"structure"` @@ -16117,6 +18132,32 @@ func (s *GetIntegrationResponseInput) SetStatusCode(v string) *GetIntegrationRes return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetIntegrationResponseInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.PathTarget, "status_code", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to describe an existing Method resource. type GetMethodInput struct { _ struct{} `type:"structure"` @@ -16184,14 +18225,35 @@ func (s *GetMethodInput) SetRestApiId(v string) *GetMethodInput { return s } -// Request to describe a MethodResponse resource. -type GetMethodResponseInput struct { - _ struct{} `type:"structure"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetMethodInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HttpMethod != nil { + v := *s.HttpMethod - // The HTTP verb of the Method resource. - // - // HttpMethod is a required field - HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +// Request to describe a MethodResponse resource. +type GetMethodResponseInput struct { + _ struct{} `type:"structure"` + + // The HTTP verb of the Method resource. + // + // HttpMethod is a required field + HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` // The Resource identifier for the MethodResponse resource. // @@ -16265,6 +18327,32 @@ func (s *GetMethodResponseInput) SetStatusCode(v string) *GetMethodResponseInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetMethodResponseInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.PathTarget, "status_code", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to list information about a model in an existing RestApi resource. type GetModelInput struct { _ struct{} `type:"structure"` @@ -16329,6 +18417,27 @@ func (s *GetModelInput) SetRestApiId(v string) *GetModelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetModelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Flatten != nil { + v := *s.Flatten + + e.SetValue(protocol.QueryTarget, "flatten", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ModelName != nil { + v := *s.ModelName + + e.SetValue(protocol.PathTarget, "model_name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to generate a sample mapping template used to transform the payload. type GetModelTemplateInput struct { _ struct{} `type:"structure"` @@ -16382,6 +18491,22 @@ func (s *GetModelTemplateInput) SetRestApiId(v string) *GetModelTemplateInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetModelTemplateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ModelName != nil { + v := *s.ModelName + + e.SetValue(protocol.PathTarget, "model_name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents a mapping template used to transform a payload. // // Mapping Templates (http://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html#models-mappings-mappings) @@ -16409,6 +18534,17 @@ func (s *GetModelTemplateOutput) SetValue(v string) *GetModelTemplateOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetModelTemplateOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to list existing Models defined for a RestApi resource. type GetModelsInput struct { _ struct{} `type:"structure"` @@ -16467,6 +18603,27 @@ func (s *GetModelsInput) SetRestApiId(v string) *GetModelsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetModelsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents a collection of Model resources. // // Method, MethodResponse, Models and Mappings (http://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html) @@ -16501,6 +18658,22 @@ func (s *GetModelsOutput) SetPosition(v string) *GetModelsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetModelsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeModelList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Gets a RequestValidator of a given RestApi. type GetRequestValidatorInput struct { _ struct{} `type:"structure"` @@ -16554,6 +18727,22 @@ func (s *GetRequestValidatorInput) SetRestApiId(v string) *GetRequestValidatorIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetRequestValidatorInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RequestValidatorId != nil { + v := *s.RequestValidatorId + + e.SetValue(protocol.PathTarget, "requestvalidator_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Gets the RequestValidators collection of a given RestApi. type GetRequestValidatorsInput struct { _ struct{} `type:"structure"` @@ -16611,6 +18800,27 @@ func (s *GetRequestValidatorsInput) SetRestApiId(v string) *GetRequestValidators return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetRequestValidatorsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A collection of RequestValidator resources of a given RestApi. // // In Swagger, the RequestValidators of an API is defined by the x-amazon-apigateway-request-validators @@ -16649,6 +18859,22 @@ func (s *GetRequestValidatorsOutput) SetPosition(v string) *GetRequestValidators return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetRequestValidatorsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeUpdateRequestValidatorOutputList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to list information about a resource. type GetResourceInput struct { _ struct{} `type:"structure"` @@ -16716,6 +18942,27 @@ func (s *GetResourceInput) SetRestApiId(v string) *GetResourceInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetResourceInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Embed) > 0 { + v := s.Embed + + e.SetList(protocol.QueryTarget, "embed", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to list information about a collection of resources. type GetResourcesInput struct { _ struct{} `type:"structure"` @@ -16788,6 +19035,32 @@ func (s *GetResourcesInput) SetRestApiId(v string) *GetResourcesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetResourcesInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Embed) > 0 { + v := s.Embed + + e.SetList(protocol.QueryTarget, "embed", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents a collection of Resource resources. // // Create an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) @@ -16822,6 +19095,22 @@ func (s *GetResourcesOutput) SetPosition(v string) *GetResourcesOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetResourcesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeResourceList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The GET request to list an existing RestApi defined for your collection. type GetRestApiInput struct { _ struct{} `type:"structure"` @@ -16861,6 +19150,17 @@ func (s *GetRestApiInput) SetRestApiId(v string) *GetRestApiInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetRestApiInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The GET request to list existing RestApis defined for your collection. type GetRestApisInput struct { _ struct{} `type:"structure"` @@ -16895,6 +19195,22 @@ func (s *GetRestApisInput) SetPosition(v string) *GetRestApisInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetRestApisInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains references to your APIs and links that guide you in how to interact // with your collection. A collection offers a paginated view of your APIs. // @@ -16930,6 +19246,22 @@ func (s *GetRestApisOutput) SetPosition(v string) *GetRestApisOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetRestApisOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeRestApiList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request a new generated client SDK for a RestApi and Stage. type GetSdkInput struct { _ struct{} `type:"structure"` @@ -17011,6 +19343,32 @@ func (s *GetSdkInput) SetStageName(v string) *GetSdkInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSdkInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Parameters) > 0 { + v := s.Parameters + + e.SetMap(protocol.QueryTarget, "parameters", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SdkType != nil { + v := *s.SdkType + + e.SetValue(protocol.PathTarget, "sdk_type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StageName != nil { + v := *s.StageName + + e.SetValue(protocol.PathTarget, "stage_name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The binary blob response to GetSdk, which contains the generated SDK. type GetSdkOutput struct { _ struct{} `type:"structure" payload:"Body"` @@ -17053,6 +19411,27 @@ func (s *GetSdkOutput) SetContentType(v string) *GetSdkOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSdkOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := s.Body + + e.SetStream(protocol.PayloadTarget, "body", protocol.BytesStream(v), protocol.Metadata{}) + } + if s.ContentDisposition != nil { + v := *s.ContentDisposition + + e.SetValue(protocol.HeaderTarget, "Content-Disposition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Get an SdkType instance. type GetSdkTypeInput struct { _ struct{} `type:"structure"` @@ -17092,6 +19471,17 @@ func (s *GetSdkTypeInput) SetId(v string) *GetSdkTypeInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSdkTypeInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "sdktype_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Get the SdkTypes collection. type GetSdkTypesInput struct { _ struct{} `type:"structure"` @@ -17125,6 +19515,22 @@ func (s *GetSdkTypesInput) SetPosition(v string) *GetSdkTypesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSdkTypesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The collection of SdkType instances. type GetSdkTypesOutput struct { _ struct{} `type:"structure"` @@ -17157,6 +19563,22 @@ func (s *GetSdkTypesOutput) SetPosition(v string) *GetSdkTypesOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSdkTypesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeSdkTypeList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Requests Amazon API Gateway to get information about a Stage resource. type GetStageInput struct { _ struct{} `type:"structure"` @@ -17210,6 +19632,22 @@ func (s *GetStageInput) SetStageName(v string) *GetStageInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetStageInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StageName != nil { + v := *s.StageName + + e.SetValue(protocol.PathTarget, "stage_name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Requests Amazon API Gateway to get information about one or more Stage resources. type GetStagesInput struct { _ struct{} `type:"structure"` @@ -17258,6 +19696,22 @@ func (s *GetStagesInput) SetRestApiId(v string) *GetStagesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetStagesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeploymentId != nil { + v := *s.DeploymentId + + e.SetValue(protocol.QueryTarget, "deploymentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A list of Stage resources that are associated with the ApiKey resource. // // Deploying API in Stages (http://docs.aws.amazon.com/apigateway/latest/developerguide/stages.html) @@ -17284,6 +19738,17 @@ func (s *GetStagesOutput) SetItem(v []*Stage) *GetStagesOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetStagesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Item) > 0 { + v := s.Item + + e.SetList(protocol.BodyTarget, "item", encodeStageList(v), protocol.Metadata{}) + } + + return nil +} + // The GET request to get the usage data of a usage plan in a specified time // interval. type GetUsageInput struct { @@ -17379,6 +19844,42 @@ func (s *GetUsageInput) SetUsagePlanId(v string) *GetUsageInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetUsageInput) MarshalFields(e protocol.FieldEncoder) error { + if s.EndDate != nil { + v := *s.EndDate + + e.SetValue(protocol.QueryTarget, "endDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyId != nil { + v := *s.KeyId + + e.SetValue(protocol.QueryTarget, "keyId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartDate != nil { + v := *s.StartDate + + e.SetValue(protocol.QueryTarget, "startDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UsagePlanId != nil { + v := *s.UsagePlanId + + e.SetValue(protocol.PathTarget, "usageplanId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The GET request to get a usage plan of a given plan identifier. type GetUsagePlanInput struct { _ struct{} `type:"structure"` @@ -17418,6 +19919,17 @@ func (s *GetUsagePlanInput) SetUsagePlanId(v string) *GetUsagePlanInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetUsagePlanInput) MarshalFields(e protocol.FieldEncoder) error { + if s.UsagePlanId != nil { + v := *s.UsagePlanId + + e.SetValue(protocol.PathTarget, "usageplanId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The GET request to get a usage plan key of a given key identifier. type GetUsagePlanKeyInput struct { _ struct{} `type:"structure"` @@ -17473,6 +19985,22 @@ func (s *GetUsagePlanKeyInput) SetUsagePlanId(v string) *GetUsagePlanKeyInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetUsagePlanKeyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.KeyId != nil { + v := *s.KeyId + + e.SetValue(protocol.PathTarget, "keyId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UsagePlanId != nil { + v := *s.UsagePlanId + + e.SetValue(protocol.PathTarget, "usageplanId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The GET request to get all the usage plan keys representing the API keys // added to a specified usage plan. type GetUsagePlanKeysInput struct { @@ -17541,18 +20069,44 @@ func (s *GetUsagePlanKeysInput) SetUsagePlanId(v string) *GetUsagePlanKeysInput return s } -// Represents the collection of usage plan keys added to usage plans for the -// associated API keys and, possibly, other types of keys. -// -// Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) -type GetUsagePlanKeysOutput struct { - _ struct{} `type:"structure"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetUsagePlanKeysInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Limit != nil { + v := *s.Limit - // The current page of elements from this collection. - Items []*UsagePlanKey `locationName:"item" type:"list"` + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NameQuery != nil { + v := *s.NameQuery - Position *string `locationName:"position" type:"string"` -} + e.SetValue(protocol.QueryTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UsagePlanId != nil { + v := *s.UsagePlanId + + e.SetValue(protocol.PathTarget, "usageplanId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +// Represents the collection of usage plan keys added to usage plans for the +// associated API keys and, possibly, other types of keys. +// +// Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) +type GetUsagePlanKeysOutput struct { + _ struct{} `type:"structure"` + + // The current page of elements from this collection. + Items []*UsagePlanKey `locationName:"item" type:"list"` + + Position *string `locationName:"position" type:"string"` +} // String returns the string representation func (s GetUsagePlanKeysOutput) String() string { @@ -17576,6 +20130,22 @@ func (s *GetUsagePlanKeysOutput) SetPosition(v string) *GetUsagePlanKeysOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetUsagePlanKeysOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeUsagePlanKeyList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The GET request to get all the usage plans of the caller's account. type GetUsagePlansInput struct { _ struct{} `type:"structure"` @@ -17618,6 +20188,27 @@ func (s *GetUsagePlansInput) SetPosition(v string) *GetUsagePlansInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetUsagePlansInput) MarshalFields(e protocol.FieldEncoder) error { + if s.KeyId != nil { + v := *s.KeyId + + e.SetValue(protocol.QueryTarget, "keyId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.QueryTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents a collection of usage plans for an AWS account. // // Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) @@ -17652,6 +20243,22 @@ func (s *GetUsagePlansOutput) SetPosition(v string) *GetUsagePlansOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetUsagePlansOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "item", encodeUsagePlanList(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The POST request to import API keys from an external source, such as a CSV-formatted // file. type ImportApiKeysInput struct { @@ -17718,6 +20325,27 @@ func (s *ImportApiKeysInput) SetFormat(v string) *ImportApiKeysInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ImportApiKeysInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := s.Body + + e.SetStream(protocol.PayloadTarget, "body", protocol.BytesStream(v), protocol.Metadata{}) + } + if s.FailOnWarnings != nil { + v := *s.FailOnWarnings + + e.SetValue(protocol.QueryTarget, "failonwarnings", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Format != nil { + v := *s.Format + + e.SetValue(protocol.QueryTarget, "format", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The identifier of an ApiKey used in a UsagePlan. type ImportApiKeysOutput struct { _ struct{} `type:"structure"` @@ -17751,6 +20379,22 @@ func (s *ImportApiKeysOutput) SetWarnings(v []*string) *ImportApiKeysOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ImportApiKeysOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Ids) > 0 { + v := s.Ids + + e.SetList(protocol.BodyTarget, "ids", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.Warnings) > 0 { + v := s.Warnings + + e.SetList(protocol.BodyTarget, "warnings", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Import documentation parts from an external (e.g., Swagger) definition file. type ImportDocumentationPartsInput struct { _ struct{} `type:"structure" payload:"Body"` @@ -17827,6 +20471,32 @@ func (s *ImportDocumentationPartsInput) SetRestApiId(v string) *ImportDocumentat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ImportDocumentationPartsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := s.Body + + e.SetStream(protocol.PayloadTarget, "body", protocol.BytesStream(v), protocol.Metadata{}) + } + if s.FailOnWarnings != nil { + v := *s.FailOnWarnings + + e.SetValue(protocol.QueryTarget, "failonwarnings", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Mode != nil { + v := *s.Mode + + e.SetValue(protocol.QueryTarget, "mode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A collection of the imported DocumentationPart identifiers. // // This is used to return the result when documentation parts in an external @@ -17866,6 +20536,22 @@ func (s *ImportDocumentationPartsOutput) SetWarnings(v []*string) *ImportDocumen return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ImportDocumentationPartsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Ids) > 0 { + v := s.Ids + + e.SetList(protocol.BodyTarget, "ids", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.Warnings) > 0 { + v := s.Warnings + + e.SetList(protocol.BodyTarget, "warnings", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // A POST request to import an API to Amazon API Gateway using an input of an // API definition file. type ImportRestApiInput struct { @@ -17947,6 +20633,27 @@ func (s *ImportRestApiInput) SetParameters(v map[string]*string) *ImportRestApiI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ImportRestApiInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := s.Body + + e.SetStream(protocol.PayloadTarget, "body", protocol.BytesStream(v), protocol.Metadata{}) + } + if s.FailOnWarnings != nil { + v := *s.FailOnWarnings + + e.SetValue(protocol.QueryTarget, "failonwarnings", protocol.BoolValue(v), protocol.Metadata{}) + } + if len(s.Parameters) > 0 { + v := s.Parameters + + e.SetMap(protocol.QueryTarget, "parameters", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // Represents an HTTP, HTTP_PROXY, AWS, AWS_PROXY, or Mock integration. // // In the API Gateway console, the built-in Lambda integration is an AWS integration. @@ -18152,6 +20859,72 @@ func (s *Integration) SetUri(v string) *Integration { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Integration) MarshalFields(e protocol.FieldEncoder) error { + if len(s.CacheKeyParameters) > 0 { + v := s.CacheKeyParameters + + e.SetList(protocol.BodyTarget, "cacheKeyParameters", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.CacheNamespace != nil { + v := *s.CacheNamespace + + e.SetValue(protocol.BodyTarget, "cacheNamespace", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentHandling != nil { + v := *s.ContentHandling + + e.SetValue(protocol.BodyTarget, "contentHandling", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Credentials != nil { + v := *s.Credentials + + e.SetValue(protocol.BodyTarget, "credentials", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.BodyTarget, "httpMethod", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.IntegrationResponses) > 0 { + v := s.IntegrationResponses + + e.SetMap(protocol.BodyTarget, "integrationResponses", encodeIntegrationResponseMap(v), protocol.Metadata{}) + } + if s.PassthroughBehavior != nil { + v := *s.PassthroughBehavior + + e.SetValue(protocol.BodyTarget, "passthroughBehavior", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.RequestParameters) > 0 { + v := s.RequestParameters + + e.SetMap(protocol.BodyTarget, "requestParameters", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if len(s.RequestTemplates) > 0 { + v := s.RequestTemplates + + e.SetMap(protocol.BodyTarget, "requestTemplates", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.TimeoutInMillis != nil { + v := *s.TimeoutInMillis + + e.SetValue(protocol.BodyTarget, "timeoutInMillis", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Uri != nil { + v := *s.Uri + + e.SetValue(protocol.BodyTarget, "uri", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents an integration response. The status code must map to an existing // MethodResponse, and parameters and templates can be used to transform the // back-end response. @@ -18245,6 +21018,45 @@ func (s *IntegrationResponse) SetStatusCode(v string) *IntegrationResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *IntegrationResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ContentHandling != nil { + v := *s.ContentHandling + + e.SetValue(protocol.BodyTarget, "contentHandling", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.ResponseParameters) > 0 { + v := s.ResponseParameters + + e.SetMap(protocol.BodyTarget, "responseParameters", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if len(s.ResponseTemplates) > 0 { + v := s.ResponseTemplates + + e.SetMap(protocol.BodyTarget, "responseTemplates", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.SelectionPattern != nil { + v := *s.SelectionPattern + + e.SetValue(protocol.BodyTarget, "selectionPattern", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.BodyTarget, "statusCode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeIntegrationResponseMap(vs map[string]*IntegrationResponse) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // Represents a client-facing interface by which the client calls the API to // access back-end resources. A Method resource is integrated with an Integration // resource. Both consist of a request and one or more responses. The method @@ -18501,6 +21313,70 @@ func (s *Method) SetRequestValidatorId(v string) *Method { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Method) MarshalFields(e protocol.FieldEncoder) error { + if s.ApiKeyRequired != nil { + v := *s.ApiKeyRequired + + e.SetValue(protocol.BodyTarget, "apiKeyRequired", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.AuthorizationType != nil { + v := *s.AuthorizationType + + e.SetValue(protocol.BodyTarget, "authorizationType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AuthorizerId != nil { + v := *s.AuthorizerId + + e.SetValue(protocol.BodyTarget, "authorizerId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.BodyTarget, "httpMethod", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MethodIntegration != nil { + v := s.MethodIntegration + + e.SetFields(protocol.BodyTarget, "methodIntegration", v, protocol.Metadata{}) + } + if len(s.MethodResponses) > 0 { + v := s.MethodResponses + + e.SetMap(protocol.BodyTarget, "methodResponses", encodeMethodResponseMap(v), protocol.Metadata{}) + } + if s.OperationName != nil { + v := *s.OperationName + + e.SetValue(protocol.BodyTarget, "operationName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.RequestModels) > 0 { + v := s.RequestModels + + e.SetMap(protocol.BodyTarget, "requestModels", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if len(s.RequestParameters) > 0 { + v := s.RequestParameters + + e.SetMap(protocol.BodyTarget, "requestParameters", protocol.EncodeBoolMap(v), protocol.Metadata{}) + } + if s.RequestValidatorId != nil { + v := *s.RequestValidatorId + + e.SetValue(protocol.BodyTarget, "requestValidatorId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeMethodMap(vs map[string]*Method) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // Represents a method response of a given HTTP status code returned to the // client. The method response is passed from the back end through the associated // integration response that can be transformed using a mapping template. @@ -18580,6 +21456,35 @@ func (s *MethodResponse) SetStatusCode(v string) *MethodResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MethodResponse) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ResponseModels) > 0 { + v := s.ResponseModels + + e.SetMap(protocol.BodyTarget, "responseModels", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if len(s.ResponseParameters) > 0 { + v := s.ResponseParameters + + e.SetMap(protocol.BodyTarget, "responseParameters", protocol.EncodeBoolMap(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.BodyTarget, "statusCode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeMethodResponseMap(vs map[string]*MethodResponse) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // Specifies the method setting properties. type MethodSetting struct { _ struct{} `type:"structure"` @@ -18706,6 +21611,70 @@ func (s *MethodSetting) SetUnauthorizedCacheControlHeaderStrategy(v string) *Met return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MethodSetting) MarshalFields(e protocol.FieldEncoder) error { + if s.CacheDataEncrypted != nil { + v := *s.CacheDataEncrypted + + e.SetValue(protocol.BodyTarget, "cacheDataEncrypted", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.CacheTtlInSeconds != nil { + v := *s.CacheTtlInSeconds + + e.SetValue(protocol.BodyTarget, "cacheTtlInSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.CachingEnabled != nil { + v := *s.CachingEnabled + + e.SetValue(protocol.BodyTarget, "cachingEnabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.DataTraceEnabled != nil { + v := *s.DataTraceEnabled + + e.SetValue(protocol.BodyTarget, "dataTraceEnabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.LoggingLevel != nil { + v := *s.LoggingLevel + + e.SetValue(protocol.BodyTarget, "loggingLevel", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MetricsEnabled != nil { + v := *s.MetricsEnabled + + e.SetValue(protocol.BodyTarget, "metricsEnabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.RequireAuthorizationForCacheControl != nil { + v := *s.RequireAuthorizationForCacheControl + + e.SetValue(protocol.BodyTarget, "requireAuthorizationForCacheControl", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ThrottlingBurstLimit != nil { + v := *s.ThrottlingBurstLimit + + e.SetValue(protocol.BodyTarget, "throttlingBurstLimit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ThrottlingRateLimit != nil { + v := *s.ThrottlingRateLimit + + e.SetValue(protocol.BodyTarget, "throttlingRateLimit", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.UnauthorizedCacheControlHeaderStrategy != nil { + v := *s.UnauthorizedCacheControlHeaderStrategy + + e.SetValue(protocol.BodyTarget, "unauthorizedCacheControlHeaderStrategy", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeMethodSettingMap(vs map[string]*MethodSetting) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // Represents a summary of a Method resource, given a particular date and time. type MethodSnapshot struct { _ struct{} `type:"structure"` @@ -18741,6 +21710,30 @@ func (s *MethodSnapshot) SetAuthorizationType(v string) *MethodSnapshot { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MethodSnapshot) MarshalFields(e protocol.FieldEncoder) error { + if s.ApiKeyRequired != nil { + v := *s.ApiKeyRequired + + e.SetValue(protocol.BodyTarget, "apiKeyRequired", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.AuthorizationType != nil { + v := *s.AuthorizationType + + e.SetValue(protocol.BodyTarget, "authorizationType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeMethodSnapshotMap(vs map[string]*MethodSnapshot) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // Represents the data structure of a method's request or response payload. // // A request model defines the data structure of the client-supplied request @@ -18816,6 +21809,45 @@ func (s *Model) SetSchema(v string) *Model { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Model) MarshalFields(e protocol.FieldEncoder) error { + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.BodyTarget, "contentType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Schema != nil { + v := *s.Schema + + e.SetValue(protocol.BodyTarget, "schema", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeModelList(vs []*Model) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A single patch operation to apply to the specified resource. Please refer // to http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how // each operation is used. @@ -18883,22 +21915,56 @@ func (s *PatchOperation) SetValue(v string) *PatchOperation { return s } -// Creates a customization of a GatewayResponse of a specified response type -// and status code on the given RestApi. -type PutGatewayResponseInput struct { - _ struct{} `type:"structure"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PatchOperation) MarshalFields(e protocol.FieldEncoder) error { + if s.From != nil { + v := *s.From - // Response parameters (paths, query strings and headers) of the GatewayResponse - // as a string-to-string map of key-value pairs. - ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` + e.SetValue(protocol.BodyTarget, "from", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Op != nil { + v := *s.Op - // Response templates of the GatewayResponse as a string-to-string map of key-value - // pairs. - ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` + e.SetValue(protocol.BodyTarget, "op", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Path != nil { + v := *s.Path - // The response type of the associated GatewayResponse. Valid values are ACCESS_DENIED - // - // API_CONFIGURATION_ERROR + e.SetValue(protocol.BodyTarget, "path", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodePatchOperationList(vs []*PatchOperation) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + +// Creates a customization of a GatewayResponse of a specified response type +// and status code on the given RestApi. +type PutGatewayResponseInput struct { + _ struct{} `type:"structure"` + + // Response parameters (paths, query strings and headers) of the GatewayResponse + // as a string-to-string map of key-value pairs. + ResponseParameters map[string]*string `locationName:"responseParameters" type:"map"` + + // Response templates of the GatewayResponse as a string-to-string map of key-value + // pairs. + ResponseTemplates map[string]*string `locationName:"responseTemplates" type:"map"` + + // The response type of the associated GatewayResponse. Valid values are ACCESS_DENIED + // + // API_CONFIGURATION_ERROR // AUTHORIZER_FAILURE // AUTHORIZER_CONFIGURATION_ERROR // BAD_REQUEST_PARAMETERS @@ -18986,6 +22052,37 @@ func (s *PutGatewayResponseInput) SetStatusCode(v string) *PutGatewayResponseInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutGatewayResponseInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ResponseParameters) > 0 { + v := s.ResponseParameters + + e.SetMap(protocol.BodyTarget, "responseParameters", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if len(s.ResponseTemplates) > 0 { + v := s.ResponseTemplates + + e.SetMap(protocol.BodyTarget, "responseTemplates", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.ResponseType != nil { + v := *s.ResponseType + + e.SetValue(protocol.PathTarget, "response_type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.BodyTarget, "statusCode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Sets up a method's integration. type PutIntegrationInput struct { _ struct{} `type:"structure"` @@ -19200,6 +22297,82 @@ func (s *PutIntegrationInput) SetUri(v string) *PutIntegrationInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutIntegrationInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.CacheKeyParameters) > 0 { + v := s.CacheKeyParameters + + e.SetList(protocol.BodyTarget, "cacheKeyParameters", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.CacheNamespace != nil { + v := *s.CacheNamespace + + e.SetValue(protocol.BodyTarget, "cacheNamespace", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentHandling != nil { + v := *s.ContentHandling + + e.SetValue(protocol.BodyTarget, "contentHandling", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Credentials != nil { + v := *s.Credentials + + e.SetValue(protocol.BodyTarget, "credentials", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IntegrationHttpMethod != nil { + v := *s.IntegrationHttpMethod + + e.SetValue(protocol.BodyTarget, "httpMethod", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PassthroughBehavior != nil { + v := *s.PassthroughBehavior + + e.SetValue(protocol.BodyTarget, "passthroughBehavior", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.RequestParameters) > 0 { + v := s.RequestParameters + + e.SetMap(protocol.BodyTarget, "requestParameters", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if len(s.RequestTemplates) > 0 { + v := s.RequestTemplates + + e.SetMap(protocol.BodyTarget, "requestTemplates", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimeoutInMillis != nil { + v := *s.TimeoutInMillis + + e.SetValue(protocol.BodyTarget, "timeoutInMillis", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Uri != nil { + v := *s.Uri + + e.SetValue(protocol.BodyTarget, "uri", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents a put integration response request. type PutIntegrationResponseInput struct { _ struct{} `type:"structure"` @@ -19337,6 +22510,52 @@ func (s *PutIntegrationResponseInput) SetStatusCode(v string) *PutIntegrationRes return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutIntegrationResponseInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ContentHandling != nil { + v := *s.ContentHandling + + e.SetValue(protocol.BodyTarget, "contentHandling", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.ResponseParameters) > 0 { + v := s.ResponseParameters + + e.SetMap(protocol.BodyTarget, "responseParameters", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if len(s.ResponseTemplates) > 0 { + v := s.ResponseTemplates + + e.SetMap(protocol.BodyTarget, "responseTemplates", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SelectionPattern != nil { + v := *s.SelectionPattern + + e.SetValue(protocol.BodyTarget, "selectionPattern", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.PathTarget, "status_code", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to add a method to an existing Resource resource. type PutMethodInput struct { _ struct{} `type:"structure"` @@ -19486,6 +22705,62 @@ func (s *PutMethodInput) SetRestApiId(v string) *PutMethodInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutMethodInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApiKeyRequired != nil { + v := *s.ApiKeyRequired + + e.SetValue(protocol.BodyTarget, "apiKeyRequired", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.AuthorizationType != nil { + v := *s.AuthorizationType + + e.SetValue(protocol.BodyTarget, "authorizationType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AuthorizerId != nil { + v := *s.AuthorizerId + + e.SetValue(protocol.BodyTarget, "authorizerId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OperationName != nil { + v := *s.OperationName + + e.SetValue(protocol.BodyTarget, "operationName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.RequestModels) > 0 { + v := s.RequestModels + + e.SetMap(protocol.BodyTarget, "requestModels", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if len(s.RequestParameters) > 0 { + v := s.RequestParameters + + e.SetMap(protocol.BodyTarget, "requestParameters", protocol.EncodeBoolMap(v), protocol.Metadata{}) + } + if s.RequestValidatorId != nil { + v := *s.RequestValidatorId + + e.SetValue(protocol.BodyTarget, "requestValidatorId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to add a MethodResponse to an existing Method resource. type PutMethodResponseInput struct { _ struct{} `type:"structure"` @@ -19597,6 +22872,42 @@ func (s *PutMethodResponseInput) SetStatusCode(v string) *PutMethodResponseInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutMethodResponseInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.ResponseModels) > 0 { + v := s.ResponseModels + + e.SetMap(protocol.BodyTarget, "responseModels", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if len(s.ResponseParameters) > 0 { + v := s.ResponseParameters + + e.SetMap(protocol.BodyTarget, "responseParameters", protocol.EncodeBoolMap(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.PathTarget, "status_code", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A PUT request to update an existing API, with external API definitions specified // as the request body. type PutRestApiInput struct { @@ -19685,6 +22996,37 @@ func (s *PutRestApiInput) SetRestApiId(v string) *PutRestApiInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutRestApiInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := s.Body + + e.SetStream(protocol.PayloadTarget, "body", protocol.BytesStream(v), protocol.Metadata{}) + } + if s.FailOnWarnings != nil { + v := *s.FailOnWarnings + + e.SetValue(protocol.QueryTarget, "failonwarnings", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Mode != nil { + v := *s.Mode + + e.SetValue(protocol.QueryTarget, "mode", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Parameters) > 0 { + v := s.Parameters + + e.SetMap(protocol.QueryTarget, "parameters", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Quotas configured for a usage plan. type QuotaSettings struct { _ struct{} `type:"structure"` @@ -19729,6 +23071,27 @@ func (s *QuotaSettings) SetPeriod(v string) *QuotaSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *QuotaSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.BodyTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Offset != nil { + v := *s.Offset + + e.SetValue(protocol.BodyTarget, "offset", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Period != nil { + v := *s.Period + + e.SetValue(protocol.BodyTarget, "period", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents an API resource. // // Create an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) @@ -19847,6 +23210,45 @@ func (s *Resource) SetResourceMethods(v map[string]*Method) *Resource { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Resource) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParentId != nil { + v := *s.ParentId + + e.SetValue(protocol.BodyTarget, "parentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Path != nil { + v := *s.Path + + e.SetValue(protocol.BodyTarget, "path", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PathPart != nil { + v := *s.PathPart + + e.SetValue(protocol.BodyTarget, "pathPart", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.ResourceMethods) > 0 { + v := s.ResourceMethods + + e.SetMap(protocol.BodyTarget, "resourceMethods", encodeMethodMap(v), protocol.Metadata{}) + } + + return nil +} + +func encodeResourceList(vs []*Resource) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Represents a REST API. // // Create an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) @@ -19940,6 +23342,60 @@ func (s *RestApi) SetWarnings(v []*string) *RestApi { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RestApi) MarshalFields(e protocol.FieldEncoder) error { + if len(s.BinaryMediaTypes) > 0 { + v := s.BinaryMediaTypes + + e.SetList(protocol.BodyTarget, "binaryMediaTypes", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EndpointConfiguration != nil { + v := s.EndpointConfiguration + + e.SetFields(protocol.BodyTarget, "endpointConfiguration", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Warnings) > 0 { + v := s.Warnings + + e.SetList(protocol.BodyTarget, "warnings", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeRestApiList(vs []*RestApi) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A configuration property of an SDK type. type SdkConfigurationProperty struct { _ struct{} `type:"structure"` @@ -20001,6 +23457,45 @@ func (s *SdkConfigurationProperty) SetRequired(v bool) *SdkConfigurationProperty return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SdkConfigurationProperty) MarshalFields(e protocol.FieldEncoder) error { + if s.DefaultValue != nil { + v := *s.DefaultValue + + e.SetValue(protocol.BodyTarget, "defaultValue", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FriendlyName != nil { + v := *s.FriendlyName + + e.SetValue(protocol.BodyTarget, "friendlyName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Required != nil { + v := *s.Required + + e.SetValue(protocol.BodyTarget, "required", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeSdkConfigurationPropertyList(vs []*SdkConfigurationProperty) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A type of SDK that API Gateway can generate. type SdkType struct { _ struct{} `type:"structure"` @@ -20052,6 +23547,40 @@ func (s *SdkType) SetId(v string) *SdkType { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SdkType) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ConfigurationProperties) > 0 { + v := s.ConfigurationProperties + + e.SetList(protocol.BodyTarget, "configurationProperties", encodeSdkConfigurationPropertyList(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FriendlyName != nil { + v := *s.FriendlyName + + e.SetValue(protocol.BodyTarget, "friendlyName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeSdkTypeList(vs []*SdkType) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Represents a unique identifier for a version of a deployed RestApi that is // callable by users. // @@ -20193,6 +23722,85 @@ func (s *Stage) SetVariables(v map[string]*string) *Stage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Stage) MarshalFields(e protocol.FieldEncoder) error { + if s.AccessLogSettings != nil { + v := s.AccessLogSettings + + e.SetFields(protocol.BodyTarget, "accessLogSettings", v, protocol.Metadata{}) + } + if s.CacheClusterEnabled != nil { + v := *s.CacheClusterEnabled + + e.SetValue(protocol.BodyTarget, "cacheClusterEnabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.CacheClusterSize != nil { + v := *s.CacheClusterSize + + e.SetValue(protocol.BodyTarget, "cacheClusterSize", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CacheClusterStatus != nil { + v := *s.CacheClusterStatus + + e.SetValue(protocol.BodyTarget, "cacheClusterStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ClientCertificateId != nil { + v := *s.ClientCertificateId + + e.SetValue(protocol.BodyTarget, "clientCertificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.DeploymentId != nil { + v := *s.DeploymentId + + e.SetValue(protocol.BodyTarget, "deploymentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DocumentationVersion != nil { + v := *s.DocumentationVersion + + e.SetValue(protocol.BodyTarget, "documentationVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if len(s.MethodSettings) > 0 { + v := s.MethodSettings + + e.SetMap(protocol.BodyTarget, "methodSettings", encodeMethodSettingMap(v), protocol.Metadata{}) + } + if s.StageName != nil { + v := *s.StageName + + e.SetValue(protocol.BodyTarget, "stageName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Variables) > 0 { + v := s.Variables + + e.SetMap(protocol.BodyTarget, "variables", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + +func encodeStageList(vs []*Stage) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A reference to a unique stage identified in the format {restApiId}/{stage}. type StageKey struct { _ struct{} `type:"structure"` @@ -20226,6 +23834,30 @@ func (s *StageKey) SetStageName(v string) *StageKey { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StageKey) MarshalFields(e protocol.FieldEncoder) error { + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.BodyTarget, "restApiId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StageName != nil { + v := *s.StageName + + e.SetValue(protocol.BodyTarget, "stageName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeStageKeyList(vs []*StageKey) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Make a request to simulate the execution of an Authorizer. type TestInvokeAuthorizerInput struct { _ struct{} `type:"structure"` @@ -20328,6 +23960,47 @@ func (s *TestInvokeAuthorizerInput) SetStageVariables(v map[string]*string) *Tes return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TestInvokeAuthorizerInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AdditionalContext) > 0 { + v := s.AdditionalContext + + e.SetMap(protocol.BodyTarget, "additionalContext", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.AuthorizerId != nil { + v := *s.AuthorizerId + + e.SetValue(protocol.PathTarget, "authorizer_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Body != nil { + v := *s.Body + + e.SetValue(protocol.BodyTarget, "body", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Headers) > 0 { + v := s.Headers + + e.SetMap(protocol.BodyTarget, "headers", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.PathWithQueryString != nil { + v := *s.PathWithQueryString + + e.SetValue(protocol.BodyTarget, "pathWithQueryString", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.StageVariables) > 0 { + v := s.StageVariables + + e.SetMap(protocol.BodyTarget, "stageVariables", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // Represents the response of the test invoke request for a custom Authorizer type TestInvokeAuthorizerOutput struct { _ struct{} `type:"structure"` @@ -20408,6 +24081,52 @@ func (s *TestInvokeAuthorizerOutput) SetPrincipalId(v string) *TestInvokeAuthori return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TestInvokeAuthorizerOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Authorization) > 0 { + v := s.Authorization + + e.SetMap(protocol.BodyTarget, "authorization", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + if len(s.Claims) > 0 { + v := s.Claims + + e.SetMap(protocol.BodyTarget, "claims", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.ClientStatus != nil { + v := *s.ClientStatus + + e.SetValue(protocol.BodyTarget, "clientStatus", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Latency != nil { + v := *s.Latency + + e.SetValue(protocol.BodyTarget, "latency", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Log != nil { + v := *s.Log + + e.SetValue(protocol.BodyTarget, "log", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Policy != nil { + v := *s.Policy + + e.SetValue(protocol.BodyTarget, "policy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PrincipalId != nil { + v := *s.PrincipalId + + e.SetValue(protocol.BodyTarget, "principalId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Make a request to simulate the execution of a Method. type TestInvokeMethodInput struct { _ struct{} `type:"structure"` @@ -20524,6 +24243,52 @@ func (s *TestInvokeMethodInput) SetStageVariables(v map[string]*string) *TestInv return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TestInvokeMethodInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := *s.Body + + e.SetValue(protocol.BodyTarget, "body", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ClientCertificateId != nil { + v := *s.ClientCertificateId + + e.SetValue(protocol.BodyTarget, "clientCertificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Headers) > 0 { + v := s.Headers + + e.SetMap(protocol.BodyTarget, "headers", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PathWithQueryString != nil { + v := *s.PathWithQueryString + + e.SetValue(protocol.BodyTarget, "pathWithQueryString", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.StageVariables) > 0 { + v := s.StageVariables + + e.SetMap(protocol.BodyTarget, "stageVariables", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // Represents the response of the test invoke request in the HTTP method. // // Test API using the API Gateway console (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-test-method.html#how-to-test-method-console) @@ -20586,6 +24351,37 @@ func (s *TestInvokeMethodOutput) SetStatus(v int64) *TestInvokeMethodOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TestInvokeMethodOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := *s.Body + + e.SetValue(protocol.BodyTarget, "body", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Headers) > 0 { + v := s.Headers + + e.SetMap(protocol.BodyTarget, "headers", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.Latency != nil { + v := *s.Latency + + e.SetValue(protocol.BodyTarget, "latency", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Log != nil { + v := *s.Log + + e.SetValue(protocol.BodyTarget, "log", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The API request rate limits. type ThrottleSettings struct { _ struct{} `type:"structure"` @@ -20621,6 +24417,22 @@ func (s *ThrottleSettings) SetRateLimit(v float64) *ThrottleSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ThrottleSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.BurstLimit != nil { + v := *s.BurstLimit + + e.SetValue(protocol.BodyTarget, "burstLimit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RateLimit != nil { + v := *s.RateLimit + + e.SetValue(protocol.BodyTarget, "rateLimit", protocol.Float64Value(v), protocol.Metadata{}) + } + + return nil +} + // Requests Amazon API Gateway to change information about the current Account // resource. type UpdateAccountInput struct { @@ -20647,6 +24459,17 @@ func (s *UpdateAccountInput) SetPatchOperations(v []*PatchOperation) *UpdateAcco return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateAccountInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + + return nil +} + // A request to change information about an ApiKey resource. type UpdateApiKeyInput struct { _ struct{} `type:"structure"` @@ -20696,6 +24519,22 @@ func (s *UpdateApiKeyInput) SetPatchOperations(v []*PatchOperation) *UpdateApiKe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateApiKeyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApiKey != nil { + v := *s.ApiKey + + e.SetValue(protocol.PathTarget, "api_Key", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + + return nil +} + // Request to update an existing Authorizer resource. type UpdateAuthorizerInput struct { _ struct{} `type:"structure"` @@ -20759,6 +24598,27 @@ func (s *UpdateAuthorizerInput) SetRestApiId(v string) *UpdateAuthorizerInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateAuthorizerInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthorizerId != nil { + v := *s.AuthorizerId + + e.SetValue(protocol.PathTarget, "authorizer_id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request to change information about the BasePathMapping resource. type UpdateBasePathMappingInput struct { _ struct{} `type:"structure"` @@ -20822,6 +24682,27 @@ func (s *UpdateBasePathMappingInput) SetPatchOperations(v []*PatchOperation) *Up return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateBasePathMappingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BasePath != nil { + v := *s.BasePath + + e.SetValue(protocol.PathTarget, "base_path", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.PathTarget, "domain_name", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + + return nil +} + // A request to change information about an ClientCertificate resource. type UpdateClientCertificateInput struct { _ struct{} `type:"structure"` @@ -20871,6 +24752,22 @@ func (s *UpdateClientCertificateInput) SetPatchOperations(v []*PatchOperation) * return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateClientCertificateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ClientCertificateId != nil { + v := *s.ClientCertificateId + + e.SetValue(protocol.PathTarget, "clientcertificate_id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + + return nil +} + // Requests Amazon API Gateway to change information about a Deployment resource. type UpdateDeploymentInput struct { _ struct{} `type:"structure"` @@ -20935,6 +24832,27 @@ func (s *UpdateDeploymentInput) SetRestApiId(v string) *UpdateDeploymentInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateDeploymentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeploymentId != nil { + v := *s.DeploymentId + + e.SetValue(protocol.PathTarget, "deployment_id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Updates an existing documentation part of a given API. type UpdateDocumentationPartInput struct { _ struct{} `type:"structure"` @@ -20998,6 +24916,27 @@ func (s *UpdateDocumentationPartInput) SetRestApiId(v string) *UpdateDocumentati return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateDocumentationPartInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DocumentationPartId != nil { + v := *s.DocumentationPartId + + e.SetValue(protocol.PathTarget, "part_id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Updates an existing documentation version of an API. type UpdateDocumentationVersionInput struct { _ struct{} `type:"structure"` @@ -21061,6 +25000,27 @@ func (s *UpdateDocumentationVersionInput) SetRestApiId(v string) *UpdateDocument return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateDocumentationVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DocumentationVersion != nil { + v := *s.DocumentationVersion + + e.SetValue(protocol.PathTarget, "doc_version", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request to change information about the DomainName resource. type UpdateDomainNameInput struct { _ struct{} `type:"structure"` @@ -21110,6 +25070,22 @@ func (s *UpdateDomainNameInput) SetPatchOperations(v []*PatchOperation) *UpdateD return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateDomainNameInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.PathTarget, "domain_name", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + + return nil +} + // Updates a GatewayResponse of a specified response type on the given RestApi. type UpdateGatewayResponseInput struct { _ struct{} `type:"structure"` @@ -21193,6 +25169,27 @@ func (s *UpdateGatewayResponseInput) SetRestApiId(v string) *UpdateGatewayRespon return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateGatewayResponseInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.ResponseType != nil { + v := *s.ResponseType + + e.SetValue(protocol.PathTarget, "response_type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A gateway response of a given response type and status code, with optional // response parameters and mapping templates. // @@ -21317,6 +25314,45 @@ func (s *UpdateGatewayResponseOutput) SetStatusCode(v string) *UpdateGatewayResp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateGatewayResponseOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DefaultResponse != nil { + v := *s.DefaultResponse + + e.SetValue(protocol.BodyTarget, "defaultResponse", protocol.BoolValue(v), protocol.Metadata{}) + } + if len(s.ResponseParameters) > 0 { + v := s.ResponseParameters + + e.SetMap(protocol.BodyTarget, "responseParameters", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if len(s.ResponseTemplates) > 0 { + v := s.ResponseTemplates + + e.SetMap(protocol.BodyTarget, "responseTemplates", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.ResponseType != nil { + v := *s.ResponseType + + e.SetValue(protocol.BodyTarget, "responseType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.BodyTarget, "statusCode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeUpdateGatewayResponseOutputList(vs []*UpdateGatewayResponseOutput) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Represents an update integration request. type UpdateIntegrationInput struct { _ struct{} `type:"structure"` @@ -21394,6 +25430,32 @@ func (s *UpdateIntegrationInput) SetRestApiId(v string) *UpdateIntegrationInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateIntegrationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents an update integration response request. type UpdateIntegrationResponseInput struct { _ struct{} `type:"structure"` @@ -21485,6 +25547,37 @@ func (s *UpdateIntegrationResponseInput) SetStatusCode(v string) *UpdateIntegrat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateIntegrationResponseInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.PathTarget, "status_code", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to update an existing Method resource. type UpdateMethodInput struct { _ struct{} `type:"structure"` @@ -21562,6 +25655,32 @@ func (s *UpdateMethodInput) SetRestApiId(v string) *UpdateMethodInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateMethodInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request to update an existing MethodResponse resource. type UpdateMethodResponseInput struct { _ struct{} `type:"structure"` @@ -21653,6 +25772,37 @@ func (s *UpdateMethodResponseInput) SetStatusCode(v string) *UpdateMethodRespons return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateMethodResponseInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.PathTarget, "http_method", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.PathTarget, "status_code", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to update an existing model in an existing RestApi resource. type UpdateModelInput struct { _ struct{} `type:"structure"` @@ -21716,6 +25866,27 @@ func (s *UpdateModelInput) SetRestApiId(v string) *UpdateModelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateModelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ModelName != nil { + v := *s.ModelName + + e.SetValue(protocol.PathTarget, "model_name", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Updates a RequestValidator of a given RestApi. type UpdateRequestValidatorInput struct { _ struct{} `type:"structure"` @@ -21779,6 +25950,27 @@ func (s *UpdateRequestValidatorInput) SetRestApiId(v string) *UpdateRequestValid return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateRequestValidatorInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.RequestValidatorId != nil { + v := *s.RequestValidatorId + + e.SetValue(protocol.PathTarget, "requestvalidator_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A set of validation rules for incoming Method requests. // // In Swagger, a RequestValidator of an API is defined by the x-amazon-apigateway-request-validators.requestValidator @@ -21840,6 +26032,40 @@ func (s *UpdateRequestValidatorOutput) SetValidateRequestParameters(v bool) *Upd return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateRequestValidatorOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ValidateRequestBody != nil { + v := *s.ValidateRequestBody + + e.SetValue(protocol.BodyTarget, "validateRequestBody", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ValidateRequestParameters != nil { + v := *s.ValidateRequestParameters + + e.SetValue(protocol.BodyTarget, "validateRequestParameters", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeUpdateRequestValidatorOutputList(vs []*UpdateRequestValidatorOutput) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Request to change information about a Resource resource. type UpdateResourceInput struct { _ struct{} `type:"structure"` @@ -21903,6 +26129,27 @@ func (s *UpdateResourceInput) SetRestApiId(v string) *UpdateResourceInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateResourceInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "resource_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to update an existing RestApi resource in your collection. type UpdateRestApiInput struct { _ struct{} `type:"structure"` @@ -21952,6 +26199,22 @@ func (s *UpdateRestApiInput) SetRestApiId(v string) *UpdateRestApiInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateRestApiInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Requests Amazon API Gateway to change information about a Stage resource. type UpdateStageInput struct { _ struct{} `type:"structure"` @@ -22015,6 +26278,27 @@ func (s *UpdateStageInput) SetStageName(v string) *UpdateStageInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateStageInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.RestApiId != nil { + v := *s.RestApiId + + e.SetValue(protocol.PathTarget, "restapi_id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StageName != nil { + v := *s.StageName + + e.SetValue(protocol.PathTarget, "stage_name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The PATCH request to grant a temporary extension to the remaining quota of // a usage plan associated with a specified API key. type UpdateUsageInput struct { @@ -22080,6 +26364,27 @@ func (s *UpdateUsageInput) SetUsagePlanId(v string) *UpdateUsageInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateUsageInput) MarshalFields(e protocol.FieldEncoder) error { + if s.KeyId != nil { + v := *s.KeyId + + e.SetValue(protocol.PathTarget, "keyId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.UsagePlanId != nil { + v := *s.UsagePlanId + + e.SetValue(protocol.PathTarget, "usageplanId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The PATCH request to update a usage plan of a given plan Id. type UpdateUsagePlanInput struct { _ struct{} `type:"structure"` @@ -22129,6 +26434,22 @@ func (s *UpdateUsagePlanInput) SetUsagePlanId(v string) *UpdateUsagePlanInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateUsagePlanInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.PatchOperations) > 0 { + v := s.PatchOperations + + e.SetList(protocol.BodyTarget, "patchOperations", encodePatchOperationList(v), protocol.Metadata{}) + } + if s.UsagePlanId != nil { + v := *s.UsagePlanId + + e.SetValue(protocol.PathTarget, "usageplanId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents the usage data of a usage plan. // // Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html), Manage Usage in a Usage Plan (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-usage-plans-with-console.html#api-gateway-usage-plan-manage-usage) @@ -22194,6 +26515,47 @@ func (s *Usage) SetUsagePlanId(v string) *Usage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Usage) MarshalFields(e protocol.FieldEncoder) error { + if s.EndDate != nil { + v := *s.EndDate + + e.SetValue(protocol.BodyTarget, "endDate", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Items) > 0 { + v := s.Items + + e.SetMap(protocol.BodyTarget, "values", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, func(le protocol.ListEncoder) { + for _, item := range v { + v := item + le.ListAddList(protocol.EncodeInt64List(v)) + } + }) + } + }, protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartDate != nil { + v := *s.StartDate + + e.SetValue(protocol.BodyTarget, "startDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UsagePlanId != nil { + v := *s.UsagePlanId + + e.SetValue(protocol.BodyTarget, "usagePlanId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents a usage plan than can specify who can assess associated API stages // with specified request limits and quotas. // @@ -22280,6 +26642,55 @@ func (s *UsagePlan) SetThrottle(v *ThrottleSettings) *UsagePlan { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UsagePlan) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ApiStages) > 0 { + v := s.ApiStages + + e.SetList(protocol.BodyTarget, "apiStages", encodeApiStageList(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ProductCode != nil { + v := *s.ProductCode + + e.SetValue(protocol.BodyTarget, "productCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Quota != nil { + v := s.Quota + + e.SetFields(protocol.BodyTarget, "quota", v, protocol.Metadata{}) + } + if s.Throttle != nil { + v := s.Throttle + + e.SetFields(protocol.BodyTarget, "throttle", v, protocol.Metadata{}) + } + + return nil +} + +func encodeUsagePlanList(vs []*UsagePlan) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Represents a usage plan key to identify a plan customer. // // To associate an API stage with a selected API key in a usage plan, you must @@ -22336,6 +26747,40 @@ func (s *UsagePlanKey) SetValue(v string) *UsagePlanKey { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UsagePlanKey) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeUsagePlanKeyList(vs []*UsagePlanKey) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + const ( // ApiKeysFormatCsv is a ApiKeysFormat enum value ApiKeysFormatCsv = "csv" diff --git a/service/batch/api.go b/service/batch/api.go index 4af4e082b10..58756226a7e 100644 --- a/service/batch/api.go +++ b/service/batch/api.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" ) const opCancelJob = "CancelJob" @@ -1473,6 +1474,37 @@ func (s *AttemptContainerDetail) SetTaskArn(v string) *AttemptContainerDetail { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttemptContainerDetail) MarshalFields(e protocol.FieldEncoder) error { + if s.ContainerInstanceArn != nil { + v := *s.ContainerInstanceArn + + e.SetValue(protocol.BodyTarget, "containerInstanceArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ExitCode != nil { + v := *s.ExitCode + + e.SetValue(protocol.BodyTarget, "exitCode", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.LogStreamName != nil { + v := *s.LogStreamName + + e.SetValue(protocol.BodyTarget, "logStreamName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Reason != nil { + v := *s.Reason + + e.SetValue(protocol.BodyTarget, "reason", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TaskArn != nil { + v := *s.TaskArn + + e.SetValue(protocol.BodyTarget, "taskArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // An object representing a job attempt. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/AttemptDetail type AttemptDetail struct { @@ -1528,6 +1560,40 @@ func (s *AttemptDetail) SetStoppedAt(v int64) *AttemptDetail { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttemptDetail) MarshalFields(e protocol.FieldEncoder) error { + if s.Container != nil { + v := s.Container + + e.SetFields(protocol.BodyTarget, "container", v, protocol.Metadata{}) + } + if s.StartedAt != nil { + v := *s.StartedAt + + e.SetValue(protocol.BodyTarget, "startedAt", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StatusReason != nil { + v := *s.StatusReason + + e.SetValue(protocol.BodyTarget, "statusReason", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StoppedAt != nil { + v := *s.StoppedAt + + e.SetValue(protocol.BodyTarget, "stoppedAt", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeAttemptDetailList(vs []*AttemptDetail) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CancelJobRequest type CancelJobInput struct { _ struct{} `type:"structure"` @@ -1583,6 +1649,22 @@ func (s *CancelJobInput) SetReason(v string) *CancelJobInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CancelJobInput) MarshalFields(e protocol.FieldEncoder) error { + if s.JobId != nil { + v := *s.JobId + + e.SetValue(protocol.BodyTarget, "jobId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Reason != nil { + v := *s.Reason + + e.SetValue(protocol.BodyTarget, "reason", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CancelJobResponse type CancelJobOutput struct { _ struct{} `type:"structure"` @@ -1598,6 +1680,12 @@ func (s CancelJobOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CancelJobOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // An object representing an AWS Batch compute environment. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ComputeEnvironmentDetail type ComputeEnvironmentDetail struct { @@ -1706,6 +1794,65 @@ func (s *ComputeEnvironmentDetail) SetType(v string) *ComputeEnvironmentDetail { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ComputeEnvironmentDetail) MarshalFields(e protocol.FieldEncoder) error { + if s.ComputeEnvironmentArn != nil { + v := *s.ComputeEnvironmentArn + + e.SetValue(protocol.BodyTarget, "computeEnvironmentArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ComputeEnvironmentName != nil { + v := *s.ComputeEnvironmentName + + e.SetValue(protocol.BodyTarget, "computeEnvironmentName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ComputeResources != nil { + v := s.ComputeResources + + e.SetFields(protocol.BodyTarget, "computeResources", v, protocol.Metadata{}) + } + if s.EcsClusterArn != nil { + v := *s.EcsClusterArn + + e.SetValue(protocol.BodyTarget, "ecsClusterArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServiceRole != nil { + v := *s.ServiceRole + + e.SetValue(protocol.BodyTarget, "serviceRole", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusReason != nil { + v := *s.StatusReason + + e.SetValue(protocol.BodyTarget, "statusReason", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeComputeEnvironmentDetailList(vs []*ComputeEnvironmentDetail) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The order in which compute environments are tried for job placement within // a queue. Compute environments are tried in ascending order. For example, // if two compute environments are associated with a job queue, the compute @@ -1763,6 +1910,30 @@ func (s *ComputeEnvironmentOrder) SetOrder(v int64) *ComputeEnvironmentOrder { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ComputeEnvironmentOrder) MarshalFields(e protocol.FieldEncoder) error { + if s.ComputeEnvironment != nil { + v := *s.ComputeEnvironment + + e.SetValue(protocol.BodyTarget, "computeEnvironment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Order != nil { + v := *s.Order + + e.SetValue(protocol.BodyTarget, "order", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeComputeEnvironmentOrderList(vs []*ComputeEnvironmentOrder) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // An object representing an AWS Batch compute resource. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ComputeResource type ComputeResource struct { @@ -1956,6 +2127,77 @@ func (s *ComputeResource) SetType(v string) *ComputeResource { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ComputeResource) MarshalFields(e protocol.FieldEncoder) error { + if s.BidPercentage != nil { + v := *s.BidPercentage + + e.SetValue(protocol.BodyTarget, "bidPercentage", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.DesiredvCpus != nil { + v := *s.DesiredvCpus + + e.SetValue(protocol.BodyTarget, "desiredvCpus", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Ec2KeyPair != nil { + v := *s.Ec2KeyPair + + e.SetValue(protocol.BodyTarget, "ec2KeyPair", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ImageId != nil { + v := *s.ImageId + + e.SetValue(protocol.BodyTarget, "imageId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InstanceRole != nil { + v := *s.InstanceRole + + e.SetValue(protocol.BodyTarget, "instanceRole", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.InstanceTypes) > 0 { + v := s.InstanceTypes + + e.SetList(protocol.BodyTarget, "instanceTypes", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.MaxvCpus != nil { + v := *s.MaxvCpus + + e.SetValue(protocol.BodyTarget, "maxvCpus", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MinvCpus != nil { + v := *s.MinvCpus + + e.SetValue(protocol.BodyTarget, "minvCpus", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.SecurityGroupIds) > 0 { + v := s.SecurityGroupIds + + e.SetList(protocol.BodyTarget, "securityGroupIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.SpotIamFleetRole != nil { + v := *s.SpotIamFleetRole + + e.SetValue(protocol.BodyTarget, "spotIamFleetRole", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Subnets) > 0 { + v := s.Subnets + + e.SetList(protocol.BodyTarget, "subnets", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.Tags) > 0 { + v := s.Tags + + e.SetMap(protocol.BodyTarget, "tags", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // An object representing the attributes of a compute environment that can be // updated. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ComputeResourceUpdate @@ -2000,6 +2242,27 @@ func (s *ComputeResourceUpdate) SetMinvCpus(v int64) *ComputeResourceUpdate { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ComputeResourceUpdate) MarshalFields(e protocol.FieldEncoder) error { + if s.DesiredvCpus != nil { + v := *s.DesiredvCpus + + e.SetValue(protocol.BodyTarget, "desiredvCpus", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MaxvCpus != nil { + v := *s.MaxvCpus + + e.SetValue(protocol.BodyTarget, "maxvCpus", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MinvCpus != nil { + v := *s.MinvCpus + + e.SetValue(protocol.BodyTarget, "minvCpus", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // An object representing the details of a container that is part of a job. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ContainerDetail type ContainerDetail struct { @@ -2180,6 +2443,97 @@ func (s *ContainerDetail) SetVolumes(v []*Volume) *ContainerDetail { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ContainerDetail) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Command) > 0 { + v := s.Command + + e.SetList(protocol.BodyTarget, "command", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.ContainerInstanceArn != nil { + v := *s.ContainerInstanceArn + + e.SetValue(protocol.BodyTarget, "containerInstanceArn", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Environment) > 0 { + v := s.Environment + + e.SetList(protocol.BodyTarget, "environment", encodeKeyValuePairList(v), protocol.Metadata{}) + } + if s.ExitCode != nil { + v := *s.ExitCode + + e.SetValue(protocol.BodyTarget, "exitCode", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Image != nil { + v := *s.Image + + e.SetValue(protocol.BodyTarget, "image", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobRoleArn != nil { + v := *s.JobRoleArn + + e.SetValue(protocol.BodyTarget, "jobRoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LogStreamName != nil { + v := *s.LogStreamName + + e.SetValue(protocol.BodyTarget, "logStreamName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Memory != nil { + v := *s.Memory + + e.SetValue(protocol.BodyTarget, "memory", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.MountPoints) > 0 { + v := s.MountPoints + + e.SetList(protocol.BodyTarget, "mountPoints", encodeMountPointList(v), protocol.Metadata{}) + } + if s.Privileged != nil { + v := *s.Privileged + + e.SetValue(protocol.BodyTarget, "privileged", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ReadonlyRootFilesystem != nil { + v := *s.ReadonlyRootFilesystem + + e.SetValue(protocol.BodyTarget, "readonlyRootFilesystem", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Reason != nil { + v := *s.Reason + + e.SetValue(protocol.BodyTarget, "reason", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TaskArn != nil { + v := *s.TaskArn + + e.SetValue(protocol.BodyTarget, "taskArn", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Ulimits) > 0 { + v := s.Ulimits + + e.SetList(protocol.BodyTarget, "ulimits", encodeUlimitList(v), protocol.Metadata{}) + } + if s.User != nil { + v := *s.User + + e.SetValue(protocol.BodyTarget, "user", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Vcpus != nil { + v := *s.Vcpus + + e.SetValue(protocol.BodyTarget, "vcpus", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Volumes) > 0 { + v := s.Volumes + + e.SetList(protocol.BodyTarget, "volumes", encodeVolumeList(v), protocol.Metadata{}) + } + + return nil +} + // The overrides that should be sent to a container. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ContainerOverrides type ContainerOverrides struct { @@ -2240,6 +2594,32 @@ func (s *ContainerOverrides) SetVcpus(v int64) *ContainerOverrides { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ContainerOverrides) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Command) > 0 { + v := s.Command + + e.SetList(protocol.BodyTarget, "command", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.Environment) > 0 { + v := s.Environment + + e.SetList(protocol.BodyTarget, "environment", encodeKeyValuePairList(v), protocol.Metadata{}) + } + if s.Memory != nil { + v := *s.Memory + + e.SetValue(protocol.BodyTarget, "memory", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Vcpus != nil { + v := *s.Vcpus + + e.SetValue(protocol.BodyTarget, "vcpus", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Container properties are used in job definitions to describe the container // that is launched as part of a job. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ContainerProperties @@ -2462,6 +2842,72 @@ func (s *ContainerProperties) SetVolumes(v []*Volume) *ContainerProperties { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ContainerProperties) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Command) > 0 { + v := s.Command + + e.SetList(protocol.BodyTarget, "command", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.Environment) > 0 { + v := s.Environment + + e.SetList(protocol.BodyTarget, "environment", encodeKeyValuePairList(v), protocol.Metadata{}) + } + if s.Image != nil { + v := *s.Image + + e.SetValue(protocol.BodyTarget, "image", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobRoleArn != nil { + v := *s.JobRoleArn + + e.SetValue(protocol.BodyTarget, "jobRoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Memory != nil { + v := *s.Memory + + e.SetValue(protocol.BodyTarget, "memory", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.MountPoints) > 0 { + v := s.MountPoints + + e.SetList(protocol.BodyTarget, "mountPoints", encodeMountPointList(v), protocol.Metadata{}) + } + if s.Privileged != nil { + v := *s.Privileged + + e.SetValue(protocol.BodyTarget, "privileged", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ReadonlyRootFilesystem != nil { + v := *s.ReadonlyRootFilesystem + + e.SetValue(protocol.BodyTarget, "readonlyRootFilesystem", protocol.BoolValue(v), protocol.Metadata{}) + } + if len(s.Ulimits) > 0 { + v := s.Ulimits + + e.SetList(protocol.BodyTarget, "ulimits", encodeUlimitList(v), protocol.Metadata{}) + } + if s.User != nil { + v := *s.User + + e.SetValue(protocol.BodyTarget, "user", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Vcpus != nil { + v := *s.Vcpus + + e.SetValue(protocol.BodyTarget, "vcpus", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Volumes) > 0 { + v := s.Volumes + + e.SetList(protocol.BodyTarget, "volumes", encodeVolumeList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateComputeEnvironmentRequest type CreateComputeEnvironmentInput struct { _ struct{} `type:"structure"` @@ -2567,6 +3013,37 @@ func (s *CreateComputeEnvironmentInput) SetType(v string) *CreateComputeEnvironm return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateComputeEnvironmentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ComputeEnvironmentName != nil { + v := *s.ComputeEnvironmentName + + e.SetValue(protocol.BodyTarget, "computeEnvironmentName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ComputeResources != nil { + v := s.ComputeResources + + e.SetFields(protocol.BodyTarget, "computeResources", v, protocol.Metadata{}) + } + if s.ServiceRole != nil { + v := *s.ServiceRole + + e.SetValue(protocol.BodyTarget, "serviceRole", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateComputeEnvironmentResponse type CreateComputeEnvironmentOutput struct { _ struct{} `type:"structure"` @@ -2600,6 +3077,22 @@ func (s *CreateComputeEnvironmentOutput) SetComputeEnvironmentName(v string) *Cr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateComputeEnvironmentOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ComputeEnvironmentArn != nil { + v := *s.ComputeEnvironmentArn + + e.SetValue(protocol.BodyTarget, "computeEnvironmentArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ComputeEnvironmentName != nil { + v := *s.ComputeEnvironmentName + + e.SetValue(protocol.BodyTarget, "computeEnvironmentName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateJobQueueRequest type CreateJobQueueInput struct { _ struct{} `type:"structure"` @@ -2695,6 +3188,32 @@ func (s *CreateJobQueueInput) SetState(v string) *CreateJobQueueInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateJobQueueInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ComputeEnvironmentOrder) > 0 { + v := s.ComputeEnvironmentOrder + + e.SetList(protocol.BodyTarget, "computeEnvironmentOrder", encodeComputeEnvironmentOrderList(v), protocol.Metadata{}) + } + if s.JobQueueName != nil { + v := *s.JobQueueName + + e.SetValue(protocol.BodyTarget, "jobQueueName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Priority != nil { + v := *s.Priority + + e.SetValue(protocol.BodyTarget, "priority", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/CreateJobQueueResponse type CreateJobQueueOutput struct { _ struct{} `type:"structure"` @@ -2732,6 +3251,22 @@ func (s *CreateJobQueueOutput) SetJobQueueName(v string) *CreateJobQueueOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateJobQueueOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.JobQueueArn != nil { + v := *s.JobQueueArn + + e.SetValue(protocol.BodyTarget, "jobQueueArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobQueueName != nil { + v := *s.JobQueueName + + e.SetValue(protocol.BodyTarget, "jobQueueName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteComputeEnvironmentRequest type DeleteComputeEnvironmentInput struct { _ struct{} `type:"structure"` @@ -2771,6 +3306,17 @@ func (s *DeleteComputeEnvironmentInput) SetComputeEnvironment(v string) *DeleteC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteComputeEnvironmentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ComputeEnvironment != nil { + v := *s.ComputeEnvironment + + e.SetValue(protocol.BodyTarget, "computeEnvironment", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteComputeEnvironmentResponse type DeleteComputeEnvironmentOutput struct { _ struct{} `type:"structure"` @@ -2786,6 +3332,12 @@ func (s DeleteComputeEnvironmentOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteComputeEnvironmentOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteJobQueueRequest type DeleteJobQueueInput struct { _ struct{} `type:"structure"` @@ -2825,10 +3377,21 @@ func (s *DeleteJobQueueInput) SetJobQueue(v string) *DeleteJobQueueInput { return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteJobQueueResponse -type DeleteJobQueueOutput struct { - _ struct{} `type:"structure"` -} +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteJobQueueInput) MarshalFields(e protocol.FieldEncoder) error { + if s.JobQueue != nil { + v := *s.JobQueue + + e.SetValue(protocol.BodyTarget, "jobQueue", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeleteJobQueueResponse +type DeleteJobQueueOutput struct { + _ struct{} `type:"structure"` +} // String returns the string representation func (s DeleteJobQueueOutput) String() string { @@ -2840,6 +3403,12 @@ func (s DeleteJobQueueOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteJobQueueOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeregisterJobDefinitionRequest type DeregisterJobDefinitionInput struct { _ struct{} `type:"structure"` @@ -2880,6 +3449,17 @@ func (s *DeregisterJobDefinitionInput) SetJobDefinition(v string) *DeregisterJob return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeregisterJobDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.JobDefinition != nil { + v := *s.JobDefinition + + e.SetValue(protocol.BodyTarget, "jobDefinition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DeregisterJobDefinitionResponse type DeregisterJobDefinitionOutput struct { _ struct{} `type:"structure"` @@ -2895,6 +3475,12 @@ func (s DeregisterJobDefinitionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeregisterJobDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeComputeEnvironmentsRequest type DescribeComputeEnvironmentsInput struct { _ struct{} `type:"structure"` @@ -2952,6 +3538,27 @@ func (s *DescribeComputeEnvironmentsInput) SetNextToken(v string) *DescribeCompu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeComputeEnvironmentsInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ComputeEnvironments) > 0 { + v := s.ComputeEnvironments + + e.SetList(protocol.BodyTarget, "computeEnvironments", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeComputeEnvironmentsResponse type DescribeComputeEnvironmentsOutput struct { _ struct{} `type:"structure"` @@ -2988,6 +3595,22 @@ func (s *DescribeComputeEnvironmentsOutput) SetNextToken(v string) *DescribeComp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeComputeEnvironmentsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ComputeEnvironments) > 0 { + v := s.ComputeEnvironments + + e.SetList(protocol.BodyTarget, "computeEnvironments", encodeComputeEnvironmentDetailList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobDefinitionsRequest type DescribeJobDefinitionsInput struct { _ struct{} `type:"structure"` @@ -3062,6 +3685,37 @@ func (s *DescribeJobDefinitionsInput) SetStatus(v string) *DescribeJobDefinition return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeJobDefinitionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.JobDefinitionName != nil { + v := *s.JobDefinitionName + + e.SetValue(protocol.BodyTarget, "jobDefinitionName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.JobDefinitions) > 0 { + v := s.JobDefinitions + + e.SetList(protocol.BodyTarget, "jobDefinitions", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobDefinitionsResponse type DescribeJobDefinitionsOutput struct { _ struct{} `type:"structure"` @@ -3098,6 +3752,22 @@ func (s *DescribeJobDefinitionsOutput) SetNextToken(v string) *DescribeJobDefini return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeJobDefinitionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.JobDefinitions) > 0 { + v := s.JobDefinitions + + e.SetList(protocol.BodyTarget, "jobDefinitions", encodeJobDefinitionList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobQueuesRequest type DescribeJobQueuesInput struct { _ struct{} `type:"structure"` @@ -3154,6 +3824,27 @@ func (s *DescribeJobQueuesInput) SetNextToken(v string) *DescribeJobQueuesInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeJobQueuesInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.JobQueues) > 0 { + v := s.JobQueues + + e.SetList(protocol.BodyTarget, "jobQueues", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobQueuesResponse type DescribeJobQueuesOutput struct { _ struct{} `type:"structure"` @@ -3190,6 +3881,22 @@ func (s *DescribeJobQueuesOutput) SetNextToken(v string) *DescribeJobQueuesOutpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeJobQueuesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.JobQueues) > 0 { + v := s.JobQueues + + e.SetList(protocol.BodyTarget, "jobQueues", encodeJobQueueDetailList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobsRequest type DescribeJobsInput struct { _ struct{} `type:"structure"` @@ -3229,6 +3936,17 @@ func (s *DescribeJobsInput) SetJobs(v []*string) *DescribeJobsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeJobsInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Jobs) > 0 { + v := s.Jobs + + e.SetList(protocol.BodyTarget, "jobs", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/DescribeJobsResponse type DescribeJobsOutput struct { _ struct{} `type:"structure"` @@ -3253,6 +3971,17 @@ func (s *DescribeJobsOutput) SetJobs(v []*JobDetail) *DescribeJobsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeJobsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Jobs) > 0 { + v := s.Jobs + + e.SetList(protocol.BodyTarget, "jobs", encodeJobDetailList(v), protocol.Metadata{}) + } + + return nil +} + // The contents of the host parameter determine whether your data volume persists // on the host container instance and where it is stored. If the host parameter // is empty, then the Docker daemon assigns a host path for your data volume, @@ -3288,6 +4017,17 @@ func (s *Host) SetSourcePath(v string) *Host { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Host) MarshalFields(e protocol.FieldEncoder) error { + if s.SourcePath != nil { + v := *s.SourcePath + + e.SetValue(protocol.BodyTarget, "sourcePath", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // An object representing an AWS Batch job definition. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/JobDefinition type JobDefinition struct { @@ -3388,6 +4128,60 @@ func (s *JobDefinition) SetType(v string) *JobDefinition { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *JobDefinition) MarshalFields(e protocol.FieldEncoder) error { + if s.ContainerProperties != nil { + v := s.ContainerProperties + + e.SetFields(protocol.BodyTarget, "containerProperties", v, protocol.Metadata{}) + } + if s.JobDefinitionArn != nil { + v := *s.JobDefinitionArn + + e.SetValue(protocol.BodyTarget, "jobDefinitionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobDefinitionName != nil { + v := *s.JobDefinitionName + + e.SetValue(protocol.BodyTarget, "jobDefinitionName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Parameters) > 0 { + v := s.Parameters + + e.SetMap(protocol.BodyTarget, "parameters", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.RetryStrategy != nil { + v := s.RetryStrategy + + e.SetFields(protocol.BodyTarget, "retryStrategy", v, protocol.Metadata{}) + } + if s.Revision != nil { + v := *s.Revision + + e.SetValue(protocol.BodyTarget, "revision", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeJobDefinitionList(vs []*JobDefinition) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // An object representing an AWS Batch job dependency. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/JobDependency type JobDependency struct { @@ -3413,6 +4207,25 @@ func (s *JobDependency) SetJobId(v string) *JobDependency { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *JobDependency) MarshalFields(e protocol.FieldEncoder) error { + if s.JobId != nil { + v := *s.JobId + + e.SetValue(protocol.BodyTarget, "jobId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeJobDependencyList(vs []*JobDependency) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // An object representing an AWS Batch job. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/JobDetail type JobDetail struct { @@ -3574,6 +4387,90 @@ func (s *JobDetail) SetStoppedAt(v int64) *JobDetail { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *JobDetail) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Attempts) > 0 { + v := s.Attempts + + e.SetList(protocol.BodyTarget, "attempts", encodeAttemptDetailList(v), protocol.Metadata{}) + } + if s.Container != nil { + v := s.Container + + e.SetFields(protocol.BodyTarget, "container", v, protocol.Metadata{}) + } + if s.CreatedAt != nil { + v := *s.CreatedAt + + e.SetValue(protocol.BodyTarget, "createdAt", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.DependsOn) > 0 { + v := s.DependsOn + + e.SetList(protocol.BodyTarget, "dependsOn", encodeJobDependencyList(v), protocol.Metadata{}) + } + if s.JobDefinition != nil { + v := *s.JobDefinition + + e.SetValue(protocol.BodyTarget, "jobDefinition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobId != nil { + v := *s.JobId + + e.SetValue(protocol.BodyTarget, "jobId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobName != nil { + v := *s.JobName + + e.SetValue(protocol.BodyTarget, "jobName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobQueue != nil { + v := *s.JobQueue + + e.SetValue(protocol.BodyTarget, "jobQueue", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Parameters) > 0 { + v := s.Parameters + + e.SetMap(protocol.BodyTarget, "parameters", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.RetryStrategy != nil { + v := s.RetryStrategy + + e.SetFields(protocol.BodyTarget, "retryStrategy", v, protocol.Metadata{}) + } + if s.StartedAt != nil { + v := *s.StartedAt + + e.SetValue(protocol.BodyTarget, "startedAt", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusReason != nil { + v := *s.StatusReason + + e.SetValue(protocol.BodyTarget, "statusReason", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StoppedAt != nil { + v := *s.StoppedAt + + e.SetValue(protocol.BodyTarget, "stoppedAt", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeJobDetailList(vs []*JobDetail) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // An object representing the details of an AWS Batch job queue. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/JobQueueDetail type JobQueueDetail struct { @@ -3666,6 +4563,55 @@ func (s *JobQueueDetail) SetStatusReason(v string) *JobQueueDetail { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *JobQueueDetail) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ComputeEnvironmentOrder) > 0 { + v := s.ComputeEnvironmentOrder + + e.SetList(protocol.BodyTarget, "computeEnvironmentOrder", encodeComputeEnvironmentOrderList(v), protocol.Metadata{}) + } + if s.JobQueueArn != nil { + v := *s.JobQueueArn + + e.SetValue(protocol.BodyTarget, "jobQueueArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobQueueName != nil { + v := *s.JobQueueName + + e.SetValue(protocol.BodyTarget, "jobQueueName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Priority != nil { + v := *s.Priority + + e.SetValue(protocol.BodyTarget, "priority", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusReason != nil { + v := *s.StatusReason + + e.SetValue(protocol.BodyTarget, "statusReason", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeJobQueueDetailList(vs []*JobQueueDetail) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // An object representing summary details of a job. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/JobSummary type JobSummary struct { @@ -3704,6 +4650,30 @@ func (s *JobSummary) SetJobName(v string) *JobSummary { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *JobSummary) MarshalFields(e protocol.FieldEncoder) error { + if s.JobId != nil { + v := *s.JobId + + e.SetValue(protocol.BodyTarget, "jobId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobName != nil { + v := *s.JobName + + e.SetValue(protocol.BodyTarget, "jobName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeJobSummaryList(vs []*JobSummary) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A key-value pair object. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/KeyValuePair type KeyValuePair struct { @@ -3740,6 +4710,30 @@ func (s *KeyValuePair) SetValue(v string) *KeyValuePair { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *KeyValuePair) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeKeyValuePairList(vs []*KeyValuePair) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ListJobsRequest type ListJobsInput struct { _ struct{} `type:"structure"` @@ -3820,6 +4814,32 @@ func (s *ListJobsInput) SetNextToken(v string) *ListJobsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListJobsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.JobQueue != nil { + v := *s.JobQueue + + e.SetValue(protocol.BodyTarget, "jobQueue", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobStatus != nil { + v := *s.JobStatus + + e.SetValue(protocol.BodyTarget, "jobStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/ListJobsResponse type ListJobsOutput struct { _ struct{} `type:"structure"` @@ -3858,6 +4878,22 @@ func (s *ListJobsOutput) SetNextToken(v string) *ListJobsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListJobsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.JobSummaryList) > 0 { + v := s.JobSummaryList + + e.SetList(protocol.BodyTarget, "jobSummaryList", encodeJobSummaryList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Details on a Docker volume mount point that is used in a job's container // properties. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/MountPoint @@ -3903,6 +4939,35 @@ func (s *MountPoint) SetSourceVolume(v string) *MountPoint { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MountPoint) MarshalFields(e protocol.FieldEncoder) error { + if s.ContainerPath != nil { + v := *s.ContainerPath + + e.SetValue(protocol.BodyTarget, "containerPath", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ReadOnly != nil { + v := *s.ReadOnly + + e.SetValue(protocol.BodyTarget, "readOnly", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.SourceVolume != nil { + v := *s.SourceVolume + + e.SetValue(protocol.BodyTarget, "sourceVolume", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeMountPointList(vs []*MountPoint) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/RegisterJobDefinitionRequest type RegisterJobDefinitionInput struct { _ struct{} `type:"structure"` @@ -3994,6 +5059,37 @@ func (s *RegisterJobDefinitionInput) SetType(v string) *RegisterJobDefinitionInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RegisterJobDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ContainerProperties != nil { + v := s.ContainerProperties + + e.SetFields(protocol.BodyTarget, "containerProperties", v, protocol.Metadata{}) + } + if s.JobDefinitionName != nil { + v := *s.JobDefinitionName + + e.SetValue(protocol.BodyTarget, "jobDefinitionName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Parameters) > 0 { + v := s.Parameters + + e.SetMap(protocol.BodyTarget, "parameters", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.RetryStrategy != nil { + v := s.RetryStrategy + + e.SetFields(protocol.BodyTarget, "retryStrategy", v, protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/RegisterJobDefinitionResponse type RegisterJobDefinitionOutput struct { _ struct{} `type:"structure"` @@ -4042,6 +5138,27 @@ func (s *RegisterJobDefinitionOutput) SetRevision(v int64) *RegisterJobDefinitio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RegisterJobDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.JobDefinitionArn != nil { + v := *s.JobDefinitionArn + + e.SetValue(protocol.BodyTarget, "jobDefinitionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobDefinitionName != nil { + v := *s.JobDefinitionName + + e.SetValue(protocol.BodyTarget, "jobDefinitionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Revision != nil { + v := *s.Revision + + e.SetValue(protocol.BodyTarget, "revision", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The retry strategy associated with a job. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/RetryStrategy type RetryStrategy struct { @@ -4069,6 +5186,17 @@ func (s *RetryStrategy) SetAttempts(v int64) *RetryStrategy { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RetryStrategy) MarshalFields(e protocol.FieldEncoder) error { + if s.Attempts != nil { + v := *s.Attempts + + e.SetValue(protocol.BodyTarget, "attempts", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/SubmitJobRequest type SubmitJobInput struct { _ struct{} `type:"structure"` @@ -4188,6 +5316,47 @@ func (s *SubmitJobInput) SetRetryStrategy(v *RetryStrategy) *SubmitJobInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SubmitJobInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ContainerOverrides != nil { + v := s.ContainerOverrides + + e.SetFields(protocol.BodyTarget, "containerOverrides", v, protocol.Metadata{}) + } + if len(s.DependsOn) > 0 { + v := s.DependsOn + + e.SetList(protocol.BodyTarget, "dependsOn", encodeJobDependencyList(v), protocol.Metadata{}) + } + if s.JobDefinition != nil { + v := *s.JobDefinition + + e.SetValue(protocol.BodyTarget, "jobDefinition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobName != nil { + v := *s.JobName + + e.SetValue(protocol.BodyTarget, "jobName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobQueue != nil { + v := *s.JobQueue + + e.SetValue(protocol.BodyTarget, "jobQueue", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Parameters) > 0 { + v := s.Parameters + + e.SetMap(protocol.BodyTarget, "parameters", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.RetryStrategy != nil { + v := s.RetryStrategy + + e.SetFields(protocol.BodyTarget, "retryStrategy", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/SubmitJobResponse type SubmitJobOutput struct { _ struct{} `type:"structure"` @@ -4225,6 +5394,22 @@ func (s *SubmitJobOutput) SetJobName(v string) *SubmitJobOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SubmitJobOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.JobId != nil { + v := *s.JobId + + e.SetValue(protocol.BodyTarget, "jobId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobName != nil { + v := *s.JobName + + e.SetValue(protocol.BodyTarget, "jobName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/TerminateJobRequest type TerminateJobInput struct { _ struct{} `type:"structure"` @@ -4280,6 +5465,22 @@ func (s *TerminateJobInput) SetReason(v string) *TerminateJobInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TerminateJobInput) MarshalFields(e protocol.FieldEncoder) error { + if s.JobId != nil { + v := *s.JobId + + e.SetValue(protocol.BodyTarget, "jobId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Reason != nil { + v := *s.Reason + + e.SetValue(protocol.BodyTarget, "reason", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/TerminateJobResponse type TerminateJobOutput struct { _ struct{} `type:"structure"` @@ -4295,6 +5496,12 @@ func (s TerminateJobOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TerminateJobOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The ulimit settings to pass to the container. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/Ulimit type Ulimit struct { @@ -4363,6 +5570,35 @@ func (s *Ulimit) SetSoftLimit(v int64) *Ulimit { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Ulimit) MarshalFields(e protocol.FieldEncoder) error { + if s.HardLimit != nil { + v := *s.HardLimit + + e.SetValue(protocol.BodyTarget, "hardLimit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SoftLimit != nil { + v := *s.SoftLimit + + e.SetValue(protocol.BodyTarget, "softLimit", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeUlimitList(vs []*Ulimit) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateComputeEnvironmentRequest type UpdateComputeEnvironmentInput struct { _ struct{} `type:"structure"` @@ -4444,6 +5680,32 @@ func (s *UpdateComputeEnvironmentInput) SetState(v string) *UpdateComputeEnviron return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateComputeEnvironmentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ComputeEnvironment != nil { + v := *s.ComputeEnvironment + + e.SetValue(protocol.BodyTarget, "computeEnvironment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ComputeResources != nil { + v := s.ComputeResources + + e.SetFields(protocol.BodyTarget, "computeResources", v, protocol.Metadata{}) + } + if s.ServiceRole != nil { + v := *s.ServiceRole + + e.SetValue(protocol.BodyTarget, "serviceRole", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateComputeEnvironmentResponse type UpdateComputeEnvironmentOutput struct { _ struct{} `type:"structure"` @@ -4477,6 +5739,22 @@ func (s *UpdateComputeEnvironmentOutput) SetComputeEnvironmentName(v string) *Up return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateComputeEnvironmentOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ComputeEnvironmentArn != nil { + v := *s.ComputeEnvironmentArn + + e.SetValue(protocol.BodyTarget, "computeEnvironmentArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ComputeEnvironmentName != nil { + v := *s.ComputeEnvironmentName + + e.SetValue(protocol.BodyTarget, "computeEnvironmentName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateJobQueueRequest type UpdateJobQueueInput struct { _ struct{} `type:"structure"` @@ -4559,6 +5837,32 @@ func (s *UpdateJobQueueInput) SetState(v string) *UpdateJobQueueInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateJobQueueInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ComputeEnvironmentOrder) > 0 { + v := s.ComputeEnvironmentOrder + + e.SetList(protocol.BodyTarget, "computeEnvironmentOrder", encodeComputeEnvironmentOrderList(v), protocol.Metadata{}) + } + if s.JobQueue != nil { + v := *s.JobQueue + + e.SetValue(protocol.BodyTarget, "jobQueue", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Priority != nil { + v := *s.Priority + + e.SetValue(protocol.BodyTarget, "priority", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/UpdateJobQueueResponse type UpdateJobQueueOutput struct { _ struct{} `type:"structure"` @@ -4592,6 +5896,22 @@ func (s *UpdateJobQueueOutput) SetJobQueueName(v string) *UpdateJobQueueOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateJobQueueOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.JobQueueArn != nil { + v := *s.JobQueueArn + + e.SetValue(protocol.BodyTarget, "jobQueueArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobQueueName != nil { + v := *s.JobQueueName + + e.SetValue(protocol.BodyTarget, "jobQueueName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A data volume used in a job's container properties. // Please also see https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10/Volume type Volume struct { @@ -4632,6 +5952,30 @@ func (s *Volume) SetName(v string) *Volume { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Volume) MarshalFields(e protocol.FieldEncoder) error { + if s.Host != nil { + v := s.Host + + e.SetFields(protocol.BodyTarget, "host", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeVolumeList(vs []*Volume) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + const ( // CEStateEnabled is a CEState enum value CEStateEnabled = "ENABLED" diff --git a/service/clouddirectory/api.go b/service/clouddirectory/api.go index 1a1b9a17fbb..bf19e5999c9 100644 --- a/service/clouddirectory/api.go +++ b/service/clouddirectory/api.go @@ -7903,6 +7903,32 @@ func (s *AddFacetToObjectInput) SetSchemaFacet(v *SchemaFacet) *AddFacetToObject return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AddFacetToObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.ObjectAttributeList) > 0 { + v := s.ObjectAttributeList + + e.SetList(protocol.BodyTarget, "ObjectAttributeList", encodeAttributeKeyAndValueList(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + if s.SchemaFacet != nil { + v := s.SchemaFacet + + e.SetFields(protocol.BodyTarget, "SchemaFacet", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AddFacetToObjectResponse type AddFacetToObjectOutput struct { _ struct{} `type:"structure"` @@ -7918,6 +7944,12 @@ func (s AddFacetToObjectOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AddFacetToObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ApplySchemaRequest type ApplySchemaInput struct { _ struct{} `type:"structure"` @@ -7973,6 +8005,22 @@ func (s *ApplySchemaInput) SetPublishedSchemaArn(v string) *ApplySchemaInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ApplySchemaInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PublishedSchemaArn != nil { + v := *s.PublishedSchemaArn + + e.SetValue(protocol.BodyTarget, "PublishedSchemaArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ApplySchemaResponse type ApplySchemaOutput struct { _ struct{} `type:"structure"` @@ -8009,6 +8057,22 @@ func (s *ApplySchemaOutput) SetDirectoryArn(v string) *ApplySchemaOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ApplySchemaOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AppliedSchemaArn != nil { + v := *s.AppliedSchemaArn + + e.SetValue(protocol.BodyTarget, "AppliedSchemaArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.BodyTarget, "DirectoryArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachObjectRequest type AttachObjectInput struct { _ struct{} `type:"structure"` @@ -8094,6 +8158,32 @@ func (s *AttachObjectInput) SetParentReference(v *ObjectReference) *AttachObject return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttachObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ChildReference != nil { + v := s.ChildReference + + e.SetFields(protocol.BodyTarget, "ChildReference", v, protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LinkName != nil { + v := *s.LinkName + + e.SetValue(protocol.BodyTarget, "LinkName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParentReference != nil { + v := s.ParentReference + + e.SetFields(protocol.BodyTarget, "ParentReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachObjectResponse type AttachObjectOutput struct { _ struct{} `type:"structure"` @@ -8118,6 +8208,17 @@ func (s *AttachObjectOutput) SetAttachedObjectIdentifier(v string) *AttachObject return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttachObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AttachedObjectIdentifier != nil { + v := *s.AttachedObjectIdentifier + + e.SetValue(protocol.BodyTarget, "AttachedObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachPolicyRequest type AttachPolicyInput struct { _ struct{} `type:"structure"` @@ -8181,6 +8282,27 @@ func (s *AttachPolicyInput) SetPolicyReference(v *ObjectReference) *AttachPolicy return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttachPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + if s.PolicyReference != nil { + v := s.PolicyReference + + e.SetFields(protocol.BodyTarget, "PolicyReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachPolicyResponse type AttachPolicyOutput struct { _ struct{} `type:"structure"` @@ -8196,6 +8318,12 @@ func (s AttachPolicyOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttachPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachToIndexRequest type AttachToIndexInput struct { _ struct{} `type:"structure"` @@ -8264,6 +8392,27 @@ func (s *AttachToIndexInput) SetTargetReference(v *ObjectReference) *AttachToInd return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttachToIndexInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IndexReference != nil { + v := s.IndexReference + + e.SetFields(protocol.BodyTarget, "IndexReference", v, protocol.Metadata{}) + } + if s.TargetReference != nil { + v := s.TargetReference + + e.SetFields(protocol.BodyTarget, "TargetReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachToIndexResponse type AttachToIndexOutput struct { _ struct{} `type:"structure"` @@ -8288,6 +8437,17 @@ func (s *AttachToIndexOutput) SetAttachedObjectIdentifier(v string) *AttachToInd return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttachToIndexOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AttachedObjectIdentifier != nil { + v := *s.AttachedObjectIdentifier + + e.SetValue(protocol.BodyTarget, "AttachedObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachTypedLinkRequest type AttachTypedLinkInput struct { _ struct{} `type:"structure"` @@ -8399,6 +8559,37 @@ func (s *AttachTypedLinkInput) SetTypedLinkFacet(v *TypedLinkSchemaAndFacetName) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttachTypedLinkInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetList(protocol.BodyTarget, "Attributes", encodeAttributeNameAndValueList(v), protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SourceObjectReference != nil { + v := s.SourceObjectReference + + e.SetFields(protocol.BodyTarget, "SourceObjectReference", v, protocol.Metadata{}) + } + if s.TargetObjectReference != nil { + v := s.TargetObjectReference + + e.SetFields(protocol.BodyTarget, "TargetObjectReference", v, protocol.Metadata{}) + } + if s.TypedLinkFacet != nil { + v := s.TypedLinkFacet + + e.SetFields(protocol.BodyTarget, "TypedLinkFacet", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttachTypedLinkResponse type AttachTypedLinkOutput struct { _ struct{} `type:"structure"` @@ -8423,6 +8614,17 @@ func (s *AttachTypedLinkOutput) SetTypedLinkSpecifier(v *TypedLinkSpecifier) *At return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttachTypedLinkOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.TypedLinkSpecifier != nil { + v := s.TypedLinkSpecifier + + e.SetFields(protocol.BodyTarget, "TypedLinkSpecifier", v, protocol.Metadata{}) + } + + return nil +} + // A unique identifier for an attribute. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttributeKey type AttributeKey struct { @@ -8498,6 +8700,35 @@ func (s *AttributeKey) SetSchemaArn(v string) *AttributeKey { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttributeKey) MarshalFields(e protocol.FieldEncoder) error { + if s.FacetName != nil { + v := *s.FacetName + + e.SetValue(protocol.BodyTarget, "FacetName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.BodyTarget, "SchemaArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeAttributeKeyList(vs []*AttributeKey) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The combination of an attribute key and an attribute value. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttributeKeyAndValue type AttributeKeyAndValue struct { @@ -8557,6 +8788,30 @@ func (s *AttributeKeyAndValue) SetValue(v *TypedAttributeValue) *AttributeKeyAnd return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttributeKeyAndValue) MarshalFields(e protocol.FieldEncoder) error { + if s.Key != nil { + v := s.Key + + e.SetFields(protocol.BodyTarget, "Key", v, protocol.Metadata{}) + } + if s.Value != nil { + v := s.Value + + e.SetFields(protocol.BodyTarget, "Value", v, protocol.Metadata{}) + } + + return nil +} + +func encodeAttributeKeyAndValueList(vs []*AttributeKeyAndValue) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Identifies the attribute name and value for a typed link. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/AttributeNameAndValue type AttributeNameAndValue struct { @@ -8614,6 +8869,30 @@ func (s *AttributeNameAndValue) SetValue(v *TypedAttributeValue) *AttributeNameA return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttributeNameAndValue) MarshalFields(e protocol.FieldEncoder) error { + if s.AttributeName != nil { + v := *s.AttributeName + + e.SetValue(protocol.BodyTarget, "AttributeName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := s.Value + + e.SetFields(protocol.BodyTarget, "Value", v, protocol.Metadata{}) + } + + return nil +} + +func encodeAttributeNameAndValueList(vs []*AttributeNameAndValue) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Represents the output of a batch add facet to object operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchAddFacetToObject type BatchAddFacetToObject struct { @@ -8697,6 +8976,27 @@ func (s *BatchAddFacetToObject) SetSchemaFacet(v *SchemaFacet) *BatchAddFacetToO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchAddFacetToObject) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ObjectAttributeList) > 0 { + v := s.ObjectAttributeList + + e.SetList(protocol.BodyTarget, "ObjectAttributeList", encodeAttributeKeyAndValueList(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + if s.SchemaFacet != nil { + v := s.SchemaFacet + + e.SetFields(protocol.BodyTarget, "SchemaFacet", v, protocol.Metadata{}) + } + + return nil +} + // The result of a batch add facet to object operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchAddFacetToObjectResponse type BatchAddFacetToObjectResponse struct { @@ -8713,6 +9013,12 @@ func (s BatchAddFacetToObjectResponse) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchAddFacetToObjectResponse) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Represents the output of an AttachObject operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchAttachObject type BatchAttachObject struct { @@ -8784,6 +9090,27 @@ func (s *BatchAttachObject) SetParentReference(v *ObjectReference) *BatchAttachO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchAttachObject) MarshalFields(e protocol.FieldEncoder) error { + if s.ChildReference != nil { + v := s.ChildReference + + e.SetFields(protocol.BodyTarget, "ChildReference", v, protocol.Metadata{}) + } + if s.LinkName != nil { + v := *s.LinkName + + e.SetValue(protocol.BodyTarget, "LinkName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParentReference != nil { + v := s.ParentReference + + e.SetFields(protocol.BodyTarget, "ParentReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output batch AttachObject response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchAttachObjectResponse type BatchAttachObjectResponse struct { @@ -8809,6 +9136,17 @@ func (s *BatchAttachObjectResponse) SetAttachedObjectIdentifier(v string) *Batch return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchAttachObjectResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.AttachedObjectIdentifier != nil { + v := *s.AttachedObjectIdentifier + + e.SetValue(protocol.BodyTarget, "attachedObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Attaches a policy object to a regular object inside a BatchRead operation. For // more information, see AttachPolicy and BatchReadRequest$Operations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchAttachPolicy @@ -8864,6 +9202,22 @@ func (s *BatchAttachPolicy) SetPolicyReference(v *ObjectReference) *BatchAttachP return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchAttachPolicy) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + if s.PolicyReference != nil { + v := s.PolicyReference + + e.SetFields(protocol.BodyTarget, "PolicyReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of an AttachPolicy response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchAttachPolicyResponse type BatchAttachPolicyResponse struct { @@ -8880,6 +9234,12 @@ func (s BatchAttachPolicyResponse) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchAttachPolicyResponse) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Attaches the specified object to the specified index inside a BatchRead operation. // For more information, see AttachToIndex and BatchReadRequest$Operations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchAttachToIndex @@ -8935,6 +9295,22 @@ func (s *BatchAttachToIndex) SetTargetReference(v *ObjectReference) *BatchAttach return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchAttachToIndex) MarshalFields(e protocol.FieldEncoder) error { + if s.IndexReference != nil { + v := s.IndexReference + + e.SetFields(protocol.BodyTarget, "IndexReference", v, protocol.Metadata{}) + } + if s.TargetReference != nil { + v := s.TargetReference + + e.SetFields(protocol.BodyTarget, "TargetReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a AttachToIndex response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchAttachToIndexResponse type BatchAttachToIndexResponse struct { @@ -8960,6 +9336,17 @@ func (s *BatchAttachToIndexResponse) SetAttachedObjectIdentifier(v string) *Batc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchAttachToIndexResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.AttachedObjectIdentifier != nil { + v := *s.AttachedObjectIdentifier + + e.SetValue(protocol.BodyTarget, "AttachedObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Attaches a typed link to a specified source and target object inside a BatchRead // operation. For more information, see AttachTypedLink and BatchReadRequest$Operations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchAttachTypedLink @@ -9058,6 +9445,32 @@ func (s *BatchAttachTypedLink) SetTypedLinkFacet(v *TypedLinkSchemaAndFacetName) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchAttachTypedLink) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetList(protocol.BodyTarget, "Attributes", encodeAttributeNameAndValueList(v), protocol.Metadata{}) + } + if s.SourceObjectReference != nil { + v := s.SourceObjectReference + + e.SetFields(protocol.BodyTarget, "SourceObjectReference", v, protocol.Metadata{}) + } + if s.TargetObjectReference != nil { + v := s.TargetObjectReference + + e.SetFields(protocol.BodyTarget, "TargetObjectReference", v, protocol.Metadata{}) + } + if s.TypedLinkFacet != nil { + v := s.TypedLinkFacet + + e.SetFields(protocol.BodyTarget, "TypedLinkFacet", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a AttachTypedLink response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchAttachTypedLinkResponse type BatchAttachTypedLinkResponse struct { @@ -9083,6 +9496,17 @@ func (s *BatchAttachTypedLinkResponse) SetTypedLinkSpecifier(v *TypedLinkSpecifi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchAttachTypedLinkResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.TypedLinkSpecifier != nil { + v := s.TypedLinkSpecifier + + e.SetFields(protocol.BodyTarget, "TypedLinkSpecifier", v, protocol.Metadata{}) + } + + return nil +} + // Creates an index object inside of a BatchRead operation. For more information, // see CreateIndex and BatchReadRequest$Operations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchCreateIndex @@ -9181,6 +9605,37 @@ func (s *BatchCreateIndex) SetParentReference(v *ObjectReference) *BatchCreateIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchCreateIndex) MarshalFields(e protocol.FieldEncoder) error { + if s.BatchReferenceName != nil { + v := *s.BatchReferenceName + + e.SetValue(protocol.BodyTarget, "BatchReferenceName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsUnique != nil { + v := *s.IsUnique + + e.SetValue(protocol.BodyTarget, "IsUnique", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.LinkName != nil { + v := *s.LinkName + + e.SetValue(protocol.BodyTarget, "LinkName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.OrderedIndexedAttributeList) > 0 { + v := s.OrderedIndexedAttributeList + + e.SetList(protocol.BodyTarget, "OrderedIndexedAttributeList", encodeAttributeKeyList(v), protocol.Metadata{}) + } + if s.ParentReference != nil { + v := s.ParentReference + + e.SetFields(protocol.BodyTarget, "ParentReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a CreateIndex response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchCreateIndexResponse type BatchCreateIndexResponse struct { @@ -9206,6 +9661,17 @@ func (s *BatchCreateIndexResponse) SetObjectIdentifier(v string) *BatchCreateInd return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchCreateIndexResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectIdentifier != nil { + v := *s.ObjectIdentifier + + e.SetValue(protocol.BodyTarget, "ObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents the output of a CreateObject operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchCreateObject type BatchCreateObject struct { @@ -9328,6 +9794,37 @@ func (s *BatchCreateObject) SetSchemaFacet(v []*SchemaFacet) *BatchCreateObject return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchCreateObject) MarshalFields(e protocol.FieldEncoder) error { + if s.BatchReferenceName != nil { + v := *s.BatchReferenceName + + e.SetValue(protocol.BodyTarget, "BatchReferenceName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LinkName != nil { + v := *s.LinkName + + e.SetValue(protocol.BodyTarget, "LinkName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.ObjectAttributeList) > 0 { + v := s.ObjectAttributeList + + e.SetList(protocol.BodyTarget, "ObjectAttributeList", encodeAttributeKeyAndValueList(v), protocol.Metadata{}) + } + if s.ParentReference != nil { + v := s.ParentReference + + e.SetFields(protocol.BodyTarget, "ParentReference", v, protocol.Metadata{}) + } + if len(s.SchemaFacet) > 0 { + v := s.SchemaFacet + + e.SetList(protocol.BodyTarget, "SchemaFacet", encodeSchemaFacetList(v), protocol.Metadata{}) + } + + return nil +} + // Represents the output of a CreateObject response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchCreateObjectResponse type BatchCreateObjectResponse struct { @@ -9353,9 +9850,20 @@ func (s *BatchCreateObjectResponse) SetObjectIdentifier(v string) *BatchCreateOb return s } -// Represents the output of a DeleteObject operation. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchDeleteObject -type BatchDeleteObject struct { +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchCreateObjectResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectIdentifier != nil { + v := *s.ObjectIdentifier + + e.SetValue(protocol.BodyTarget, "ObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +// Represents the output of a DeleteObject operation. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchDeleteObject +type BatchDeleteObject struct { _ struct{} `type:"structure"` // The reference that identifies the object. @@ -9393,6 +9901,17 @@ func (s *BatchDeleteObject) SetObjectReference(v *ObjectReference) *BatchDeleteO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchDeleteObject) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a DeleteObject response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchDeleteObjectResponse type BatchDeleteObjectResponse struct { @@ -9409,6 +9928,12 @@ func (s BatchDeleteObjectResponse) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchDeleteObjectResponse) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Detaches the specified object from the specified index inside a BatchRead // operation. For more information, see DetachFromIndex and BatchReadRequest$Operations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchDetachFromIndex @@ -9464,6 +9989,22 @@ func (s *BatchDetachFromIndex) SetTargetReference(v *ObjectReference) *BatchDeta return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchDetachFromIndex) MarshalFields(e protocol.FieldEncoder) error { + if s.IndexReference != nil { + v := s.IndexReference + + e.SetFields(protocol.BodyTarget, "IndexReference", v, protocol.Metadata{}) + } + if s.TargetReference != nil { + v := s.TargetReference + + e.SetFields(protocol.BodyTarget, "TargetReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a DetachFromIndex response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchDetachFromIndexResponse type BatchDetachFromIndexResponse struct { @@ -9489,6 +10030,17 @@ func (s *BatchDetachFromIndexResponse) SetDetachedObjectIdentifier(v string) *Ba return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchDetachFromIndexResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.DetachedObjectIdentifier != nil { + v := *s.DetachedObjectIdentifier + + e.SetValue(protocol.BodyTarget, "DetachedObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents the output of a DetachObject operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchDetachObject type BatchDetachObject struct { @@ -9561,6 +10113,27 @@ func (s *BatchDetachObject) SetParentReference(v *ObjectReference) *BatchDetachO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchDetachObject) MarshalFields(e protocol.FieldEncoder) error { + if s.BatchReferenceName != nil { + v := *s.BatchReferenceName + + e.SetValue(protocol.BodyTarget, "BatchReferenceName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LinkName != nil { + v := *s.LinkName + + e.SetValue(protocol.BodyTarget, "LinkName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParentReference != nil { + v := s.ParentReference + + e.SetFields(protocol.BodyTarget, "ParentReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a DetachObject response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchDetachObjectResponse type BatchDetachObjectResponse struct { @@ -9586,6 +10159,17 @@ func (s *BatchDetachObjectResponse) SetDetachedObjectIdentifier(v string) *Batch return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchDetachObjectResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.DetachedObjectIdentifier != nil { + v := *s.DetachedObjectIdentifier + + e.SetValue(protocol.BodyTarget, "detachedObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Detaches the specified policy from the specified directory inside a BatchRead // operation. For more information, see DetachPolicy and BatchReadRequest$Operations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchDetachPolicy @@ -9641,6 +10225,22 @@ func (s *BatchDetachPolicy) SetPolicyReference(v *ObjectReference) *BatchDetachP return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchDetachPolicy) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + if s.PolicyReference != nil { + v := s.PolicyReference + + e.SetFields(protocol.BodyTarget, "PolicyReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a DetachPolicy response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchDetachPolicyResponse type BatchDetachPolicyResponse struct { @@ -9657,6 +10257,12 @@ func (s BatchDetachPolicyResponse) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchDetachPolicyResponse) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Detaches a typed link from a specified source and target object inside a // BatchRead operation. For more information, see DetachTypedLink and BatchReadRequest$Operations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchDetachTypedLink @@ -9703,6 +10309,17 @@ func (s *BatchDetachTypedLink) SetTypedLinkSpecifier(v *TypedLinkSpecifier) *Bat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchDetachTypedLink) MarshalFields(e protocol.FieldEncoder) error { + if s.TypedLinkSpecifier != nil { + v := s.TypedLinkSpecifier + + e.SetFields(protocol.BodyTarget, "TypedLinkSpecifier", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a DetachTypedLink response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchDetachTypedLinkResponse type BatchDetachTypedLinkResponse struct { @@ -9719,6 +10336,12 @@ func (s BatchDetachTypedLinkResponse) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchDetachTypedLinkResponse) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Retrieves metadata about an object inside a BatchRead operation. For more // information, see GetObjectInformation and BatchReadRequest$Operations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchGetObjectInformation @@ -9760,6 +10383,17 @@ func (s *BatchGetObjectInformation) SetObjectReference(v *ObjectReference) *Batc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchGetObjectInformation) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a GetObjectInformation response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchGetObjectInformationResponse type BatchGetObjectInformationResponse struct { @@ -9794,6 +10428,22 @@ func (s *BatchGetObjectInformationResponse) SetSchemaFacets(v []*SchemaFacet) *B return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchGetObjectInformationResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectIdentifier != nil { + v := *s.ObjectIdentifier + + e.SetValue(protocol.BodyTarget, "ObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SchemaFacets) > 0 { + v := s.SchemaFacets + + e.SetList(protocol.BodyTarget, "SchemaFacets", encodeSchemaFacetList(v), protocol.Metadata{}) + } + + return nil +} + // Lists indices attached to an object inside a BatchRead operation. For more // information, see ListAttachedIndices and BatchReadRequest$Operations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListAttachedIndices @@ -9856,6 +10506,27 @@ func (s *BatchListAttachedIndices) SetTargetReference(v *ObjectReference) *Batch return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListAttachedIndices) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TargetReference != nil { + v := s.TargetReference + + e.SetFields(protocol.BodyTarget, "TargetReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a ListAttachedIndices response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListAttachedIndicesResponse type BatchListAttachedIndicesResponse struct { @@ -9890,6 +10561,22 @@ func (s *BatchListAttachedIndicesResponse) SetNextToken(v string) *BatchListAtta return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListAttachedIndicesResponse) MarshalFields(e protocol.FieldEncoder) error { + if len(s.IndexAttachments) > 0 { + v := s.IndexAttachments + + e.SetList(protocol.BodyTarget, "IndexAttachments", encodeIndexAttachmentList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Returns a paginated list of all the incoming TypedLinkSpecifier information // for an object inside a BatchRead operation. For more information, see ListIncomingTypedLinks // and BatchReadRequest$Operations. @@ -9990,6 +10677,37 @@ func (s *BatchListIncomingTypedLinks) SetObjectReference(v *ObjectReference) *Ba return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListIncomingTypedLinks) MarshalFields(e protocol.FieldEncoder) error { + if len(s.FilterAttributeRanges) > 0 { + v := s.FilterAttributeRanges + + e.SetList(protocol.BodyTarget, "FilterAttributeRanges", encodeTypedLinkAttributeRangeList(v), protocol.Metadata{}) + } + if s.FilterTypedLink != nil { + v := s.FilterTypedLink + + e.SetFields(protocol.BodyTarget, "FilterTypedLink", v, protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a ListIncomingTypedLinks response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListIncomingTypedLinksResponse type BatchListIncomingTypedLinksResponse struct { @@ -10024,6 +10742,22 @@ func (s *BatchListIncomingTypedLinksResponse) SetNextToken(v string) *BatchListI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListIncomingTypedLinksResponse) MarshalFields(e protocol.FieldEncoder) error { + if len(s.LinkSpecifiers) > 0 { + v := s.LinkSpecifiers + + e.SetList(protocol.BodyTarget, "LinkSpecifiers", encodeTypedLinkSpecifierList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Lists objects attached to the specified index inside a BatchRead operation. // For more information, see ListIndex and BatchReadRequest$Operations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListIndex @@ -10105,6 +10839,32 @@ func (s *BatchListIndex) SetRangesOnIndexedValues(v []*ObjectAttributeRange) *Ba return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListIndex) MarshalFields(e protocol.FieldEncoder) error { + if s.IndexReference != nil { + v := s.IndexReference + + e.SetFields(protocol.BodyTarget, "IndexReference", v, protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.RangesOnIndexedValues) > 0 { + v := s.RangesOnIndexedValues + + e.SetList(protocol.BodyTarget, "RangesOnIndexedValues", encodeObjectAttributeRangeList(v), protocol.Metadata{}) + } + + return nil +} + // Represents the output of a ListIndex response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListIndexResponse type BatchListIndexResponse struct { @@ -10139,6 +10899,22 @@ func (s *BatchListIndexResponse) SetNextToken(v string) *BatchListIndexResponse return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListIndexResponse) MarshalFields(e protocol.FieldEncoder) error { + if len(s.IndexAttachments) > 0 { + v := s.IndexAttachments + + e.SetList(protocol.BodyTarget, "IndexAttachments", encodeIndexAttachmentList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents the output of a ListObjectAttributes operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListObjectAttributes type BatchListObjectAttributes struct { @@ -10216,6 +10992,32 @@ func (s *BatchListObjectAttributes) SetObjectReference(v *ObjectReference) *Batc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListObjectAttributes) MarshalFields(e protocol.FieldEncoder) error { + if s.FacetFilter != nil { + v := s.FacetFilter + + e.SetFields(protocol.BodyTarget, "FacetFilter", v, protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a ListObjectAttributes response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListObjectAttributesResponse type BatchListObjectAttributesResponse struct { @@ -10251,6 +11053,22 @@ func (s *BatchListObjectAttributesResponse) SetNextToken(v string) *BatchListObj return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListObjectAttributesResponse) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetList(protocol.BodyTarget, "Attributes", encodeAttributeKeyAndValueList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents the output of a ListObjectChildren operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListObjectChildren type BatchListObjectChildren struct { @@ -10313,6 +11131,27 @@ func (s *BatchListObjectChildren) SetObjectReference(v *ObjectReference) *BatchL return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListObjectChildren) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a ListObjectChildren response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListObjectChildrenResponse type BatchListObjectChildrenResponse struct { @@ -10348,6 +11187,22 @@ func (s *BatchListObjectChildrenResponse) SetNextToken(v string) *BatchListObjec return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListObjectChildrenResponse) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Children) > 0 { + v := s.Children + + e.SetMap(protocol.BodyTarget, "Children", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Retrieves all available parent paths for any object type such as node, leaf // node, policy node, and index node objects inside a BatchRead operation. For // more information, see ListObjectParentPaths and BatchReadRequest$Operations. @@ -10411,6 +11266,27 @@ func (s *BatchListObjectParentPaths) SetObjectReference(v *ObjectReference) *Bat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListObjectParentPaths) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a ListObjectParentPaths response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListObjectParentPathsResponse type BatchListObjectParentPathsResponse struct { @@ -10445,6 +11321,22 @@ func (s *BatchListObjectParentPathsResponse) SetPathToObjectIdentifiersList(v [] return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListObjectParentPathsResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PathToObjectIdentifiersList) > 0 { + v := s.PathToObjectIdentifiersList + + e.SetList(protocol.BodyTarget, "PathToObjectIdentifiersList", encodePathToObjectIdentifiersList(v), protocol.Metadata{}) + } + + return nil +} + // Returns policies attached to an object in pagination fashion inside a BatchRead // operation. For more information, see ListObjectPolicies and BatchReadRequest$Operations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListObjectPolicies @@ -10507,6 +11399,27 @@ func (s *BatchListObjectPolicies) SetObjectReference(v *ObjectReference) *BatchL return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListObjectPolicies) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a ListObjectPolicies response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListObjectPoliciesResponse type BatchListObjectPoliciesResponse struct { @@ -10541,6 +11454,22 @@ func (s *BatchListObjectPoliciesResponse) SetNextToken(v string) *BatchListObjec return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListObjectPoliciesResponse) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AttachedPolicyIds) > 0 { + v := s.AttachedPolicyIds + + e.SetList(protocol.BodyTarget, "AttachedPolicyIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Returns a paginated list of all the outgoing TypedLinkSpecifier information // for an object inside a BatchRead operation. For more information, see ListOutgoingTypedLinks // and BatchReadRequest$Operations. @@ -10641,6 +11570,37 @@ func (s *BatchListOutgoingTypedLinks) SetObjectReference(v *ObjectReference) *Ba return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListOutgoingTypedLinks) MarshalFields(e protocol.FieldEncoder) error { + if len(s.FilterAttributeRanges) > 0 { + v := s.FilterAttributeRanges + + e.SetList(protocol.BodyTarget, "FilterAttributeRanges", encodeTypedLinkAttributeRangeList(v), protocol.Metadata{}) + } + if s.FilterTypedLink != nil { + v := s.FilterTypedLink + + e.SetFields(protocol.BodyTarget, "FilterTypedLink", v, protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a ListOutgoingTypedLinks response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListOutgoingTypedLinksResponse type BatchListOutgoingTypedLinksResponse struct { @@ -10675,6 +11635,22 @@ func (s *BatchListOutgoingTypedLinksResponse) SetTypedLinkSpecifiers(v []*TypedL return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListOutgoingTypedLinksResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TypedLinkSpecifiers) > 0 { + v := s.TypedLinkSpecifiers + + e.SetList(protocol.BodyTarget, "TypedLinkSpecifiers", encodeTypedLinkSpecifierList(v), protocol.Metadata{}) + } + + return nil +} + // Returns all of the ObjectIdentifiers to which a given policy is attached // inside a BatchRead operation. For more information, see ListPolicyAttachments // and BatchReadRequest$Operations. @@ -10738,6 +11714,27 @@ func (s *BatchListPolicyAttachments) SetPolicyReference(v *ObjectReference) *Bat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListPolicyAttachments) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyReference != nil { + v := s.PolicyReference + + e.SetFields(protocol.BodyTarget, "PolicyReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a ListPolicyAttachments response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchListPolicyAttachmentsResponse type BatchListPolicyAttachmentsResponse struct { @@ -10772,7 +11769,23 @@ func (s *BatchListPolicyAttachmentsResponse) SetObjectIdentifiers(v []*string) * return s } -// Lists all policies from the root of the Directory to the object specified +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchListPolicyAttachmentsResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.ObjectIdentifiers) > 0 { + v := s.ObjectIdentifiers + + e.SetList(protocol.BodyTarget, "ObjectIdentifiers", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + +// Lists all policies from the root of the Directory to the object specified // inside a BatchRead operation. For more information, see LookupPolicy and // BatchReadRequest$Operations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchLookupPolicy @@ -10835,6 +11848,27 @@ func (s *BatchLookupPolicy) SetObjectReference(v *ObjectReference) *BatchLookupP return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchLookupPolicy) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a LookupPolicy response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchLookupPolicyResponse type BatchLookupPolicyResponse struct { @@ -10870,6 +11904,22 @@ func (s *BatchLookupPolicyResponse) SetPolicyToPathList(v []*PolicyToPath) *Batc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchLookupPolicyResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PolicyToPathList) > 0 { + v := s.PolicyToPathList + + e.SetList(protocol.BodyTarget, "PolicyToPathList", encodePolicyToPathList(v), protocol.Metadata{}) + } + + return nil +} + // The batch read exception structure, which contains the exception type and // message. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchReadException @@ -10905,6 +11955,22 @@ func (s *BatchReadException) SetType(v string) *BatchReadException { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchReadException) MarshalFields(e protocol.FieldEncoder) error { + if s.Message != nil { + v := *s.Message + + e.SetValue(protocol.BodyTarget, "Message", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchReadRequest type BatchReadInput struct { _ struct{} `type:"structure"` @@ -10979,6 +12045,27 @@ func (s *BatchReadInput) SetOperations(v []*BatchReadOperation) *BatchReadInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchReadInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ConsistencyLevel != nil { + v := *s.ConsistencyLevel + + e.SetValue(protocol.HeaderTarget, "x-amz-consistency-level", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Operations) > 0 { + v := s.Operations + + e.SetList(protocol.BodyTarget, "Operations", encodeBatchReadOperationList(v), protocol.Metadata{}) + } + + return nil +} + // Represents the output of a BatchRead operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchReadOperation type BatchReadOperation struct { @@ -11172,6 +12259,75 @@ func (s *BatchReadOperation) SetLookupPolicy(v *BatchLookupPolicy) *BatchReadOpe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchReadOperation) MarshalFields(e protocol.FieldEncoder) error { + if s.GetObjectInformation != nil { + v := s.GetObjectInformation + + e.SetFields(protocol.BodyTarget, "GetObjectInformation", v, protocol.Metadata{}) + } + if s.ListAttachedIndices != nil { + v := s.ListAttachedIndices + + e.SetFields(protocol.BodyTarget, "ListAttachedIndices", v, protocol.Metadata{}) + } + if s.ListIncomingTypedLinks != nil { + v := s.ListIncomingTypedLinks + + e.SetFields(protocol.BodyTarget, "ListIncomingTypedLinks", v, protocol.Metadata{}) + } + if s.ListIndex != nil { + v := s.ListIndex + + e.SetFields(protocol.BodyTarget, "ListIndex", v, protocol.Metadata{}) + } + if s.ListObjectAttributes != nil { + v := s.ListObjectAttributes + + e.SetFields(protocol.BodyTarget, "ListObjectAttributes", v, protocol.Metadata{}) + } + if s.ListObjectChildren != nil { + v := s.ListObjectChildren + + e.SetFields(protocol.BodyTarget, "ListObjectChildren", v, protocol.Metadata{}) + } + if s.ListObjectParentPaths != nil { + v := s.ListObjectParentPaths + + e.SetFields(protocol.BodyTarget, "ListObjectParentPaths", v, protocol.Metadata{}) + } + if s.ListObjectPolicies != nil { + v := s.ListObjectPolicies + + e.SetFields(protocol.BodyTarget, "ListObjectPolicies", v, protocol.Metadata{}) + } + if s.ListOutgoingTypedLinks != nil { + v := s.ListOutgoingTypedLinks + + e.SetFields(protocol.BodyTarget, "ListOutgoingTypedLinks", v, protocol.Metadata{}) + } + if s.ListPolicyAttachments != nil { + v := s.ListPolicyAttachments + + e.SetFields(protocol.BodyTarget, "ListPolicyAttachments", v, protocol.Metadata{}) + } + if s.LookupPolicy != nil { + v := s.LookupPolicy + + e.SetFields(protocol.BodyTarget, "LookupPolicy", v, protocol.Metadata{}) + } + + return nil +} + +func encodeBatchReadOperationList(vs []*BatchReadOperation) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Represents the output of a BatchRead response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchReadOperationResponse type BatchReadOperationResponse struct { @@ -11206,6 +12362,30 @@ func (s *BatchReadOperationResponse) SetSuccessfulResponse(v *BatchReadSuccessfu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchReadOperationResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ExceptionResponse != nil { + v := s.ExceptionResponse + + e.SetFields(protocol.BodyTarget, "ExceptionResponse", v, protocol.Metadata{}) + } + if s.SuccessfulResponse != nil { + v := s.SuccessfulResponse + + e.SetFields(protocol.BodyTarget, "SuccessfulResponse", v, protocol.Metadata{}) + } + + return nil +} + +func encodeBatchReadOperationResponseList(vs []*BatchReadOperationResponse) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchReadResponse type BatchReadOutput struct { _ struct{} `type:"structure"` @@ -11230,6 +12410,17 @@ func (s *BatchReadOutput) SetResponses(v []*BatchReadOperationResponse) *BatchRe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchReadOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Responses) > 0 { + v := s.Responses + + e.SetList(protocol.BodyTarget, "Responses", encodeBatchReadOperationResponseList(v), protocol.Metadata{}) + } + + return nil +} + // Represents the output of a BatchRead success response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchReadSuccessfulResponse type BatchReadSuccessfulResponse struct { @@ -11358,6 +12549,67 @@ func (s *BatchReadSuccessfulResponse) SetLookupPolicy(v *BatchLookupPolicyRespon return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchReadSuccessfulResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.GetObjectInformation != nil { + v := s.GetObjectInformation + + e.SetFields(protocol.BodyTarget, "GetObjectInformation", v, protocol.Metadata{}) + } + if s.ListAttachedIndices != nil { + v := s.ListAttachedIndices + + e.SetFields(protocol.BodyTarget, "ListAttachedIndices", v, protocol.Metadata{}) + } + if s.ListIncomingTypedLinks != nil { + v := s.ListIncomingTypedLinks + + e.SetFields(protocol.BodyTarget, "ListIncomingTypedLinks", v, protocol.Metadata{}) + } + if s.ListIndex != nil { + v := s.ListIndex + + e.SetFields(protocol.BodyTarget, "ListIndex", v, protocol.Metadata{}) + } + if s.ListObjectAttributes != nil { + v := s.ListObjectAttributes + + e.SetFields(protocol.BodyTarget, "ListObjectAttributes", v, protocol.Metadata{}) + } + if s.ListObjectChildren != nil { + v := s.ListObjectChildren + + e.SetFields(protocol.BodyTarget, "ListObjectChildren", v, protocol.Metadata{}) + } + if s.ListObjectParentPaths != nil { + v := s.ListObjectParentPaths + + e.SetFields(protocol.BodyTarget, "ListObjectParentPaths", v, protocol.Metadata{}) + } + if s.ListObjectPolicies != nil { + v := s.ListObjectPolicies + + e.SetFields(protocol.BodyTarget, "ListObjectPolicies", v, protocol.Metadata{}) + } + if s.ListOutgoingTypedLinks != nil { + v := s.ListOutgoingTypedLinks + + e.SetFields(protocol.BodyTarget, "ListOutgoingTypedLinks", v, protocol.Metadata{}) + } + if s.ListPolicyAttachments != nil { + v := s.ListPolicyAttachments + + e.SetFields(protocol.BodyTarget, "ListPolicyAttachments", v, protocol.Metadata{}) + } + if s.LookupPolicy != nil { + v := s.LookupPolicy + + e.SetFields(protocol.BodyTarget, "LookupPolicy", v, protocol.Metadata{}) + } + + return nil +} + // A batch operation to remove a facet from an object. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchRemoveFacetFromObject type BatchRemoveFacetFromObject struct { @@ -11417,6 +12669,22 @@ func (s *BatchRemoveFacetFromObject) SetSchemaFacet(v *SchemaFacet) *BatchRemove return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchRemoveFacetFromObject) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + if s.SchemaFacet != nil { + v := s.SchemaFacet + + e.SetFields(protocol.BodyTarget, "SchemaFacet", v, protocol.Metadata{}) + } + + return nil +} + // An empty result that represents success. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchRemoveFacetFromObjectResponse type BatchRemoveFacetFromObjectResponse struct { @@ -11433,6 +12701,12 @@ func (s BatchRemoveFacetFromObjectResponse) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchRemoveFacetFromObjectResponse) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Represents the output of a BatchUpdate operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchUpdateObjectAttributes type BatchUpdateObjectAttributes struct { @@ -11497,6 +12771,22 @@ func (s *BatchUpdateObjectAttributes) SetObjectReference(v *ObjectReference) *Ba return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchUpdateObjectAttributes) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AttributeUpdates) > 0 { + v := s.AttributeUpdates + + e.SetList(protocol.BodyTarget, "AttributeUpdates", encodeObjectAttributeUpdateList(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Represents the output of a BatchUpdate response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchUpdateObjectAttributesResponse type BatchUpdateObjectAttributesResponse struct { @@ -11522,6 +12812,17 @@ func (s *BatchUpdateObjectAttributesResponse) SetObjectIdentifier(v string) *Bat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchUpdateObjectAttributesResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectIdentifier != nil { + v := *s.ObjectIdentifier + + e.SetValue(protocol.BodyTarget, "ObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchWriteRequest type BatchWriteInput struct { _ struct{} `type:"structure"` @@ -11586,6 +12887,22 @@ func (s *BatchWriteInput) SetOperations(v []*BatchWriteOperation) *BatchWriteInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchWriteInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Operations) > 0 { + v := s.Operations + + e.SetList(protocol.BodyTarget, "Operations", encodeBatchWriteOperationList(v), protocol.Metadata{}) + } + + return nil +} + // Represents the output of a BatchWrite operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchWriteOperation type BatchWriteOperation struct { @@ -11812,6 +13129,90 @@ func (s *BatchWriteOperation) SetUpdateObjectAttributes(v *BatchUpdateObjectAttr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchWriteOperation) MarshalFields(e protocol.FieldEncoder) error { + if s.AddFacetToObject != nil { + v := s.AddFacetToObject + + e.SetFields(protocol.BodyTarget, "AddFacetToObject", v, protocol.Metadata{}) + } + if s.AttachObject != nil { + v := s.AttachObject + + e.SetFields(protocol.BodyTarget, "AttachObject", v, protocol.Metadata{}) + } + if s.AttachPolicy != nil { + v := s.AttachPolicy + + e.SetFields(protocol.BodyTarget, "AttachPolicy", v, protocol.Metadata{}) + } + if s.AttachToIndex != nil { + v := s.AttachToIndex + + e.SetFields(protocol.BodyTarget, "AttachToIndex", v, protocol.Metadata{}) + } + if s.AttachTypedLink != nil { + v := s.AttachTypedLink + + e.SetFields(protocol.BodyTarget, "AttachTypedLink", v, protocol.Metadata{}) + } + if s.CreateIndex != nil { + v := s.CreateIndex + + e.SetFields(protocol.BodyTarget, "CreateIndex", v, protocol.Metadata{}) + } + if s.CreateObject != nil { + v := s.CreateObject + + e.SetFields(protocol.BodyTarget, "CreateObject", v, protocol.Metadata{}) + } + if s.DeleteObject != nil { + v := s.DeleteObject + + e.SetFields(protocol.BodyTarget, "DeleteObject", v, protocol.Metadata{}) + } + if s.DetachFromIndex != nil { + v := s.DetachFromIndex + + e.SetFields(protocol.BodyTarget, "DetachFromIndex", v, protocol.Metadata{}) + } + if s.DetachObject != nil { + v := s.DetachObject + + e.SetFields(protocol.BodyTarget, "DetachObject", v, protocol.Metadata{}) + } + if s.DetachPolicy != nil { + v := s.DetachPolicy + + e.SetFields(protocol.BodyTarget, "DetachPolicy", v, protocol.Metadata{}) + } + if s.DetachTypedLink != nil { + v := s.DetachTypedLink + + e.SetFields(protocol.BodyTarget, "DetachTypedLink", v, protocol.Metadata{}) + } + if s.RemoveFacetFromObject != nil { + v := s.RemoveFacetFromObject + + e.SetFields(protocol.BodyTarget, "RemoveFacetFromObject", v, protocol.Metadata{}) + } + if s.UpdateObjectAttributes != nil { + v := s.UpdateObjectAttributes + + e.SetFields(protocol.BodyTarget, "UpdateObjectAttributes", v, protocol.Metadata{}) + } + + return nil +} + +func encodeBatchWriteOperationList(vs []*BatchWriteOperation) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Represents the output of a BatchWrite response operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchWriteOperationResponse type BatchWriteOperationResponse struct { @@ -11958,6 +13359,90 @@ func (s *BatchWriteOperationResponse) SetUpdateObjectAttributes(v *BatchUpdateOb return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchWriteOperationResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.AddFacetToObject != nil { + v := s.AddFacetToObject + + e.SetFields(protocol.BodyTarget, "AddFacetToObject", v, protocol.Metadata{}) + } + if s.AttachObject != nil { + v := s.AttachObject + + e.SetFields(protocol.BodyTarget, "AttachObject", v, protocol.Metadata{}) + } + if s.AttachPolicy != nil { + v := s.AttachPolicy + + e.SetFields(protocol.BodyTarget, "AttachPolicy", v, protocol.Metadata{}) + } + if s.AttachToIndex != nil { + v := s.AttachToIndex + + e.SetFields(protocol.BodyTarget, "AttachToIndex", v, protocol.Metadata{}) + } + if s.AttachTypedLink != nil { + v := s.AttachTypedLink + + e.SetFields(protocol.BodyTarget, "AttachTypedLink", v, protocol.Metadata{}) + } + if s.CreateIndex != nil { + v := s.CreateIndex + + e.SetFields(protocol.BodyTarget, "CreateIndex", v, protocol.Metadata{}) + } + if s.CreateObject != nil { + v := s.CreateObject + + e.SetFields(protocol.BodyTarget, "CreateObject", v, protocol.Metadata{}) + } + if s.DeleteObject != nil { + v := s.DeleteObject + + e.SetFields(protocol.BodyTarget, "DeleteObject", v, protocol.Metadata{}) + } + if s.DetachFromIndex != nil { + v := s.DetachFromIndex + + e.SetFields(protocol.BodyTarget, "DetachFromIndex", v, protocol.Metadata{}) + } + if s.DetachObject != nil { + v := s.DetachObject + + e.SetFields(protocol.BodyTarget, "DetachObject", v, protocol.Metadata{}) + } + if s.DetachPolicy != nil { + v := s.DetachPolicy + + e.SetFields(protocol.BodyTarget, "DetachPolicy", v, protocol.Metadata{}) + } + if s.DetachTypedLink != nil { + v := s.DetachTypedLink + + e.SetFields(protocol.BodyTarget, "DetachTypedLink", v, protocol.Metadata{}) + } + if s.RemoveFacetFromObject != nil { + v := s.RemoveFacetFromObject + + e.SetFields(protocol.BodyTarget, "RemoveFacetFromObject", v, protocol.Metadata{}) + } + if s.UpdateObjectAttributes != nil { + v := s.UpdateObjectAttributes + + e.SetFields(protocol.BodyTarget, "UpdateObjectAttributes", v, protocol.Metadata{}) + } + + return nil +} + +func encodeBatchWriteOperationResponseList(vs []*BatchWriteOperationResponse) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/BatchWriteResponse type BatchWriteOutput struct { _ struct{} `type:"structure"` @@ -11982,6 +13467,17 @@ func (s *BatchWriteOutput) SetResponses(v []*BatchWriteOperationResponse) *Batch return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchWriteOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Responses) > 0 { + v := s.Responses + + e.SetList(protocol.BodyTarget, "Responses", encodeBatchWriteOperationResponseList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateDirectoryRequest type CreateDirectoryInput struct { _ struct{} `type:"structure"` @@ -12039,6 +13535,22 @@ func (s *CreateDirectoryInput) SetSchemaArn(v string) *CreateDirectoryInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDirectoryInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateDirectoryResponse type CreateDirectoryOutput struct { _ struct{} `type:"structure"` @@ -12101,6 +13613,32 @@ func (s *CreateDirectoryOutput) SetObjectIdentifier(v string) *CreateDirectoryOu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDirectoryOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AppliedSchemaArn != nil { + v := *s.AppliedSchemaArn + + e.SetValue(protocol.BodyTarget, "AppliedSchemaArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.BodyTarget, "DirectoryArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectIdentifier != nil { + v := *s.ObjectIdentifier + + e.SetValue(protocol.BodyTarget, "ObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateFacetRequest type CreateFacetInput struct { _ struct{} `type:"structure"` @@ -12201,6 +13739,32 @@ func (s *CreateFacetInput) SetSchemaArn(v string) *CreateFacetInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateFacetInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetList(protocol.BodyTarget, "Attributes", encodeFacetAttributeList(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectType != nil { + v := *s.ObjectType + + e.SetValue(protocol.BodyTarget, "ObjectType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateFacetResponse type CreateFacetOutput struct { _ struct{} `type:"structure"` @@ -12216,6 +13780,12 @@ func (s CreateFacetOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateFacetOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateIndexRequest type CreateIndexInput struct { _ struct{} `type:"structure"` @@ -12316,6 +13886,37 @@ func (s *CreateIndexInput) SetParentReference(v *ObjectReference) *CreateIndexIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateIndexInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsUnique != nil { + v := *s.IsUnique + + e.SetValue(protocol.BodyTarget, "IsUnique", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.LinkName != nil { + v := *s.LinkName + + e.SetValue(protocol.BodyTarget, "LinkName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.OrderedIndexedAttributeList) > 0 { + v := s.OrderedIndexedAttributeList + + e.SetList(protocol.BodyTarget, "OrderedIndexedAttributeList", encodeAttributeKeyList(v), protocol.Metadata{}) + } + if s.ParentReference != nil { + v := s.ParentReference + + e.SetFields(protocol.BodyTarget, "ParentReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateIndexResponse type CreateIndexOutput struct { _ struct{} `type:"structure"` @@ -12340,6 +13941,17 @@ func (s *CreateIndexOutput) SetObjectIdentifier(v string) *CreateIndexOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateIndexOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectIdentifier != nil { + v := *s.ObjectIdentifier + + e.SetValue(protocol.BodyTarget, "ObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateObjectRequest type CreateObjectInput struct { _ struct{} `type:"structure"` @@ -12446,6 +14058,37 @@ func (s *CreateObjectInput) SetSchemaFacets(v []*SchemaFacet) *CreateObjectInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LinkName != nil { + v := *s.LinkName + + e.SetValue(protocol.BodyTarget, "LinkName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.ObjectAttributeList) > 0 { + v := s.ObjectAttributeList + + e.SetList(protocol.BodyTarget, "ObjectAttributeList", encodeAttributeKeyAndValueList(v), protocol.Metadata{}) + } + if s.ParentReference != nil { + v := s.ParentReference + + e.SetFields(protocol.BodyTarget, "ParentReference", v, protocol.Metadata{}) + } + if len(s.SchemaFacets) > 0 { + v := s.SchemaFacets + + e.SetList(protocol.BodyTarget, "SchemaFacets", encodeSchemaFacetList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateObjectResponse type CreateObjectOutput struct { _ struct{} `type:"structure"` @@ -12470,6 +14113,17 @@ func (s *CreateObjectOutput) SetObjectIdentifier(v string) *CreateObjectOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectIdentifier != nil { + v := *s.ObjectIdentifier + + e.SetValue(protocol.BodyTarget, "ObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateSchemaRequest type CreateSchemaInput struct { _ struct{} `type:"structure"` @@ -12513,6 +14167,17 @@ func (s *CreateSchemaInput) SetName(v string) *CreateSchemaInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateSchemaInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateSchemaResponse type CreateSchemaOutput struct { _ struct{} `type:"structure"` @@ -12538,6 +14203,17 @@ func (s *CreateSchemaOutput) SetSchemaArn(v string) *CreateSchemaOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateSchemaOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.BodyTarget, "SchemaArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateTypedLinkFacetRequest type CreateTypedLinkFacetInput struct { _ struct{} `type:"structure"` @@ -12597,6 +14273,22 @@ func (s *CreateTypedLinkFacetInput) SetSchemaArn(v string) *CreateTypedLinkFacet return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateTypedLinkFacetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Facet != nil { + v := s.Facet + + e.SetFields(protocol.BodyTarget, "Facet", v, protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/CreateTypedLinkFacetResponse type CreateTypedLinkFacetOutput struct { _ struct{} `type:"structure"` @@ -12612,6 +14304,12 @@ func (s CreateTypedLinkFacetOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateTypedLinkFacetOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteDirectoryRequest type DeleteDirectoryInput struct { _ struct{} `type:"structure"` @@ -12651,6 +14349,17 @@ func (s *DeleteDirectoryInput) SetDirectoryArn(v string) *DeleteDirectoryInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDirectoryInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteDirectoryResponse type DeleteDirectoryOutput struct { _ struct{} `type:"structure"` @@ -12677,6 +14386,17 @@ func (s *DeleteDirectoryOutput) SetDirectoryArn(v string) *DeleteDirectoryOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDirectoryOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.BodyTarget, "DirectoryArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteFacetRequest type DeleteFacetInput struct { _ struct{} `type:"structure"` @@ -12734,6 +14454,22 @@ func (s *DeleteFacetInput) SetSchemaArn(v string) *DeleteFacetInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteFacetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteFacetResponse type DeleteFacetOutput struct { _ struct{} `type:"structure"` @@ -12749,6 +14485,12 @@ func (s DeleteFacetOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteFacetOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteObjectRequest type DeleteObjectInput struct { _ struct{} `type:"structure"` @@ -12803,6 +14545,22 @@ func (s *DeleteObjectInput) SetObjectReference(v *ObjectReference) *DeleteObject return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteObjectResponse type DeleteObjectOutput struct { _ struct{} `type:"structure"` @@ -12818,6 +14576,12 @@ func (s DeleteObjectOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteSchemaRequest type DeleteSchemaInput struct { _ struct{} `type:"structure"` @@ -12858,6 +14622,17 @@ func (s *DeleteSchemaInput) SetSchemaArn(v string) *DeleteSchemaInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteSchemaInput) MarshalFields(e protocol.FieldEncoder) error { + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteSchemaResponse type DeleteSchemaOutput struct { _ struct{} `type:"structure"` @@ -12883,6 +14658,17 @@ func (s *DeleteSchemaOutput) SetSchemaArn(v string) *DeleteSchemaOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteSchemaOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.BodyTarget, "SchemaArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteTypedLinkFacetRequest type DeleteTypedLinkFacetInput struct { _ struct{} `type:"structure"` @@ -12937,6 +14723,22 @@ func (s *DeleteTypedLinkFacetInput) SetSchemaArn(v string) *DeleteTypedLinkFacet return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteTypedLinkFacetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DeleteTypedLinkFacetResponse type DeleteTypedLinkFacetOutput struct { _ struct{} `type:"structure"` @@ -12952,6 +14754,12 @@ func (s DeleteTypedLinkFacetOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteTypedLinkFacetOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachFromIndexRequest type DetachFromIndexInput struct { _ struct{} `type:"structure"` @@ -13020,6 +14828,27 @@ func (s *DetachFromIndexInput) SetTargetReference(v *ObjectReference) *DetachFro return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DetachFromIndexInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IndexReference != nil { + v := s.IndexReference + + e.SetFields(protocol.BodyTarget, "IndexReference", v, protocol.Metadata{}) + } + if s.TargetReference != nil { + v := s.TargetReference + + e.SetFields(protocol.BodyTarget, "TargetReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachFromIndexResponse type DetachFromIndexOutput struct { _ struct{} `type:"structure"` @@ -13044,6 +14873,17 @@ func (s *DetachFromIndexOutput) SetDetachedObjectIdentifier(v string) *DetachFro return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DetachFromIndexOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DetachedObjectIdentifier != nil { + v := *s.DetachedObjectIdentifier + + e.SetValue(protocol.BodyTarget, "DetachedObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachObjectRequest type DetachObjectInput struct { _ struct{} `type:"structure"` @@ -13116,6 +14956,27 @@ func (s *DetachObjectInput) SetParentReference(v *ObjectReference) *DetachObject return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DetachObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LinkName != nil { + v := *s.LinkName + + e.SetValue(protocol.BodyTarget, "LinkName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParentReference != nil { + v := s.ParentReference + + e.SetFields(protocol.BodyTarget, "ParentReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachObjectResponse type DetachObjectOutput struct { _ struct{} `type:"structure"` @@ -13140,6 +15001,17 @@ func (s *DetachObjectOutput) SetDetachedObjectIdentifier(v string) *DetachObject return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DetachObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DetachedObjectIdentifier != nil { + v := *s.DetachedObjectIdentifier + + e.SetValue(protocol.BodyTarget, "DetachedObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachPolicyRequest type DetachPolicyInput struct { _ struct{} `type:"structure"` @@ -13208,6 +15080,27 @@ func (s *DetachPolicyInput) SetPolicyReference(v *ObjectReference) *DetachPolicy return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DetachPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + if s.PolicyReference != nil { + v := s.PolicyReference + + e.SetFields(protocol.BodyTarget, "PolicyReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachPolicyResponse type DetachPolicyOutput struct { _ struct{} `type:"structure"` @@ -13223,6 +15116,12 @@ func (s DetachPolicyOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DetachPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachTypedLinkRequest type DetachTypedLinkInput struct { _ struct{} `type:"structure"` @@ -13282,6 +15181,22 @@ func (s *DetachTypedLinkInput) SetTypedLinkSpecifier(v *TypedLinkSpecifier) *Det return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DetachTypedLinkInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TypedLinkSpecifier != nil { + v := s.TypedLinkSpecifier + + e.SetFields(protocol.BodyTarget, "TypedLinkSpecifier", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DetachTypedLinkOutput type DetachTypedLinkOutput struct { _ struct{} `type:"structure"` @@ -13297,6 +15212,12 @@ func (s DetachTypedLinkOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DetachTypedLinkOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Directory structure that includes the directory name and directory ARN. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/Directory type Directory struct { @@ -13350,6 +15271,40 @@ func (s *Directory) SetState(v string) *Directory { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Directory) MarshalFields(e protocol.FieldEncoder) error { + if s.CreationDateTime != nil { + v := *s.CreationDateTime + + e.SetValue(protocol.BodyTarget, "CreationDateTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.BodyTarget, "DirectoryArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "State", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDirectoryList(vs []*Directory) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DisableDirectoryRequest type DisableDirectoryInput struct { _ struct{} `type:"structure"` @@ -13389,6 +15344,17 @@ func (s *DisableDirectoryInput) SetDirectoryArn(v string) *DisableDirectoryInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DisableDirectoryInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/DisableDirectoryResponse type DisableDirectoryOutput struct { _ struct{} `type:"structure"` @@ -13415,6 +15381,17 @@ func (s *DisableDirectoryOutput) SetDirectoryArn(v string) *DisableDirectoryOutp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DisableDirectoryOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.BodyTarget, "DirectoryArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/EnableDirectoryRequest type EnableDirectoryInput struct { _ struct{} `type:"structure"` @@ -13454,6 +15431,17 @@ func (s *EnableDirectoryInput) SetDirectoryArn(v string) *EnableDirectoryInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EnableDirectoryInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/EnableDirectoryResponse type EnableDirectoryOutput struct { _ struct{} `type:"structure"` @@ -13480,6 +15468,17 @@ func (s *EnableDirectoryOutput) SetDirectoryArn(v string) *EnableDirectoryOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EnableDirectoryOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.BodyTarget, "DirectoryArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A structure that contains Name, ARN, Attributes, Rules, and ObjectTypes. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/Facet type Facet struct { @@ -13515,6 +15514,22 @@ func (s *Facet) SetObjectType(v string) *Facet { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Facet) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectType != nil { + v := *s.ObjectType + + e.SetValue(protocol.BodyTarget, "ObjectType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // An attribute that is associated with the Facet. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/FacetAttribute type FacetAttribute struct { @@ -13599,6 +15614,40 @@ func (s *FacetAttribute) SetRequiredBehavior(v string) *FacetAttribute { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FacetAttribute) MarshalFields(e protocol.FieldEncoder) error { + if s.AttributeDefinition != nil { + v := s.AttributeDefinition + + e.SetFields(protocol.BodyTarget, "AttributeDefinition", v, protocol.Metadata{}) + } + if s.AttributeReference != nil { + v := s.AttributeReference + + e.SetFields(protocol.BodyTarget, "AttributeReference", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequiredBehavior != nil { + v := *s.RequiredBehavior + + e.SetValue(protocol.BodyTarget, "RequiredBehavior", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeFacetAttributeList(vs []*FacetAttribute) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A facet attribute definition. See Attribute References (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/cd_advanced.html#attributereferences) // for more information. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/FacetAttributeDefinition @@ -13667,6 +15716,32 @@ func (s *FacetAttributeDefinition) SetType(v string) *FacetAttributeDefinition { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FacetAttributeDefinition) MarshalFields(e protocol.FieldEncoder) error { + if s.DefaultValue != nil { + v := s.DefaultValue + + e.SetFields(protocol.BodyTarget, "DefaultValue", v, protocol.Metadata{}) + } + if s.IsImmutable != nil { + v := *s.IsImmutable + + e.SetValue(protocol.BodyTarget, "IsImmutable", protocol.BoolValue(v), protocol.Metadata{}) + } + if len(s.Rules) > 0 { + v := s.Rules + + e.SetMap(protocol.BodyTarget, "Rules", encodeRuleMap(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The facet attribute reference that specifies the attribute definition that // contains the attribute facet name and attribute name. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/FacetAttributeReference @@ -13732,6 +15807,22 @@ func (s *FacetAttributeReference) SetTargetFacetName(v string) *FacetAttributeRe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FacetAttributeReference) MarshalFields(e protocol.FieldEncoder) error { + if s.TargetAttributeName != nil { + v := *s.TargetAttributeName + + e.SetValue(protocol.BodyTarget, "TargetAttributeName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TargetFacetName != nil { + v := *s.TargetFacetName + + e.SetValue(protocol.BodyTarget, "TargetFacetName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A structure that contains information used to update an attribute. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/FacetAttributeUpdate type FacetAttributeUpdate struct { @@ -13781,6 +15872,30 @@ func (s *FacetAttributeUpdate) SetAttribute(v *FacetAttribute) *FacetAttributeUp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FacetAttributeUpdate) MarshalFields(e protocol.FieldEncoder) error { + if s.Action != nil { + v := *s.Action + + e.SetValue(protocol.BodyTarget, "Action", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Attribute != nil { + v := s.Attribute + + e.SetFields(protocol.BodyTarget, "Attribute", v, protocol.Metadata{}) + } + + return nil +} + +func encodeFacetAttributeUpdateList(vs []*FacetAttributeUpdate) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetDirectoryRequest type GetDirectoryInput struct { _ struct{} `type:"structure"` @@ -13820,6 +15935,17 @@ func (s *GetDirectoryInput) SetDirectoryArn(v string) *GetDirectoryInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDirectoryInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetDirectoryResponse type GetDirectoryOutput struct { _ struct{} `type:"structure"` @@ -13846,6 +15972,17 @@ func (s *GetDirectoryOutput) SetDirectory(v *Directory) *GetDirectoryOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDirectoryOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Directory != nil { + v := s.Directory + + e.SetFields(protocol.BodyTarget, "Directory", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetFacetRequest type GetFacetInput struct { _ struct{} `type:"structure"` @@ -13903,6 +16040,22 @@ func (s *GetFacetInput) SetSchemaArn(v string) *GetFacetInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetFacetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetFacetResponse type GetFacetOutput struct { _ struct{} `type:"structure"` @@ -13927,6 +16080,17 @@ func (s *GetFacetOutput) SetFacet(v *Facet) *GetFacetOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetFacetOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Facet != nil { + v := s.Facet + + e.SetFields(protocol.BodyTarget, "Facet", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetObjectInformationRequest type GetObjectInformationInput struct { _ struct{} `type:"structure"` @@ -13989,6 +16153,27 @@ func (s *GetObjectInformationInput) SetObjectReference(v *ObjectReference) *GetO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetObjectInformationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ConsistencyLevel != nil { + v := *s.ConsistencyLevel + + e.SetValue(protocol.HeaderTarget, "x-amz-consistency-level", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetObjectInformationResponse type GetObjectInformationOutput struct { _ struct{} `type:"structure"` @@ -14022,6 +16207,22 @@ func (s *GetObjectInformationOutput) SetSchemaFacets(v []*SchemaFacet) *GetObjec return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetObjectInformationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectIdentifier != nil { + v := *s.ObjectIdentifier + + e.SetValue(protocol.BodyTarget, "ObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SchemaFacets) > 0 { + v := s.SchemaFacets + + e.SetList(protocol.BodyTarget, "SchemaFacets", encodeSchemaFacetList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetSchemaAsJsonRequest type GetSchemaAsJsonInput struct { _ struct{} `type:"structure"` @@ -14061,6 +16262,17 @@ func (s *GetSchemaAsJsonInput) SetSchemaArn(v string) *GetSchemaAsJsonInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSchemaAsJsonInput) MarshalFields(e protocol.FieldEncoder) error { + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetSchemaAsJsonResponse type GetSchemaAsJsonOutput struct { _ struct{} `type:"structure"` @@ -14094,6 +16306,22 @@ func (s *GetSchemaAsJsonOutput) SetName(v string) *GetSchemaAsJsonOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSchemaAsJsonOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Document != nil { + v := *s.Document + + e.SetValue(protocol.BodyTarget, "Document", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetTypedLinkFacetInformationRequest type GetTypedLinkFacetInformationInput struct { _ struct{} `type:"structure"` @@ -14148,6 +16376,22 @@ func (s *GetTypedLinkFacetInformationInput) SetSchemaArn(v string) *GetTypedLink return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetTypedLinkFacetInformationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/GetTypedLinkFacetInformationResponse type GetTypedLinkFacetInformationOutput struct { _ struct{} `type:"structure"` @@ -14179,6 +16423,17 @@ func (s *GetTypedLinkFacetInformationOutput) SetIdentityAttributeOrder(v []*stri return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetTypedLinkFacetInformationOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.IdentityAttributeOrder) > 0 { + v := s.IdentityAttributeOrder + + e.SetList(protocol.BodyTarget, "IdentityAttributeOrder", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Represents an index and an attached object. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/IndexAttachment type IndexAttachment struct { @@ -14213,6 +16468,30 @@ func (s *IndexAttachment) SetObjectIdentifier(v string) *IndexAttachment { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *IndexAttachment) MarshalFields(e protocol.FieldEncoder) error { + if len(s.IndexedAttributes) > 0 { + v := s.IndexedAttributes + + e.SetList(protocol.BodyTarget, "IndexedAttributes", encodeAttributeKeyAndValueList(v), protocol.Metadata{}) + } + if s.ObjectIdentifier != nil { + v := *s.ObjectIdentifier + + e.SetValue(protocol.BodyTarget, "ObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeIndexAttachmentList(vs []*IndexAttachment) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListAppliedSchemaArnsRequest type ListAppliedSchemaArnsInput struct { _ struct{} `type:"structure"` @@ -14273,6 +16552,27 @@ func (s *ListAppliedSchemaArnsInput) SetNextToken(v string) *ListAppliedSchemaAr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListAppliedSchemaArnsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.BodyTarget, "DirectoryArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListAppliedSchemaArnsResponse type ListAppliedSchemaArnsOutput struct { _ struct{} `type:"structure"` @@ -14306,6 +16606,22 @@ func (s *ListAppliedSchemaArnsOutput) SetSchemaArns(v []*string) *ListAppliedSch return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListAppliedSchemaArnsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SchemaArns) > 0 { + v := s.SchemaArns + + e.SetList(protocol.BodyTarget, "SchemaArns", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListAttachedIndicesRequest type ListAttachedIndicesInput struct { _ struct{} `type:"structure"` @@ -14389,6 +16705,37 @@ func (s *ListAttachedIndicesInput) SetTargetReference(v *ObjectReference) *ListA return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListAttachedIndicesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ConsistencyLevel != nil { + v := *s.ConsistencyLevel + + e.SetValue(protocol.HeaderTarget, "x-amz-consistency-level", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TargetReference != nil { + v := s.TargetReference + + e.SetFields(protocol.BodyTarget, "TargetReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListAttachedIndicesResponse type ListAttachedIndicesOutput struct { _ struct{} `type:"structure"` @@ -14422,6 +16769,22 @@ func (s *ListAttachedIndicesOutput) SetNextToken(v string) *ListAttachedIndicesO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListAttachedIndicesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.IndexAttachments) > 0 { + v := s.IndexAttachments + + e.SetList(protocol.BodyTarget, "IndexAttachments", encodeIndexAttachmentList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListDevelopmentSchemaArnsRequest type ListDevelopmentSchemaArnsInput struct { _ struct{} `type:"structure"` @@ -14468,6 +16831,22 @@ func (s *ListDevelopmentSchemaArnsInput) SetNextToken(v string) *ListDevelopment return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDevelopmentSchemaArnsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListDevelopmentSchemaArnsResponse type ListDevelopmentSchemaArnsOutput struct { _ struct{} `type:"structure"` @@ -14501,6 +16880,22 @@ func (s *ListDevelopmentSchemaArnsOutput) SetSchemaArns(v []*string) *ListDevelo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDevelopmentSchemaArnsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SchemaArns) > 0 { + v := s.SchemaArns + + e.SetList(protocol.BodyTarget, "SchemaArns", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListDirectoriesRequest type ListDirectoriesInput struct { _ struct{} `type:"structure"` @@ -14557,6 +16952,27 @@ func (s *ListDirectoriesInput) SetState(v string) *ListDirectoriesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDirectoriesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListDirectoriesResponse type ListDirectoriesOutput struct { _ struct{} `type:"structure"` @@ -14593,6 +17009,22 @@ func (s *ListDirectoriesOutput) SetNextToken(v string) *ListDirectoriesOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDirectoriesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Directories) > 0 { + v := s.Directories + + e.SetList(protocol.BodyTarget, "Directories", encodeDirectoryList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListFacetAttributesRequest type ListFacetAttributesInput struct { _ struct{} `type:"structure"` @@ -14670,6 +17102,32 @@ func (s *ListFacetAttributesInput) SetSchemaArn(v string) *ListFacetAttributesIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListFacetAttributesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListFacetAttributesResponse type ListFacetAttributesOutput struct { _ struct{} `type:"structure"` @@ -14703,6 +17161,22 @@ func (s *ListFacetAttributesOutput) SetNextToken(v string) *ListFacetAttributesO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListFacetAttributesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetList(protocol.BodyTarget, "Attributes", encodeFacetAttributeList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListFacetNamesRequest type ListFacetNamesInput struct { _ struct{} `type:"structure"` @@ -14763,6 +17237,27 @@ func (s *ListFacetNamesInput) SetSchemaArn(v string) *ListFacetNamesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListFacetNamesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListFacetNamesResponse type ListFacetNamesOutput struct { _ struct{} `type:"structure"` @@ -14796,6 +17291,22 @@ func (s *ListFacetNamesOutput) SetNextToken(v string) *ListFacetNamesOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListFacetNamesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.FacetNames) > 0 { + v := s.FacetNames + + e.SetList(protocol.BodyTarget, "FacetNames", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListIncomingTypedLinksRequest type ListIncomingTypedLinksInput struct { _ struct{} `type:"structure"` @@ -14917,6 +17428,47 @@ func (s *ListIncomingTypedLinksInput) SetObjectReference(v *ObjectReference) *Li return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListIncomingTypedLinksInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ConsistencyLevel != nil { + v := *s.ConsistencyLevel + + e.SetValue(protocol.BodyTarget, "ConsistencyLevel", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.FilterAttributeRanges) > 0 { + v := s.FilterAttributeRanges + + e.SetList(protocol.BodyTarget, "FilterAttributeRanges", encodeTypedLinkAttributeRangeList(v), protocol.Metadata{}) + } + if s.FilterTypedLink != nil { + v := s.FilterTypedLink + + e.SetFields(protocol.BodyTarget, "FilterTypedLink", v, protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListIncomingTypedLinksResponse type ListIncomingTypedLinksOutput struct { _ struct{} `type:"structure"` @@ -14950,6 +17502,22 @@ func (s *ListIncomingTypedLinksOutput) SetNextToken(v string) *ListIncomingTyped return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListIncomingTypedLinksOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.LinkSpecifiers) > 0 { + v := s.LinkSpecifiers + + e.SetList(protocol.BodyTarget, "LinkSpecifiers", encodeTypedLinkSpecifierList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListIndexRequest type ListIndexInput struct { _ struct{} `type:"structure"` @@ -15052,6 +17620,42 @@ func (s *ListIndexInput) SetRangesOnIndexedValues(v []*ObjectAttributeRange) *Li return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListIndexInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ConsistencyLevel != nil { + v := *s.ConsistencyLevel + + e.SetValue(protocol.HeaderTarget, "x-amz-consistency-level", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IndexReference != nil { + v := s.IndexReference + + e.SetFields(protocol.BodyTarget, "IndexReference", v, protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.RangesOnIndexedValues) > 0 { + v := s.RangesOnIndexedValues + + e.SetList(protocol.BodyTarget, "RangesOnIndexedValues", encodeObjectAttributeRangeList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListIndexResponse type ListIndexOutput struct { _ struct{} `type:"structure"` @@ -15085,6 +17689,22 @@ func (s *ListIndexOutput) SetNextToken(v string) *ListIndexOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListIndexOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.IndexAttachments) > 0 { + v := s.IndexAttachments + + e.SetList(protocol.BodyTarget, "IndexAttachments", encodeIndexAttachmentList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectAttributesRequest type ListObjectAttributesInput struct { _ struct{} `type:"structure"` @@ -15186,6 +17806,42 @@ func (s *ListObjectAttributesInput) SetObjectReference(v *ObjectReference) *List return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectAttributesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ConsistencyLevel != nil { + v := *s.ConsistencyLevel + + e.SetValue(protocol.HeaderTarget, "x-amz-consistency-level", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FacetFilter != nil { + v := s.FacetFilter + + e.SetFields(protocol.BodyTarget, "FacetFilter", v, protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectAttributesResponse type ListObjectAttributesOutput struct { _ struct{} `type:"structure"` @@ -15220,6 +17876,22 @@ func (s *ListObjectAttributesOutput) SetNextToken(v string) *ListObjectAttribute return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectAttributesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetList(protocol.BodyTarget, "Attributes", encodeAttributeKeyAndValueList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectChildrenRequest type ListObjectChildrenInput struct { _ struct{} `type:"structure"` @@ -15307,6 +17979,37 @@ func (s *ListObjectChildrenInput) SetObjectReference(v *ObjectReference) *ListOb return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectChildrenInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ConsistencyLevel != nil { + v := *s.ConsistencyLevel + + e.SetValue(protocol.HeaderTarget, "x-amz-consistency-level", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectChildrenResponse type ListObjectChildrenOutput struct { _ struct{} `type:"structure"` @@ -15341,6 +18044,22 @@ func (s *ListObjectChildrenOutput) SetNextToken(v string) *ListObjectChildrenOut return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectChildrenOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Children) > 0 { + v := s.Children + + e.SetMap(protocol.BodyTarget, "Children", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectParentPathsRequest type ListObjectParentPathsInput struct { _ struct{} `type:"structure"` @@ -15416,6 +18135,32 @@ func (s *ListObjectParentPathsInput) SetObjectReference(v *ObjectReference) *Lis return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectParentPathsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectParentPathsResponse type ListObjectParentPathsOutput struct { _ struct{} `type:"structure"` @@ -15449,6 +18194,22 @@ func (s *ListObjectParentPathsOutput) SetPathToObjectIdentifiersList(v []*PathTo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectParentPathsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PathToObjectIdentifiersList) > 0 { + v := s.PathToObjectIdentifiersList + + e.SetList(protocol.BodyTarget, "PathToObjectIdentifiersList", encodePathToObjectIdentifiersList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectParentsRequest type ListObjectParentsInput struct { _ struct{} `type:"structure"` @@ -15536,6 +18297,37 @@ func (s *ListObjectParentsInput) SetObjectReference(v *ObjectReference) *ListObj return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectParentsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ConsistencyLevel != nil { + v := *s.ConsistencyLevel + + e.SetValue(protocol.HeaderTarget, "x-amz-consistency-level", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectParentsResponse type ListObjectParentsOutput struct { _ struct{} `type:"structure"` @@ -15570,6 +18362,22 @@ func (s *ListObjectParentsOutput) SetParents(v map[string]*string) *ListObjectPa return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectParentsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Parents) > 0 { + v := s.Parents + + e.SetMap(protocol.BodyTarget, "Parents", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectPoliciesRequest type ListObjectPoliciesInput struct { _ struct{} `type:"structure"` @@ -15656,6 +18464,37 @@ func (s *ListObjectPoliciesInput) SetObjectReference(v *ObjectReference) *ListOb return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectPoliciesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ConsistencyLevel != nil { + v := *s.ConsistencyLevel + + e.SetValue(protocol.HeaderTarget, "x-amz-consistency-level", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListObjectPoliciesResponse type ListObjectPoliciesOutput struct { _ struct{} `type:"structure"` @@ -15689,6 +18528,22 @@ func (s *ListObjectPoliciesOutput) SetNextToken(v string) *ListObjectPoliciesOut return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectPoliciesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AttachedPolicyIds) > 0 { + v := s.AttachedPolicyIds + + e.SetList(protocol.BodyTarget, "AttachedPolicyIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListOutgoingTypedLinksRequest type ListOutgoingTypedLinksInput struct { _ struct{} `type:"structure"` @@ -15810,6 +18665,47 @@ func (s *ListOutgoingTypedLinksInput) SetObjectReference(v *ObjectReference) *Li return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListOutgoingTypedLinksInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ConsistencyLevel != nil { + v := *s.ConsistencyLevel + + e.SetValue(protocol.BodyTarget, "ConsistencyLevel", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.FilterAttributeRanges) > 0 { + v := s.FilterAttributeRanges + + e.SetList(protocol.BodyTarget, "FilterAttributeRanges", encodeTypedLinkAttributeRangeList(v), protocol.Metadata{}) + } + if s.FilterTypedLink != nil { + v := s.FilterTypedLink + + e.SetFields(protocol.BodyTarget, "FilterTypedLink", v, protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListOutgoingTypedLinksResponse type ListOutgoingTypedLinksOutput struct { _ struct{} `type:"structure"` @@ -15843,6 +18739,22 @@ func (s *ListOutgoingTypedLinksOutput) SetTypedLinkSpecifiers(v []*TypedLinkSpec return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListOutgoingTypedLinksOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TypedLinkSpecifiers) > 0 { + v := s.TypedLinkSpecifiers + + e.SetList(protocol.BodyTarget, "TypedLinkSpecifiers", encodeTypedLinkSpecifierList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListPolicyAttachmentsRequest type ListPolicyAttachmentsInput struct { _ struct{} `type:"structure"` @@ -15929,6 +18841,37 @@ func (s *ListPolicyAttachmentsInput) SetPolicyReference(v *ObjectReference) *Lis return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPolicyAttachmentsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ConsistencyLevel != nil { + v := *s.ConsistencyLevel + + e.SetValue(protocol.HeaderTarget, "x-amz-consistency-level", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyReference != nil { + v := s.PolicyReference + + e.SetFields(protocol.BodyTarget, "PolicyReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListPolicyAttachmentsResponse type ListPolicyAttachmentsOutput struct { _ struct{} `type:"structure"` @@ -15962,6 +18905,22 @@ func (s *ListPolicyAttachmentsOutput) SetObjectIdentifiers(v []*string) *ListPol return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPolicyAttachmentsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.ObjectIdentifiers) > 0 { + v := s.ObjectIdentifiers + + e.SetList(protocol.BodyTarget, "ObjectIdentifiers", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListPublishedSchemaArnsRequest type ListPublishedSchemaArnsInput struct { _ struct{} `type:"structure"` @@ -16008,6 +18967,22 @@ func (s *ListPublishedSchemaArnsInput) SetNextToken(v string) *ListPublishedSche return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPublishedSchemaArnsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListPublishedSchemaArnsResponse type ListPublishedSchemaArnsOutput struct { _ struct{} `type:"structure"` @@ -16041,6 +19016,22 @@ func (s *ListPublishedSchemaArnsOutput) SetSchemaArns(v []*string) *ListPublishe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPublishedSchemaArnsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SchemaArns) > 0 { + v := s.SchemaArns + + e.SetList(protocol.BodyTarget, "SchemaArns", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListTagsForResourceRequest type ListTagsForResourceInput struct { _ struct{} `type:"structure"` @@ -16104,6 +19095,27 @@ func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResource return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTagsForResourceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceArn != nil { + v := *s.ResourceArn + + e.SetValue(protocol.BodyTarget, "ResourceArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListTagsForResourceResponse type ListTagsForResourceOutput struct { _ struct{} `type:"structure"` @@ -16138,6 +19150,22 @@ func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTagsForResourceOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Tags) > 0 { + v := s.Tags + + e.SetList(protocol.BodyTarget, "Tags", encodeTagList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListTypedLinkFacetAttributesRequest type ListTypedLinkFacetAttributesInput struct { _ struct{} `type:"structure"` @@ -16213,6 +19241,32 @@ func (s *ListTypedLinkFacetAttributesInput) SetSchemaArn(v string) *ListTypedLin return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTypedLinkFacetAttributesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListTypedLinkFacetAttributesResponse type ListTypedLinkFacetAttributesOutput struct { _ struct{} `type:"structure"` @@ -16246,6 +19300,22 @@ func (s *ListTypedLinkFacetAttributesOutput) SetNextToken(v string) *ListTypedLi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTypedLinkFacetAttributesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetList(protocol.BodyTarget, "Attributes", encodeTypedLinkAttributeDefinitionList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListTypedLinkFacetNamesRequest type ListTypedLinkFacetNamesInput struct { _ struct{} `type:"structure"` @@ -16307,6 +19377,27 @@ func (s *ListTypedLinkFacetNamesInput) SetSchemaArn(v string) *ListTypedLinkFace return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTypedLinkFacetNamesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ListTypedLinkFacetNamesResponse type ListTypedLinkFacetNamesOutput struct { _ struct{} `type:"structure"` @@ -16340,6 +19431,22 @@ func (s *ListTypedLinkFacetNamesOutput) SetNextToken(v string) *ListTypedLinkFac return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTypedLinkFacetNamesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.FacetNames) > 0 { + v := s.FacetNames + + e.SetList(protocol.BodyTarget, "FacetNames", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/LookupPolicyRequest type LookupPolicyInput struct { _ struct{} `type:"structure"` @@ -16416,6 +19523,32 @@ func (s *LookupPolicyInput) SetObjectReference(v *ObjectReference) *LookupPolicy return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LookupPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/LookupPolicyResponse type LookupPolicyOutput struct { _ struct{} `type:"structure"` @@ -16450,6 +19583,22 @@ func (s *LookupPolicyOutput) SetPolicyToPathList(v []*PolicyToPath) *LookupPolic return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LookupPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.PolicyToPathList) > 0 { + v := s.PolicyToPathList + + e.SetList(protocol.BodyTarget, "PolicyToPathList", encodePolicyToPathList(v), protocol.Metadata{}) + } + + return nil +} + // The action to take on the object attribute. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ObjectAttributeAction type ObjectAttributeAction struct { @@ -16484,6 +19633,22 @@ func (s *ObjectAttributeAction) SetObjectAttributeUpdateValue(v *TypedAttributeV return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ObjectAttributeAction) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectAttributeActionType != nil { + v := *s.ObjectAttributeActionType + + e.SetValue(protocol.BodyTarget, "ObjectAttributeActionType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectAttributeUpdateValue != nil { + v := s.ObjectAttributeUpdateValue + + e.SetFields(protocol.BodyTarget, "ObjectAttributeUpdateValue", v, protocol.Metadata{}) + } + + return nil +} + // A range of attributes. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ObjectAttributeRange type ObjectAttributeRange struct { @@ -16538,6 +19703,30 @@ func (s *ObjectAttributeRange) SetRange(v *TypedAttributeValueRange) *ObjectAttr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ObjectAttributeRange) MarshalFields(e protocol.FieldEncoder) error { + if s.AttributeKey != nil { + v := s.AttributeKey + + e.SetFields(protocol.BodyTarget, "AttributeKey", v, protocol.Metadata{}) + } + if s.Range != nil { + v := s.Range + + e.SetFields(protocol.BodyTarget, "Range", v, protocol.Metadata{}) + } + + return nil +} + +func encodeObjectAttributeRangeList(vs []*ObjectAttributeRange) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Structure that contains attribute update information. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ObjectAttributeUpdate type ObjectAttributeUpdate struct { @@ -16587,6 +19776,30 @@ func (s *ObjectAttributeUpdate) SetObjectAttributeKey(v *AttributeKey) *ObjectAt return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ObjectAttributeUpdate) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectAttributeAction != nil { + v := s.ObjectAttributeAction + + e.SetFields(protocol.BodyTarget, "ObjectAttributeAction", v, protocol.Metadata{}) + } + if s.ObjectAttributeKey != nil { + v := s.ObjectAttributeKey + + e.SetFields(protocol.BodyTarget, "ObjectAttributeKey", v, protocol.Metadata{}) + } + + return nil +} + +func encodeObjectAttributeUpdateList(vs []*ObjectAttributeUpdate) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The reference that identifies an object. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/ObjectReference type ObjectReference struct { @@ -16626,6 +19839,17 @@ func (s *ObjectReference) SetSelector(v string) *ObjectReference { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ObjectReference) MarshalFields(e protocol.FieldEncoder) error { + if s.Selector != nil { + v := *s.Selector + + e.SetValue(protocol.BodyTarget, "Selector", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Returns the path to the ObjectIdentifiers that is associated with the directory. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PathToObjectIdentifiers type PathToObjectIdentifiers struct { @@ -16661,6 +19885,30 @@ func (s *PathToObjectIdentifiers) SetPath(v string) *PathToObjectIdentifiers { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PathToObjectIdentifiers) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ObjectIdentifiers) > 0 { + v := s.ObjectIdentifiers + + e.SetList(protocol.BodyTarget, "ObjectIdentifiers", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Path != nil { + v := *s.Path + + e.SetValue(protocol.BodyTarget, "Path", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodePathToObjectIdentifiersList(vs []*PathToObjectIdentifiers) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Contains the PolicyType, PolicyId, and the ObjectIdentifier to which it is // attached. For more information, see Policies (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/cd_key_concepts.html#policies). // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PolicyAttachment @@ -16705,6 +19953,35 @@ func (s *PolicyAttachment) SetPolicyType(v string) *PolicyAttachment { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PolicyAttachment) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectIdentifier != nil { + v := *s.ObjectIdentifier + + e.SetValue(protocol.BodyTarget, "ObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyId != nil { + v := *s.PolicyId + + e.SetValue(protocol.BodyTarget, "PolicyId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyType != nil { + v := *s.PolicyType + + e.SetValue(protocol.BodyTarget, "PolicyType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodePolicyAttachmentList(vs []*PolicyAttachment) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Used when a regular object exists in a Directory and you want to find all // of the policies that are associated with that object and the parent to that // object. @@ -16741,6 +20018,30 @@ func (s *PolicyToPath) SetPolicies(v []*PolicyAttachment) *PolicyToPath { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PolicyToPath) MarshalFields(e protocol.FieldEncoder) error { + if s.Path != nil { + v := *s.Path + + e.SetValue(protocol.BodyTarget, "Path", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Policies) > 0 { + v := s.Policies + + e.SetList(protocol.BodyTarget, "Policies", encodePolicyAttachmentList(v), protocol.Metadata{}) + } + + return nil +} + +func encodePolicyToPathList(vs []*PolicyToPath) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PublishSchemaRequest type PublishSchemaInput struct { _ struct{} `type:"structure"` @@ -16811,6 +20112,27 @@ func (s *PublishSchemaInput) SetVersion(v string) *PublishSchemaInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PublishSchemaInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DevelopmentSchemaArn != nil { + v := *s.DevelopmentSchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PublishSchemaResponse type PublishSchemaOutput struct { _ struct{} `type:"structure"` @@ -16836,6 +20158,17 @@ func (s *PublishSchemaOutput) SetPublishedSchemaArn(v string) *PublishSchemaOutp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PublishSchemaOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.PublishedSchemaArn != nil { + v := *s.PublishedSchemaArn + + e.SetValue(protocol.BodyTarget, "PublishedSchemaArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PutSchemaFromJsonRequest type PutSchemaFromJsonInput struct { _ struct{} `type:"structure"` @@ -16883,10 +20216,26 @@ func (s *PutSchemaFromJsonInput) SetDocument(v string) *PutSchemaFromJsonInput { return s } -// SetSchemaArn sets the SchemaArn field's value. -func (s *PutSchemaFromJsonInput) SetSchemaArn(v string) *PutSchemaFromJsonInput { - s.SchemaArn = &v - return s +// SetSchemaArn sets the SchemaArn field's value. +func (s *PutSchemaFromJsonInput) SetSchemaArn(v string) *PutSchemaFromJsonInput { + s.SchemaArn = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutSchemaFromJsonInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Document != nil { + v := *s.Document + + e.SetValue(protocol.BodyTarget, "Document", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil } // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/PutSchemaFromJsonResponse @@ -16913,6 +20262,17 @@ func (s *PutSchemaFromJsonOutput) SetArn(v string) *PutSchemaFromJsonOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutSchemaFromJsonOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/RemoveFacetFromObjectRequest type RemoveFacetFromObjectInput struct { _ struct{} `type:"structure"` @@ -16985,6 +20345,27 @@ func (s *RemoveFacetFromObjectInput) SetSchemaFacet(v *SchemaFacet) *RemoveFacet return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RemoveFacetFromObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + if s.SchemaFacet != nil { + v := s.SchemaFacet + + e.SetFields(protocol.BodyTarget, "SchemaFacet", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/RemoveFacetFromObjectResponse type RemoveFacetFromObjectOutput struct { _ struct{} `type:"structure"` @@ -17000,6 +20381,12 @@ func (s RemoveFacetFromObjectOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RemoveFacetFromObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Contains an Amazon Resource Name (ARN) and parameters that are associated // with the rule. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/Rule @@ -17035,6 +20422,30 @@ func (s *Rule) SetType(v string) *Rule { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Rule) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Parameters) > 0 { + v := s.Parameters + + e.SetMap(protocol.BodyTarget, "Parameters", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeRuleMap(vs map[string]*Rule) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // A facet. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/SchemaFacet type SchemaFacet struct { @@ -17082,6 +20493,30 @@ func (s *SchemaFacet) SetSchemaArn(v string) *SchemaFacet { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SchemaFacet) MarshalFields(e protocol.FieldEncoder) error { + if s.FacetName != nil { + v := *s.FacetName + + e.SetValue(protocol.BodyTarget, "FacetName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.BodyTarget, "SchemaArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeSchemaFacetList(vs []*SchemaFacet) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The tag structure that contains a tag key and value. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/Tag type Tag struct { @@ -17116,6 +20551,30 @@ func (s *Tag) SetValue(v string) *Tag { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Tag) MarshalFields(e protocol.FieldEncoder) error { + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTagList(vs []*Tag) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/TagResourceRequest type TagResourceInput struct { _ struct{} `type:"structure"` @@ -17170,6 +20629,22 @@ func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TagResourceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ResourceArn != nil { + v := *s.ResourceArn + + e.SetValue(protocol.BodyTarget, "ResourceArn", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Tags) > 0 { + v := s.Tags + + e.SetList(protocol.BodyTarget, "Tags", encodeTagList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/TagResourceResponse type TagResourceOutput struct { _ struct{} `type:"structure"` @@ -17185,6 +20660,12 @@ func (s TagResourceOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TagResourceOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Represents the data for a typed attribute. You can set one, and only one, // of the elements. Each attribute in an item is a name-value pair. Attributes // have a single value. @@ -17250,6 +20731,37 @@ func (s *TypedAttributeValue) SetStringValue(v string) *TypedAttributeValue { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TypedAttributeValue) MarshalFields(e protocol.FieldEncoder) error { + if s.BinaryValue != nil { + v := s.BinaryValue + + e.SetValue(protocol.BodyTarget, "BinaryValue", protocol.BytesValue(v), protocol.Metadata{}) + } + if s.BooleanValue != nil { + v := *s.BooleanValue + + e.SetValue(protocol.BodyTarget, "BooleanValue", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.DatetimeValue != nil { + v := *s.DatetimeValue + + e.SetValue(protocol.BodyTarget, "DatetimeValue", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.NumberValue != nil { + v := *s.NumberValue + + e.SetValue(protocol.BodyTarget, "NumberValue", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StringValue != nil { + v := *s.StringValue + + e.SetValue(protocol.BodyTarget, "StringValue", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A range of attribute values. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/TypedAttributeValueRange type TypedAttributeValueRange struct { @@ -17322,6 +20834,32 @@ func (s *TypedAttributeValueRange) SetStartValue(v *TypedAttributeValue) *TypedA return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TypedAttributeValueRange) MarshalFields(e protocol.FieldEncoder) error { + if s.EndMode != nil { + v := *s.EndMode + + e.SetValue(protocol.BodyTarget, "EndMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EndValue != nil { + v := s.EndValue + + e.SetFields(protocol.BodyTarget, "EndValue", v, protocol.Metadata{}) + } + if s.StartMode != nil { + v := *s.StartMode + + e.SetValue(protocol.BodyTarget, "StartMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartValue != nil { + v := s.StartValue + + e.SetFields(protocol.BodyTarget, "StartValue", v, protocol.Metadata{}) + } + + return nil +} + // A typed link attribute definition. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/TypedLinkAttributeDefinition type TypedLinkAttributeDefinition struct { @@ -17420,6 +20958,50 @@ func (s *TypedLinkAttributeDefinition) SetType(v string) *TypedLinkAttributeDefi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TypedLinkAttributeDefinition) MarshalFields(e protocol.FieldEncoder) error { + if s.DefaultValue != nil { + v := s.DefaultValue + + e.SetFields(protocol.BodyTarget, "DefaultValue", v, protocol.Metadata{}) + } + if s.IsImmutable != nil { + v := *s.IsImmutable + + e.SetValue(protocol.BodyTarget, "IsImmutable", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequiredBehavior != nil { + v := *s.RequiredBehavior + + e.SetValue(protocol.BodyTarget, "RequiredBehavior", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Rules) > 0 { + v := s.Rules + + e.SetMap(protocol.BodyTarget, "Rules", encodeRuleMap(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTypedLinkAttributeDefinitionList(vs []*TypedLinkAttributeDefinition) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Identifies the range of attributes that are used by a specified filter. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/TypedLinkAttributeRange type TypedLinkAttributeRange struct { @@ -17477,6 +21059,30 @@ func (s *TypedLinkAttributeRange) SetRange(v *TypedAttributeValueRange) *TypedLi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TypedLinkAttributeRange) MarshalFields(e protocol.FieldEncoder) error { + if s.AttributeName != nil { + v := *s.AttributeName + + e.SetValue(protocol.BodyTarget, "AttributeName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Range != nil { + v := s.Range + + e.SetFields(protocol.BodyTarget, "Range", v, protocol.Metadata{}) + } + + return nil +} + +func encodeTypedLinkAttributeRangeList(vs []*TypedLinkAttributeRange) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Defines the typed links structure and its attributes. To create a typed link // facet, use the CreateTypedLinkFacet API. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/TypedLinkFacet @@ -17562,6 +21168,27 @@ func (s *TypedLinkFacet) SetName(v string) *TypedLinkFacet { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TypedLinkFacet) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetList(protocol.BodyTarget, "Attributes", encodeTypedLinkAttributeDefinitionList(v), protocol.Metadata{}) + } + if len(s.IdentityAttributeOrder) > 0 { + v := s.IdentityAttributeOrder + + e.SetList(protocol.BodyTarget, "IdentityAttributeOrder", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A typed link facet attribute update. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/TypedLinkFacetAttributeUpdate type TypedLinkFacetAttributeUpdate struct { @@ -17621,6 +21248,30 @@ func (s *TypedLinkFacetAttributeUpdate) SetAttribute(v *TypedLinkAttributeDefini return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TypedLinkFacetAttributeUpdate) MarshalFields(e protocol.FieldEncoder) error { + if s.Action != nil { + v := *s.Action + + e.SetValue(protocol.BodyTarget, "Action", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Attribute != nil { + v := s.Attribute + + e.SetFields(protocol.BodyTarget, "Attribute", v, protocol.Metadata{}) + } + + return nil +} + +func encodeTypedLinkFacetAttributeUpdateList(vs []*TypedLinkFacetAttributeUpdate) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Identifies the schema Amazon Resource Name (ARN) and facet name for the typed // link. // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/TypedLinkSchemaAndFacetName @@ -17677,6 +21328,22 @@ func (s *TypedLinkSchemaAndFacetName) SetTypedLinkName(v string) *TypedLinkSchem return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TypedLinkSchemaAndFacetName) MarshalFields(e protocol.FieldEncoder) error { + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.BodyTarget, "SchemaArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TypedLinkName != nil { + v := *s.TypedLinkName + + e.SetValue(protocol.BodyTarget, "TypedLinkName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains all the information that is used to uniquely identify a typed link. // The parameters discussed in this topic are used to uniquely specify the typed // link being operated on. The AttachTypedLink API returns a typed link specifier @@ -17779,6 +21446,40 @@ func (s *TypedLinkSpecifier) SetTypedLinkFacet(v *TypedLinkSchemaAndFacetName) * return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TypedLinkSpecifier) MarshalFields(e protocol.FieldEncoder) error { + if len(s.IdentityAttributeValues) > 0 { + v := s.IdentityAttributeValues + + e.SetList(protocol.BodyTarget, "IdentityAttributeValues", encodeAttributeNameAndValueList(v), protocol.Metadata{}) + } + if s.SourceObjectReference != nil { + v := s.SourceObjectReference + + e.SetFields(protocol.BodyTarget, "SourceObjectReference", v, protocol.Metadata{}) + } + if s.TargetObjectReference != nil { + v := s.TargetObjectReference + + e.SetFields(protocol.BodyTarget, "TargetObjectReference", v, protocol.Metadata{}) + } + if s.TypedLinkFacet != nil { + v := s.TypedLinkFacet + + e.SetFields(protocol.BodyTarget, "TypedLinkFacet", v, protocol.Metadata{}) + } + + return nil +} + +func encodeTypedLinkSpecifierList(vs []*TypedLinkSpecifier) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UntagResourceRequest type UntagResourceInput struct { _ struct{} `type:"structure"` @@ -17833,6 +21534,22 @@ func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UntagResourceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ResourceArn != nil { + v := *s.ResourceArn + + e.SetValue(protocol.BodyTarget, "ResourceArn", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TagKeys) > 0 { + v := s.TagKeys + + e.SetList(protocol.BodyTarget, "TagKeys", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UntagResourceResponse type UntagResourceOutput struct { _ struct{} `type:"structure"` @@ -17848,6 +21565,12 @@ func (s UntagResourceOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UntagResourceOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateFacetRequest type UpdateFacetInput struct { _ struct{} `type:"structure"` @@ -17936,6 +21659,32 @@ func (s *UpdateFacetInput) SetSchemaArn(v string) *UpdateFacetInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateFacetInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AttributeUpdates) > 0 { + v := s.AttributeUpdates + + e.SetList(protocol.BodyTarget, "AttributeUpdates", encodeFacetAttributeUpdateList(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectType != nil { + v := *s.ObjectType + + e.SetValue(protocol.BodyTarget, "ObjectType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateFacetResponse type UpdateFacetOutput struct { _ struct{} `type:"structure"` @@ -17951,6 +21700,12 @@ func (s UpdateFacetOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateFacetOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateObjectAttributesRequest type UpdateObjectAttributesInput struct { _ struct{} `type:"structure"` @@ -18029,6 +21784,27 @@ func (s *UpdateObjectAttributesInput) SetObjectReference(v *ObjectReference) *Up return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateObjectAttributesInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AttributeUpdates) > 0 { + v := s.AttributeUpdates + + e.SetList(protocol.BodyTarget, "AttributeUpdates", encodeObjectAttributeUpdateList(v), protocol.Metadata{}) + } + if s.DirectoryArn != nil { + v := *s.DirectoryArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ObjectReference != nil { + v := s.ObjectReference + + e.SetFields(protocol.BodyTarget, "ObjectReference", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateObjectAttributesResponse type UpdateObjectAttributesOutput struct { _ struct{} `type:"structure"` @@ -18053,6 +21829,17 @@ func (s *UpdateObjectAttributesOutput) SetObjectIdentifier(v string) *UpdateObje return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateObjectAttributesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ObjectIdentifier != nil { + v := *s.ObjectIdentifier + + e.SetValue(protocol.BodyTarget, "ObjectIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateSchemaRequest type UpdateSchemaInput struct { _ struct{} `type:"structure"` @@ -18110,6 +21897,22 @@ func (s *UpdateSchemaInput) SetSchemaArn(v string) *UpdateSchemaInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateSchemaInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateSchemaResponse type UpdateSchemaOutput struct { _ struct{} `type:"structure"` @@ -18135,6 +21938,17 @@ func (s *UpdateSchemaOutput) SetSchemaArn(v string) *UpdateSchemaOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateSchemaOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.BodyTarget, "SchemaArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateTypedLinkFacetRequest type UpdateTypedLinkFacetInput struct { _ struct{} `type:"structure"` @@ -18234,6 +22048,32 @@ func (s *UpdateTypedLinkFacetInput) SetSchemaArn(v string) *UpdateTypedLinkFacet return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateTypedLinkFacetInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AttributeUpdates) > 0 { + v := s.AttributeUpdates + + e.SetList(protocol.BodyTarget, "AttributeUpdates", encodeTypedLinkFacetAttributeUpdateList(v), protocol.Metadata{}) + } + if len(s.IdentityAttributeOrder) > 0 { + v := s.IdentityAttributeOrder + + e.SetList(protocol.BodyTarget, "IdentityAttributeOrder", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SchemaArn != nil { + v := *s.SchemaArn + + e.SetValue(protocol.HeaderTarget, "x-amz-data-partition", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10/UpdateTypedLinkFacetResponse type UpdateTypedLinkFacetOutput struct { _ struct{} `type:"structure"` @@ -18249,6 +22089,12 @@ func (s UpdateTypedLinkFacetOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateTypedLinkFacetOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + const ( // BatchReadExceptionTypeValidationException is a BatchReadExceptionType enum value BatchReadExceptionTypeValidationException = "ValidationException" diff --git a/service/cloudfront/api.go b/service/cloudfront/api.go index b44abab8c9e..afca9743ee7 100644 --- a/service/cloudfront/api.go +++ b/service/cloudfront/api.go @@ -3248,6 +3248,27 @@ func (s *ActiveTrustedSigners) SetQuantity(v int64) *ActiveTrustedSigners { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ActiveTrustedSigners) MarshalFields(e protocol.FieldEncoder) error { + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", encodeSignerList(v), protocol.Metadata{ListLocationName: "Signer"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about CNAMEs (alternate domain names), // if any, for this distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/Aliases @@ -3300,6 +3321,22 @@ func (s *Aliases) SetQuantity(v int64) *Aliases { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Aliases) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "CNAME"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that controls which HTTP methods CloudFront processes and // forwards to your Amazon S3 bucket or your custom origin. There are three // choices: @@ -3394,6 +3431,27 @@ func (s *AllowedMethods) SetQuantity(v int64) *AllowedMethods { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AllowedMethods) MarshalFields(e protocol.FieldEncoder) error { + if s.CachedMethods != nil { + v := s.CachedMethods + + e.SetFields(protocol.BodyTarget, "CachedMethods", v, protocol.Metadata{}) + } + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "Method"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that describes how CloudFront processes requests. // // You must create at least as many cache behaviors (including the default cache @@ -3701,6 +3759,80 @@ func (s *CacheBehavior) SetViewerProtocolPolicy(v string) *CacheBehavior { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CacheBehavior) MarshalFields(e protocol.FieldEncoder) error { + if s.AllowedMethods != nil { + v := s.AllowedMethods + + e.SetFields(protocol.BodyTarget, "AllowedMethods", v, protocol.Metadata{}) + } + if s.Compress != nil { + v := *s.Compress + + e.SetValue(protocol.BodyTarget, "Compress", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.DefaultTTL != nil { + v := *s.DefaultTTL + + e.SetValue(protocol.BodyTarget, "DefaultTTL", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ForwardedValues != nil { + v := s.ForwardedValues + + e.SetFields(protocol.BodyTarget, "ForwardedValues", v, protocol.Metadata{}) + } + if s.LambdaFunctionAssociations != nil { + v := s.LambdaFunctionAssociations + + e.SetFields(protocol.BodyTarget, "LambdaFunctionAssociations", v, protocol.Metadata{}) + } + if s.MaxTTL != nil { + v := *s.MaxTTL + + e.SetValue(protocol.BodyTarget, "MaxTTL", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MinTTL != nil { + v := *s.MinTTL + + e.SetValue(protocol.BodyTarget, "MinTTL", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PathPattern != nil { + v := *s.PathPattern + + e.SetValue(protocol.BodyTarget, "PathPattern", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SmoothStreaming != nil { + v := *s.SmoothStreaming + + e.SetValue(protocol.BodyTarget, "SmoothStreaming", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.TargetOriginId != nil { + v := *s.TargetOriginId + + e.SetValue(protocol.BodyTarget, "TargetOriginId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrustedSigners != nil { + v := s.TrustedSigners + + e.SetFields(protocol.BodyTarget, "TrustedSigners", v, protocol.Metadata{}) + } + if s.ViewerProtocolPolicy != nil { + v := *s.ViewerProtocolPolicy + + e.SetValue(protocol.BodyTarget, "ViewerProtocolPolicy", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCacheBehaviorList(vs []*CacheBehavior) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that contains zero or more CacheBehavior elements. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CacheBehaviors type CacheBehaviors struct { @@ -3761,6 +3893,22 @@ func (s *CacheBehaviors) SetQuantity(v int64) *CacheBehaviors { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CacheBehaviors) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", encodeCacheBehaviorList(v), protocol.Metadata{ListLocationName: "CacheBehavior"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that controls whether CloudFront caches the response to requests // using the specified HTTP methods. There are two choices: // @@ -3827,6 +3975,22 @@ func (s *CachedMethods) SetQuantity(v int64) *CachedMethods { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CachedMethods) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "Method"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that specifies whether you want CloudFront to forward cookies // to the origin and, if so, which ones. For more information about forwarding // cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies @@ -3882,6 +4046,22 @@ func (s *CookieNames) SetQuantity(v int64) *CookieNames { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CookieNames) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "Name"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that specifies whether you want CloudFront to forward cookies // to the origin and, if so, which ones. For more information about forwarding // cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies @@ -3957,6 +4137,22 @@ func (s *CookiePreference) SetWhitelistedNames(v *CookieNames) *CookiePreference return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CookiePreference) MarshalFields(e protocol.FieldEncoder) error { + if s.Forward != nil { + v := *s.Forward + + e.SetValue(protocol.BodyTarget, "Forward", protocol.StringValue(v), protocol.Metadata{}) + } + if s.WhitelistedNames != nil { + v := s.WhitelistedNames + + e.SetFields(protocol.BodyTarget, "WhitelistedNames", v, protocol.Metadata{}) + } + + return nil +} + // The request to create a new origin access identity. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateCloudFrontOriginAccessIdentityRequest type CreateCloudFrontOriginAccessIdentityInput struct { @@ -4002,6 +4198,17 @@ func (s *CreateCloudFrontOriginAccessIdentityInput) SetCloudFrontOriginAccessIde return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateCloudFrontOriginAccessIdentityInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CloudFrontOriginAccessIdentityConfig != nil { + v := s.CloudFrontOriginAccessIdentityConfig + + e.SetFields(protocol.PayloadTarget, "CloudFrontOriginAccessIdentityConfig", v, protocol.Metadata{XMLNamespaceURI: "http://cloudfront.amazonaws.com/doc/2017-03-25/"}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateCloudFrontOriginAccessIdentityResult type CreateCloudFrontOriginAccessIdentityOutput struct { @@ -4046,6 +4253,27 @@ func (s *CreateCloudFrontOriginAccessIdentityOutput) SetLocation(v string) *Crea return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateCloudFrontOriginAccessIdentityOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CloudFrontOriginAccessIdentity != nil { + v := s.CloudFrontOriginAccessIdentity + + e.SetFields(protocol.PayloadTarget, "CloudFrontOriginAccessIdentity", v, protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The request to create a new distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateDistributionRequest type CreateDistributionInput struct { @@ -4091,6 +4319,17 @@ func (s *CreateDistributionInput) SetDistributionConfig(v *DistributionConfig) * return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDistributionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DistributionConfig != nil { + v := s.DistributionConfig + + e.SetFields(protocol.PayloadTarget, "DistributionConfig", v, protocol.Metadata{XMLNamespaceURI: "http://cloudfront.amazonaws.com/doc/2017-03-25/"}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateDistributionResult type CreateDistributionOutput struct { @@ -4135,6 +4374,27 @@ func (s *CreateDistributionOutput) SetLocation(v string) *CreateDistributionOutp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDistributionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Distribution != nil { + v := s.Distribution + + e.SetFields(protocol.PayloadTarget, "Distribution", v, protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The request to create a new distribution with tags. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateDistributionWithTagsRequest type CreateDistributionWithTagsInput struct { @@ -4180,6 +4440,17 @@ func (s *CreateDistributionWithTagsInput) SetDistributionConfigWithTags(v *Distr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDistributionWithTagsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DistributionConfigWithTags != nil { + v := s.DistributionConfigWithTags + + e.SetFields(protocol.PayloadTarget, "DistributionConfigWithTags", v, protocol.Metadata{XMLNamespaceURI: "http://cloudfront.amazonaws.com/doc/2017-03-25/"}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateDistributionWithTagsResult type CreateDistributionWithTagsOutput struct { @@ -4224,6 +4495,27 @@ func (s *CreateDistributionWithTagsOutput) SetLocation(v string) *CreateDistribu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDistributionWithTagsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Distribution != nil { + v := s.Distribution + + e.SetFields(protocol.PayloadTarget, "Distribution", v, protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The request to create an invalidation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateInvalidationRequest type CreateInvalidationInput struct { @@ -4283,6 +4575,22 @@ func (s *CreateInvalidationInput) SetInvalidationBatch(v *InvalidationBatch) *Cr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateInvalidationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DistributionId != nil { + v := *s.DistributionId + + e.SetValue(protocol.PathTarget, "DistributionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InvalidationBatch != nil { + v := s.InvalidationBatch + + e.SetFields(protocol.PayloadTarget, "InvalidationBatch", v, protocol.Metadata{XMLNamespaceURI: "http://cloudfront.amazonaws.com/doc/2017-03-25/"}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateInvalidationResult type CreateInvalidationOutput struct { @@ -4318,6 +4626,22 @@ func (s *CreateInvalidationOutput) SetLocation(v string) *CreateInvalidationOutp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateInvalidationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Invalidation != nil { + v := s.Invalidation + + e.SetFields(protocol.PayloadTarget, "Invalidation", v, protocol.Metadata{}) + } + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The request to create a new streaming distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateStreamingDistributionRequest type CreateStreamingDistributionInput struct { @@ -4363,6 +4687,17 @@ func (s *CreateStreamingDistributionInput) SetStreamingDistributionConfig(v *Str return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateStreamingDistributionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.StreamingDistributionConfig != nil { + v := s.StreamingDistributionConfig + + e.SetFields(protocol.PayloadTarget, "StreamingDistributionConfig", v, protocol.Metadata{XMLNamespaceURI: "http://cloudfront.amazonaws.com/doc/2017-03-25/"}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateStreamingDistributionResult type CreateStreamingDistributionOutput struct { @@ -4407,6 +4742,27 @@ func (s *CreateStreamingDistributionOutput) SetStreamingDistribution(v *Streamin return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateStreamingDistributionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StreamingDistribution != nil { + v := s.StreamingDistribution + + e.SetFields(protocol.PayloadTarget, "StreamingDistribution", v, protocol.Metadata{}) + } + + return nil +} + // The request to create a new streaming distribution with tags. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateStreamingDistributionWithTagsRequest type CreateStreamingDistributionWithTagsInput struct { @@ -4452,6 +4808,17 @@ func (s *CreateStreamingDistributionWithTagsInput) SetStreamingDistributionConfi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateStreamingDistributionWithTagsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.StreamingDistributionConfigWithTags != nil { + v := s.StreamingDistributionConfigWithTags + + e.SetFields(protocol.PayloadTarget, "StreamingDistributionConfigWithTags", v, protocol.Metadata{XMLNamespaceURI: "http://cloudfront.amazonaws.com/doc/2017-03-25/"}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CreateStreamingDistributionWithTagsResult type CreateStreamingDistributionWithTagsOutput struct { @@ -4495,6 +4862,27 @@ func (s *CreateStreamingDistributionWithTagsOutput) SetStreamingDistribution(v * return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateStreamingDistributionWithTagsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StreamingDistribution != nil { + v := s.StreamingDistribution + + e.SetFields(protocol.PayloadTarget, "StreamingDistribution", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that controls: // // * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range @@ -4624,6 +5012,40 @@ func (s *CustomErrorResponse) SetResponsePagePath(v string) *CustomErrorResponse return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CustomErrorResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ErrorCachingMinTTL != nil { + v := *s.ErrorCachingMinTTL + + e.SetValue(protocol.BodyTarget, "ErrorCachingMinTTL", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ErrorCode != nil { + v := *s.ErrorCode + + e.SetValue(protocol.BodyTarget, "ErrorCode", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ResponseCode != nil { + v := *s.ResponseCode + + e.SetValue(protocol.BodyTarget, "ResponseCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResponsePagePath != nil { + v := *s.ResponsePagePath + + e.SetValue(protocol.BodyTarget, "ResponsePagePath", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCustomErrorResponseList(vs []*CustomErrorResponse) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that controls: // // * Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range @@ -4695,6 +5117,22 @@ func (s *CustomErrorResponses) SetQuantity(v int64) *CustomErrorResponses { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CustomErrorResponses) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", encodeCustomErrorResponseList(v), protocol.Metadata{ListLocationName: "CustomErrorResponse"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the list of Custom Headers for each origin. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CustomHeaders type CustomHeaders struct { @@ -4756,6 +5194,22 @@ func (s *CustomHeaders) SetQuantity(v int64) *CustomHeaders { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CustomHeaders) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", encodeOriginCustomHeaderList(v), protocol.Metadata{ListLocationName: "OriginCustomHeader"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A customer origin. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CustomOriginConfig type CustomOriginConfig struct { @@ -4869,6 +5323,42 @@ func (s *CustomOriginConfig) SetOriginSslProtocols(v *OriginSslProtocols) *Custo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CustomOriginConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.HTTPPort != nil { + v := *s.HTTPPort + + e.SetValue(protocol.BodyTarget, "HTTPPort", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.HTTPSPort != nil { + v := *s.HTTPSPort + + e.SetValue(protocol.BodyTarget, "HTTPSPort", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.OriginKeepaliveTimeout != nil { + v := *s.OriginKeepaliveTimeout + + e.SetValue(protocol.BodyTarget, "OriginKeepaliveTimeout", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.OriginProtocolPolicy != nil { + v := *s.OriginProtocolPolicy + + e.SetValue(protocol.BodyTarget, "OriginProtocolPolicy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OriginReadTimeout != nil { + v := *s.OriginReadTimeout + + e.SetValue(protocol.BodyTarget, "OriginReadTimeout", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.OriginSslProtocols != nil { + v := s.OriginSslProtocols + + e.SetFields(protocol.BodyTarget, "OriginSslProtocols", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that describes the default cache behavior if you don't specify // a CacheBehavior element or if files don't match any of the values of PathPattern // in CacheBehavior elements. You must create exactly one default cache behavior. @@ -5117,13 +5607,74 @@ func (s *DefaultCacheBehavior) SetViewerProtocolPolicy(v string) *DefaultCacheBe return s } -// Deletes a origin access identity. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteCloudFrontOriginAccessIdentityRequest -type DeleteCloudFrontOriginAccessIdentityInput struct { - _ struct{} `type:"structure"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DefaultCacheBehavior) MarshalFields(e protocol.FieldEncoder) error { + if s.AllowedMethods != nil { + v := s.AllowedMethods - // The origin access identity's ID. - // + e.SetFields(protocol.BodyTarget, "AllowedMethods", v, protocol.Metadata{}) + } + if s.Compress != nil { + v := *s.Compress + + e.SetValue(protocol.BodyTarget, "Compress", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.DefaultTTL != nil { + v := *s.DefaultTTL + + e.SetValue(protocol.BodyTarget, "DefaultTTL", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ForwardedValues != nil { + v := s.ForwardedValues + + e.SetFields(protocol.BodyTarget, "ForwardedValues", v, protocol.Metadata{}) + } + if s.LambdaFunctionAssociations != nil { + v := s.LambdaFunctionAssociations + + e.SetFields(protocol.BodyTarget, "LambdaFunctionAssociations", v, protocol.Metadata{}) + } + if s.MaxTTL != nil { + v := *s.MaxTTL + + e.SetValue(protocol.BodyTarget, "MaxTTL", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MinTTL != nil { + v := *s.MinTTL + + e.SetValue(protocol.BodyTarget, "MinTTL", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SmoothStreaming != nil { + v := *s.SmoothStreaming + + e.SetValue(protocol.BodyTarget, "SmoothStreaming", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.TargetOriginId != nil { + v := *s.TargetOriginId + + e.SetValue(protocol.BodyTarget, "TargetOriginId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrustedSigners != nil { + v := s.TrustedSigners + + e.SetFields(protocol.BodyTarget, "TrustedSigners", v, protocol.Metadata{}) + } + if s.ViewerProtocolPolicy != nil { + v := *s.ViewerProtocolPolicy + + e.SetValue(protocol.BodyTarget, "ViewerProtocolPolicy", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +// Deletes a origin access identity. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteCloudFrontOriginAccessIdentityRequest +type DeleteCloudFrontOriginAccessIdentityInput struct { + _ struct{} `type:"structure"` + + // The origin access identity's ID. + // // Id is a required field Id *string `location:"uri" locationName:"Id" type:"string" required:"true"` @@ -5167,6 +5718,22 @@ func (s *DeleteCloudFrontOriginAccessIdentityInput) SetIfMatch(v string) *Delete return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteCloudFrontOriginAccessIdentityInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IfMatch != nil { + v := *s.IfMatch + + e.SetValue(protocol.HeaderTarget, "If-Match", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteCloudFrontOriginAccessIdentityOutput type DeleteCloudFrontOriginAccessIdentityOutput struct { _ struct{} `type:"structure"` @@ -5182,6 +5749,12 @@ func (s DeleteCloudFrontOriginAccessIdentityOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteCloudFrontOriginAccessIdentityOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // This action deletes a web distribution. To delete a web distribution using // the CloudFront API, perform the following steps. // @@ -5266,6 +5839,22 @@ func (s *DeleteDistributionInput) SetIfMatch(v string) *DeleteDistributionInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDistributionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IfMatch != nil { + v := *s.IfMatch + + e.SetValue(protocol.HeaderTarget, "If-Match", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteDistributionOutput type DeleteDistributionOutput struct { _ struct{} `type:"structure"` @@ -5281,6 +5870,12 @@ func (s DeleteDistributionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDistributionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteServiceLinkedRoleRequest type DeleteServiceLinkedRoleInput struct { _ struct{} `type:"structure"` @@ -5318,6 +5913,17 @@ func (s *DeleteServiceLinkedRoleInput) SetRoleName(v string) *DeleteServiceLinke return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteServiceLinkedRoleInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RoleName != nil { + v := *s.RoleName + + e.SetValue(protocol.PathTarget, "RoleName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteServiceLinkedRoleOutput type DeleteServiceLinkedRoleOutput struct { _ struct{} `type:"structure"` @@ -5333,6 +5939,12 @@ func (s DeleteServiceLinkedRoleOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteServiceLinkedRoleOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The request to delete a streaming distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteStreamingDistributionRequest type DeleteStreamingDistributionInput struct { @@ -5383,6 +5995,22 @@ func (s *DeleteStreamingDistributionInput) SetIfMatch(v string) *DeleteStreaming return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteStreamingDistributionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IfMatch != nil { + v := *s.IfMatch + + e.SetValue(protocol.HeaderTarget, "If-Match", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DeleteStreamingDistributionOutput type DeleteStreamingDistributionOutput struct { _ struct{} `type:"structure"` @@ -5398,6 +6026,12 @@ func (s DeleteStreamingDistributionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteStreamingDistributionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The distribution's information. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/Distribution type Distribution struct { @@ -5513,6 +6147,52 @@ func (s *Distribution) SetStatus(v string) *Distribution { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Distribution) MarshalFields(e protocol.FieldEncoder) error { + if s.ARN != nil { + v := *s.ARN + + e.SetValue(protocol.BodyTarget, "ARN", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ActiveTrustedSigners != nil { + v := s.ActiveTrustedSigners + + e.SetFields(protocol.BodyTarget, "ActiveTrustedSigners", v, protocol.Metadata{}) + } + if s.DistributionConfig != nil { + v := s.DistributionConfig + + e.SetFields(protocol.BodyTarget, "DistributionConfig", v, protocol.Metadata{}) + } + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.BodyTarget, "DomainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InProgressInvalidationBatches != nil { + v := *s.InProgressInvalidationBatches + + e.SetValue(protocol.BodyTarget, "InProgressInvalidationBatches", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.LastModifiedTime != nil { + v := *s.LastModifiedTime + + e.SetValue(protocol.BodyTarget, "LastModifiedTime", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A distribution configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DistributionConfig type DistributionConfig struct { @@ -5952,6 +6632,92 @@ func (s *DistributionConfig) SetWebACLId(v string) *DistributionConfig { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DistributionConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.Aliases != nil { + v := s.Aliases + + e.SetFields(protocol.BodyTarget, "Aliases", v, protocol.Metadata{}) + } + if s.CacheBehaviors != nil { + v := s.CacheBehaviors + + e.SetFields(protocol.BodyTarget, "CacheBehaviors", v, protocol.Metadata{}) + } + if s.CallerReference != nil { + v := *s.CallerReference + + e.SetValue(protocol.BodyTarget, "CallerReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CustomErrorResponses != nil { + v := s.CustomErrorResponses + + e.SetFields(protocol.BodyTarget, "CustomErrorResponses", v, protocol.Metadata{}) + } + if s.DefaultCacheBehavior != nil { + v := s.DefaultCacheBehavior + + e.SetFields(protocol.BodyTarget, "DefaultCacheBehavior", v, protocol.Metadata{}) + } + if s.DefaultRootObject != nil { + v := *s.DefaultRootObject + + e.SetValue(protocol.BodyTarget, "DefaultRootObject", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HttpVersion != nil { + v := *s.HttpVersion + + e.SetValue(protocol.BodyTarget, "HttpVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsIPV6Enabled != nil { + v := *s.IsIPV6Enabled + + e.SetValue(protocol.BodyTarget, "IsIPV6Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Logging != nil { + v := s.Logging + + e.SetFields(protocol.BodyTarget, "Logging", v, protocol.Metadata{}) + } + if s.Origins != nil { + v := s.Origins + + e.SetFields(protocol.BodyTarget, "Origins", v, protocol.Metadata{}) + } + if s.PriceClass != nil { + v := *s.PriceClass + + e.SetValue(protocol.BodyTarget, "PriceClass", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Restrictions != nil { + v := s.Restrictions + + e.SetFields(protocol.BodyTarget, "Restrictions", v, protocol.Metadata{}) + } + if s.ViewerCertificate != nil { + v := s.ViewerCertificate + + e.SetFields(protocol.BodyTarget, "ViewerCertificate", v, protocol.Metadata{}) + } + if s.WebACLId != nil { + v := *s.WebACLId + + e.SetValue(protocol.BodyTarget, "WebACLId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A distribution Configuration and a list of tags to be associated with the // distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DistributionConfigWithTags @@ -6017,6 +6783,22 @@ func (s *DistributionConfigWithTags) SetTags(v *Tags) *DistributionConfigWithTag return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DistributionConfigWithTags) MarshalFields(e protocol.FieldEncoder) error { + if s.DistributionConfig != nil { + v := s.DistributionConfig + + e.SetFields(protocol.BodyTarget, "DistributionConfig", v, protocol.Metadata{}) + } + if s.Tags != nil { + v := s.Tags + + e.SetFields(protocol.BodyTarget, "Tags", v, protocol.Metadata{}) + } + + return nil +} + // A distribution list. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DistributionList type DistributionList struct { @@ -6101,6 +6883,42 @@ func (s *DistributionList) SetQuantity(v int64) *DistributionList { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DistributionList) MarshalFields(e protocol.FieldEncoder) error { + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", encodeDistributionSummaryList(v), protocol.Metadata{ListLocationName: "DistributionSummary"}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.BodyTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "NextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A summary of the information about a CloudFront distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/DistributionSummary type DistributionSummary struct { @@ -6407,6 +7225,110 @@ func (s *DistributionSummary) SetWebACLId(v string) *DistributionSummary { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DistributionSummary) MarshalFields(e protocol.FieldEncoder) error { + if s.ARN != nil { + v := *s.ARN + + e.SetValue(protocol.BodyTarget, "ARN", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Aliases != nil { + v := s.Aliases + + e.SetFields(protocol.BodyTarget, "Aliases", v, protocol.Metadata{}) + } + if s.CacheBehaviors != nil { + v := s.CacheBehaviors + + e.SetFields(protocol.BodyTarget, "CacheBehaviors", v, protocol.Metadata{}) + } + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CustomErrorResponses != nil { + v := s.CustomErrorResponses + + e.SetFields(protocol.BodyTarget, "CustomErrorResponses", v, protocol.Metadata{}) + } + if s.DefaultCacheBehavior != nil { + v := s.DefaultCacheBehavior + + e.SetFields(protocol.BodyTarget, "DefaultCacheBehavior", v, protocol.Metadata{}) + } + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.BodyTarget, "DomainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HttpVersion != nil { + v := *s.HttpVersion + + e.SetValue(protocol.BodyTarget, "HttpVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsIPV6Enabled != nil { + v := *s.IsIPV6Enabled + + e.SetValue(protocol.BodyTarget, "IsIPV6Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.LastModifiedTime != nil { + v := *s.LastModifiedTime + + e.SetValue(protocol.BodyTarget, "LastModifiedTime", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.Origins != nil { + v := s.Origins + + e.SetFields(protocol.BodyTarget, "Origins", v, protocol.Metadata{}) + } + if s.PriceClass != nil { + v := *s.PriceClass + + e.SetValue(protocol.BodyTarget, "PriceClass", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Restrictions != nil { + v := s.Restrictions + + e.SetFields(protocol.BodyTarget, "Restrictions", v, protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ViewerCertificate != nil { + v := s.ViewerCertificate + + e.SetFields(protocol.BodyTarget, "ViewerCertificate", v, protocol.Metadata{}) + } + if s.WebACLId != nil { + v := *s.WebACLId + + e.SetValue(protocol.BodyTarget, "WebACLId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDistributionSummaryList(vs []*DistributionSummary) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that specifies how CloudFront handles query strings and cookies. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ForwardedValues type ForwardedValues struct { @@ -6522,6 +7444,32 @@ func (s *ForwardedValues) SetQueryStringCacheKeys(v *QueryStringCacheKeys) *Forw return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ForwardedValues) MarshalFields(e protocol.FieldEncoder) error { + if s.Cookies != nil { + v := s.Cookies + + e.SetFields(protocol.BodyTarget, "Cookies", v, protocol.Metadata{}) + } + if s.Headers != nil { + v := s.Headers + + e.SetFields(protocol.BodyTarget, "Headers", v, protocol.Metadata{}) + } + if s.QueryString != nil { + v := *s.QueryString + + e.SetValue(protocol.BodyTarget, "QueryString", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.QueryStringCacheKeys != nil { + v := s.QueryStringCacheKeys + + e.SetFields(protocol.BodyTarget, "QueryStringCacheKeys", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that controls the countries in which your content is distributed. // CloudFront determines the location of your users using MaxMind GeoIP databases. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GeoRestriction @@ -6610,6 +7558,27 @@ func (s *GeoRestriction) SetRestrictionType(v string) *GeoRestriction { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GeoRestriction) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "Location"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RestrictionType != nil { + v := *s.RestrictionType + + e.SetValue(protocol.BodyTarget, "RestrictionType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The origin access identity's configuration information. For more information, // see CloudFrontOriginAccessIdentityConfigComplexType. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetCloudFrontOriginAccessIdentityConfigRequest @@ -6651,6 +7620,17 @@ func (s *GetCloudFrontOriginAccessIdentityConfigInput) SetId(v string) *GetCloud return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCloudFrontOriginAccessIdentityConfigInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetCloudFrontOriginAccessIdentityConfigResult type GetCloudFrontOriginAccessIdentityConfigOutput struct { @@ -6685,10 +7665,26 @@ func (s *GetCloudFrontOriginAccessIdentityConfigOutput) SetETag(v string) *GetCl return s } -// The request to get an origin access identity's information. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetCloudFrontOriginAccessIdentityRequest -type GetCloudFrontOriginAccessIdentityInput struct { - _ struct{} `type:"structure"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCloudFrontOriginAccessIdentityConfigOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CloudFrontOriginAccessIdentityConfig != nil { + v := s.CloudFrontOriginAccessIdentityConfig + + e.SetFields(protocol.PayloadTarget, "CloudFrontOriginAccessIdentityConfig", v, protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +// The request to get an origin access identity's information. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetCloudFrontOriginAccessIdentityRequest +type GetCloudFrontOriginAccessIdentityInput struct { + _ struct{} `type:"structure"` // The identity's ID. // @@ -6725,6 +7721,17 @@ func (s *GetCloudFrontOriginAccessIdentityInput) SetId(v string) *GetCloudFrontO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCloudFrontOriginAccessIdentityInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetCloudFrontOriginAccessIdentityResult type GetCloudFrontOriginAccessIdentityOutput struct { @@ -6760,6 +7767,22 @@ func (s *GetCloudFrontOriginAccessIdentityOutput) SetETag(v string) *GetCloudFro return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCloudFrontOriginAccessIdentityOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CloudFrontOriginAccessIdentity != nil { + v := s.CloudFrontOriginAccessIdentity + + e.SetFields(protocol.PayloadTarget, "CloudFrontOriginAccessIdentity", v, protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The request to get a distribution configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetDistributionConfigRequest type GetDistributionConfigInput struct { @@ -6800,6 +7823,17 @@ func (s *GetDistributionConfigInput) SetId(v string) *GetDistributionConfigInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDistributionConfigInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetDistributionConfigResult type GetDistributionConfigOutput struct { @@ -6834,6 +7868,22 @@ func (s *GetDistributionConfigOutput) SetETag(v string) *GetDistributionConfigOu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDistributionConfigOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DistributionConfig != nil { + v := s.DistributionConfig + + e.SetFields(protocol.PayloadTarget, "DistributionConfig", v, protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The request to get a distribution's information. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetDistributionRequest type GetDistributionInput struct { @@ -6874,6 +7924,17 @@ func (s *GetDistributionInput) SetId(v string) *GetDistributionInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDistributionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetDistributionResult type GetDistributionOutput struct { @@ -6908,6 +7969,22 @@ func (s *GetDistributionOutput) SetETag(v string) *GetDistributionOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDistributionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Distribution != nil { + v := s.Distribution + + e.SetFields(protocol.PayloadTarget, "Distribution", v, protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The request to get an invalidation's information. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetInvalidationRequest type GetInvalidationInput struct { @@ -6962,6 +8039,22 @@ func (s *GetInvalidationInput) SetId(v string) *GetInvalidationInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetInvalidationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DistributionId != nil { + v := *s.DistributionId + + e.SetValue(protocol.PathTarget, "DistributionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetInvalidationResult type GetInvalidationOutput struct { @@ -6988,6 +8081,17 @@ func (s *GetInvalidationOutput) SetInvalidation(v *Invalidation) *GetInvalidatio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetInvalidationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Invalidation != nil { + v := s.Invalidation + + e.SetFields(protocol.PayloadTarget, "Invalidation", v, protocol.Metadata{}) + } + + return nil +} + // To request to get a streaming distribution configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetStreamingDistributionConfigRequest type GetStreamingDistributionConfigInput struct { @@ -7028,6 +8132,17 @@ func (s *GetStreamingDistributionConfigInput) SetId(v string) *GetStreamingDistr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetStreamingDistributionConfigInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetStreamingDistributionConfigResult type GetStreamingDistributionConfigOutput struct { @@ -7062,6 +8177,22 @@ func (s *GetStreamingDistributionConfigOutput) SetStreamingDistributionConfig(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetStreamingDistributionConfigOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StreamingDistributionConfig != nil { + v := s.StreamingDistributionConfig + + e.SetFields(protocol.PayloadTarget, "StreamingDistributionConfig", v, protocol.Metadata{}) + } + + return nil +} + // The request to get a streaming distribution's information. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetStreamingDistributionRequest type GetStreamingDistributionInput struct { @@ -7102,6 +8233,17 @@ func (s *GetStreamingDistributionInput) SetId(v string) *GetStreamingDistributio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetStreamingDistributionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/GetStreamingDistributionResult type GetStreamingDistributionOutput struct { @@ -7137,6 +8279,22 @@ func (s *GetStreamingDistributionOutput) SetStreamingDistribution(v *StreamingDi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetStreamingDistributionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StreamingDistribution != nil { + v := s.StreamingDistribution + + e.SetFields(protocol.PayloadTarget, "StreamingDistribution", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that specifies the request headers, if any, that you want // CloudFront to base caching on for this cache behavior. // @@ -7224,6 +8382,22 @@ func (s *Headers) SetQuantity(v int64) *Headers { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Headers) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "Name"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // An invalidation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/Invalidation type Invalidation struct { @@ -7285,6 +8459,32 @@ func (s *Invalidation) SetStatus(v string) *Invalidation { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Invalidation) MarshalFields(e protocol.FieldEncoder) error { + if s.CreateTime != nil { + v := *s.CreateTime + + e.SetValue(protocol.BodyTarget, "CreateTime", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InvalidationBatch != nil { + v := s.InvalidationBatch + + e.SetFields(protocol.BodyTarget, "InvalidationBatch", v, protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // An invalidation batch. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/InvalidationBatch type InvalidationBatch struct { @@ -7361,6 +8561,22 @@ func (s *InvalidationBatch) SetPaths(v *Paths) *InvalidationBatch { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InvalidationBatch) MarshalFields(e protocol.FieldEncoder) error { + if s.CallerReference != nil { + v := *s.CallerReference + + e.SetValue(protocol.BodyTarget, "CallerReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Paths != nil { + v := s.Paths + + e.SetFields(protocol.BodyTarget, "Paths", v, protocol.Metadata{}) + } + + return nil +} + // The InvalidationList complex type describes the list of invalidation objects. // For more information about invalidation, see Invalidating Objects (Web Distributions // Only) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html) @@ -7448,6 +8664,42 @@ func (s *InvalidationList) SetQuantity(v int64) *InvalidationList { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InvalidationList) MarshalFields(e protocol.FieldEncoder) error { + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", encodeInvalidationSummaryList(v), protocol.Metadata{ListLocationName: "InvalidationSummary"}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.BodyTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "NextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A summary of an invalidation request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/InvalidationSummary type InvalidationSummary struct { @@ -7495,6 +8747,35 @@ func (s *InvalidationSummary) SetStatus(v string) *InvalidationSummary { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InvalidationSummary) MarshalFields(e protocol.FieldEncoder) error { + if s.CreateTime != nil { + v := *s.CreateTime + + e.SetValue(protocol.BodyTarget, "CreateTime", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeInvalidationSummaryList(vs []*InvalidationSummary) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that lists the active CloudFront key pairs, if any, that are // associated with AwsAccountNumber. // @@ -7539,6 +8820,22 @@ func (s *KeyPairIds) SetQuantity(v int64) *KeyPairIds { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *KeyPairIds) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "KeyPairId"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains a Lambda function association. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/LambdaFunctionAssociation type LambdaFunctionAssociation struct { @@ -7597,6 +8894,30 @@ func (s *LambdaFunctionAssociation) SetLambdaFunctionARN(v string) *LambdaFuncti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LambdaFunctionAssociation) MarshalFields(e protocol.FieldEncoder) error { + if s.EventType != nil { + v := *s.EventType + + e.SetValue(protocol.BodyTarget, "EventType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LambdaFunctionARN != nil { + v := *s.LambdaFunctionARN + + e.SetValue(protocol.BodyTarget, "LambdaFunctionARN", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeLambdaFunctionAssociationList(vs []*LambdaFunctionAssociation) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that specifies a list of Lambda functions associations for // a cache behavior. // @@ -7657,6 +8978,22 @@ func (s *LambdaFunctionAssociations) SetQuantity(v int64) *LambdaFunctionAssocia return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LambdaFunctionAssociations) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", encodeLambdaFunctionAssociationList(v), protocol.Metadata{ListLocationName: "LambdaFunctionAssociation"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The request to list origin access identities. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListCloudFrontOriginAccessIdentitiesRequest type ListCloudFrontOriginAccessIdentitiesInput struct { @@ -7695,6 +9032,22 @@ func (s *ListCloudFrontOriginAccessIdentitiesInput) SetMaxItems(v int64) *ListCl return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListCloudFrontOriginAccessIdentitiesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListCloudFrontOriginAccessIdentitiesResult type ListCloudFrontOriginAccessIdentitiesOutput struct { @@ -7720,6 +9073,17 @@ func (s *ListCloudFrontOriginAccessIdentitiesOutput) SetCloudFrontOriginAccessId return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListCloudFrontOriginAccessIdentitiesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CloudFrontOriginAccessIdentityList != nil { + v := s.CloudFrontOriginAccessIdentityList + + e.SetFields(protocol.PayloadTarget, "CloudFrontOriginAccessIdentityList", v, protocol.Metadata{}) + } + + return nil +} + // The request to list distributions that are associated with a specified AWS // WAF web ACL. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListDistributionsByWebACLIdRequest @@ -7786,6 +9150,27 @@ func (s *ListDistributionsByWebACLIdInput) SetWebACLId(v string) *ListDistributi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDistributionsByWebACLIdInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.WebACLId != nil { + v := *s.WebACLId + + e.SetValue(protocol.PathTarget, "WebACLId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The response to a request to list the distributions that are associated with // a specified AWS WAF web ACL. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListDistributionsByWebACLIdResult @@ -7812,6 +9197,17 @@ func (s *ListDistributionsByWebACLIdOutput) SetDistributionList(v *DistributionL return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDistributionsByWebACLIdOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DistributionList != nil { + v := s.DistributionList + + e.SetFields(protocol.PayloadTarget, "DistributionList", v, protocol.Metadata{}) + } + + return nil +} + // The request to list your distributions. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListDistributionsRequest type ListDistributionsInput struct { @@ -7850,6 +9246,22 @@ func (s *ListDistributionsInput) SetMaxItems(v int64) *ListDistributionsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDistributionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListDistributionsResult type ListDistributionsOutput struct { @@ -7875,6 +9287,17 @@ func (s *ListDistributionsOutput) SetDistributionList(v *DistributionList) *List return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDistributionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DistributionList != nil { + v := s.DistributionList + + e.SetFields(protocol.PayloadTarget, "DistributionList", v, protocol.Metadata{}) + } + + return nil +} + // The request to list invalidations. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListInvalidationsRequest type ListInvalidationsInput struct { @@ -7940,6 +9363,27 @@ func (s *ListInvalidationsInput) SetMaxItems(v int64) *ListInvalidationsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListInvalidationsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DistributionId != nil { + v := *s.DistributionId + + e.SetValue(protocol.PathTarget, "DistributionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListInvalidationsResult type ListInvalidationsOutput struct { @@ -7965,6 +9409,17 @@ func (s *ListInvalidationsOutput) SetInvalidationList(v *InvalidationList) *List return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListInvalidationsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.InvalidationList != nil { + v := s.InvalidationList + + e.SetFields(protocol.PayloadTarget, "InvalidationList", v, protocol.Metadata{}) + } + + return nil +} + // The request to list your streaming distributions. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListStreamingDistributionsRequest type ListStreamingDistributionsInput struct { @@ -7999,6 +9454,22 @@ func (s *ListStreamingDistributionsInput) SetMaxItems(v int64) *ListStreamingDis return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListStreamingDistributionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListStreamingDistributionsResult type ListStreamingDistributionsOutput struct { @@ -8024,6 +9495,17 @@ func (s *ListStreamingDistributionsOutput) SetStreamingDistributionList(v *Strea return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListStreamingDistributionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.StreamingDistributionList != nil { + v := s.StreamingDistributionList + + e.SetFields(protocol.PayloadTarget, "StreamingDistributionList", v, protocol.Metadata{}) + } + + return nil +} + // The request to list tags for a CloudFront resource. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListTagsForResourceRequest type ListTagsForResourceInput struct { @@ -8064,6 +9546,17 @@ func (s *ListTagsForResourceInput) SetResource(v string) *ListTagsForResourceInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTagsForResourceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Resource != nil { + v := *s.Resource + + e.SetValue(protocol.QueryTarget, "Resource", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/ListTagsForResourceResult type ListTagsForResourceOutput struct { @@ -8091,6 +9584,17 @@ func (s *ListTagsForResourceOutput) SetTags(v *Tags) *ListTagsForResourceOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTagsForResourceOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Tags != nil { + v := s.Tags + + e.SetFields(protocol.PayloadTarget, "Tags", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that controls whether access logs are written for the distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/LoggingConfig type LoggingConfig struct { @@ -8186,6 +9690,32 @@ func (s *LoggingConfig) SetPrefix(v string) *LoggingConfig { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LoggingConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.BodyTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.IncludeCookies != nil { + v := *s.IncludeCookies + + e.SetValue(protocol.BodyTarget, "IncludeCookies", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that describes the Amazon S3 bucket or the HTTP server (for // example, a web server) from which CloudFront gets your files. You must create // at least one origin. @@ -8350,6 +9880,50 @@ func (s *Origin) SetS3OriginConfig(v *S3OriginConfig) *Origin { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Origin) MarshalFields(e protocol.FieldEncoder) error { + if s.CustomHeaders != nil { + v := s.CustomHeaders + + e.SetFields(protocol.BodyTarget, "CustomHeaders", v, protocol.Metadata{}) + } + if s.CustomOriginConfig != nil { + v := s.CustomOriginConfig + + e.SetFields(protocol.BodyTarget, "CustomOriginConfig", v, protocol.Metadata{}) + } + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.BodyTarget, "DomainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OriginPath != nil { + v := *s.OriginPath + + e.SetValue(protocol.BodyTarget, "OriginPath", protocol.StringValue(v), protocol.Metadata{}) + } + if s.S3OriginConfig != nil { + v := s.S3OriginConfig + + e.SetFields(protocol.BodyTarget, "S3OriginConfig", v, protocol.Metadata{}) + } + + return nil +} + +func encodeOriginList(vs []*Origin) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // CloudFront origin access identity. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CloudFrontOriginAccessIdentity type OriginAccessIdentity struct { @@ -8399,6 +9973,27 @@ func (s *OriginAccessIdentity) SetS3CanonicalUserId(v string) *OriginAccessIdent return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OriginAccessIdentity) MarshalFields(e protocol.FieldEncoder) error { + if s.CloudFrontOriginAccessIdentityConfig != nil { + v := s.CloudFrontOriginAccessIdentityConfig + + e.SetFields(protocol.BodyTarget, "CloudFrontOriginAccessIdentityConfig", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.S3CanonicalUserId != nil { + v := *s.S3CanonicalUserId + + e.SetValue(protocol.BodyTarget, "S3CanonicalUserId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Origin access identity configuration. Send a GET request to the /CloudFront // API version/CloudFront/identity ID/config resource. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CloudFrontOriginAccessIdentityConfig @@ -8467,6 +10062,22 @@ func (s *OriginAccessIdentityConfig) SetComment(v string) *OriginAccessIdentityC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OriginAccessIdentityConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.CallerReference != nil { + v := *s.CallerReference + + e.SetValue(protocol.BodyTarget, "CallerReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Lists the origin access identities for CloudFront.Send a GET request to the // /CloudFront API version/origin-access-identity/cloudfront resource. The response // includes a CloudFrontOriginAccessIdentityList element with zero or more CloudFrontOriginAccessIdentitySummary @@ -8561,6 +10172,42 @@ func (s *OriginAccessIdentityList) SetQuantity(v int64) *OriginAccessIdentityLis return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OriginAccessIdentityList) MarshalFields(e protocol.FieldEncoder) error { + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", encodeOriginAccessIdentitySummaryList(v), protocol.Metadata{ListLocationName: "CloudFrontOriginAccessIdentitySummary"}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.BodyTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "NextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Summary of the information about a CloudFront origin access identity. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/CloudFrontOriginAccessIdentitySummary type OriginAccessIdentitySummary struct { @@ -8613,6 +10260,35 @@ func (s *OriginAccessIdentitySummary) SetS3CanonicalUserId(v string) *OriginAcce return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OriginAccessIdentitySummary) MarshalFields(e protocol.FieldEncoder) error { + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.S3CanonicalUserId != nil { + v := *s.S3CanonicalUserId + + e.SetValue(protocol.BodyTarget, "S3CanonicalUserId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeOriginAccessIdentitySummaryList(vs []*OriginAccessIdentitySummary) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that contains HeaderName and HeaderValue elements, if any, // for this distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/OriginCustomHeader @@ -8671,6 +10347,30 @@ func (s *OriginCustomHeader) SetHeaderValue(v string) *OriginCustomHeader { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OriginCustomHeader) MarshalFields(e protocol.FieldEncoder) error { + if s.HeaderName != nil { + v := *s.HeaderName + + e.SetValue(protocol.BodyTarget, "HeaderName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HeaderValue != nil { + v := *s.HeaderValue + + e.SetValue(protocol.BodyTarget, "HeaderValue", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeOriginCustomHeaderList(vs []*OriginCustomHeader) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that contains information about the SSL/TLS protocols that // CloudFront can use when establishing an HTTPS connection with your origin. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/OriginSslProtocols @@ -8727,6 +10427,22 @@ func (s *OriginSslProtocols) SetQuantity(v int64) *OriginSslProtocols { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OriginSslProtocols) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "SslProtocol"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about origins for this distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/Origins type Origins struct { @@ -8789,6 +10505,22 @@ func (s *Origins) SetQuantity(v int64) *Origins { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Origins) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", encodeOriginList(v), protocol.Metadata{ListLocationName: "Origin"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the objects that you want // to invalidate. For more information, see Specifying the Objects to Invalidate // (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidation-specifying-objects) @@ -8841,6 +10573,22 @@ func (s *Paths) SetQuantity(v int64) *Paths { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Paths) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "Path"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/QueryStringCacheKeys type QueryStringCacheKeys struct { _ struct{} `type:"structure"` @@ -8891,6 +10639,22 @@ func (s *QueryStringCacheKeys) SetQuantity(v int64) *QueryStringCacheKeys { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *QueryStringCacheKeys) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "Name"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that identifies ways in which you want to restrict distribution // of your content. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/Restrictions @@ -8938,6 +10702,17 @@ func (s *Restrictions) SetGeoRestriction(v *GeoRestriction) *Restrictions { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Restrictions) MarshalFields(e protocol.FieldEncoder) error { + if s.GeoRestriction != nil { + v := s.GeoRestriction + + e.SetFields(protocol.BodyTarget, "GeoRestriction", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the Amazon S3 bucket from // which you want CloudFront to get your media files for distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/S3Origin @@ -9009,6 +10784,22 @@ func (s *S3Origin) SetOriginAccessIdentity(v string) *S3Origin { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *S3Origin) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.BodyTarget, "DomainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OriginAccessIdentity != nil { + v := *s.OriginAccessIdentity + + e.SetValue(protocol.BodyTarget, "OriginAccessIdentity", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the Amazon S3 origin. If the // origin is a custom origin, use the CustomOriginConfig element instead. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/S3OriginConfig @@ -9072,6 +10863,17 @@ func (s *S3OriginConfig) SetOriginAccessIdentity(v string) *S3OriginConfig { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *S3OriginConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.OriginAccessIdentity != nil { + v := *s.OriginAccessIdentity + + e.SetValue(protocol.BodyTarget, "OriginAccessIdentity", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that lists the AWS accounts that were included in the TrustedSigners // complex type, as well as their active CloudFront key pair IDs, if any. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/Signer @@ -9107,10 +10909,34 @@ func (s *Signer) SetAwsAccountNumber(v string) *Signer { return s } -// SetKeyPairIds sets the KeyPairIds field's value. -func (s *Signer) SetKeyPairIds(v *KeyPairIds) *Signer { - s.KeyPairIds = v - return s +// SetKeyPairIds sets the KeyPairIds field's value. +func (s *Signer) SetKeyPairIds(v *KeyPairIds) *Signer { + s.KeyPairIds = v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Signer) MarshalFields(e protocol.FieldEncoder) error { + if s.AwsAccountNumber != nil { + v := *s.AwsAccountNumber + + e.SetValue(protocol.BodyTarget, "AwsAccountNumber", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyPairIds != nil { + v := s.KeyPairIds + + e.SetFields(protocol.BodyTarget, "KeyPairIds", v, protocol.Metadata{}) + } + + return nil +} + +func encodeSignerList(vs []*Signer) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } } // A streaming distribution. @@ -9215,6 +11041,47 @@ func (s *StreamingDistribution) SetStreamingDistributionConfig(v *StreamingDistr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StreamingDistribution) MarshalFields(e protocol.FieldEncoder) error { + if s.ARN != nil { + v := *s.ARN + + e.SetValue(protocol.BodyTarget, "ARN", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ActiveTrustedSigners != nil { + v := s.ActiveTrustedSigners + + e.SetFields(protocol.BodyTarget, "ActiveTrustedSigners", v, protocol.Metadata{}) + } + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.BodyTarget, "DomainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedTime != nil { + v := *s.LastModifiedTime + + e.SetValue(protocol.BodyTarget, "LastModifiedTime", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StreamingDistributionConfig != nil { + v := s.StreamingDistributionConfig + + e.SetFields(protocol.BodyTarget, "StreamingDistributionConfig", v, protocol.Metadata{}) + } + + return nil +} + // The RTMP distribution's configuration information. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/StreamingDistributionConfig type StreamingDistributionConfig struct { @@ -9377,6 +11244,52 @@ func (s *StreamingDistributionConfig) SetTrustedSigners(v *TrustedSigners) *Stre return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StreamingDistributionConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.Aliases != nil { + v := s.Aliases + + e.SetFields(protocol.BodyTarget, "Aliases", v, protocol.Metadata{}) + } + if s.CallerReference != nil { + v := *s.CallerReference + + e.SetValue(protocol.BodyTarget, "CallerReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Logging != nil { + v := s.Logging + + e.SetFields(protocol.BodyTarget, "Logging", v, protocol.Metadata{}) + } + if s.PriceClass != nil { + v := *s.PriceClass + + e.SetValue(protocol.BodyTarget, "PriceClass", protocol.StringValue(v), protocol.Metadata{}) + } + if s.S3Origin != nil { + v := s.S3Origin + + e.SetFields(protocol.BodyTarget, "S3Origin", v, protocol.Metadata{}) + } + if s.TrustedSigners != nil { + v := s.TrustedSigners + + e.SetFields(protocol.BodyTarget, "TrustedSigners", v, protocol.Metadata{}) + } + + return nil +} + // A streaming distribution Configuration and a list of tags to be associated // with the streaming distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/StreamingDistributionConfigWithTags @@ -9442,6 +11355,22 @@ func (s *StreamingDistributionConfigWithTags) SetTags(v *Tags) *StreamingDistrib return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StreamingDistributionConfigWithTags) MarshalFields(e protocol.FieldEncoder) error { + if s.StreamingDistributionConfig != nil { + v := s.StreamingDistributionConfig + + e.SetFields(protocol.BodyTarget, "StreamingDistributionConfig", v, protocol.Metadata{}) + } + if s.Tags != nil { + v := s.Tags + + e.SetFields(protocol.BodyTarget, "Tags", v, protocol.Metadata{}) + } + + return nil +} + // A streaming distribution list. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/StreamingDistributionList type StreamingDistributionList struct { @@ -9527,6 +11456,42 @@ func (s *StreamingDistributionList) SetQuantity(v int64) *StreamingDistributionL return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StreamingDistributionList) MarshalFields(e protocol.FieldEncoder) error { + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", encodeStreamingDistributionSummaryList(v), protocol.Metadata{ListLocationName: "StreamingDistributionSummary"}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.BodyTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "NextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A summary of the information for an Amazon CloudFront streaming distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/StreamingDistributionSummary type StreamingDistributionSummary struct { @@ -9677,6 +11642,75 @@ func (s *StreamingDistributionSummary) SetTrustedSigners(v *TrustedSigners) *Str return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StreamingDistributionSummary) MarshalFields(e protocol.FieldEncoder) error { + if s.ARN != nil { + v := *s.ARN + + e.SetValue(protocol.BodyTarget, "ARN", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Aliases != nil { + v := s.Aliases + + e.SetFields(protocol.BodyTarget, "Aliases", v, protocol.Metadata{}) + } + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.BodyTarget, "DomainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedTime != nil { + v := *s.LastModifiedTime + + e.SetValue(protocol.BodyTarget, "LastModifiedTime", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.PriceClass != nil { + v := *s.PriceClass + + e.SetValue(protocol.BodyTarget, "PriceClass", protocol.StringValue(v), protocol.Metadata{}) + } + if s.S3Origin != nil { + v := s.S3Origin + + e.SetFields(protocol.BodyTarget, "S3Origin", v, protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrustedSigners != nil { + v := s.TrustedSigners + + e.SetFields(protocol.BodyTarget, "TrustedSigners", v, protocol.Metadata{}) + } + + return nil +} + +func encodeStreamingDistributionSummaryList(vs []*StreamingDistributionSummary) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that controls whether access logs are written for this streaming // distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/StreamingLoggingConfig @@ -9754,6 +11788,27 @@ func (s *StreamingLoggingConfig) SetPrefix(v string) *StreamingLoggingConfig { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StreamingLoggingConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.BodyTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains Tag key and Tag value. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/Tag type Tag struct { @@ -9812,6 +11867,30 @@ func (s *Tag) SetValue(v string) *Tag { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Tag) MarshalFields(e protocol.FieldEncoder) error { + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTagList(vs []*Tag) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that contains zero or more Tag elements. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/TagKeys type TagKeys struct { @@ -9837,6 +11916,17 @@ func (s *TagKeys) SetItems(v []*string) *TagKeys { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TagKeys) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "Key"}) + } + + return nil +} + // The request to add tags to a CloudFront resource. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/TagResourceRequest type TagResourceInput struct { @@ -9896,6 +11986,22 @@ func (s *TagResourceInput) SetTags(v *Tags) *TagResourceInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TagResourceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Resource != nil { + v := *s.Resource + + e.SetValue(protocol.QueryTarget, "Resource", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Tags != nil { + v := s.Tags + + e.SetFields(protocol.PayloadTarget, "Tags", v, protocol.Metadata{XMLNamespaceURI: "http://cloudfront.amazonaws.com/doc/2017-03-25/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/TagResourceOutput type TagResourceOutput struct { _ struct{} `type:"structure"` @@ -9911,6 +12017,12 @@ func (s TagResourceOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TagResourceOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A complex type that contains zero or more Tag elements. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/Tags type Tags struct { @@ -9956,6 +12068,17 @@ func (s *Tags) SetItems(v []*Tag) *Tags { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Tags) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", encodeTagList(v), protocol.Metadata{ListLocationName: "Tag"}) + } + + return nil +} + // A complex type that specifies the AWS accounts, if any, that you want to // allow to create signed URLs for private content. // @@ -10038,6 +12161,27 @@ func (s *TrustedSigners) SetQuantity(v int64) *TrustedSigners { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TrustedSigners) MarshalFields(e protocol.FieldEncoder) error { + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "AwsAccountNumber"}) + } + if s.Quantity != nil { + v := *s.Quantity + + e.SetValue(protocol.BodyTarget, "Quantity", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The request to remove tags from a CloudFront resource. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UntagResourceRequest type UntagResourceInput struct { @@ -10092,6 +12236,22 @@ func (s *UntagResourceInput) SetTagKeys(v *TagKeys) *UntagResourceInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UntagResourceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Resource != nil { + v := *s.Resource + + e.SetValue(protocol.QueryTarget, "Resource", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TagKeys != nil { + v := s.TagKeys + + e.SetFields(protocol.PayloadTarget, "TagKeys", v, protocol.Metadata{XMLNamespaceURI: "http://cloudfront.amazonaws.com/doc/2017-03-25/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UntagResourceOutput type UntagResourceOutput struct { _ struct{} `type:"structure"` @@ -10107,6 +12267,12 @@ func (s UntagResourceOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UntagResourceOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The request to update an origin access identity. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UpdateCloudFrontOriginAccessIdentityRequest type UpdateCloudFrontOriginAccessIdentityInput struct { @@ -10176,6 +12342,27 @@ func (s *UpdateCloudFrontOriginAccessIdentityInput) SetIfMatch(v string) *Update return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateCloudFrontOriginAccessIdentityInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CloudFrontOriginAccessIdentityConfig != nil { + v := s.CloudFrontOriginAccessIdentityConfig + + e.SetFields(protocol.PayloadTarget, "CloudFrontOriginAccessIdentityConfig", v, protocol.Metadata{XMLNamespaceURI: "http://cloudfront.amazonaws.com/doc/2017-03-25/"}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IfMatch != nil { + v := *s.IfMatch + + e.SetValue(protocol.HeaderTarget, "If-Match", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UpdateCloudFrontOriginAccessIdentityResult type UpdateCloudFrontOriginAccessIdentityOutput struct { @@ -10210,6 +12397,22 @@ func (s *UpdateCloudFrontOriginAccessIdentityOutput) SetETag(v string) *UpdateCl return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateCloudFrontOriginAccessIdentityOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CloudFrontOriginAccessIdentity != nil { + v := s.CloudFrontOriginAccessIdentity + + e.SetFields(protocol.PayloadTarget, "CloudFrontOriginAccessIdentity", v, protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The request to update a distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UpdateDistributionRequest type UpdateDistributionInput struct { @@ -10279,6 +12482,27 @@ func (s *UpdateDistributionInput) SetIfMatch(v string) *UpdateDistributionInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateDistributionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DistributionConfig != nil { + v := s.DistributionConfig + + e.SetFields(protocol.PayloadTarget, "DistributionConfig", v, protocol.Metadata{XMLNamespaceURI: "http://cloudfront.amazonaws.com/doc/2017-03-25/"}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IfMatch != nil { + v := *s.IfMatch + + e.SetValue(protocol.HeaderTarget, "If-Match", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UpdateDistributionResult type UpdateDistributionOutput struct { @@ -10313,6 +12537,22 @@ func (s *UpdateDistributionOutput) SetETag(v string) *UpdateDistributionOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateDistributionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Distribution != nil { + v := s.Distribution + + e.SetFields(protocol.PayloadTarget, "Distribution", v, protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The request to update a streaming distribution. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UpdateStreamingDistributionRequest type UpdateStreamingDistributionInput struct { @@ -10382,6 +12622,27 @@ func (s *UpdateStreamingDistributionInput) SetStreamingDistributionConfig(v *Str return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateStreamingDistributionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IfMatch != nil { + v := *s.IfMatch + + e.SetValue(protocol.HeaderTarget, "If-Match", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StreamingDistributionConfig != nil { + v := s.StreamingDistributionConfig + + e.SetFields(protocol.PayloadTarget, "StreamingDistributionConfig", v, protocol.Metadata{XMLNamespaceURI: "http://cloudfront.amazonaws.com/doc/2017-03-25/"}) + } + + return nil +} + // The returned result of the corresponding request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25/UpdateStreamingDistributionResult type UpdateStreamingDistributionOutput struct { @@ -10416,6 +12677,22 @@ func (s *UpdateStreamingDistributionOutput) SetStreamingDistribution(v *Streamin return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateStreamingDistributionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StreamingDistribution != nil { + v := s.StreamingDistribution + + e.SetFields(protocol.PayloadTarget, "StreamingDistribution", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that specifies the following: // // * Whether you want viewers to use HTTP or HTTPS to request your objects. @@ -10650,6 +12927,47 @@ func (s *ViewerCertificate) SetSSLSupportMethod(v string) *ViewerCertificate { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ViewerCertificate) MarshalFields(e protocol.FieldEncoder) error { + if s.ACMCertificateArn != nil { + v := *s.ACMCertificateArn + + e.SetValue(protocol.BodyTarget, "ACMCertificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Certificate != nil { + v := *s.Certificate + + e.SetValue(protocol.BodyTarget, "Certificate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateSource != nil { + v := *s.CertificateSource + + e.SetValue(protocol.BodyTarget, "CertificateSource", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CloudFrontDefaultCertificate != nil { + v := *s.CloudFrontDefaultCertificate + + e.SetValue(protocol.BodyTarget, "CloudFrontDefaultCertificate", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.IAMCertificateId != nil { + v := *s.IAMCertificateId + + e.SetValue(protocol.BodyTarget, "IAMCertificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MinimumProtocolVersion != nil { + v := *s.MinimumProtocolVersion + + e.SetValue(protocol.BodyTarget, "MinimumProtocolVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSLSupportMethod != nil { + v := *s.SSLSupportMethod + + e.SetValue(protocol.BodyTarget, "SSLSupportMethod", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + const ( // CertificateSourceCloudfront is a CertificateSource enum value CertificateSourceCloudfront = "cloudfront" diff --git a/service/cloudsearchdomain/api.go b/service/cloudsearchdomain/api.go index 37de7c21f7b..453e9942b54 100644 --- a/service/cloudsearchdomain/api.go +++ b/service/cloudsearchdomain/api.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" ) const opSearch = "Search" @@ -328,6 +329,30 @@ func (s *Bucket) SetValue(v string) *Bucket { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Bucket) MarshalFields(e protocol.FieldEncoder) error { + if s.Count != nil { + v := *s.Count + + e.SetValue(protocol.BodyTarget, "count", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeBucketList(vs []*Bucket) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A container for the calculated facet values and counts. type BucketInfo struct { _ struct{} `type:"structure"` @@ -352,6 +377,25 @@ func (s *BucketInfo) SetBuckets(v []*Bucket) *BucketInfo { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BucketInfo) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Buckets) > 0 { + v := s.Buckets + + e.SetList(protocol.BodyTarget, "buckets", encodeBucketList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeBucketInfoMap(vs map[string]*BucketInfo) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // A warning returned by the document service when an issue is discovered while // processing an upload request. type DocumentServiceWarning struct { @@ -377,6 +421,25 @@ func (s *DocumentServiceWarning) SetMessage(v string) *DocumentServiceWarning { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DocumentServiceWarning) MarshalFields(e protocol.FieldEncoder) error { + if s.Message != nil { + v := *s.Message + + e.SetValue(protocol.BodyTarget, "message", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDocumentServiceWarningList(vs []*DocumentServiceWarning) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The statistics for a field calculated in the request. type FieldStats struct { _ struct{} `type:"structure"` @@ -486,6 +549,60 @@ func (s *FieldStats) SetSumOfSquares(v float64) *FieldStats { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FieldStats) MarshalFields(e protocol.FieldEncoder) error { + if s.Count != nil { + v := *s.Count + + e.SetValue(protocol.BodyTarget, "count", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Max != nil { + v := *s.Max + + e.SetValue(protocol.BodyTarget, "max", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Mean != nil { + v := *s.Mean + + e.SetValue(protocol.BodyTarget, "mean", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Min != nil { + v := *s.Min + + e.SetValue(protocol.BodyTarget, "min", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Missing != nil { + v := *s.Missing + + e.SetValue(protocol.BodyTarget, "missing", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Stddev != nil { + v := *s.Stddev + + e.SetValue(protocol.BodyTarget, "stddev", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.Sum != nil { + v := *s.Sum + + e.SetValue(protocol.BodyTarget, "sum", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.SumOfSquares != nil { + v := *s.SumOfSquares + + e.SetValue(protocol.BodyTarget, "sumOfSquares", protocol.Float64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeFieldStatsMap(vs map[string]*FieldStats) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // Information about a document that matches the search request. type Hit struct { _ struct{} `type:"structure"` @@ -537,6 +654,45 @@ func (s *Hit) SetId(v string) *Hit { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Hit) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Exprs) > 0 { + v := s.Exprs + + e.SetMap(protocol.BodyTarget, "exprs", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if len(s.Fields) > 0 { + v := s.Fields + + e.SetMap(protocol.BodyTarget, "fields", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + if len(s.Highlights) > 0 { + v := s.Highlights + + e.SetMap(protocol.BodyTarget, "highlights", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeHitList(vs []*Hit) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The collection of documents that match the search request. type Hits struct { _ struct{} `type:"structure"` @@ -589,6 +745,32 @@ func (s *Hits) SetStart(v int64) *Hits { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Hits) MarshalFields(e protocol.FieldEncoder) error { + if s.Cursor != nil { + v := *s.Cursor + + e.SetValue(protocol.BodyTarget, "cursor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Found != nil { + v := *s.Found + + e.SetValue(protocol.BodyTarget, "found", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Hit) > 0 { + v := s.Hit + + e.SetList(protocol.BodyTarget, "hit", encodeHitList(v), protocol.Metadata{}) + } + if s.Start != nil { + v := *s.Start + + e.SetValue(protocol.BodyTarget, "start", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Container for the parameters to the Search request. type SearchInput struct { _ struct{} `type:"structure"` @@ -1000,6 +1182,82 @@ func (s *SearchInput) SetStats(v string) *SearchInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SearchInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Cursor != nil { + v := *s.Cursor + + e.SetValue(protocol.QueryTarget, "cursor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Expr != nil { + v := *s.Expr + + e.SetValue(protocol.QueryTarget, "expr", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Facet != nil { + v := *s.Facet + + e.SetValue(protocol.QueryTarget, "facet", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FilterQuery != nil { + v := *s.FilterQuery + + e.SetValue(protocol.QueryTarget, "fq", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Highlight != nil { + v := *s.Highlight + + e.SetValue(protocol.QueryTarget, "highlight", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Partial != nil { + v := *s.Partial + + e.SetValue(protocol.QueryTarget, "partial", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Query != nil { + v := *s.Query + + e.SetValue(protocol.QueryTarget, "q", protocol.StringValue(v), protocol.Metadata{}) + } + if s.QueryOptions != nil { + v := *s.QueryOptions + + e.SetValue(protocol.QueryTarget, "q.options", protocol.StringValue(v), protocol.Metadata{}) + } + if s.QueryParser != nil { + v := *s.QueryParser + + e.SetValue(protocol.QueryTarget, "q.parser", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Return != nil { + v := *s.Return + + e.SetValue(protocol.QueryTarget, "return", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Size != nil { + v := *s.Size + + e.SetValue(protocol.QueryTarget, "size", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Sort != nil { + v := *s.Sort + + e.SetValue(protocol.QueryTarget, "sort", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Start != nil { + v := *s.Start + + e.SetValue(protocol.QueryTarget, "start", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Stats != nil { + v := *s.Stats + + e.SetValue(protocol.QueryTarget, "stats", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The result of a Search request. Contains the documents that match the specified // search criteria and any requested fields, highlights, and facet information. type SearchOutput struct { @@ -1052,6 +1310,32 @@ func (s *SearchOutput) SetStatus(v *SearchStatus) *SearchOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SearchOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Facets) > 0 { + v := s.Facets + + e.SetMap(protocol.BodyTarget, "facets", encodeBucketInfoMap(v), protocol.Metadata{}) + } + if s.Hits != nil { + v := s.Hits + + e.SetFields(protocol.BodyTarget, "hits", v, protocol.Metadata{}) + } + if len(s.Stats) > 0 { + v := s.Stats + + e.SetMap(protocol.BodyTarget, "stats", encodeFieldStatsMap(v), protocol.Metadata{}) + } + if s.Status != nil { + v := s.Status + + e.SetFields(protocol.BodyTarget, "status", v, protocol.Metadata{}) + } + + return nil +} + // Contains the resource id (rid) and the time it took to process the request // (timems). type SearchStatus struct { @@ -1086,6 +1370,22 @@ func (s *SearchStatus) SetTimems(v int64) *SearchStatus { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SearchStatus) MarshalFields(e protocol.FieldEncoder) error { + if s.Rid != nil { + v := *s.Rid + + e.SetValue(protocol.BodyTarget, "rid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Timems != nil { + v := *s.Timems + + e.SetValue(protocol.BodyTarget, "timems", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Container for the parameters to the Suggest request. type SuggestInput struct { _ struct{} `type:"structure"` @@ -1148,6 +1448,27 @@ func (s *SuggestInput) SetSuggester(v string) *SuggestInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SuggestInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Query != nil { + v := *s.Query + + e.SetValue(protocol.QueryTarget, "q", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Size != nil { + v := *s.Size + + e.SetValue(protocol.QueryTarget, "size", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Suggester != nil { + v := *s.Suggester + + e.SetValue(protocol.QueryTarget, "suggester", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Container for the suggestion information returned in a SuggestResponse. type SuggestModel struct { _ struct{} `type:"structure"` @@ -1190,6 +1511,27 @@ func (s *SuggestModel) SetSuggestions(v []*SuggestionMatch) *SuggestModel { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SuggestModel) MarshalFields(e protocol.FieldEncoder) error { + if s.Found != nil { + v := *s.Found + + e.SetValue(protocol.BodyTarget, "found", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Query != nil { + v := *s.Query + + e.SetValue(protocol.BodyTarget, "query", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Suggestions) > 0 { + v := s.Suggestions + + e.SetList(protocol.BodyTarget, "suggestions", encodeSuggestionMatchList(v), protocol.Metadata{}) + } + + return nil +} + // Contains the response to a Suggest request. type SuggestOutput struct { _ struct{} `type:"structure"` @@ -1224,6 +1566,22 @@ func (s *SuggestOutput) SetSuggest(v *SuggestModel) *SuggestOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SuggestOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Status != nil { + v := s.Status + + e.SetFields(protocol.BodyTarget, "status", v, protocol.Metadata{}) + } + if s.Suggest != nil { + v := s.Suggest + + e.SetFields(protocol.BodyTarget, "suggest", v, protocol.Metadata{}) + } + + return nil +} + // Contains the resource id (rid) and the time it took to process the request // (timems). type SuggestStatus struct { @@ -1258,6 +1616,22 @@ func (s *SuggestStatus) SetTimems(v int64) *SuggestStatus { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SuggestStatus) MarshalFields(e protocol.FieldEncoder) error { + if s.Rid != nil { + v := *s.Rid + + e.SetValue(protocol.BodyTarget, "rid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Timems != nil { + v := *s.Timems + + e.SetValue(protocol.BodyTarget, "timems", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // An autocomplete suggestion that matches the query string specified in a SuggestRequest. type SuggestionMatch struct { _ struct{} `type:"structure"` @@ -1300,6 +1674,35 @@ func (s *SuggestionMatch) SetSuggestion(v string) *SuggestionMatch { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SuggestionMatch) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Score != nil { + v := *s.Score + + e.SetValue(protocol.BodyTarget, "score", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Suggestion != nil { + v := *s.Suggestion + + e.SetValue(protocol.BodyTarget, "suggestion", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeSuggestionMatchList(vs []*SuggestionMatch) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Container for the parameters to the UploadDocuments request. type UploadDocumentsInput struct { _ struct{} `type:"structure" payload:"Documents"` @@ -1357,6 +1760,22 @@ func (s *UploadDocumentsInput) SetDocuments(v io.ReadSeeker) *UploadDocumentsInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UploadDocumentsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Documents != nil { + v := s.Documents + + e.SetStream(protocol.PayloadTarget, "documents", protocol.ReadSeekerStream{V: v}, protocol.Metadata{}) + } + + return nil +} + // Contains the response to an UploadDocuments request. type UploadDocumentsOutput struct { _ struct{} `type:"structure"` @@ -1408,6 +1827,32 @@ func (s *UploadDocumentsOutput) SetWarnings(v []*DocumentServiceWarning) *Upload return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UploadDocumentsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Adds != nil { + v := *s.Adds + + e.SetValue(protocol.BodyTarget, "adds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Deletes != nil { + v := *s.Deletes + + e.SetValue(protocol.BodyTarget, "deletes", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Warnings) > 0 { + v := s.Warnings + + e.SetList(protocol.BodyTarget, "warnings", encodeDocumentServiceWarningList(v), protocol.Metadata{}) + } + + return nil +} + const ( // ContentTypeApplicationJson is a ContentType enum value ContentTypeApplicationJson = "application/json" diff --git a/service/cognitosync/api.go b/service/cognitosync/api.go index 09fb41f7021..44c023cf81d 100644 --- a/service/cognitosync/api.go +++ b/service/cognitosync/api.go @@ -1713,6 +1713,17 @@ func (s *BulkPublishInput) SetIdentityPoolId(v string) *BulkPublishInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BulkPublishInput) MarshalFields(e protocol.FieldEncoder) error { + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output for the BulkPublish operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/BulkPublishResponse type BulkPublishOutput struct { @@ -1739,6 +1750,17 @@ func (s *BulkPublishOutput) SetIdentityPoolId(v string) *BulkPublishOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BulkPublishOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.BodyTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Configuration options for configure Cognito streams. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/CognitoStreams type CognitoStreams struct { @@ -1805,6 +1827,27 @@ func (s *CognitoStreams) SetStreamingStatus(v string) *CognitoStreams { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CognitoStreams) MarshalFields(e protocol.FieldEncoder) error { + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "RoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StreamName != nil { + v := *s.StreamName + + e.SetValue(protocol.BodyTarget, "StreamName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StreamingStatus != nil { + v := *s.StreamingStatus + + e.SetValue(protocol.BodyTarget, "StreamingStatus", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A collection of data for an identity pool. An identity pool can have multiple // datasets. A dataset is per identity and can be general or associated with // a particular entity in an application (like a saved game). Datasets are automatically @@ -1890,6 +1933,55 @@ func (s *Dataset) SetNumRecords(v int64) *Dataset { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Dataset) MarshalFields(e protocol.FieldEncoder) error { + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.DataStorage != nil { + v := *s.DataStorage + + e.SetValue(protocol.BodyTarget, "DataStorage", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.DatasetName != nil { + v := *s.DatasetName + + e.SetValue(protocol.BodyTarget, "DatasetName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityId != nil { + v := *s.IdentityId + + e.SetValue(protocol.BodyTarget, "IdentityId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedBy != nil { + v := *s.LastModifiedBy + + e.SetValue(protocol.BodyTarget, "LastModifiedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.NumRecords != nil { + v := *s.NumRecords + + e.SetValue(protocol.BodyTarget, "NumRecords", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDatasetList(vs []*Dataset) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A request to delete the specific dataset. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DeleteDatasetRequest type DeleteDatasetInput struct { @@ -1970,6 +2062,27 @@ func (s *DeleteDatasetInput) SetIdentityPoolId(v string) *DeleteDatasetInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDatasetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DatasetName != nil { + v := *s.DatasetName + + e.SetValue(protocol.PathTarget, "DatasetName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityId != nil { + v := *s.IdentityId + + e.SetValue(protocol.PathTarget, "IdentityId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Response to a successful DeleteDataset request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DeleteDatasetResponse type DeleteDatasetOutput struct { @@ -1999,6 +2112,17 @@ func (s *DeleteDatasetOutput) SetDataset(v *Dataset) *DeleteDatasetOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDatasetOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Dataset != nil { + v := s.Dataset + + e.SetFields(protocol.BodyTarget, "Dataset", v, protocol.Metadata{}) + } + + return nil +} + // A request for meta data about a dataset (creation date, number of records, // size) by owner and dataset name. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeDatasetRequest @@ -2080,6 +2204,27 @@ func (s *DescribeDatasetInput) SetIdentityPoolId(v string) *DescribeDatasetInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeDatasetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DatasetName != nil { + v := *s.DatasetName + + e.SetValue(protocol.PathTarget, "DatasetName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityId != nil { + v := *s.IdentityId + + e.SetValue(protocol.PathTarget, "IdentityId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Response to a successful DescribeDataset request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeDatasetResponse type DescribeDatasetOutput struct { @@ -2109,6 +2254,17 @@ func (s *DescribeDatasetOutput) SetDataset(v *Dataset) *DescribeDatasetOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeDatasetOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Dataset != nil { + v := s.Dataset + + e.SetFields(protocol.BodyTarget, "Dataset", v, protocol.Metadata{}) + } + + return nil +} + // A request for usage information about the identity pool. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityPoolUsageRequest type DescribeIdentityPoolUsageInput struct { @@ -2153,6 +2309,17 @@ func (s *DescribeIdentityPoolUsageInput) SetIdentityPoolId(v string) *DescribeId return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeIdentityPoolUsageInput) MarshalFields(e protocol.FieldEncoder) error { + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Response to a successful DescribeIdentityPoolUsage request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityPoolUsageResponse type DescribeIdentityPoolUsageOutput struct { @@ -2178,6 +2345,17 @@ func (s *DescribeIdentityPoolUsageOutput) SetIdentityPoolUsage(v *IdentityPoolUs return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeIdentityPoolUsageOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.IdentityPoolUsage != nil { + v := s.IdentityPoolUsage + + e.SetFields(protocol.BodyTarget, "IdentityPoolUsage", v, protocol.Metadata{}) + } + + return nil +} + // A request for information about the usage of an identity pool. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityUsageRequest type DescribeIdentityUsageInput struct { @@ -2240,6 +2418,22 @@ func (s *DescribeIdentityUsageInput) SetIdentityPoolId(v string) *DescribeIdenti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeIdentityUsageInput) MarshalFields(e protocol.FieldEncoder) error { + if s.IdentityId != nil { + v := *s.IdentityId + + e.SetValue(protocol.PathTarget, "IdentityId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The response to a successful DescribeIdentityUsage request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityUsageResponse type DescribeIdentityUsageOutput struct { @@ -2265,6 +2459,17 @@ func (s *DescribeIdentityUsageOutput) SetIdentityUsage(v *IdentityUsage) *Descri return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeIdentityUsageOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.IdentityUsage != nil { + v := s.IdentityUsage + + e.SetFields(protocol.BodyTarget, "IdentityUsage", v, protocol.Metadata{}) + } + + return nil +} + // The input for the GetBulkPublishDetails operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetBulkPublishDetailsRequest type GetBulkPublishDetailsInput struct { @@ -2309,6 +2514,17 @@ func (s *GetBulkPublishDetailsInput) SetIdentityPoolId(v string) *GetBulkPublish return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBulkPublishDetailsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output for the GetBulkPublishDetails operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetBulkPublishDetailsResponse type GetBulkPublishDetailsOutput struct { @@ -2382,6 +2598,37 @@ func (s *GetBulkPublishDetailsOutput) SetIdentityPoolId(v string) *GetBulkPublis return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBulkPublishDetailsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.BulkPublishCompleteTime != nil { + v := *s.BulkPublishCompleteTime + + e.SetValue(protocol.BodyTarget, "BulkPublishCompleteTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.BulkPublishStartTime != nil { + v := *s.BulkPublishStartTime + + e.SetValue(protocol.BodyTarget, "BulkPublishStartTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.BulkPublishStatus != nil { + v := *s.BulkPublishStatus + + e.SetValue(protocol.BodyTarget, "BulkPublishStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FailureMessage != nil { + v := *s.FailureMessage + + e.SetValue(protocol.BodyTarget, "FailureMessage", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.BodyTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request for a list of the configured Cognito Events // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetCognitoEventsRequest type GetCognitoEventsInput struct { @@ -2425,6 +2672,17 @@ func (s *GetCognitoEventsInput) SetIdentityPoolId(v string) *GetCognitoEventsInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCognitoEventsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The response from the GetCognitoEvents request // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetCognitoEventsResponse type GetCognitoEventsOutput struct { @@ -2450,6 +2708,17 @@ func (s *GetCognitoEventsOutput) SetEvents(v map[string]*string) *GetCognitoEven return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCognitoEventsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Events) > 0 { + v := s.Events + + e.SetMap(protocol.BodyTarget, "Events", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // The input for the GetIdentityPoolConfiguration operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetIdentityPoolConfigurationRequest type GetIdentityPoolConfigurationInput struct { @@ -2495,6 +2764,17 @@ func (s *GetIdentityPoolConfigurationInput) SetIdentityPoolId(v string) *GetIden return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetIdentityPoolConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output for the GetIdentityPoolConfiguration operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetIdentityPoolConfigurationResponse type GetIdentityPoolConfigurationOutput struct { @@ -2539,6 +2819,27 @@ func (s *GetIdentityPoolConfigurationOutput) SetPushSync(v *PushSync) *GetIdenti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetIdentityPoolConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CognitoStreams != nil { + v := s.CognitoStreams + + e.SetFields(protocol.BodyTarget, "CognitoStreams", v, protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.BodyTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PushSync != nil { + v := s.PushSync + + e.SetFields(protocol.BodyTarget, "PushSync", v, protocol.Metadata{}) + } + + return nil +} + // Usage information for the identity pool. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/IdentityPoolUsage type IdentityPoolUsage struct { @@ -2592,6 +2893,40 @@ func (s *IdentityPoolUsage) SetSyncSessionsCount(v int64) *IdentityPoolUsage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *IdentityPoolUsage) MarshalFields(e protocol.FieldEncoder) error { + if s.DataStorage != nil { + v := *s.DataStorage + + e.SetValue(protocol.BodyTarget, "DataStorage", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.BodyTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.SyncSessionsCount != nil { + v := *s.SyncSessionsCount + + e.SetValue(protocol.BodyTarget, "SyncSessionsCount", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeIdentityPoolUsageList(vs []*IdentityPoolUsage) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Usage information for the identity. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/IdentityUsage type IdentityUsage struct { @@ -2655,6 +2990,37 @@ func (s *IdentityUsage) SetLastModifiedDate(v time.Time) *IdentityUsage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *IdentityUsage) MarshalFields(e protocol.FieldEncoder) error { + if s.DataStorage != nil { + v := *s.DataStorage + + e.SetValue(protocol.BodyTarget, "DataStorage", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.DatasetCount != nil { + v := *s.DatasetCount + + e.SetValue(protocol.BodyTarget, "DatasetCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.IdentityId != nil { + v := *s.IdentityId + + e.SetValue(protocol.BodyTarget, "IdentityId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.BodyTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + + return nil +} + // Request for a list of datasets for an identity. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListDatasetsRequest type ListDatasetsInput struct { @@ -2735,6 +3101,32 @@ func (s *ListDatasetsInput) SetNextToken(v string) *ListDatasetsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDatasetsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.IdentityId != nil { + v := *s.IdentityId + + e.SetValue(protocol.PathTarget, "IdentityId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Returned for a successful ListDatasets request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListDatasetsResponse type ListDatasetsOutput struct { @@ -2778,6 +3170,27 @@ func (s *ListDatasetsOutput) SetNextToken(v string) *ListDatasetsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDatasetsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Count != nil { + v := *s.Count + + e.SetValue(protocol.BodyTarget, "Count", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Datasets) > 0 { + v := s.Datasets + + e.SetList(protocol.BodyTarget, "Datasets", encodeDatasetList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request for usage information on an identity pool. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListIdentityPoolUsageRequest type ListIdentityPoolUsageInput struct { @@ -2812,6 +3225,22 @@ func (s *ListIdentityPoolUsageInput) SetNextToken(v string) *ListIdentityPoolUsa return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListIdentityPoolUsageInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Returned for a successful ListIdentityPoolUsage request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListIdentityPoolUsageResponse type ListIdentityPoolUsageOutput struct { @@ -2864,6 +3293,32 @@ func (s *ListIdentityPoolUsageOutput) SetNextToken(v string) *ListIdentityPoolUs return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListIdentityPoolUsageOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Count != nil { + v := *s.Count + + e.SetValue(protocol.BodyTarget, "Count", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.IdentityPoolUsages) > 0 { + v := s.IdentityPoolUsages + + e.SetList(protocol.BodyTarget, "IdentityPoolUsages", encodeIdentityPoolUsageList(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request for a list of records. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListRecordsRequest type ListRecordsInput struct { @@ -2980,6 +3435,47 @@ func (s *ListRecordsInput) SetSyncSessionToken(v string) *ListRecordsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListRecordsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DatasetName != nil { + v := *s.DatasetName + + e.SetValue(protocol.PathTarget, "DatasetName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityId != nil { + v := *s.IdentityId + + e.SetValue(protocol.PathTarget, "IdentityId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastSyncCount != nil { + v := *s.LastSyncCount + + e.SetValue(protocol.QueryTarget, "lastSyncCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SyncSessionToken != nil { + v := *s.SyncSessionToken + + e.SetValue(protocol.QueryTarget, "syncSessionToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Returned for a successful ListRecordsRequest. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListRecordsResponse type ListRecordsOutput struct { @@ -3077,6 +3573,57 @@ func (s *ListRecordsOutput) SetSyncSessionToken(v string) *ListRecordsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListRecordsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Count != nil { + v := *s.Count + + e.SetValue(protocol.BodyTarget, "Count", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.DatasetDeletedAfterRequestedSyncCount != nil { + v := *s.DatasetDeletedAfterRequestedSyncCount + + e.SetValue(protocol.BodyTarget, "DatasetDeletedAfterRequestedSyncCount", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.DatasetExists != nil { + v := *s.DatasetExists + + e.SetValue(protocol.BodyTarget, "DatasetExists", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.DatasetSyncCount != nil { + v := *s.DatasetSyncCount + + e.SetValue(protocol.BodyTarget, "DatasetSyncCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.LastModifiedBy != nil { + v := *s.LastModifiedBy + + e.SetValue(protocol.BodyTarget, "LastModifiedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.MergedDatasetNames) > 0 { + v := s.MergedDatasetNames + + e.SetList(protocol.BodyTarget, "MergedDatasetNames", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Records) > 0 { + v := s.Records + + e.SetList(protocol.BodyTarget, "Records", encodeRecordList(v), protocol.Metadata{}) + } + if s.SyncSessionToken != nil { + v := *s.SyncSessionToken + + e.SetValue(protocol.BodyTarget, "SyncSessionToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Configuration options to be applied to the identity pool. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/PushSync type PushSync struct { @@ -3124,6 +3671,22 @@ func (s *PushSync) SetRoleArn(v string) *PushSync { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PushSync) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ApplicationArns) > 0 { + v := s.ApplicationArns + + e.SetList(protocol.BodyTarget, "ApplicationArns", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "RoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The basic data structure of a dataset. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/Record type Record struct { @@ -3194,6 +3757,50 @@ func (s *Record) SetValue(v string) *Record { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Record) MarshalFields(e protocol.FieldEncoder) error { + if s.DeviceLastModifiedDate != nil { + v := *s.DeviceLastModifiedDate + + e.SetValue(protocol.BodyTarget, "DeviceLastModifiedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedBy != nil { + v := *s.LastModifiedBy + + e.SetValue(protocol.BodyTarget, "LastModifiedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.SyncCount != nil { + v := *s.SyncCount + + e.SetValue(protocol.BodyTarget, "SyncCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeRecordList(vs []*Record) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // An update operation for a record. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/RecordPatch type RecordPatch struct { @@ -3283,6 +3890,45 @@ func (s *RecordPatch) SetValue(v string) *RecordPatch { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RecordPatch) MarshalFields(e protocol.FieldEncoder) error { + if s.DeviceLastModifiedDate != nil { + v := *s.DeviceLastModifiedDate + + e.SetValue(protocol.BodyTarget, "DeviceLastModifiedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Op != nil { + v := *s.Op + + e.SetValue(protocol.BodyTarget, "Op", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SyncCount != nil { + v := *s.SyncCount + + e.SetValue(protocol.BodyTarget, "SyncCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeRecordPatchList(vs []*RecordPatch) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A request to RegisterDevice. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/RegisterDeviceRequest type RegisterDeviceInput struct { @@ -3373,6 +4019,32 @@ func (s *RegisterDeviceInput) SetToken(v string) *RegisterDeviceInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RegisterDeviceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.IdentityId != nil { + v := *s.IdentityId + + e.SetValue(protocol.PathTarget, "IdentityId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Platform != nil { + v := *s.Platform + + e.SetValue(protocol.BodyTarget, "Platform", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Token != nil { + v := *s.Token + + e.SetValue(protocol.BodyTarget, "Token", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Response to a RegisterDevice request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/RegisterDeviceResponse type RegisterDeviceOutput struct { @@ -3398,6 +4070,17 @@ func (s *RegisterDeviceOutput) SetDeviceId(v string) *RegisterDeviceOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RegisterDeviceOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeviceId != nil { + v := *s.DeviceId + + e.SetValue(protocol.BodyTarget, "DeviceId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request to configure Cognito Events" // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetCognitoEventsRequest type SetCognitoEventsInput struct { @@ -3455,6 +4138,22 @@ func (s *SetCognitoEventsInput) SetIdentityPoolId(v string) *SetCognitoEventsInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SetCognitoEventsInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Events) > 0 { + v := s.Events + + e.SetMap(protocol.BodyTarget, "Events", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetCognitoEventsOutput type SetCognitoEventsOutput struct { _ struct{} `type:"structure"` @@ -3470,6 +4169,12 @@ func (s SetCognitoEventsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SetCognitoEventsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the SetIdentityPoolConfiguration operation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetIdentityPoolConfigurationRequest type SetIdentityPoolConfigurationInput struct { @@ -3542,6 +4247,27 @@ func (s *SetIdentityPoolConfigurationInput) SetPushSync(v *PushSync) *SetIdentit return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SetIdentityPoolConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CognitoStreams != nil { + v := s.CognitoStreams + + e.SetFields(protocol.BodyTarget, "CognitoStreams", v, protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PushSync != nil { + v := s.PushSync + + e.SetFields(protocol.BodyTarget, "PushSync", v, protocol.Metadata{}) + } + + return nil +} + // The output for the SetIdentityPoolConfiguration operation // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetIdentityPoolConfigurationResponse type SetIdentityPoolConfigurationOutput struct { @@ -3586,6 +4312,27 @@ func (s *SetIdentityPoolConfigurationOutput) SetPushSync(v *PushSync) *SetIdenti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SetIdentityPoolConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CognitoStreams != nil { + v := s.CognitoStreams + + e.SetFields(protocol.BodyTarget, "CognitoStreams", v, protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.BodyTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PushSync != nil { + v := s.PushSync + + e.SetFields(protocol.BodyTarget, "PushSync", v, protocol.Metadata{}) + } + + return nil +} + // A request to SubscribeToDatasetRequest. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SubscribeToDatasetRequest type SubscribeToDatasetInput struct { @@ -3681,6 +4428,32 @@ func (s *SubscribeToDatasetInput) SetIdentityPoolId(v string) *SubscribeToDatase return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SubscribeToDatasetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DatasetName != nil { + v := *s.DatasetName + + e.SetValue(protocol.PathTarget, "DatasetName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeviceId != nil { + v := *s.DeviceId + + e.SetValue(protocol.PathTarget, "DeviceId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityId != nil { + v := *s.IdentityId + + e.SetValue(protocol.PathTarget, "IdentityId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Response to a SubscribeToDataset request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SubscribeToDatasetResponse type SubscribeToDatasetOutput struct { @@ -3697,6 +4470,12 @@ func (s SubscribeToDatasetOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SubscribeToDatasetOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A request to UnsubscribeFromDataset. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UnsubscribeFromDatasetRequest type UnsubscribeFromDatasetInput struct { @@ -3792,6 +4571,32 @@ func (s *UnsubscribeFromDatasetInput) SetIdentityPoolId(v string) *UnsubscribeFr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UnsubscribeFromDatasetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DatasetName != nil { + v := *s.DatasetName + + e.SetValue(protocol.PathTarget, "DatasetName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeviceId != nil { + v := *s.DeviceId + + e.SetValue(protocol.PathTarget, "DeviceId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityId != nil { + v := *s.IdentityId + + e.SetValue(protocol.PathTarget, "IdentityId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Response to an UnsubscribeFromDataset request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UnsubscribeFromDatasetResponse type UnsubscribeFromDatasetOutput struct { @@ -3808,6 +4613,12 @@ func (s UnsubscribeFromDatasetOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UnsubscribeFromDatasetOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A request to post updates to records or add and delete records for a dataset // and user. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UpdateRecordsRequest @@ -3945,6 +4756,47 @@ func (s *UpdateRecordsInput) SetSyncSessionToken(v string) *UpdateRecordsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateRecordsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ClientContext != nil { + v := *s.ClientContext + + e.SetValue(protocol.HeaderTarget, "x-amz-Client-Context", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DatasetName != nil { + v := *s.DatasetName + + e.SetValue(protocol.PathTarget, "DatasetName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeviceId != nil { + v := *s.DeviceId + + e.SetValue(protocol.BodyTarget, "DeviceId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityId != nil { + v := *s.IdentityId + + e.SetValue(protocol.PathTarget, "IdentityId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdentityPoolId != nil { + v := *s.IdentityPoolId + + e.SetValue(protocol.PathTarget, "IdentityPoolId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.RecordPatches) > 0 { + v := s.RecordPatches + + e.SetList(protocol.BodyTarget, "RecordPatches", encodeRecordPatchList(v), protocol.Metadata{}) + } + if s.SyncSessionToken != nil { + v := *s.SyncSessionToken + + e.SetValue(protocol.BodyTarget, "SyncSessionToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Returned for a successful UpdateRecordsRequest. // Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UpdateRecordsResponse type UpdateRecordsOutput struct { @@ -3970,6 +4822,17 @@ func (s *UpdateRecordsOutput) SetRecords(v []*Record) *UpdateRecordsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateRecordsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Records) > 0 { + v := s.Records + + e.SetList(protocol.BodyTarget, "Records", encodeRecordList(v), protocol.Metadata{}) + } + + return nil +} + const ( // BulkPublishStatusNotStarted is a BulkPublishStatus enum value BulkPublishStatusNotStarted = "NOT_STARTED" diff --git a/service/efs/api.go b/service/efs/api.go index 5f4d46fe479..4d603cb31c1 100644 --- a/service/efs/api.go +++ b/service/efs/api.go @@ -1393,6 +1393,32 @@ func (s *CreateFileSystemInput) SetPerformanceMode(v string) *CreateFileSystemIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateFileSystemInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CreationToken != nil { + v := *s.CreationToken + + e.SetValue(protocol.BodyTarget, "CreationToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Encrypted != nil { + v := *s.Encrypted + + e.SetValue(protocol.BodyTarget, "Encrypted", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.KmsKeyId != nil { + v := *s.KmsKeyId + + e.SetValue(protocol.BodyTarget, "KmsKeyId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PerformanceMode != nil { + v := *s.PerformanceMode + + e.SetValue(protocol.BodyTarget, "PerformanceMode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateMountTargetRequest type CreateMountTargetInput struct { _ struct{} `type:"structure"` @@ -1465,6 +1491,32 @@ func (s *CreateMountTargetInput) SetSubnetId(v string) *CreateMountTargetInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateMountTargetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FileSystemId != nil { + v := *s.FileSystemId + + e.SetValue(protocol.BodyTarget, "FileSystemId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IpAddress != nil { + v := *s.IpAddress + + e.SetValue(protocol.BodyTarget, "IpAddress", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SecurityGroups) > 0 { + v := s.SecurityGroups + + e.SetList(protocol.BodyTarget, "SecurityGroups", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.SubnetId != nil { + v := *s.SubnetId + + e.SetValue(protocol.BodyTarget, "SubnetId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateTagsRequest type CreateTagsInput struct { _ struct{} `type:"structure"` @@ -1529,6 +1581,22 @@ func (s *CreateTagsInput) SetTags(v []*Tag) *CreateTagsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateTagsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FileSystemId != nil { + v := *s.FileSystemId + + e.SetValue(protocol.PathTarget, "FileSystemId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Tags) > 0 { + v := s.Tags + + e.SetList(protocol.BodyTarget, "Tags", encodeTagList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateTagsOutput type CreateTagsOutput struct { _ struct{} `type:"structure"` @@ -1544,6 +1612,12 @@ func (s CreateTagsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateTagsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteFileSystemRequest type DeleteFileSystemInput struct { _ struct{} `type:"structure"` @@ -1583,6 +1657,17 @@ func (s *DeleteFileSystemInput) SetFileSystemId(v string) *DeleteFileSystemInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteFileSystemInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FileSystemId != nil { + v := *s.FileSystemId + + e.SetValue(protocol.PathTarget, "FileSystemId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteFileSystemOutput type DeleteFileSystemOutput struct { _ struct{} `type:"structure"` @@ -1598,6 +1683,12 @@ func (s DeleteFileSystemOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteFileSystemOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteMountTargetRequest type DeleteMountTargetInput struct { _ struct{} `type:"structure"` @@ -1637,6 +1728,17 @@ func (s *DeleteMountTargetInput) SetMountTargetId(v string) *DeleteMountTargetIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteMountTargetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MountTargetId != nil { + v := *s.MountTargetId + + e.SetValue(protocol.PathTarget, "MountTargetId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteMountTargetOutput type DeleteMountTargetOutput struct { _ struct{} `type:"structure"` @@ -1652,6 +1754,12 @@ func (s DeleteMountTargetOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteMountTargetOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteTagsRequest type DeleteTagsInput struct { _ struct{} `type:"structure"` @@ -1705,6 +1813,22 @@ func (s *DeleteTagsInput) SetTagKeys(v []*string) *DeleteTagsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteTagsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FileSystemId != nil { + v := *s.FileSystemId + + e.SetValue(protocol.PathTarget, "FileSystemId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TagKeys) > 0 { + v := s.TagKeys + + e.SetList(protocol.BodyTarget, "TagKeys", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteTagsOutput type DeleteTagsOutput struct { _ struct{} `type:"structure"` @@ -1720,6 +1844,12 @@ func (s DeleteTagsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteTagsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystemsRequest type DescribeFileSystemsInput struct { _ struct{} `type:"structure"` @@ -1795,6 +1925,32 @@ func (s *DescribeFileSystemsInput) SetMaxItems(v int64) *DescribeFileSystemsInpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeFileSystemsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CreationToken != nil { + v := *s.CreationToken + + e.SetValue(protocol.QueryTarget, "CreationToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FileSystemId != nil { + v := *s.FileSystemId + + e.SetValue(protocol.QueryTarget, "FileSystemId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystemsResponse type DescribeFileSystemsOutput struct { _ struct{} `type:"structure"` @@ -1838,6 +1994,27 @@ func (s *DescribeFileSystemsOutput) SetNextMarker(v string) *DescribeFileSystems return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeFileSystemsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.FileSystems) > 0 { + v := s.FileSystems + + e.SetList(protocol.BodyTarget, "FileSystems", encodeFileSystemDescriptionList(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "NextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargetSecurityGroupsRequest type DescribeMountTargetSecurityGroupsInput struct { _ struct{} `type:"structure"` @@ -1877,6 +2054,17 @@ func (s *DescribeMountTargetSecurityGroupsInput) SetMountTargetId(v string) *Des return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeMountTargetSecurityGroupsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MountTargetId != nil { + v := *s.MountTargetId + + e.SetValue(protocol.PathTarget, "MountTargetId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargetSecurityGroupsResponse type DescribeMountTargetSecurityGroupsOutput struct { _ struct{} `type:"structure"` @@ -1903,6 +2091,17 @@ func (s *DescribeMountTargetSecurityGroupsOutput) SetSecurityGroups(v []*string) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeMountTargetSecurityGroupsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.SecurityGroups) > 0 { + v := s.SecurityGroups + + e.SetList(protocol.BodyTarget, "SecurityGroups", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargetsRequest type DescribeMountTargetsInput struct { _ struct{} `type:"structure"` @@ -1972,6 +2171,32 @@ func (s *DescribeMountTargetsInput) SetMountTargetId(v string) *DescribeMountTar return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeMountTargetsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FileSystemId != nil { + v := *s.FileSystemId + + e.SetValue(protocol.QueryTarget, "FileSystemId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MountTargetId != nil { + v := *s.MountTargetId + + e.SetValue(protocol.QueryTarget, "MountTargetId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargetsResponse type DescribeMountTargetsOutput struct { _ struct{} `type:"structure"` @@ -2018,6 +2243,27 @@ func (s *DescribeMountTargetsOutput) SetNextMarker(v string) *DescribeMountTarge return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeMountTargetsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.MountTargets) > 0 { + v := s.MountTargets + + e.SetList(protocol.BodyTarget, "MountTargets", encodeMountTargetDescriptionList(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "NextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeTagsRequest type DescribeTagsInput struct { _ struct{} `type:"structure"` @@ -2081,6 +2327,27 @@ func (s *DescribeTagsInput) SetMaxItems(v int64) *DescribeTagsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeTagsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FileSystemId != nil { + v := *s.FileSystemId + + e.SetValue(protocol.PathTarget, "FileSystemId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeTagsResponse type DescribeTagsOutput struct { _ struct{} `type:"structure"` @@ -2128,6 +2395,27 @@ func (s *DescribeTagsOutput) SetTags(v []*Tag) *DescribeTagsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeTagsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "NextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Tags) > 0 { + v := s.Tags + + e.SetList(protocol.BodyTarget, "Tags", encodeTagList(v), protocol.Metadata{}) + } + + return nil +} + // Description of the file system. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/FileSystemDescription type FileSystemDescription struct { @@ -2272,6 +2560,75 @@ func (s *FileSystemDescription) SetSizeInBytes(v *FileSystemSize) *FileSystemDes return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FileSystemDescription) MarshalFields(e protocol.FieldEncoder) error { + if s.CreationTime != nil { + v := *s.CreationTime + + e.SetValue(protocol.BodyTarget, "CreationTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.CreationToken != nil { + v := *s.CreationToken + + e.SetValue(protocol.BodyTarget, "CreationToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Encrypted != nil { + v := *s.Encrypted + + e.SetValue(protocol.BodyTarget, "Encrypted", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.FileSystemId != nil { + v := *s.FileSystemId + + e.SetValue(protocol.BodyTarget, "FileSystemId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KmsKeyId != nil { + v := *s.KmsKeyId + + e.SetValue(protocol.BodyTarget, "KmsKeyId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LifeCycleState != nil { + v := *s.LifeCycleState + + e.SetValue(protocol.BodyTarget, "LifeCycleState", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NumberOfMountTargets != nil { + v := *s.NumberOfMountTargets + + e.SetValue(protocol.BodyTarget, "NumberOfMountTargets", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.OwnerId != nil { + v := *s.OwnerId + + e.SetValue(protocol.BodyTarget, "OwnerId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PerformanceMode != nil { + v := *s.PerformanceMode + + e.SetValue(protocol.BodyTarget, "PerformanceMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SizeInBytes != nil { + v := s.SizeInBytes + + e.SetFields(protocol.BodyTarget, "SizeInBytes", v, protocol.Metadata{}) + } + + return nil +} + +func encodeFileSystemDescriptionList(vs []*FileSystemDescription) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Latest known metered size (in bytes) of data stored in the file system, in // its Value field, and the time at which that size was determined in its Timestamp // field. Note that the value does not represent the size of a consistent snapshot @@ -2316,6 +2673,22 @@ func (s *FileSystemSize) SetValue(v int64) *FileSystemSize { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FileSystemSize) MarshalFields(e protocol.FieldEncoder) error { + if s.Timestamp != nil { + v := *s.Timestamp + + e.SetValue(protocol.BodyTarget, "Timestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ModifyMountTargetSecurityGroupsRequest type ModifyMountTargetSecurityGroupsInput struct { _ struct{} `type:"structure"` @@ -2364,6 +2737,22 @@ func (s *ModifyMountTargetSecurityGroupsInput) SetSecurityGroups(v []*string) *M return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ModifyMountTargetSecurityGroupsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MountTargetId != nil { + v := *s.MountTargetId + + e.SetValue(protocol.PathTarget, "MountTargetId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SecurityGroups) > 0 { + v := s.SecurityGroups + + e.SetList(protocol.BodyTarget, "SecurityGroups", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ModifyMountTargetSecurityGroupsOutput type ModifyMountTargetSecurityGroupsOutput struct { _ struct{} `type:"structure"` @@ -2379,6 +2768,12 @@ func (s ModifyMountTargetSecurityGroupsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ModifyMountTargetSecurityGroupsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Provides a description of a mount target. // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/MountTargetDescription type MountTargetDescription struct { @@ -2467,6 +2862,55 @@ func (s *MountTargetDescription) SetSubnetId(v string) *MountTargetDescription { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MountTargetDescription) MarshalFields(e protocol.FieldEncoder) error { + if s.FileSystemId != nil { + v := *s.FileSystemId + + e.SetValue(protocol.BodyTarget, "FileSystemId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IpAddress != nil { + v := *s.IpAddress + + e.SetValue(protocol.BodyTarget, "IpAddress", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LifeCycleState != nil { + v := *s.LifeCycleState + + e.SetValue(protocol.BodyTarget, "LifeCycleState", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MountTargetId != nil { + v := *s.MountTargetId + + e.SetValue(protocol.BodyTarget, "MountTargetId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NetworkInterfaceId != nil { + v := *s.NetworkInterfaceId + + e.SetValue(protocol.BodyTarget, "NetworkInterfaceId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OwnerId != nil { + v := *s.OwnerId + + e.SetValue(protocol.BodyTarget, "OwnerId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubnetId != nil { + v := *s.SubnetId + + e.SetValue(protocol.BodyTarget, "SubnetId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeMountTargetDescriptionList(vs []*MountTargetDescription) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A tag is a key-value pair. Allowed characters: letters, whitespace, and numbers, // representable in UTF-8, and the following characters: + - = . _ : / // Please also see https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/Tag @@ -2525,6 +2969,30 @@ func (s *Tag) SetValue(v string) *Tag { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Tag) MarshalFields(e protocol.FieldEncoder) error { + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTagList(vs []*Tag) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + const ( // LifeCycleStateCreating is a LifeCycleState enum value LifeCycleStateCreating = "creating" diff --git a/service/elasticsearchservice/api.go b/service/elasticsearchservice/api.go index 2ca61fa43e5..a3b88b8cc3d 100644 --- a/service/elasticsearchservice/api.go +++ b/service/elasticsearchservice/api.go @@ -1443,6 +1443,22 @@ func (s *AccessPoliciesStatus) SetStatus(v *OptionStatus) *AccessPoliciesStatus return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AccessPoliciesStatus) MarshalFields(e protocol.FieldEncoder) error { + if s.Options != nil { + v := *s.Options + + e.SetValue(protocol.BodyTarget, "Options", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := s.Status + + e.SetFields(protocol.BodyTarget, "Status", v, protocol.Metadata{}) + } + + return nil +} + // Container for the parameters to the AddTags operation. Specify the tags that // you want to attach to the Elasticsearch domain. type AddTagsInput struct { @@ -1507,6 +1523,22 @@ func (s *AddTagsInput) SetTagList(v []*Tag) *AddTagsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AddTagsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ARN != nil { + v := *s.ARN + + e.SetValue(protocol.BodyTarget, "ARN", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TagList) > 0 { + v := s.TagList + + e.SetList(protocol.BodyTarget, "TagList", encodeTagList(v), protocol.Metadata{}) + } + + return nil +} + type AddTagsOutput struct { _ struct{} `type:"structure"` } @@ -1521,6 +1553,12 @@ func (s AddTagsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AddTagsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // List of limits that are specific to a given InstanceType and for each of // it's InstanceRole . type AdditionalLimit struct { @@ -1560,6 +1598,30 @@ func (s *AdditionalLimit) SetLimitValues(v []*string) *AdditionalLimit { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AdditionalLimit) MarshalFields(e protocol.FieldEncoder) error { + if s.LimitName != nil { + v := *s.LimitName + + e.SetValue(protocol.BodyTarget, "LimitName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.LimitValues) > 0 { + v := s.LimitValues + + e.SetList(protocol.BodyTarget, "LimitValues", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeAdditionalLimitList(vs []*AdditionalLimit) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Status of the advanced options for the specified Elasticsearch domain. Currently, // the following advanced options are available: // @@ -1608,6 +1670,22 @@ func (s *AdvancedOptionsStatus) SetStatus(v *OptionStatus) *AdvancedOptionsStatu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AdvancedOptionsStatus) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Options) > 0 { + v := s.Options + + e.SetMap(protocol.BodyTarget, "Options", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.Status != nil { + v := s.Status + + e.SetFields(protocol.BodyTarget, "Status", v, protocol.Metadata{}) + } + + return nil +} + type CreateElasticsearchDomainInput struct { _ struct{} `type:"structure"` @@ -1735,6 +1813,57 @@ func (s *CreateElasticsearchDomainInput) SetVPCOptions(v *VPCOptions) *CreateEla return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateElasticsearchDomainInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccessPolicies != nil { + v := *s.AccessPolicies + + e.SetValue(protocol.BodyTarget, "AccessPolicies", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.AdvancedOptions) > 0 { + v := s.AdvancedOptions + + e.SetMap(protocol.BodyTarget, "AdvancedOptions", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.BodyTarget, "DomainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EBSOptions != nil { + v := s.EBSOptions + + e.SetFields(protocol.BodyTarget, "EBSOptions", v, protocol.Metadata{}) + } + if s.ElasticsearchClusterConfig != nil { + v := s.ElasticsearchClusterConfig + + e.SetFields(protocol.BodyTarget, "ElasticsearchClusterConfig", v, protocol.Metadata{}) + } + if s.ElasticsearchVersion != nil { + v := *s.ElasticsearchVersion + + e.SetValue(protocol.BodyTarget, "ElasticsearchVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.LogPublishingOptions) > 0 { + v := s.LogPublishingOptions + + e.SetMap(protocol.BodyTarget, "LogPublishingOptions", encodeLogPublishingOptionMap(v), protocol.Metadata{}) + } + if s.SnapshotOptions != nil { + v := s.SnapshotOptions + + e.SetFields(protocol.BodyTarget, "SnapshotOptions", v, protocol.Metadata{}) + } + if s.VPCOptions != nil { + v := s.VPCOptions + + e.SetFields(protocol.BodyTarget, "VPCOptions", v, protocol.Metadata{}) + } + + return nil +} + // The result of a CreateElasticsearchDomain operation. Contains the status // of the newly created Elasticsearch domain. type CreateElasticsearchDomainOutput struct { @@ -1760,6 +1889,17 @@ func (s *CreateElasticsearchDomainOutput) SetDomainStatus(v *ElasticsearchDomain return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateElasticsearchDomainOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainStatus != nil { + v := s.DomainStatus + + e.SetFields(protocol.BodyTarget, "DomainStatus", v, protocol.Metadata{}) + } + + return nil +} + // Container for the parameters to the DeleteElasticsearchDomain operation. // Specifies the name of the Elasticsearch domain that you want to delete. type DeleteElasticsearchDomainInput struct { @@ -1803,6 +1943,17 @@ func (s *DeleteElasticsearchDomainInput) SetDomainName(v string) *DeleteElastics return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteElasticsearchDomainInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.PathTarget, "DomainName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The result of a DeleteElasticsearchDomain request. Contains the status of // the pending deletion, or no status if the domain and all of its resources // have been deleted. @@ -1829,6 +1980,17 @@ func (s *DeleteElasticsearchDomainOutput) SetDomainStatus(v *ElasticsearchDomain return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteElasticsearchDomainOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainStatus != nil { + v := s.DomainStatus + + e.SetFields(protocol.BodyTarget, "DomainStatus", v, protocol.Metadata{}) + } + + return nil +} + type DeleteElasticsearchServiceRoleInput struct { _ struct{} `type:"structure"` } @@ -1843,6 +2005,12 @@ func (s DeleteElasticsearchServiceRoleInput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteElasticsearchServiceRoleInput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type DeleteElasticsearchServiceRoleOutput struct { _ struct{} `type:"structure"` } @@ -1857,6 +2025,12 @@ func (s DeleteElasticsearchServiceRoleOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteElasticsearchServiceRoleOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Container for the parameters to the DescribeElasticsearchDomainConfig operation. // Specifies the domain name for which you want configuration information. type DescribeElasticsearchDomainConfigInput struct { @@ -1900,6 +2074,17 @@ func (s *DescribeElasticsearchDomainConfigInput) SetDomainName(v string) *Descri return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeElasticsearchDomainConfigInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.PathTarget, "DomainName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The result of a DescribeElasticsearchDomainConfig request. Contains the configuration // information of the requested domain. type DescribeElasticsearchDomainConfigOutput struct { @@ -1928,6 +2113,17 @@ func (s *DescribeElasticsearchDomainConfigOutput) SetDomainConfig(v *Elasticsear return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeElasticsearchDomainConfigOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainConfig != nil { + v := s.DomainConfig + + e.SetFields(protocol.BodyTarget, "DomainConfig", v, protocol.Metadata{}) + } + + return nil +} + // Container for the parameters to the DescribeElasticsearchDomain operation. type DescribeElasticsearchDomainInput struct { _ struct{} `type:"structure"` @@ -1970,6 +2166,17 @@ func (s *DescribeElasticsearchDomainInput) SetDomainName(v string) *DescribeElas return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeElasticsearchDomainInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.PathTarget, "DomainName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The result of a DescribeElasticsearchDomain request. Contains the status // of the domain specified in the request. type DescribeElasticsearchDomainOutput struct { @@ -1997,6 +2204,17 @@ func (s *DescribeElasticsearchDomainOutput) SetDomainStatus(v *ElasticsearchDoma return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeElasticsearchDomainOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainStatus != nil { + v := s.DomainStatus + + e.SetFields(protocol.BodyTarget, "DomainStatus", v, protocol.Metadata{}) + } + + return nil +} + // Container for the parameters to the DescribeElasticsearchDomains operation. // By default, the API returns the status of all Elasticsearch domains. type DescribeElasticsearchDomainsInput struct { @@ -2037,6 +2255,17 @@ func (s *DescribeElasticsearchDomainsInput) SetDomainNames(v []*string) *Describ return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeElasticsearchDomainsInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.DomainNames) > 0 { + v := s.DomainNames + + e.SetList(protocol.BodyTarget, "DomainNames", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // The result of a DescribeElasticsearchDomains request. Contains the status // of the specified domains or all domains owned by the account. type DescribeElasticsearchDomainsOutput struct { @@ -2064,6 +2293,17 @@ func (s *DescribeElasticsearchDomainsOutput) SetDomainStatusList(v []*Elasticsea return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeElasticsearchDomainsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.DomainStatusList) > 0 { + v := s.DomainStatusList + + e.SetList(protocol.BodyTarget, "DomainStatusList", encodeElasticsearchDomainStatusList(v), protocol.Metadata{}) + } + + return nil +} + // Container for the parameters to DescribeElasticsearchInstanceTypeLimits operation. type DescribeElasticsearchInstanceTypeLimitsInput struct { _ struct{} `type:"structure"` @@ -2132,6 +2372,27 @@ func (s *DescribeElasticsearchInstanceTypeLimitsInput) SetInstanceType(v string) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeElasticsearchInstanceTypeLimitsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.QueryTarget, "domainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ElasticsearchVersion != nil { + v := *s.ElasticsearchVersion + + e.SetValue(protocol.PathTarget, "ElasticsearchVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InstanceType != nil { + v := *s.InstanceType + + e.SetValue(protocol.PathTarget, "InstanceType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Container for the parameters received from DescribeElasticsearchInstanceTypeLimits // operation. type DescribeElasticsearchInstanceTypeLimitsOutput struct { @@ -2160,6 +2421,17 @@ func (s *DescribeElasticsearchInstanceTypeLimitsOutput) SetLimitsByRole(v map[st return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeElasticsearchInstanceTypeLimitsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.LimitsByRole) > 0 { + v := s.LimitsByRole + + e.SetMap(protocol.BodyTarget, "LimitsByRole", encodeLimitsMap(v), protocol.Metadata{}) + } + + return nil +} + type DomainInfo struct { _ struct{} `type:"structure"` @@ -2183,6 +2455,25 @@ func (s *DomainInfo) SetDomainName(v string) *DomainInfo { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DomainInfo) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.BodyTarget, "DomainName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDomainInfoList(vs []*DomainInfo) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Options to enable, disable, and specify the properties of EBS storage volumes. // For more information, see Configuring EBS-based Storage (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-createupdatedomains.html#es-createdomain-configure-ebs). type EBSOptions struct { @@ -2235,6 +2526,32 @@ func (s *EBSOptions) SetVolumeType(v string) *EBSOptions { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EBSOptions) MarshalFields(e protocol.FieldEncoder) error { + if s.EBSEnabled != nil { + v := *s.EBSEnabled + + e.SetValue(protocol.BodyTarget, "EBSEnabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Iops != nil { + v := *s.Iops + + e.SetValue(protocol.BodyTarget, "Iops", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.VolumeSize != nil { + v := *s.VolumeSize + + e.SetValue(protocol.BodyTarget, "VolumeSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.VolumeType != nil { + v := *s.VolumeType + + e.SetValue(protocol.BodyTarget, "VolumeType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Status of the EBS options for the specified Elasticsearch domain. type EBSOptionsStatus struct { _ struct{} `type:"structure"` @@ -2272,6 +2589,22 @@ func (s *EBSOptionsStatus) SetStatus(v *OptionStatus) *EBSOptionsStatus { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EBSOptionsStatus) MarshalFields(e protocol.FieldEncoder) error { + if s.Options != nil { + v := s.Options + + e.SetFields(protocol.BodyTarget, "Options", v, protocol.Metadata{}) + } + if s.Status != nil { + v := s.Status + + e.SetFields(protocol.BodyTarget, "Status", v, protocol.Metadata{}) + } + + return nil +} + // Specifies the configuration for the domain cluster, such as the type and // number of instances. type ElasticsearchClusterConfig struct { @@ -2346,6 +2679,42 @@ func (s *ElasticsearchClusterConfig) SetZoneAwarenessEnabled(v bool) *Elasticsea return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ElasticsearchClusterConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.DedicatedMasterCount != nil { + v := *s.DedicatedMasterCount + + e.SetValue(protocol.BodyTarget, "DedicatedMasterCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.DedicatedMasterEnabled != nil { + v := *s.DedicatedMasterEnabled + + e.SetValue(protocol.BodyTarget, "DedicatedMasterEnabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.DedicatedMasterType != nil { + v := *s.DedicatedMasterType + + e.SetValue(protocol.BodyTarget, "DedicatedMasterType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InstanceCount != nil { + v := *s.InstanceCount + + e.SetValue(protocol.BodyTarget, "InstanceCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.InstanceType != nil { + v := *s.InstanceType + + e.SetValue(protocol.BodyTarget, "InstanceType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ZoneAwarenessEnabled != nil { + v := *s.ZoneAwarenessEnabled + + e.SetValue(protocol.BodyTarget, "ZoneAwarenessEnabled", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // Specifies the configuration status for the specified Elasticsearch domain. type ElasticsearchClusterConfigStatus struct { _ struct{} `type:"structure"` @@ -2384,6 +2753,22 @@ func (s *ElasticsearchClusterConfigStatus) SetStatus(v *OptionStatus) *Elasticse return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ElasticsearchClusterConfigStatus) MarshalFields(e protocol.FieldEncoder) error { + if s.Options != nil { + v := s.Options + + e.SetFields(protocol.BodyTarget, "Options", v, protocol.Metadata{}) + } + if s.Status != nil { + v := s.Status + + e.SetFields(protocol.BodyTarget, "Status", v, protocol.Metadata{}) + } + + return nil +} + // The configuration of an Elasticsearch domain. type ElasticsearchDomainConfig struct { _ struct{} `type:"structure"` @@ -2474,6 +2859,52 @@ func (s *ElasticsearchDomainConfig) SetVPCOptions(v *VPCDerivedInfoStatus) *Elas return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ElasticsearchDomainConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.AccessPolicies != nil { + v := s.AccessPolicies + + e.SetFields(protocol.BodyTarget, "AccessPolicies", v, protocol.Metadata{}) + } + if s.AdvancedOptions != nil { + v := s.AdvancedOptions + + e.SetFields(protocol.BodyTarget, "AdvancedOptions", v, protocol.Metadata{}) + } + if s.EBSOptions != nil { + v := s.EBSOptions + + e.SetFields(protocol.BodyTarget, "EBSOptions", v, protocol.Metadata{}) + } + if s.ElasticsearchClusterConfig != nil { + v := s.ElasticsearchClusterConfig + + e.SetFields(protocol.BodyTarget, "ElasticsearchClusterConfig", v, protocol.Metadata{}) + } + if s.ElasticsearchVersion != nil { + v := s.ElasticsearchVersion + + e.SetFields(protocol.BodyTarget, "ElasticsearchVersion", v, protocol.Metadata{}) + } + if s.LogPublishingOptions != nil { + v := s.LogPublishingOptions + + e.SetFields(protocol.BodyTarget, "LogPublishingOptions", v, protocol.Metadata{}) + } + if s.SnapshotOptions != nil { + v := s.SnapshotOptions + + e.SetFields(protocol.BodyTarget, "SnapshotOptions", v, protocol.Metadata{}) + } + if s.VPCOptions != nil { + v := s.VPCOptions + + e.SetFields(protocol.BodyTarget, "VPCOptions", v, protocol.Metadata{}) + } + + return nil +} + // The current status of an Elasticsearch domain. type ElasticsearchDomainStatus struct { _ struct{} `type:"structure"` @@ -2656,6 +3087,100 @@ func (s *ElasticsearchDomainStatus) SetVPCOptions(v *VPCDerivedInfo) *Elasticsea return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ElasticsearchDomainStatus) MarshalFields(e protocol.FieldEncoder) error { + if s.ARN != nil { + v := *s.ARN + + e.SetValue(protocol.BodyTarget, "ARN", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AccessPolicies != nil { + v := *s.AccessPolicies + + e.SetValue(protocol.BodyTarget, "AccessPolicies", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.AdvancedOptions) > 0 { + v := s.AdvancedOptions + + e.SetMap(protocol.BodyTarget, "AdvancedOptions", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.Created != nil { + v := *s.Created + + e.SetValue(protocol.BodyTarget, "Created", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Deleted != nil { + v := *s.Deleted + + e.SetValue(protocol.BodyTarget, "Deleted", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.DomainId != nil { + v := *s.DomainId + + e.SetValue(protocol.BodyTarget, "DomainId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.BodyTarget, "DomainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EBSOptions != nil { + v := s.EBSOptions + + e.SetFields(protocol.BodyTarget, "EBSOptions", v, protocol.Metadata{}) + } + if s.ElasticsearchClusterConfig != nil { + v := s.ElasticsearchClusterConfig + + e.SetFields(protocol.BodyTarget, "ElasticsearchClusterConfig", v, protocol.Metadata{}) + } + if s.ElasticsearchVersion != nil { + v := *s.ElasticsearchVersion + + e.SetValue(protocol.BodyTarget, "ElasticsearchVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Endpoint != nil { + v := *s.Endpoint + + e.SetValue(protocol.BodyTarget, "Endpoint", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Endpoints) > 0 { + v := s.Endpoints + + e.SetMap(protocol.BodyTarget, "Endpoints", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if len(s.LogPublishingOptions) > 0 { + v := s.LogPublishingOptions + + e.SetMap(protocol.BodyTarget, "LogPublishingOptions", encodeLogPublishingOptionMap(v), protocol.Metadata{}) + } + if s.Processing != nil { + v := *s.Processing + + e.SetValue(protocol.BodyTarget, "Processing", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.SnapshotOptions != nil { + v := s.SnapshotOptions + + e.SetFields(protocol.BodyTarget, "SnapshotOptions", v, protocol.Metadata{}) + } + if s.VPCOptions != nil { + v := s.VPCOptions + + e.SetFields(protocol.BodyTarget, "VPCOptions", v, protocol.Metadata{}) + } + + return nil +} + +func encodeElasticsearchDomainStatusList(vs []*ElasticsearchDomainStatus) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Status of the Elasticsearch version options for the specified Elasticsearch // domain. type ElasticsearchVersionStatus struct { @@ -2695,6 +3220,22 @@ func (s *ElasticsearchVersionStatus) SetStatus(v *OptionStatus) *ElasticsearchVe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ElasticsearchVersionStatus) MarshalFields(e protocol.FieldEncoder) error { + if s.Options != nil { + v := *s.Options + + e.SetValue(protocol.BodyTarget, "Options", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := s.Status + + e.SetFields(protocol.BodyTarget, "Status", v, protocol.Metadata{}) + } + + return nil +} + // InstanceCountLimits represents the limits on number of instances that be // created in Amazon Elasticsearch for given InstanceType. type InstanceCountLimits struct { @@ -2729,6 +3270,22 @@ func (s *InstanceCountLimits) SetMinimumInstanceCount(v int64) *InstanceCountLim return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InstanceCountLimits) MarshalFields(e protocol.FieldEncoder) error { + if s.MaximumInstanceCount != nil { + v := *s.MaximumInstanceCount + + e.SetValue(protocol.BodyTarget, "MaximumInstanceCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MinimumInstanceCount != nil { + v := *s.MinimumInstanceCount + + e.SetValue(protocol.BodyTarget, "MinimumInstanceCount", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // InstanceLimits represents the list of instance related attributes that are // available for given InstanceType. type InstanceLimits struct { @@ -2755,6 +3312,17 @@ func (s *InstanceLimits) SetInstanceCountLimits(v *InstanceCountLimits) *Instanc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InstanceLimits) MarshalFields(e protocol.FieldEncoder) error { + if s.InstanceCountLimits != nil { + v := s.InstanceCountLimits + + e.SetFields(protocol.BodyTarget, "InstanceCountLimits", v, protocol.Metadata{}) + } + + return nil +} + // Limits for given InstanceType and for each of it's role. Limits contains following StorageTypes, InstanceLimitsand AdditionalLimits type Limits struct { _ struct{} `type:"structure"` @@ -2800,6 +3368,35 @@ func (s *Limits) SetStorageTypes(v []*StorageType) *Limits { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Limits) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AdditionalLimits) > 0 { + v := s.AdditionalLimits + + e.SetList(protocol.BodyTarget, "AdditionalLimits", encodeAdditionalLimitList(v), protocol.Metadata{}) + } + if s.InstanceLimits != nil { + v := s.InstanceLimits + + e.SetFields(protocol.BodyTarget, "InstanceLimits", v, protocol.Metadata{}) + } + if len(s.StorageTypes) > 0 { + v := s.StorageTypes + + e.SetList(protocol.BodyTarget, "StorageTypes", encodeStorageTypeList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeLimitsMap(vs map[string]*Limits) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + type ListDomainNamesInput struct { _ struct{} `type:"structure"` } @@ -2814,6 +3411,12 @@ func (s ListDomainNamesInput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDomainNamesInput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The result of a ListDomainNames operation. Contains the names of all Elasticsearch // domains owned by this account. type ListDomainNamesOutput struct { @@ -2839,6 +3442,17 @@ func (s *ListDomainNamesOutput) SetDomainNames(v []*DomainInfo) *ListDomainNames return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDomainNamesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.DomainNames) > 0 { + v := s.DomainNames + + e.SetList(protocol.BodyTarget, "DomainNames", encodeDomainInfoList(v), protocol.Metadata{}) + } + + return nil +} + // Container for the parameters to the ListElasticsearchInstanceTypes operation. type ListElasticsearchInstanceTypesInput struct { _ struct{} `type:"structure"` @@ -2913,6 +3527,32 @@ func (s *ListElasticsearchInstanceTypesInput) SetNextToken(v string) *ListElasti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListElasticsearchInstanceTypesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.QueryTarget, "domainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ElasticsearchVersion != nil { + v := *s.ElasticsearchVersion + + e.SetValue(protocol.PathTarget, "ElasticsearchVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Container for the parameters returned by ListElasticsearchInstanceTypes operation. type ListElasticsearchInstanceTypesOutput struct { _ struct{} `type:"structure"` @@ -2949,6 +3589,22 @@ func (s *ListElasticsearchInstanceTypesOutput) SetNextToken(v string) *ListElast return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListElasticsearchInstanceTypesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ElasticsearchInstanceTypes) > 0 { + v := s.ElasticsearchInstanceTypes + + e.SetList(protocol.BodyTarget, "ElasticsearchInstanceTypes", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Container for the parameters to the ListElasticsearchVersions operation. // Use MaxResults to control the maximum number of results to retrieve in a // single call. @@ -2990,6 +3646,22 @@ func (s *ListElasticsearchVersionsInput) SetNextToken(v string) *ListElasticsear return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListElasticsearchVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Container for the parameters for response received from ListElasticsearchVersions // operation. type ListElasticsearchVersionsOutput struct { @@ -3026,6 +3698,22 @@ func (s *ListElasticsearchVersionsOutput) SetNextToken(v string) *ListElasticsea return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListElasticsearchVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ElasticsearchVersions) > 0 { + v := s.ElasticsearchVersions + + e.SetList(protocol.BodyTarget, "ElasticsearchVersions", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Container for the parameters to the ListTags operation. Specify the ARN for // the Elasticsearch domain to which the tags are attached that you want to // view are attached. @@ -3068,6 +3756,17 @@ func (s *ListTagsInput) SetARN(v string) *ListTagsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTagsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ARN != nil { + v := *s.ARN + + e.SetValue(protocol.QueryTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The result of a ListTags operation. Contains tags for all requested Elasticsearch // domains. type ListTagsOutput struct { @@ -3093,6 +3792,17 @@ func (s *ListTagsOutput) SetTagList(v []*Tag) *ListTagsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTagsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.TagList) > 0 { + v := s.TagList + + e.SetList(protocol.BodyTarget, "TagList", encodeTagList(v), protocol.Metadata{}) + } + + return nil +} + // Log Publishing option that is set for given domain. Attributes and their details: CloudWatchLogsLogGroupArn: ARN of the Cloudwatch // log group to which log needs to be published. // Enabled: Whether the log publishing for given log type is enabled or not @@ -3128,6 +3838,30 @@ func (s *LogPublishingOption) SetEnabled(v bool) *LogPublishingOption { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LogPublishingOption) MarshalFields(e protocol.FieldEncoder) error { + if s.CloudWatchLogsLogGroupArn != nil { + v := *s.CloudWatchLogsLogGroupArn + + e.SetValue(protocol.BodyTarget, "CloudWatchLogsLogGroupArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeLogPublishingOptionMap(vs map[string]*LogPublishingOption) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // The configured log publishing options for the domain and their current status. type LogPublishingOptionsStatus struct { _ struct{} `type:"structure"` @@ -3162,6 +3896,22 @@ func (s *LogPublishingOptionsStatus) SetStatus(v *OptionStatus) *LogPublishingOp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LogPublishingOptionsStatus) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Options) > 0 { + v := s.Options + + e.SetMap(protocol.BodyTarget, "Options", encodeLogPublishingOptionMap(v), protocol.Metadata{}) + } + if s.Status != nil { + v := s.Status + + e.SetFields(protocol.BodyTarget, "Status", v, protocol.Metadata{}) + } + + return nil +} + // Provides the current status of the entity. type OptionStatus struct { _ struct{} `type:"structure"` @@ -3228,6 +3978,37 @@ func (s *OptionStatus) SetUpdateVersion(v int64) *OptionStatus { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OptionStatus) MarshalFields(e protocol.FieldEncoder) error { + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.PendingDeletion != nil { + v := *s.PendingDeletion + + e.SetValue(protocol.BodyTarget, "PendingDeletion", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "State", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UpdateDate != nil { + v := *s.UpdateDate + + e.SetValue(protocol.BodyTarget, "UpdateDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.UpdateVersion != nil { + v := *s.UpdateVersion + + e.SetValue(protocol.BodyTarget, "UpdateVersion", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Container for the parameters to the RemoveTags operation. Specify the ARN // for the Elasticsearch domain from which you want to remove the specified // TagKey. @@ -3285,6 +4066,22 @@ func (s *RemoveTagsInput) SetTagKeys(v []*string) *RemoveTagsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RemoveTagsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ARN != nil { + v := *s.ARN + + e.SetValue(protocol.BodyTarget, "ARN", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TagKeys) > 0 { + v := s.TagKeys + + e.SetList(protocol.BodyTarget, "TagKeys", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + type RemoveTagsOutput struct { _ struct{} `type:"structure"` } @@ -3299,6 +4096,12 @@ func (s RemoveTagsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RemoveTagsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Specifies the time, in UTC format, when the service takes a daily automated // snapshot of the specified Elasticsearch domain. Default value is 0 hours. type SnapshotOptions struct { @@ -3325,6 +4128,17 @@ func (s *SnapshotOptions) SetAutomatedSnapshotStartHour(v int64) *SnapshotOption return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SnapshotOptions) MarshalFields(e protocol.FieldEncoder) error { + if s.AutomatedSnapshotStartHour != nil { + v := *s.AutomatedSnapshotStartHour + + e.SetValue(protocol.BodyTarget, "AutomatedSnapshotStartHour", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Status of a daily automated snapshot. type SnapshotOptionsStatus struct { _ struct{} `type:"structure"` @@ -3362,6 +4176,22 @@ func (s *SnapshotOptionsStatus) SetStatus(v *OptionStatus) *SnapshotOptionsStatu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SnapshotOptionsStatus) MarshalFields(e protocol.FieldEncoder) error { + if s.Options != nil { + v := s.Options + + e.SetFields(protocol.BodyTarget, "Options", v, protocol.Metadata{}) + } + if s.Status != nil { + v := s.Status + + e.SetFields(protocol.BodyTarget, "Status", v, protocol.Metadata{}) + } + + return nil +} + // StorageTypes represents the list of storage related types and their attributes // that are available for given InstanceType. type StorageType struct { @@ -3412,6 +4242,35 @@ func (s *StorageType) SetStorageTypeName(v string) *StorageType { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StorageType) MarshalFields(e protocol.FieldEncoder) error { + if s.StorageSubTypeName != nil { + v := *s.StorageSubTypeName + + e.SetValue(protocol.BodyTarget, "StorageSubTypeName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.StorageTypeLimits) > 0 { + v := s.StorageTypeLimits + + e.SetList(protocol.BodyTarget, "StorageTypeLimits", encodeStorageTypeLimitList(v), protocol.Metadata{}) + } + if s.StorageTypeName != nil { + v := *s.StorageTypeName + + e.SetValue(protocol.BodyTarget, "StorageTypeName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeStorageTypeList(vs []*StorageType) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Limits that are applicable for given storage type. type StorageTypeLimit struct { _ struct{} `type:"structure"` @@ -3454,6 +4313,30 @@ func (s *StorageTypeLimit) SetLimitValues(v []*string) *StorageTypeLimit { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StorageTypeLimit) MarshalFields(e protocol.FieldEncoder) error { + if s.LimitName != nil { + v := *s.LimitName + + e.SetValue(protocol.BodyTarget, "LimitName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.LimitValues) > 0 { + v := s.LimitValues + + e.SetList(protocol.BodyTarget, "LimitValues", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeStorageTypeLimitList(vs []*StorageTypeLimit) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Specifies a key value pair for a resource tag. type Tag struct { _ struct{} `type:"structure"` @@ -3514,6 +4397,30 @@ func (s *Tag) SetValue(v string) *Tag { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Tag) MarshalFields(e protocol.FieldEncoder) error { + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTagList(vs []*Tag) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Container for the parameters to the UpdateElasticsearchDomain operation. // Specifies the type and number of instances in the domain cluster. type UpdateElasticsearchDomainConfigInput struct { @@ -3627,6 +4534,52 @@ func (s *UpdateElasticsearchDomainConfigInput) SetVPCOptions(v *VPCOptions) *Upd return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateElasticsearchDomainConfigInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccessPolicies != nil { + v := *s.AccessPolicies + + e.SetValue(protocol.BodyTarget, "AccessPolicies", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.AdvancedOptions) > 0 { + v := s.AdvancedOptions + + e.SetMap(protocol.BodyTarget, "AdvancedOptions", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.DomainName != nil { + v := *s.DomainName + + e.SetValue(protocol.PathTarget, "DomainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EBSOptions != nil { + v := s.EBSOptions + + e.SetFields(protocol.BodyTarget, "EBSOptions", v, protocol.Metadata{}) + } + if s.ElasticsearchClusterConfig != nil { + v := s.ElasticsearchClusterConfig + + e.SetFields(protocol.BodyTarget, "ElasticsearchClusterConfig", v, protocol.Metadata{}) + } + if len(s.LogPublishingOptions) > 0 { + v := s.LogPublishingOptions + + e.SetMap(protocol.BodyTarget, "LogPublishingOptions", encodeLogPublishingOptionMap(v), protocol.Metadata{}) + } + if s.SnapshotOptions != nil { + v := s.SnapshotOptions + + e.SetFields(protocol.BodyTarget, "SnapshotOptions", v, protocol.Metadata{}) + } + if s.VPCOptions != nil { + v := s.VPCOptions + + e.SetFields(protocol.BodyTarget, "VPCOptions", v, protocol.Metadata{}) + } + + return nil +} + // The result of an UpdateElasticsearchDomain request. Contains the status of // the Elasticsearch domain being updated. type UpdateElasticsearchDomainConfigOutput struct { @@ -3654,6 +4607,17 @@ func (s *UpdateElasticsearchDomainConfigOutput) SetDomainConfig(v *Elasticsearch return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateElasticsearchDomainConfigOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DomainConfig != nil { + v := s.DomainConfig + + e.SetFields(protocol.BodyTarget, "DomainConfig", v, protocol.Metadata{}) + } + + return nil +} + // Options to specify the subnets and security groups for VPC endpoint. For // more information, see VPC Endpoints for Amazon Elasticsearch Service Domains // (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html). @@ -3709,6 +4673,32 @@ func (s *VPCDerivedInfo) SetVPCId(v string) *VPCDerivedInfo { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VPCDerivedInfo) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AvailabilityZones) > 0 { + v := s.AvailabilityZones + + e.SetList(protocol.BodyTarget, "AvailabilityZones", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.SecurityGroupIds) > 0 { + v := s.SecurityGroupIds + + e.SetList(protocol.BodyTarget, "SecurityGroupIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.SubnetIds) > 0 { + v := s.SubnetIds + + e.SetList(protocol.BodyTarget, "SubnetIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.VPCId != nil { + v := *s.VPCId + + e.SetValue(protocol.BodyTarget, "VPCId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Status of the VPC options for the specified Elasticsearch domain. type VPCDerivedInfoStatus struct { _ struct{} `type:"structure"` @@ -3746,6 +4736,22 @@ func (s *VPCDerivedInfoStatus) SetStatus(v *OptionStatus) *VPCDerivedInfoStatus return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VPCDerivedInfoStatus) MarshalFields(e protocol.FieldEncoder) error { + if s.Options != nil { + v := s.Options + + e.SetFields(protocol.BodyTarget, "Options", v, protocol.Metadata{}) + } + if s.Status != nil { + v := s.Status + + e.SetFields(protocol.BodyTarget, "Status", v, protocol.Metadata{}) + } + + return nil +} + // Options to specify the subnets and security groups for VPC endpoint. For // more information, see VPC Endpoints for Amazon Elasticsearch Service Domains // (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html). @@ -3781,6 +4787,22 @@ func (s *VPCOptions) SetSubnetIds(v []*string) *VPCOptions { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VPCOptions) MarshalFields(e protocol.FieldEncoder) error { + if len(s.SecurityGroupIds) > 0 { + v := s.SecurityGroupIds + + e.SetList(protocol.BodyTarget, "SecurityGroupIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.SubnetIds) > 0 { + v := s.SubnetIds + + e.SetList(protocol.BodyTarget, "SubnetIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + const ( // ESPartitionInstanceTypeM3MediumElasticsearch is a ESPartitionInstanceType enum value ESPartitionInstanceTypeM3MediumElasticsearch = "m3.medium.elasticsearch" diff --git a/service/elastictranscoder/api.go b/service/elastictranscoder/api.go index 96ca242ffb4..fb90cc85308 100644 --- a/service/elastictranscoder/api.go +++ b/service/elastictranscoder/api.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" ) const opCancelJob = "CancelJob" @@ -1986,6 +1987,55 @@ func (s *Artwork) SetSizingPolicy(v string) *Artwork { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Artwork) MarshalFields(e protocol.FieldEncoder) error { + if s.AlbumArtFormat != nil { + v := *s.AlbumArtFormat + + e.SetValue(protocol.BodyTarget, "AlbumArtFormat", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Encryption != nil { + v := s.Encryption + + e.SetFields(protocol.BodyTarget, "Encryption", v, protocol.Metadata{}) + } + if s.InputKey != nil { + v := *s.InputKey + + e.SetValue(protocol.BodyTarget, "InputKey", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxHeight != nil { + v := *s.MaxHeight + + e.SetValue(protocol.BodyTarget, "MaxHeight", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxWidth != nil { + v := *s.MaxWidth + + e.SetValue(protocol.BodyTarget, "MaxWidth", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PaddingPolicy != nil { + v := *s.PaddingPolicy + + e.SetValue(protocol.BodyTarget, "PaddingPolicy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SizingPolicy != nil { + v := *s.SizingPolicy + + e.SetValue(protocol.BodyTarget, "SizingPolicy", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeArtworkList(vs []*Artwork) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Options associated with your audio codec. type AudioCodecOptions struct { _ struct{} `type:"structure"` @@ -2079,6 +2129,32 @@ func (s *AudioCodecOptions) SetSigned(v string) *AudioCodecOptions { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioCodecOptions) MarshalFields(e protocol.FieldEncoder) error { + if s.BitDepth != nil { + v := *s.BitDepth + + e.SetValue(protocol.BodyTarget, "BitDepth", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BitOrder != nil { + v := *s.BitOrder + + e.SetValue(protocol.BodyTarget, "BitOrder", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Profile != nil { + v := *s.Profile + + e.SetValue(protocol.BodyTarget, "Profile", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Signed != nil { + v := *s.Signed + + e.SetValue(protocol.BodyTarget, "Signed", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Parameters required for transcoding audio. type AudioParameters struct { _ struct{} `type:"structure"` @@ -2289,6 +2365,42 @@ func (s *AudioParameters) SetSampleRate(v string) *AudioParameters { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioParameters) MarshalFields(e protocol.FieldEncoder) error { + if s.AudioPackingMode != nil { + v := *s.AudioPackingMode + + e.SetValue(protocol.BodyTarget, "AudioPackingMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BitRate != nil { + v := *s.BitRate + + e.SetValue(protocol.BodyTarget, "BitRate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Channels != nil { + v := *s.Channels + + e.SetValue(protocol.BodyTarget, "Channels", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Codec != nil { + v := *s.Codec + + e.SetValue(protocol.BodyTarget, "Codec", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CodecOptions != nil { + v := s.CodecOptions + + e.SetFields(protocol.BodyTarget, "CodecOptions", v, protocol.Metadata{}) + } + if s.SampleRate != nil { + v := *s.SampleRate + + e.SetValue(protocol.BodyTarget, "SampleRate", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The CancelJobRequest structure. type CancelJobInput struct { _ struct{} `type:"structure"` @@ -2331,6 +2443,17 @@ func (s *CancelJobInput) SetId(v string) *CancelJobInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CancelJobInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The response body contains a JSON object. If the job is successfully canceled, // the value of Success is true. type CancelJobOutput struct { @@ -2347,6 +2470,12 @@ func (s CancelJobOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CancelJobOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The file format of the output captions. If you leave this value blank, Elastic // Transcoder returns an error. type CaptionFormat struct { @@ -2431,6 +2560,35 @@ func (s *CaptionFormat) SetPattern(v string) *CaptionFormat { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CaptionFormat) MarshalFields(e protocol.FieldEncoder) error { + if s.Encryption != nil { + v := s.Encryption + + e.SetFields(protocol.BodyTarget, "Encryption", v, protocol.Metadata{}) + } + if s.Format != nil { + v := *s.Format + + e.SetValue(protocol.BodyTarget, "Format", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Pattern != nil { + v := *s.Pattern + + e.SetValue(protocol.BodyTarget, "Pattern", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCaptionFormatList(vs []*CaptionFormat) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A source file for the input sidecar captions used during the transcoding // process. type CaptionSource struct { @@ -2529,6 +2687,45 @@ func (s *CaptionSource) SetTimeOffset(v string) *CaptionSource { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CaptionSource) MarshalFields(e protocol.FieldEncoder) error { + if s.Encryption != nil { + v := s.Encryption + + e.SetFields(protocol.BodyTarget, "Encryption", v, protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Label != nil { + v := *s.Label + + e.SetValue(protocol.BodyTarget, "Label", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Language != nil { + v := *s.Language + + e.SetValue(protocol.BodyTarget, "Language", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimeOffset != nil { + v := *s.TimeOffset + + e.SetValue(protocol.BodyTarget, "TimeOffset", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCaptionSourceList(vs []*CaptionSource) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The captions to be created, if any. type Captions struct { _ struct{} `type:"structure"` @@ -2611,6 +2808,27 @@ func (s *Captions) SetMergePolicy(v string) *Captions { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Captions) MarshalFields(e protocol.FieldEncoder) error { + if len(s.CaptionFormats) > 0 { + v := s.CaptionFormats + + e.SetList(protocol.BodyTarget, "CaptionFormats", encodeCaptionFormatList(v), protocol.Metadata{}) + } + if len(s.CaptionSources) > 0 { + v := s.CaptionSources + + e.SetList(protocol.BodyTarget, "CaptionSources", encodeCaptionSourceList(v), protocol.Metadata{}) + } + if s.MergePolicy != nil { + v := *s.MergePolicy + + e.SetValue(protocol.BodyTarget, "MergePolicy", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Settings for one clip in a composition. All jobs in a playlist must have // the same clip settings. type Clip struct { @@ -2636,6 +2854,25 @@ func (s *Clip) SetTimeSpan(v *TimeSpan) *Clip { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Clip) MarshalFields(e protocol.FieldEncoder) error { + if s.TimeSpan != nil { + v := s.TimeSpan + + e.SetFields(protocol.BodyTarget, "TimeSpan", v, protocol.Metadata{}) + } + + return nil +} + +func encodeClipList(vs []*Clip) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The CreateJobRequest structure. type CreateJobInput struct { _ struct{} `type:"structure"` @@ -2799,6 +3036,52 @@ func (s *CreateJobInput) SetUserMetadata(v map[string]*string) *CreateJobInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateJobInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Input != nil { + v := s.Input + + e.SetFields(protocol.BodyTarget, "Input", v, protocol.Metadata{}) + } + if len(s.Inputs) > 0 { + v := s.Inputs + + e.SetList(protocol.BodyTarget, "Inputs", encodeJobInputList(v), protocol.Metadata{}) + } + if s.Output != nil { + v := s.Output + + e.SetFields(protocol.BodyTarget, "Output", v, protocol.Metadata{}) + } + if s.OutputKeyPrefix != nil { + v := *s.OutputKeyPrefix + + e.SetValue(protocol.BodyTarget, "OutputKeyPrefix", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Outputs) > 0 { + v := s.Outputs + + e.SetList(protocol.BodyTarget, "Outputs", encodeCreateJobOutputList(v), protocol.Metadata{}) + } + if s.PipelineId != nil { + v := *s.PipelineId + + e.SetValue(protocol.BodyTarget, "PipelineId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Playlists) > 0 { + v := s.Playlists + + e.SetList(protocol.BodyTarget, "Playlists", encodeCreateJobPlaylistList(v), protocol.Metadata{}) + } + if len(s.UserMetadata) > 0 { + v := s.UserMetadata + + e.SetMap(protocol.BodyTarget, "UserMetadata", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // The CreateJobOutput structure. type CreateJobOutput struct { _ struct{} `type:"structure"` @@ -3054,6 +3337,75 @@ func (s *CreateJobOutput) SetWatermarks(v []*JobWatermark) *CreateJobOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateJobOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AlbumArt != nil { + v := s.AlbumArt + + e.SetFields(protocol.BodyTarget, "AlbumArt", v, protocol.Metadata{}) + } + if s.Captions != nil { + v := s.Captions + + e.SetFields(protocol.BodyTarget, "Captions", v, protocol.Metadata{}) + } + if len(s.Composition) > 0 { + v := s.Composition + + e.SetList(protocol.BodyTarget, "Composition", encodeClipList(v), protocol.Metadata{}) + } + if s.Encryption != nil { + v := s.Encryption + + e.SetFields(protocol.BodyTarget, "Encryption", v, protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PresetId != nil { + v := *s.PresetId + + e.SetValue(protocol.BodyTarget, "PresetId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Rotate != nil { + v := *s.Rotate + + e.SetValue(protocol.BodyTarget, "Rotate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentDuration != nil { + v := *s.SegmentDuration + + e.SetValue(protocol.BodyTarget, "SegmentDuration", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThumbnailEncryption != nil { + v := s.ThumbnailEncryption + + e.SetFields(protocol.BodyTarget, "ThumbnailEncryption", v, protocol.Metadata{}) + } + if s.ThumbnailPattern != nil { + v := *s.ThumbnailPattern + + e.SetValue(protocol.BodyTarget, "ThumbnailPattern", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Watermarks) > 0 { + v := s.Watermarks + + e.SetList(protocol.BodyTarget, "Watermarks", encodeJobWatermarkList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCreateJobOutputList(vs []*CreateJobOutput) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information about the master playlist. type CreateJobPlaylist struct { _ struct{} `type:"structure"` @@ -3179,6 +3531,45 @@ func (s *CreateJobPlaylist) SetPlayReadyDrm(v *PlayReadyDrm) *CreateJobPlaylist return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateJobPlaylist) MarshalFields(e protocol.FieldEncoder) error { + if s.Format != nil { + v := *s.Format + + e.SetValue(protocol.BodyTarget, "Format", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HlsContentProtection != nil { + v := s.HlsContentProtection + + e.SetFields(protocol.BodyTarget, "HlsContentProtection", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.OutputKeys) > 0 { + v := s.OutputKeys + + e.SetList(protocol.BodyTarget, "OutputKeys", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.PlayReadyDrm != nil { + v := s.PlayReadyDrm + + e.SetFields(protocol.BodyTarget, "PlayReadyDrm", v, protocol.Metadata{}) + } + + return nil +} + +func encodeCreateJobPlaylistList(vs []*CreateJobPlaylist) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The CreateJobResponse structure. type CreateJobResponse struct { _ struct{} `type:"structure"` @@ -3204,6 +3595,17 @@ func (s *CreateJobResponse) SetJob(v *Job) *CreateJobResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateJobResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.Job != nil { + v := s.Job + + e.SetFields(protocol.BodyTarget, "Job", v, protocol.Metadata{}) + } + + return nil +} + // The CreatePipelineRequest structure. type CreatePipelineInput struct { _ struct{} `type:"structure"` @@ -3511,6 +3913,52 @@ func (s *CreatePipelineInput) SetThumbnailConfig(v *PipelineOutputConfig) *Creat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreatePipelineInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AwsKmsKeyArn != nil { + v := *s.AwsKmsKeyArn + + e.SetValue(protocol.BodyTarget, "AwsKmsKeyArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentConfig != nil { + v := s.ContentConfig + + e.SetFields(protocol.BodyTarget, "ContentConfig", v, protocol.Metadata{}) + } + if s.InputBucket != nil { + v := *s.InputBucket + + e.SetValue(protocol.BodyTarget, "InputBucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Notifications != nil { + v := s.Notifications + + e.SetFields(protocol.BodyTarget, "Notifications", v, protocol.Metadata{}) + } + if s.OutputBucket != nil { + v := *s.OutputBucket + + e.SetValue(protocol.BodyTarget, "OutputBucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Role != nil { + v := *s.Role + + e.SetValue(protocol.BodyTarget, "Role", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThumbnailConfig != nil { + v := s.ThumbnailConfig + + e.SetFields(protocol.BodyTarget, "ThumbnailConfig", v, protocol.Metadata{}) + } + + return nil +} + // When you create a pipeline, Elastic Transcoder returns the values that you // specified in the request. type CreatePipelineOutput struct { @@ -3551,6 +3999,22 @@ func (s *CreatePipelineOutput) SetWarnings(v []*Warning) *CreatePipelineOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreatePipelineOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Pipeline != nil { + v := s.Pipeline + + e.SetFields(protocol.BodyTarget, "Pipeline", v, protocol.Metadata{}) + } + if len(s.Warnings) > 0 { + v := s.Warnings + + e.SetList(protocol.BodyTarget, "Warnings", encodeWarningList(v), protocol.Metadata{}) + } + + return nil +} + // The CreatePresetRequest structure. type CreatePresetInput struct { _ struct{} `type:"structure"` @@ -3651,6 +4115,42 @@ func (s *CreatePresetInput) SetVideo(v *VideoParameters) *CreatePresetInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreatePresetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Audio != nil { + v := s.Audio + + e.SetFields(protocol.BodyTarget, "Audio", v, protocol.Metadata{}) + } + if s.Container != nil { + v := *s.Container + + e.SetValue(protocol.BodyTarget, "Container", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Thumbnails != nil { + v := s.Thumbnails + + e.SetFields(protocol.BodyTarget, "Thumbnails", v, protocol.Metadata{}) + } + if s.Video != nil { + v := s.Video + + e.SetFields(protocol.BodyTarget, "Video", v, protocol.Metadata{}) + } + + return nil +} + // The CreatePresetResponse structure. type CreatePresetOutput struct { _ struct{} `type:"structure"` @@ -3688,6 +4188,22 @@ func (s *CreatePresetOutput) SetWarning(v string) *CreatePresetOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreatePresetOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Preset != nil { + v := s.Preset + + e.SetFields(protocol.BodyTarget, "Preset", v, protocol.Metadata{}) + } + if s.Warning != nil { + v := *s.Warning + + e.SetValue(protocol.BodyTarget, "Warning", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The DeletePipelineRequest structure. type DeletePipelineInput struct { _ struct{} `type:"structure"` @@ -3727,6 +4243,17 @@ func (s *DeletePipelineInput) SetId(v string) *DeletePipelineInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeletePipelineInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The DeletePipelineResponse structure. type DeletePipelineOutput struct { _ struct{} `type:"structure"` @@ -3742,6 +4269,12 @@ func (s DeletePipelineOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeletePipelineOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The DeletePresetRequest structure. type DeletePresetInput struct { _ struct{} `type:"structure"` @@ -3781,6 +4314,17 @@ func (s *DeletePresetInput) SetId(v string) *DeletePresetInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeletePresetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The DeletePresetResponse structure. type DeletePresetOutput struct { _ struct{} `type:"structure"` @@ -3796,6 +4340,12 @@ func (s DeletePresetOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeletePresetOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The detected properties of the input file. Elastic Transcoder identifies // these values from the input file. type DetectedProperties struct { @@ -3857,6 +4407,37 @@ func (s *DetectedProperties) SetWidth(v int64) *DetectedProperties { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DetectedProperties) MarshalFields(e protocol.FieldEncoder) error { + if s.DurationMillis != nil { + v := *s.DurationMillis + + e.SetValue(protocol.BodyTarget, "DurationMillis", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FileSize != nil { + v := *s.FileSize + + e.SetValue(protocol.BodyTarget, "FileSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FrameRate != nil { + v := *s.FrameRate + + e.SetValue(protocol.BodyTarget, "FrameRate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Height != nil { + v := *s.Height + + e.SetValue(protocol.BodyTarget, "Height", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Width != nil { + v := *s.Width + + e.SetValue(protocol.BodyTarget, "Width", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The encryption settings, if any, that are used for decrypting your input // files or encrypting your output files. If your input file is encrypted, you // must specify the mode that Elastic Transcoder uses to decrypt your file, @@ -3960,6 +4541,32 @@ func (s *Encryption) SetMode(v string) *Encryption { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Encryption) MarshalFields(e protocol.FieldEncoder) error { + if s.InitializationVector != nil { + v := *s.InitializationVector + + e.SetValue(protocol.BodyTarget, "InitializationVector", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyMd5 != nil { + v := *s.KeyMd5 + + e.SetValue(protocol.BodyTarget, "KeyMd5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Mode != nil { + v := *s.Mode + + e.SetValue(protocol.BodyTarget, "Mode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The HLS content protection settings, if any, that you want Elastic Transcoder // to apply to your output files. type HlsContentProtection struct { @@ -4057,6 +4664,42 @@ func (s *HlsContentProtection) SetMethod(v string) *HlsContentProtection { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsContentProtection) MarshalFields(e protocol.FieldEncoder) error { + if s.InitializationVector != nil { + v := *s.InitializationVector + + e.SetValue(protocol.BodyTarget, "InitializationVector", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyMd5 != nil { + v := *s.KeyMd5 + + e.SetValue(protocol.BodyTarget, "KeyMd5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyStoragePolicy != nil { + v := *s.KeyStoragePolicy + + e.SetValue(protocol.BodyTarget, "KeyStoragePolicy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LicenseAcquisitionUrl != nil { + v := *s.LicenseAcquisitionUrl + + e.SetValue(protocol.BodyTarget, "LicenseAcquisitionUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Method != nil { + v := *s.Method + + e.SetValue(protocol.BodyTarget, "Method", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The captions to be created, if any. type InputCaptions struct { _ struct{} `type:"structure"` @@ -4129,6 +4772,22 @@ func (s *InputCaptions) SetMergePolicy(v string) *InputCaptions { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputCaptions) MarshalFields(e protocol.FieldEncoder) error { + if len(s.CaptionSources) > 0 { + v := s.CaptionSources + + e.SetList(protocol.BodyTarget, "CaptionSources", encodeCaptionSourceList(v), protocol.Metadata{}) + } + if s.MergePolicy != nil { + v := *s.MergePolicy + + e.SetValue(protocol.BodyTarget, "MergePolicy", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A section of the response body that provides information about the job that // is created. type Job struct { @@ -4296,6 +4955,80 @@ func (s *Job) SetUserMetadata(v map[string]*string) *Job { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Job) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Input != nil { + v := s.Input + + e.SetFields(protocol.BodyTarget, "Input", v, protocol.Metadata{}) + } + if len(s.Inputs) > 0 { + v := s.Inputs + + e.SetList(protocol.BodyTarget, "Inputs", encodeJobInputList(v), protocol.Metadata{}) + } + if s.Output != nil { + v := s.Output + + e.SetFields(protocol.BodyTarget, "Output", v, protocol.Metadata{}) + } + if s.OutputKeyPrefix != nil { + v := *s.OutputKeyPrefix + + e.SetValue(protocol.BodyTarget, "OutputKeyPrefix", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Outputs) > 0 { + v := s.Outputs + + e.SetList(protocol.BodyTarget, "Outputs", encodeJobOutputList(v), protocol.Metadata{}) + } + if s.PipelineId != nil { + v := *s.PipelineId + + e.SetValue(protocol.BodyTarget, "PipelineId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Playlists) > 0 { + v := s.Playlists + + e.SetList(protocol.BodyTarget, "Playlists", encodePlaylistList(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Timing != nil { + v := s.Timing + + e.SetFields(protocol.BodyTarget, "Timing", v, protocol.Metadata{}) + } + if len(s.UserMetadata) > 0 { + v := s.UserMetadata + + e.SetMap(protocol.BodyTarget, "UserMetadata", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + +func encodeJobList(vs []*Job) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The .jpg or .png file associated with an audio file. type JobAlbumArt struct { _ struct{} `type:"structure"` @@ -4362,6 +5095,22 @@ func (s *JobAlbumArt) SetMergePolicy(v string) *JobAlbumArt { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *JobAlbumArt) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Artwork) > 0 { + v := s.Artwork + + e.SetList(protocol.BodyTarget, "Artwork", encodeArtworkList(v), protocol.Metadata{}) + } + if s.MergePolicy != nil { + v := *s.MergePolicy + + e.SetValue(protocol.BodyTarget, "MergePolicy", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Information about the file that you're transcoding. type JobInput struct { _ struct{} `type:"structure"` @@ -4564,6 +5313,70 @@ func (s *JobInput) SetTimeSpan(v *TimeSpan) *JobInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *JobInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AspectRatio != nil { + v := *s.AspectRatio + + e.SetValue(protocol.BodyTarget, "AspectRatio", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Container != nil { + v := *s.Container + + e.SetValue(protocol.BodyTarget, "Container", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DetectedProperties != nil { + v := s.DetectedProperties + + e.SetFields(protocol.BodyTarget, "DetectedProperties", v, protocol.Metadata{}) + } + if s.Encryption != nil { + v := s.Encryption + + e.SetFields(protocol.BodyTarget, "Encryption", v, protocol.Metadata{}) + } + if s.FrameRate != nil { + v := *s.FrameRate + + e.SetValue(protocol.BodyTarget, "FrameRate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InputCaptions != nil { + v := s.InputCaptions + + e.SetFields(protocol.BodyTarget, "InputCaptions", v, protocol.Metadata{}) + } + if s.Interlaced != nil { + v := *s.Interlaced + + e.SetValue(protocol.BodyTarget, "Interlaced", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Resolution != nil { + v := *s.Resolution + + e.SetValue(protocol.BodyTarget, "Resolution", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimeSpan != nil { + v := s.TimeSpan + + e.SetFields(protocol.BodyTarget, "TimeSpan", v, protocol.Metadata{}) + } + + return nil +} + +func encodeJobInputList(vs []*JobInput) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Outputs recommended instead. // // If you specified one output for a job, information about that output. If @@ -4918,6 +5731,125 @@ func (s *JobOutput) SetWidth(v int64) *JobOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *JobOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AlbumArt != nil { + v := s.AlbumArt + + e.SetFields(protocol.BodyTarget, "AlbumArt", v, protocol.Metadata{}) + } + if s.AppliedColorSpaceConversion != nil { + v := *s.AppliedColorSpaceConversion + + e.SetValue(protocol.BodyTarget, "AppliedColorSpaceConversion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Captions != nil { + v := s.Captions + + e.SetFields(protocol.BodyTarget, "Captions", v, protocol.Metadata{}) + } + if len(s.Composition) > 0 { + v := s.Composition + + e.SetList(protocol.BodyTarget, "Composition", encodeClipList(v), protocol.Metadata{}) + } + if s.Duration != nil { + v := *s.Duration + + e.SetValue(protocol.BodyTarget, "Duration", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.DurationMillis != nil { + v := *s.DurationMillis + + e.SetValue(protocol.BodyTarget, "DurationMillis", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Encryption != nil { + v := s.Encryption + + e.SetFields(protocol.BodyTarget, "Encryption", v, protocol.Metadata{}) + } + if s.FileSize != nil { + v := *s.FileSize + + e.SetValue(protocol.BodyTarget, "FileSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FrameRate != nil { + v := *s.FrameRate + + e.SetValue(protocol.BodyTarget, "FrameRate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Height != nil { + v := *s.Height + + e.SetValue(protocol.BodyTarget, "Height", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PresetId != nil { + v := *s.PresetId + + e.SetValue(protocol.BodyTarget, "PresetId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Rotate != nil { + v := *s.Rotate + + e.SetValue(protocol.BodyTarget, "Rotate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentDuration != nil { + v := *s.SegmentDuration + + e.SetValue(protocol.BodyTarget, "SegmentDuration", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusDetail != nil { + v := *s.StatusDetail + + e.SetValue(protocol.BodyTarget, "StatusDetail", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThumbnailEncryption != nil { + v := s.ThumbnailEncryption + + e.SetFields(protocol.BodyTarget, "ThumbnailEncryption", v, protocol.Metadata{}) + } + if s.ThumbnailPattern != nil { + v := *s.ThumbnailPattern + + e.SetValue(protocol.BodyTarget, "ThumbnailPattern", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Watermarks) > 0 { + v := s.Watermarks + + e.SetList(protocol.BodyTarget, "Watermarks", encodeJobWatermarkList(v), protocol.Metadata{}) + } + if s.Width != nil { + v := *s.Width + + e.SetValue(protocol.BodyTarget, "Width", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeJobOutputList(vs []*JobOutput) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Watermarks can be in .png or .jpg format. If you want to display a watermark // that is not rectangular, use the .png format, which supports transparency. type JobWatermark struct { @@ -4988,6 +5920,35 @@ func (s *JobWatermark) SetPresetWatermarkId(v string) *JobWatermark { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *JobWatermark) MarshalFields(e protocol.FieldEncoder) error { + if s.Encryption != nil { + v := s.Encryption + + e.SetFields(protocol.BodyTarget, "Encryption", v, protocol.Metadata{}) + } + if s.InputKey != nil { + v := *s.InputKey + + e.SetValue(protocol.BodyTarget, "InputKey", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PresetWatermarkId != nil { + v := *s.PresetWatermarkId + + e.SetValue(protocol.BodyTarget, "PresetWatermarkId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeJobWatermarkList(vs []*JobWatermark) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The ListJobsByPipelineRequest structure. type ListJobsByPipelineInput struct { _ struct{} `type:"structure"` @@ -5047,6 +6008,27 @@ func (s *ListJobsByPipelineInput) SetPipelineId(v string) *ListJobsByPipelineInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListJobsByPipelineInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Ascending != nil { + v := *s.Ascending + + e.SetValue(protocol.QueryTarget, "Ascending", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageToken != nil { + v := *s.PageToken + + e.SetValue(protocol.QueryTarget, "PageToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PipelineId != nil { + v := *s.PipelineId + + e.SetValue(protocol.PathTarget, "PipelineId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The ListJobsByPipelineResponse structure. type ListJobsByPipelineOutput struct { _ struct{} `type:"structure"` @@ -5082,6 +6064,22 @@ func (s *ListJobsByPipelineOutput) SetNextPageToken(v string) *ListJobsByPipelin return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListJobsByPipelineOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Jobs) > 0 { + v := s.Jobs + + e.SetList(protocol.BodyTarget, "Jobs", encodeJobList(v), protocol.Metadata{}) + } + if s.NextPageToken != nil { + v := *s.NextPageToken + + e.SetValue(protocol.BodyTarget, "NextPageToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The ListJobsByStatusRequest structure. type ListJobsByStatusInput struct { _ struct{} `type:"structure"` @@ -5143,6 +6141,27 @@ func (s *ListJobsByStatusInput) SetStatus(v string) *ListJobsByStatusInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListJobsByStatusInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Ascending != nil { + v := *s.Ascending + + e.SetValue(protocol.QueryTarget, "Ascending", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageToken != nil { + v := *s.PageToken + + e.SetValue(protocol.QueryTarget, "PageToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.PathTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The ListJobsByStatusResponse structure. type ListJobsByStatusOutput struct { _ struct{} `type:"structure"` @@ -5178,6 +6197,22 @@ func (s *ListJobsByStatusOutput) SetNextPageToken(v string) *ListJobsByStatusOut return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListJobsByStatusOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Jobs) > 0 { + v := s.Jobs + + e.SetList(protocol.BodyTarget, "Jobs", encodeJobList(v), protocol.Metadata{}) + } + if s.NextPageToken != nil { + v := *s.NextPageToken + + e.SetValue(protocol.BodyTarget, "NextPageToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The ListPipelineRequest structure. type ListPipelinesInput struct { _ struct{} `type:"structure"` @@ -5214,6 +6249,22 @@ func (s *ListPipelinesInput) SetPageToken(v string) *ListPipelinesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPipelinesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Ascending != nil { + v := *s.Ascending + + e.SetValue(protocol.QueryTarget, "Ascending", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageToken != nil { + v := *s.PageToken + + e.SetValue(protocol.QueryTarget, "PageToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A list of the pipelines associated with the current AWS account. type ListPipelinesOutput struct { _ struct{} `type:"structure"` @@ -5249,6 +6300,22 @@ func (s *ListPipelinesOutput) SetPipelines(v []*Pipeline) *ListPipelinesOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPipelinesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextPageToken != nil { + v := *s.NextPageToken + + e.SetValue(protocol.BodyTarget, "NextPageToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Pipelines) > 0 { + v := s.Pipelines + + e.SetList(protocol.BodyTarget, "Pipelines", encodePipelineList(v), protocol.Metadata{}) + } + + return nil +} + // The ListPresetsRequest structure. type ListPresetsInput struct { _ struct{} `type:"structure"` @@ -5285,6 +6352,22 @@ func (s *ListPresetsInput) SetPageToken(v string) *ListPresetsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPresetsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Ascending != nil { + v := *s.Ascending + + e.SetValue(protocol.QueryTarget, "Ascending", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageToken != nil { + v := *s.PageToken + + e.SetValue(protocol.QueryTarget, "PageToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The ListPresetsResponse structure. type ListPresetsOutput struct { _ struct{} `type:"structure"` @@ -5320,6 +6403,22 @@ func (s *ListPresetsOutput) SetPresets(v []*Preset) *ListPresetsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPresetsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextPageToken != nil { + v := *s.NextPageToken + + e.SetValue(protocol.BodyTarget, "NextPageToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Presets) > 0 { + v := s.Presets + + e.SetList(protocol.BodyTarget, "Presets", encodePresetList(v), protocol.Metadata{}) + } + + return nil +} + // The Amazon Simple Notification Service (Amazon SNS) topic or topics to notify // in order to report job status. // @@ -5379,6 +6478,32 @@ func (s *Notifications) SetWarning(v string) *Notifications { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Notifications) MarshalFields(e protocol.FieldEncoder) error { + if s.Completed != nil { + v := *s.Completed + + e.SetValue(protocol.BodyTarget, "Completed", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Error != nil { + v := *s.Error + + e.SetValue(protocol.BodyTarget, "Error", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Progressing != nil { + v := *s.Progressing + + e.SetValue(protocol.BodyTarget, "Progressing", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Warning != nil { + v := *s.Warning + + e.SetValue(protocol.BodyTarget, "Warning", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The Permission structure. type Permission struct { _ struct{} `type:"structure"` @@ -5461,6 +6586,35 @@ func (s *Permission) SetGranteeType(v string) *Permission { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Permission) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Access) > 0 { + v := s.Access + + e.SetList(protocol.BodyTarget, "Access", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Grantee != nil { + v := *s.Grantee + + e.SetValue(protocol.BodyTarget, "Grantee", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GranteeType != nil { + v := *s.GranteeType + + e.SetValue(protocol.BodyTarget, "GranteeType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodePermissionList(vs []*Permission) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The pipeline (queue) that is used to manage jobs. type Pipeline struct { _ struct{} `type:"structure"` @@ -5696,6 +6850,75 @@ func (s *Pipeline) SetThumbnailConfig(v *PipelineOutputConfig) *Pipeline { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Pipeline) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AwsKmsKeyArn != nil { + v := *s.AwsKmsKeyArn + + e.SetValue(protocol.BodyTarget, "AwsKmsKeyArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentConfig != nil { + v := s.ContentConfig + + e.SetFields(protocol.BodyTarget, "ContentConfig", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InputBucket != nil { + v := *s.InputBucket + + e.SetValue(protocol.BodyTarget, "InputBucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Notifications != nil { + v := s.Notifications + + e.SetFields(protocol.BodyTarget, "Notifications", v, protocol.Metadata{}) + } + if s.OutputBucket != nil { + v := *s.OutputBucket + + e.SetValue(protocol.BodyTarget, "OutputBucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Role != nil { + v := *s.Role + + e.SetValue(protocol.BodyTarget, "Role", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThumbnailConfig != nil { + v := s.ThumbnailConfig + + e.SetFields(protocol.BodyTarget, "ThumbnailConfig", v, protocol.Metadata{}) + } + + return nil +} + +func encodePipelineList(vs []*Pipeline) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The PipelineOutputConfig structure. type PipelineOutputConfig struct { _ struct{} `type:"structure"` @@ -5790,6 +7013,27 @@ func (s *PipelineOutputConfig) SetStorageClass(v string) *PipelineOutputConfig { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PipelineOutputConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.BodyTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Permissions) > 0 { + v := s.Permissions + + e.SetList(protocol.BodyTarget, "Permissions", encodePermissionList(v), protocol.Metadata{}) + } + if s.StorageClass != nil { + v := *s.StorageClass + + e.SetValue(protocol.BodyTarget, "StorageClass", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The PlayReady DRM settings, if any, that you want Elastic Transcoder to apply // to the output files associated with this playlist. // @@ -5901,6 +7145,42 @@ func (s *PlayReadyDrm) SetLicenseAcquisitionUrl(v string) *PlayReadyDrm { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PlayReadyDrm) MarshalFields(e protocol.FieldEncoder) error { + if s.Format != nil { + v := *s.Format + + e.SetValue(protocol.BodyTarget, "Format", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InitializationVector != nil { + v := *s.InitializationVector + + e.SetValue(protocol.BodyTarget, "InitializationVector", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyId != nil { + v := *s.KeyId + + e.SetValue(protocol.BodyTarget, "KeyId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyMd5 != nil { + v := *s.KeyMd5 + + e.SetValue(protocol.BodyTarget, "KeyMd5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LicenseAcquisitionUrl != nil { + v := *s.LicenseAcquisitionUrl + + e.SetValue(protocol.BodyTarget, "LicenseAcquisitionUrl", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Use Only for Fragmented MP4 or MPEG-TS Outputs. If you specify a preset for // which the value of Container is fmp4 (Fragmented MP4) or ts (MPEG-TS), Playlists // contains information about the master playlists that you want Elastic Transcoder @@ -6030,6 +7310,55 @@ func (s *Playlist) SetStatusDetail(v string) *Playlist { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Playlist) MarshalFields(e protocol.FieldEncoder) error { + if s.Format != nil { + v := *s.Format + + e.SetValue(protocol.BodyTarget, "Format", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HlsContentProtection != nil { + v := s.HlsContentProtection + + e.SetFields(protocol.BodyTarget, "HlsContentProtection", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.OutputKeys) > 0 { + v := s.OutputKeys + + e.SetList(protocol.BodyTarget, "OutputKeys", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.PlayReadyDrm != nil { + v := s.PlayReadyDrm + + e.SetFields(protocol.BodyTarget, "PlayReadyDrm", v, protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusDetail != nil { + v := *s.StatusDetail + + e.SetValue(protocol.BodyTarget, "StatusDetail", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodePlaylistList(vs []*Playlist) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Presets are templates that contain most of the settings for transcoding media // files from one format to another. Elastic Transcoder includes some default // presets for common formats, for example, several iPod and iPhone versions. @@ -6137,6 +7466,65 @@ func (s *Preset) SetVideo(v *VideoParameters) *Preset { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Preset) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Audio != nil { + v := s.Audio + + e.SetFields(protocol.BodyTarget, "Audio", v, protocol.Metadata{}) + } + if s.Container != nil { + v := *s.Container + + e.SetValue(protocol.BodyTarget, "Container", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Thumbnails != nil { + v := s.Thumbnails + + e.SetFields(protocol.BodyTarget, "Thumbnails", v, protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Video != nil { + v := s.Video + + e.SetFields(protocol.BodyTarget, "Video", v, protocol.Metadata{}) + } + + return nil +} + +func encodePresetList(vs []*Preset) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Settings for the size, location, and opacity of graphics that you want Elastic // Transcoder to overlay over videos that are transcoded using this preset. // You can specify settings for up to four watermarks. Watermarks appear in @@ -6385,6 +7773,70 @@ func (s *PresetWatermark) SetVerticalOffset(v string) *PresetWatermark { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PresetWatermark) MarshalFields(e protocol.FieldEncoder) error { + if s.HorizontalAlign != nil { + v := *s.HorizontalAlign + + e.SetValue(protocol.BodyTarget, "HorizontalAlign", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HorizontalOffset != nil { + v := *s.HorizontalOffset + + e.SetValue(protocol.BodyTarget, "HorizontalOffset", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxHeight != nil { + v := *s.MaxHeight + + e.SetValue(protocol.BodyTarget, "MaxHeight", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxWidth != nil { + v := *s.MaxWidth + + e.SetValue(protocol.BodyTarget, "MaxWidth", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Opacity != nil { + v := *s.Opacity + + e.SetValue(protocol.BodyTarget, "Opacity", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SizingPolicy != nil { + v := *s.SizingPolicy + + e.SetValue(protocol.BodyTarget, "SizingPolicy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Target != nil { + v := *s.Target + + e.SetValue(protocol.BodyTarget, "Target", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VerticalAlign != nil { + v := *s.VerticalAlign + + e.SetValue(protocol.BodyTarget, "VerticalAlign", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VerticalOffset != nil { + v := *s.VerticalOffset + + e.SetValue(protocol.BodyTarget, "VerticalOffset", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodePresetWatermarkList(vs []*PresetWatermark) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The ReadJobRequest structure. type ReadJobInput struct { _ struct{} `type:"structure"` @@ -6424,6 +7876,17 @@ func (s *ReadJobInput) SetId(v string) *ReadJobInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ReadJobInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The ReadJobResponse structure. type ReadJobOutput struct { _ struct{} `type:"structure"` @@ -6448,6 +7911,17 @@ func (s *ReadJobOutput) SetJob(v *Job) *ReadJobOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ReadJobOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Job != nil { + v := s.Job + + e.SetFields(protocol.BodyTarget, "Job", v, protocol.Metadata{}) + } + + return nil +} + // The ReadPipelineRequest structure. type ReadPipelineInput struct { _ struct{} `type:"structure"` @@ -6487,6 +7961,17 @@ func (s *ReadPipelineInput) SetId(v string) *ReadPipelineInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ReadPipelineInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The ReadPipelineResponse structure. type ReadPipelineOutput struct { _ struct{} `type:"structure"` @@ -6525,6 +8010,22 @@ func (s *ReadPipelineOutput) SetWarnings(v []*Warning) *ReadPipelineOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ReadPipelineOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Pipeline != nil { + v := s.Pipeline + + e.SetFields(protocol.BodyTarget, "Pipeline", v, protocol.Metadata{}) + } + if len(s.Warnings) > 0 { + v := s.Warnings + + e.SetList(protocol.BodyTarget, "Warnings", encodeWarningList(v), protocol.Metadata{}) + } + + return nil +} + // The ReadPresetRequest structure. type ReadPresetInput struct { _ struct{} `type:"structure"` @@ -6564,6 +8065,17 @@ func (s *ReadPresetInput) SetId(v string) *ReadPresetInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ReadPresetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The ReadPresetResponse structure. type ReadPresetOutput struct { _ struct{} `type:"structure"` @@ -6588,6 +8100,17 @@ func (s *ReadPresetOutput) SetPreset(v *Preset) *ReadPresetOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ReadPresetOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Preset != nil { + v := s.Preset + + e.SetFields(protocol.BodyTarget, "Preset", v, protocol.Metadata{}) + } + + return nil +} + // The TestRoleRequest structure. type TestRoleInput struct { _ struct{} `deprecated:"true" type:"structure"` @@ -6673,6 +8196,32 @@ func (s *TestRoleInput) SetTopics(v []*string) *TestRoleInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TestRoleInput) MarshalFields(e protocol.FieldEncoder) error { + if s.InputBucket != nil { + v := *s.InputBucket + + e.SetValue(protocol.BodyTarget, "InputBucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OutputBucket != nil { + v := *s.OutputBucket + + e.SetValue(protocol.BodyTarget, "OutputBucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Role != nil { + v := *s.Role + + e.SetValue(protocol.BodyTarget, "Role", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Topics) > 0 { + v := s.Topics + + e.SetList(protocol.BodyTarget, "Topics", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // The TestRoleResponse structure. type TestRoleOutput struct { _ struct{} `deprecated:"true" type:"structure"` @@ -6708,6 +8257,22 @@ func (s *TestRoleOutput) SetSuccess(v string) *TestRoleOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TestRoleOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Messages) > 0 { + v := s.Messages + + e.SetList(protocol.BodyTarget, "Messages", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Success != nil { + v := *s.Success + + e.SetValue(protocol.BodyTarget, "Success", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Thumbnails for videos. type Thumbnails struct { _ struct{} `type:"structure"` @@ -6851,6 +8416,52 @@ func (s *Thumbnails) SetSizingPolicy(v string) *Thumbnails { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Thumbnails) MarshalFields(e protocol.FieldEncoder) error { + if s.AspectRatio != nil { + v := *s.AspectRatio + + e.SetValue(protocol.BodyTarget, "AspectRatio", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Format != nil { + v := *s.Format + + e.SetValue(protocol.BodyTarget, "Format", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Interval != nil { + v := *s.Interval + + e.SetValue(protocol.BodyTarget, "Interval", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxHeight != nil { + v := *s.MaxHeight + + e.SetValue(protocol.BodyTarget, "MaxHeight", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxWidth != nil { + v := *s.MaxWidth + + e.SetValue(protocol.BodyTarget, "MaxWidth", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PaddingPolicy != nil { + v := *s.PaddingPolicy + + e.SetValue(protocol.BodyTarget, "PaddingPolicy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Resolution != nil { + v := *s.Resolution + + e.SetValue(protocol.BodyTarget, "Resolution", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SizingPolicy != nil { + v := *s.SizingPolicy + + e.SetValue(protocol.BodyTarget, "SizingPolicy", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Settings that determine when a clip begins and how long it lasts. type TimeSpan struct { _ struct{} `type:"structure"` @@ -6893,6 +8504,22 @@ func (s *TimeSpan) SetStartTime(v string) *TimeSpan { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TimeSpan) MarshalFields(e protocol.FieldEncoder) error { + if s.Duration != nil { + v := *s.Duration + + e.SetValue(protocol.BodyTarget, "Duration", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartTime != nil { + v := *s.StartTime + + e.SetValue(protocol.BodyTarget, "StartTime", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Details about the timing of a job. type Timing struct { _ struct{} `type:"structure"` @@ -6935,6 +8562,27 @@ func (s *Timing) SetSubmitTimeMillis(v int64) *Timing { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Timing) MarshalFields(e protocol.FieldEncoder) error { + if s.FinishTimeMillis != nil { + v := *s.FinishTimeMillis + + e.SetValue(protocol.BodyTarget, "FinishTimeMillis", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StartTimeMillis != nil { + v := *s.StartTimeMillis + + e.SetValue(protocol.BodyTarget, "StartTimeMillis", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SubmitTimeMillis != nil { + v := *s.SubmitTimeMillis + + e.SetValue(protocol.BodyTarget, "SubmitTimeMillis", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The UpdatePipelineRequest structure. type UpdatePipelineInput struct { _ struct{} `type:"structure"` @@ -7204,6 +8852,52 @@ func (s *UpdatePipelineInput) SetThumbnailConfig(v *PipelineOutputConfig) *Updat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdatePipelineInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AwsKmsKeyArn != nil { + v := *s.AwsKmsKeyArn + + e.SetValue(protocol.BodyTarget, "AwsKmsKeyArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentConfig != nil { + v := s.ContentConfig + + e.SetFields(protocol.BodyTarget, "ContentConfig", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InputBucket != nil { + v := *s.InputBucket + + e.SetValue(protocol.BodyTarget, "InputBucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Notifications != nil { + v := s.Notifications + + e.SetFields(protocol.BodyTarget, "Notifications", v, protocol.Metadata{}) + } + if s.Role != nil { + v := *s.Role + + e.SetValue(protocol.BodyTarget, "Role", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThumbnailConfig != nil { + v := s.ThumbnailConfig + + e.SetFields(protocol.BodyTarget, "ThumbnailConfig", v, protocol.Metadata{}) + } + + return nil +} + // The UpdatePipelineNotificationsRequest structure. type UpdatePipelineNotificationsInput struct { _ struct{} `type:"structure"` @@ -7279,6 +8973,22 @@ func (s *UpdatePipelineNotificationsInput) SetNotifications(v *Notifications) *U return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdatePipelineNotificationsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Notifications != nil { + v := s.Notifications + + e.SetFields(protocol.BodyTarget, "Notifications", v, protocol.Metadata{}) + } + + return nil +} + // The UpdatePipelineNotificationsResponse structure. type UpdatePipelineNotificationsOutput struct { _ struct{} `type:"structure"` @@ -7304,6 +9014,17 @@ func (s *UpdatePipelineNotificationsOutput) SetPipeline(v *Pipeline) *UpdatePipe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdatePipelineNotificationsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Pipeline != nil { + v := s.Pipeline + + e.SetFields(protocol.BodyTarget, "Pipeline", v, protocol.Metadata{}) + } + + return nil +} + // When you update a pipeline, Elastic Transcoder returns the values that you // specified in the request. type UpdatePipelineOutput struct { @@ -7343,6 +9064,22 @@ func (s *UpdatePipelineOutput) SetWarnings(v []*Warning) *UpdatePipelineOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdatePipelineOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Pipeline != nil { + v := s.Pipeline + + e.SetFields(protocol.BodyTarget, "Pipeline", v, protocol.Metadata{}) + } + if len(s.Warnings) > 0 { + v := s.Warnings + + e.SetList(protocol.BodyTarget, "Warnings", encodeWarningList(v), protocol.Metadata{}) + } + + return nil +} + // The UpdatePipelineStatusRequest structure. type UpdatePipelineStatusInput struct { _ struct{} `type:"structure"` @@ -7400,6 +9137,22 @@ func (s *UpdatePipelineStatusInput) SetStatus(v string) *UpdatePipelineStatusInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdatePipelineStatusInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // When you update status for a pipeline, Elastic Transcoder returns the values // that you specified in the request. type UpdatePipelineStatusOutput struct { @@ -7425,6 +9178,17 @@ func (s *UpdatePipelineStatusOutput) SetPipeline(v *Pipeline) *UpdatePipelineSta return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdatePipelineStatusOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Pipeline != nil { + v := s.Pipeline + + e.SetFields(protocol.BodyTarget, "Pipeline", v, protocol.Metadata{}) + } + + return nil +} + // The VideoParameters structure. type VideoParameters struct { _ struct{} `type:"structure"` @@ -7962,6 +9726,87 @@ func (s *VideoParameters) SetWatermarks(v []*PresetWatermark) *VideoParameters { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VideoParameters) MarshalFields(e protocol.FieldEncoder) error { + if s.AspectRatio != nil { + v := *s.AspectRatio + + e.SetValue(protocol.BodyTarget, "AspectRatio", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BitRate != nil { + v := *s.BitRate + + e.SetValue(protocol.BodyTarget, "BitRate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Codec != nil { + v := *s.Codec + + e.SetValue(protocol.BodyTarget, "Codec", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.CodecOptions) > 0 { + v := s.CodecOptions + + e.SetMap(protocol.BodyTarget, "CodecOptions", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.DisplayAspectRatio != nil { + v := *s.DisplayAspectRatio + + e.SetValue(protocol.BodyTarget, "DisplayAspectRatio", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FixedGOP != nil { + v := *s.FixedGOP + + e.SetValue(protocol.BodyTarget, "FixedGOP", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FrameRate != nil { + v := *s.FrameRate + + e.SetValue(protocol.BodyTarget, "FrameRate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyframesMaxDist != nil { + v := *s.KeyframesMaxDist + + e.SetValue(protocol.BodyTarget, "KeyframesMaxDist", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxFrameRate != nil { + v := *s.MaxFrameRate + + e.SetValue(protocol.BodyTarget, "MaxFrameRate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxHeight != nil { + v := *s.MaxHeight + + e.SetValue(protocol.BodyTarget, "MaxHeight", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxWidth != nil { + v := *s.MaxWidth + + e.SetValue(protocol.BodyTarget, "MaxWidth", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PaddingPolicy != nil { + v := *s.PaddingPolicy + + e.SetValue(protocol.BodyTarget, "PaddingPolicy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Resolution != nil { + v := *s.Resolution + + e.SetValue(protocol.BodyTarget, "Resolution", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SizingPolicy != nil { + v := *s.SizingPolicy + + e.SetValue(protocol.BodyTarget, "SizingPolicy", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Watermarks) > 0 { + v := s.Watermarks + + e.SetList(protocol.BodyTarget, "Watermarks", encodePresetWatermarkList(v), protocol.Metadata{}) + } + + return nil +} + // Elastic Transcoder returns a warning if the resources used by your pipeline // are not in the same region as the pipeline. // @@ -8002,3 +9847,27 @@ func (s *Warning) SetMessage(v string) *Warning { s.Message = &v return s } + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Warning) MarshalFields(e protocol.FieldEncoder) error { + if s.Code != nil { + v := *s.Code + + e.SetValue(protocol.BodyTarget, "Code", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Message != nil { + v := *s.Message + + e.SetValue(protocol.BodyTarget, "Message", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeWarningList(vs []*Warning) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} diff --git a/service/glacier/api.go b/service/glacier/api.go index 29c2872bec2..3e022f3fc67 100644 --- a/service/glacier/api.go +++ b/service/glacier/api.go @@ -3931,6 +3931,27 @@ func (s *AbortMultipartUploadInput) SetVaultName(v string) *AbortMultipartUpload return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AbortMultipartUploadInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UploadId != nil { + v := *s.UploadId + + e.SetValue(protocol.PathTarget, "uploadId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type AbortMultipartUploadOutput struct { _ struct{} `type:"structure"` } @@ -3945,6 +3966,12 @@ func (s AbortMultipartUploadOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AbortMultipartUploadOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input values for AbortVaultLock. type AbortVaultLockInput struct { _ struct{} `type:"structure"` @@ -4003,6 +4030,22 @@ func (s *AbortVaultLockInput) SetVaultName(v string) *AbortVaultLockInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AbortVaultLockInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type AbortVaultLockOutput struct { _ struct{} `type:"structure"` } @@ -4017,6 +4060,12 @@ func (s AbortVaultLockOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AbortVaultLockOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input values for AddTagsToVault. type AddTagsToVaultInput struct { _ struct{} `type:"structure"` @@ -4084,6 +4133,27 @@ func (s *AddTagsToVaultInput) SetVaultName(v string) *AddTagsToVaultInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AddTagsToVaultInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Tags) > 0 { + v := s.Tags + + e.SetMap(protocol.BodyTarget, "Tags", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type AddTagsToVaultOutput struct { _ struct{} `type:"structure"` } @@ -4098,6 +4168,12 @@ func (s AddTagsToVaultOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AddTagsToVaultOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Contains the Amazon Glacier response to your request. // // For information about the underlying REST API, see Upload Archive (http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-post.html). @@ -4143,6 +4219,27 @@ func (s *ArchiveCreationOutput) SetLocation(v string) *ArchiveCreationOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ArchiveCreationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ArchiveId != nil { + v := *s.ArchiveId + + e.SetValue(protocol.HeaderTarget, "x-amz-archive-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.HeaderTarget, "x-amz-sha256-tree-hash", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Provides options to complete a multipart upload operation. This informs Amazon // Glacier that all the archive parts have been uploaded and Amazon Glacier // can now assemble the archive from the uploaded parts. After assembling and @@ -4240,6 +4337,37 @@ func (s *CompleteMultipartUploadInput) SetVaultName(v string) *CompleteMultipart return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CompleteMultipartUploadInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ArchiveSize != nil { + v := *s.ArchiveSize + + e.SetValue(protocol.HeaderTarget, "x-amz-archive-size", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.HeaderTarget, "x-amz-sha256-tree-hash", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UploadId != nil { + v := *s.UploadId + + e.SetValue(protocol.PathTarget, "uploadId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input values for CompleteVaultLock. type CompleteVaultLockInput struct { _ struct{} `type:"structure"` @@ -4312,6 +4440,27 @@ func (s *CompleteVaultLockInput) SetVaultName(v string) *CompleteVaultLockInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CompleteVaultLockInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LockId != nil { + v := *s.LockId + + e.SetValue(protocol.PathTarget, "lockId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type CompleteVaultLockOutput struct { _ struct{} `type:"structure"` } @@ -4326,6 +4475,12 @@ func (s CompleteVaultLockOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CompleteVaultLockOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Provides options to create a vault. type CreateVaultInput struct { _ struct{} `type:"structure"` @@ -4384,6 +4539,22 @@ func (s *CreateVaultInput) SetVaultName(v string) *CreateVaultInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateVaultInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the Amazon Glacier response to your request. type CreateVaultOutput struct { _ struct{} `type:"structure"` @@ -4408,6 +4579,17 @@ func (s *CreateVaultOutput) SetLocation(v string) *CreateVaultOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateVaultOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Data retrieval policy. type DataRetrievalPolicy struct { _ struct{} `type:"structure"` @@ -4433,6 +4615,17 @@ func (s *DataRetrievalPolicy) SetRules(v []*DataRetrievalRule) *DataRetrievalPol return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DataRetrievalPolicy) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Rules) > 0 { + v := s.Rules + + e.SetList(protocol.BodyTarget, "Rules", encodeDataRetrievalRuleList(v), protocol.Metadata{}) + } + + return nil +} + // Data retrieval policy rule. type DataRetrievalRule struct { _ struct{} `type:"structure"` @@ -4472,6 +4665,30 @@ func (s *DataRetrievalRule) SetStrategy(v string) *DataRetrievalRule { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DataRetrievalRule) MarshalFields(e protocol.FieldEncoder) error { + if s.BytesPerHour != nil { + v := *s.BytesPerHour + + e.SetValue(protocol.BodyTarget, "BytesPerHour", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Strategy != nil { + v := *s.Strategy + + e.SetValue(protocol.BodyTarget, "Strategy", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDataRetrievalRuleList(vs []*DataRetrievalRule) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Provides options for deleting an archive from an Amazon Glacier vault. type DeleteArchiveInput struct { _ struct{} `type:"structure"` @@ -4543,6 +4760,27 @@ func (s *DeleteArchiveInput) SetVaultName(v string) *DeleteArchiveInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteArchiveInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ArchiveId != nil { + v := *s.ArchiveId + + e.SetValue(protocol.PathTarget, "archiveId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteArchiveOutput struct { _ struct{} `type:"structure"` } @@ -4557,6 +4795,12 @@ func (s DeleteArchiveOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteArchiveOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // DeleteVaultAccessPolicy input. type DeleteVaultAccessPolicyInput struct { _ struct{} `type:"structure"` @@ -4614,6 +4858,22 @@ func (s *DeleteVaultAccessPolicyInput) SetVaultName(v string) *DeleteVaultAccess return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteVaultAccessPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteVaultAccessPolicyOutput struct { _ struct{} `type:"structure"` } @@ -4628,6 +4888,12 @@ func (s DeleteVaultAccessPolicyOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteVaultAccessPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Provides options for deleting a vault from Amazon Glacier. type DeleteVaultInput struct { _ struct{} `type:"structure"` @@ -4685,6 +4951,22 @@ func (s *DeleteVaultInput) SetVaultName(v string) *DeleteVaultInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteVaultInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Provides options for deleting a vault notification configuration from an // Amazon Glacier vault. type DeleteVaultNotificationsInput struct { @@ -4743,6 +5025,22 @@ func (s *DeleteVaultNotificationsInput) SetVaultName(v string) *DeleteVaultNotif return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteVaultNotificationsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteVaultNotificationsOutput struct { _ struct{} `type:"structure"` } @@ -4757,6 +5055,12 @@ func (s DeleteVaultNotificationsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteVaultNotificationsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + type DeleteVaultOutput struct { _ struct{} `type:"structure"` } @@ -4771,6 +5075,12 @@ func (s DeleteVaultOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteVaultOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Provides options for retrieving a job description. type DescribeJobInput struct { _ struct{} `type:"structure"` @@ -4842,6 +5152,27 @@ func (s *DescribeJobInput) SetVaultName(v string) *DescribeJobInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeJobInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobId != nil { + v := *s.JobId + + e.SetValue(protocol.PathTarget, "jobId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Provides options for retrieving metadata for a specific vault in Amazon Glacier. type DescribeVaultInput struct { _ struct{} `type:"structure"` @@ -4899,6 +5230,22 @@ func (s *DescribeVaultInput) SetVaultName(v string) *DescribeVaultInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeVaultInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the Amazon Glacier response to your request. type DescribeVaultOutput struct { _ struct{} `type:"structure"` @@ -4975,6 +5322,50 @@ func (s *DescribeVaultOutput) SetVaultName(v string) *DescribeVaultOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeVaultOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastInventoryDate != nil { + v := *s.LastInventoryDate + + e.SetValue(protocol.BodyTarget, "LastInventoryDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NumberOfArchives != nil { + v := *s.NumberOfArchives + + e.SetValue(protocol.BodyTarget, "NumberOfArchives", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SizeInBytes != nil { + v := *s.SizeInBytes + + e.SetValue(protocol.BodyTarget, "SizeInBytes", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.VaultARN != nil { + v := *s.VaultARN + + e.SetValue(protocol.BodyTarget, "VaultARN", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.BodyTarget, "VaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDescribeVaultOutputList(vs []*DescribeVaultOutput) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Input for GetDataRetrievalPolicy. type GetDataRetrievalPolicyInput struct { _ struct{} `type:"structure"` @@ -5019,6 +5410,17 @@ func (s *GetDataRetrievalPolicyInput) SetAccountId(v string) *GetDataRetrievalPo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDataRetrievalPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the Amazon Glacier response to the GetDataRetrievalPolicy request. type GetDataRetrievalPolicyOutput struct { _ struct{} `type:"structure"` @@ -5043,6 +5445,17 @@ func (s *GetDataRetrievalPolicyOutput) SetPolicy(v *DataRetrievalPolicy) *GetDat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDataRetrievalPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Policy != nil { + v := s.Policy + + e.SetFields(protocol.BodyTarget, "Policy", v, protocol.Metadata{}) + } + + return nil +} + // Provides options for downloading output of an Amazon Glacier job. type GetJobOutputInput struct { _ struct{} `type:"structure"` @@ -5151,6 +5564,32 @@ func (s *GetJobOutputInput) SetVaultName(v string) *GetJobOutputInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetJobOutputInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobId != nil { + v := *s.JobId + + e.SetValue(protocol.PathTarget, "jobId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Range != nil { + v := *s.Range + + e.SetValue(protocol.HeaderTarget, "Range", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the Amazon Glacier response to your request. type GetJobOutputOutput struct { _ struct{} `type:"structure" payload:"Body"` @@ -5251,6 +5690,39 @@ func (s *GetJobOutputOutput) SetStatus(v int64) *GetJobOutputOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetJobOutputOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AcceptRanges != nil { + v := *s.AcceptRanges + + e.SetValue(protocol.HeaderTarget, "Accept-Ranges", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ArchiveDescription != nil { + v := *s.ArchiveDescription + + e.SetValue(protocol.HeaderTarget, "x-amz-archive-description", protocol.StringValue(v), protocol.Metadata{}) + } + // Skipping Body Output type's body not valid. + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.HeaderTarget, "x-amz-sha256-tree-hash", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentRange != nil { + v := *s.ContentRange + + e.SetValue(protocol.HeaderTarget, "Content-Range", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue(v), protocol.Metadata{}) + } + // ignoring invalid encode state, StatusCode. Status + + return nil +} + // Input for GetVaultAccessPolicy. type GetVaultAccessPolicyInput struct { _ struct{} `type:"structure"` @@ -5308,6 +5780,22 @@ func (s *GetVaultAccessPolicyInput) SetVaultName(v string) *GetVaultAccessPolicy return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetVaultAccessPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Output for GetVaultAccessPolicy. type GetVaultAccessPolicyOutput struct { _ struct{} `type:"structure" payload:"Policy"` @@ -5332,6 +5820,17 @@ func (s *GetVaultAccessPolicyOutput) SetPolicy(v *VaultAccessPolicy) *GetVaultAc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetVaultAccessPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Policy != nil { + v := s.Policy + + e.SetFields(protocol.PayloadTarget, "policy", v, protocol.Metadata{}) + } + + return nil +} + // The input values for GetVaultLock. type GetVaultLockInput struct { _ struct{} `type:"structure"` @@ -5389,6 +5888,22 @@ func (s *GetVaultLockInput) SetVaultName(v string) *GetVaultLockInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetVaultLockInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the Amazon Glacier response to your request. type GetVaultLockOutput struct { _ struct{} `type:"structure"` @@ -5442,6 +5957,32 @@ func (s *GetVaultLockOutput) SetState(v string) *GetVaultLockOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetVaultLockOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ExpirationDate != nil { + v := *s.ExpirationDate + + e.SetValue(protocol.BodyTarget, "ExpirationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Policy != nil { + v := *s.Policy + + e.SetValue(protocol.BodyTarget, "Policy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "State", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Provides options for retrieving the notification configuration set on an // Amazon Glacier vault. type GetVaultNotificationsInput struct { @@ -5500,6 +6041,22 @@ func (s *GetVaultNotificationsInput) SetVaultName(v string) *GetVaultNotificatio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetVaultNotificationsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the Amazon Glacier response to your request. type GetVaultNotificationsOutput struct { _ struct{} `type:"structure" payload:"VaultNotificationConfig"` @@ -5524,6 +6081,17 @@ func (s *GetVaultNotificationsOutput) SetVaultNotificationConfig(v *VaultNotific return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetVaultNotificationsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.VaultNotificationConfig != nil { + v := s.VaultNotificationConfig + + e.SetFields(protocol.PayloadTarget, "vaultNotificationConfig", v, protocol.Metadata{}) + } + + return nil +} + // Provides options for initiating an Amazon Glacier job. type InitiateJobInput struct { _ struct{} `type:"structure" payload:"JobParameters"` @@ -5590,6 +6158,27 @@ func (s *InitiateJobInput) SetVaultName(v string) *InitiateJobInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InitiateJobInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobParameters != nil { + v := s.JobParameters + + e.SetFields(protocol.PayloadTarget, "jobParameters", v, protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the Amazon Glacier response to your request. type InitiateJobOutput struct { _ struct{} `type:"structure"` @@ -5623,6 +6212,22 @@ func (s *InitiateJobOutput) SetLocation(v string) *InitiateJobOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InitiateJobOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.JobId != nil { + v := *s.JobId + + e.SetValue(protocol.HeaderTarget, "x-amz-job-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Provides options for initiating a multipart upload to an Amazon Glacier vault. type InitiateMultipartUploadInput struct { _ struct{} `type:"structure"` @@ -5704,6 +6309,32 @@ func (s *InitiateMultipartUploadInput) SetVaultName(v string) *InitiateMultipart return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InitiateMultipartUploadInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ArchiveDescription != nil { + v := *s.ArchiveDescription + + e.SetValue(protocol.HeaderTarget, "x-amz-archive-description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PartSize != nil { + v := *s.PartSize + + e.SetValue(protocol.HeaderTarget, "x-amz-part-size", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The Amazon Glacier response to your request. type InitiateMultipartUploadOutput struct { _ struct{} `type:"structure"` @@ -5738,6 +6369,22 @@ func (s *InitiateMultipartUploadOutput) SetUploadId(v string) *InitiateMultipart return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InitiateMultipartUploadOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UploadId != nil { + v := *s.UploadId + + e.SetValue(protocol.HeaderTarget, "x-amz-multipart-upload-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input values for InitiateVaultLock. type InitiateVaultLockInput struct { _ struct{} `type:"structure" payload:"Policy"` @@ -5805,6 +6452,27 @@ func (s *InitiateVaultLockInput) SetVaultName(v string) *InitiateVaultLockInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InitiateVaultLockInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Policy != nil { + v := s.Policy + + e.SetFields(protocol.PayloadTarget, "policy", v, protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the Amazon Glacier response to your request. type InitiateVaultLockOutput struct { _ struct{} `type:"structure"` @@ -5829,6 +6497,17 @@ func (s *InitiateVaultLockOutput) SetLockId(v string) *InitiateVaultLockOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InitiateVaultLockOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.LockId != nil { + v := *s.LockId + + e.SetValue(protocol.HeaderTarget, "x-amz-lock-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes the options for a range inventory retrieval job. type InventoryRetrievalJobDescription struct { _ struct{} `type:"structure"` @@ -5901,6 +6580,37 @@ func (s *InventoryRetrievalJobDescription) SetStartDate(v string) *InventoryRetr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InventoryRetrievalJobDescription) MarshalFields(e protocol.FieldEncoder) error { + if s.EndDate != nil { + v := *s.EndDate + + e.SetValue(protocol.BodyTarget, "EndDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Format != nil { + v := *s.Format + + e.SetValue(protocol.BodyTarget, "Format", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.BodyTarget, "Limit", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartDate != nil { + v := *s.StartDate + + e.SetValue(protocol.BodyTarget, "StartDate", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Provides options for specifying a range inventory retrieval job. type InventoryRetrievalJobInput struct { _ struct{} `type:"structure"` @@ -5960,6 +6670,32 @@ func (s *InventoryRetrievalJobInput) SetStartDate(v string) *InventoryRetrievalJ return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InventoryRetrievalJobInput) MarshalFields(e protocol.FieldEncoder) error { + if s.EndDate != nil { + v := *s.EndDate + + e.SetValue(protocol.BodyTarget, "EndDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.BodyTarget, "Limit", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartDate != nil { + v := *s.StartDate + + e.SetValue(protocol.BodyTarget, "StartDate", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes an Amazon Glacier job. type JobDescription struct { _ struct{} `type:"structure"` @@ -6166,6 +6902,110 @@ func (s *JobDescription) SetVaultARN(v string) *JobDescription { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *JobDescription) MarshalFields(e protocol.FieldEncoder) error { + if s.Action != nil { + v := *s.Action + + e.SetValue(protocol.BodyTarget, "Action", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ArchiveId != nil { + v := *s.ArchiveId + + e.SetValue(protocol.BodyTarget, "ArchiveId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ArchiveSHA256TreeHash != nil { + v := *s.ArchiveSHA256TreeHash + + e.SetValue(protocol.BodyTarget, "ArchiveSHA256TreeHash", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ArchiveSizeInBytes != nil { + v := *s.ArchiveSizeInBytes + + e.SetValue(protocol.BodyTarget, "ArchiveSizeInBytes", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Completed != nil { + v := *s.Completed + + e.SetValue(protocol.BodyTarget, "Completed", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.CompletionDate != nil { + v := *s.CompletionDate + + e.SetValue(protocol.BodyTarget, "CompletionDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InventoryRetrievalParameters != nil { + v := s.InventoryRetrievalParameters + + e.SetFields(protocol.BodyTarget, "InventoryRetrievalParameters", v, protocol.Metadata{}) + } + if s.InventorySizeInBytes != nil { + v := *s.InventorySizeInBytes + + e.SetValue(protocol.BodyTarget, "InventorySizeInBytes", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.JobDescription != nil { + v := *s.JobDescription + + e.SetValue(protocol.BodyTarget, "JobDescription", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobId != nil { + v := *s.JobId + + e.SetValue(protocol.BodyTarget, "JobId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RetrievalByteRange != nil { + v := *s.RetrievalByteRange + + e.SetValue(protocol.BodyTarget, "RetrievalByteRange", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SHA256TreeHash != nil { + v := *s.SHA256TreeHash + + e.SetValue(protocol.BodyTarget, "SHA256TreeHash", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SNSTopic != nil { + v := *s.SNSTopic + + e.SetValue(protocol.BodyTarget, "SNSTopic", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.BodyTarget, "StatusCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusMessage != nil { + v := *s.StatusMessage + + e.SetValue(protocol.BodyTarget, "StatusMessage", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Tier != nil { + v := *s.Tier + + e.SetValue(protocol.BodyTarget, "Tier", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultARN != nil { + v := *s.VaultARN + + e.SetValue(protocol.BodyTarget, "VaultARN", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeJobDescriptionList(vs []*JobDescription) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Provides options for defining a job. type JobParameters struct { _ struct{} `type:"structure"` @@ -6273,6 +7113,52 @@ func (s *JobParameters) SetType(v string) *JobParameters { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *JobParameters) MarshalFields(e protocol.FieldEncoder) error { + if s.ArchiveId != nil { + v := *s.ArchiveId + + e.SetValue(protocol.BodyTarget, "ArchiveId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Format != nil { + v := *s.Format + + e.SetValue(protocol.BodyTarget, "Format", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InventoryRetrievalParameters != nil { + v := s.InventoryRetrievalParameters + + e.SetFields(protocol.BodyTarget, "InventoryRetrievalParameters", v, protocol.Metadata{}) + } + if s.RetrievalByteRange != nil { + v := *s.RetrievalByteRange + + e.SetValue(protocol.BodyTarget, "RetrievalByteRange", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SNSTopic != nil { + v := *s.SNSTopic + + e.SetValue(protocol.BodyTarget, "SNSTopic", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Tier != nil { + v := *s.Tier + + e.SetValue(protocol.BodyTarget, "Tier", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Provides options for retrieving a job list for an Amazon Glacier vault. type ListJobsInput struct { _ struct{} `type:"structure"` @@ -6372,6 +7258,42 @@ func (s *ListJobsInput) SetVaultName(v string) *ListJobsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListJobsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Completed != nil { + v := *s.Completed + + e.SetValue(protocol.QueryTarget, "completed", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Statuscode != nil { + v := *s.Statuscode + + e.SetValue(protocol.QueryTarget, "statuscode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the Amazon Glacier response to your request. type ListJobsOutput struct { _ struct{} `type:"structure"` @@ -6408,6 +7330,22 @@ func (s *ListJobsOutput) SetMarker(v string) *ListJobsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListJobsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.JobList) > 0 { + v := s.JobList + + e.SetList(protocol.BodyTarget, "JobList", encodeJobDescriptionList(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Provides options for retrieving list of in-progress multipart uploads for // an Amazon Glacier vault. type ListMultipartUploadsInput struct { @@ -6489,6 +7427,32 @@ func (s *ListMultipartUploadsInput) SetVaultName(v string) *ListMultipartUploads return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListMultipartUploadsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the Amazon Glacier response to your request. type ListMultipartUploadsOutput struct { _ struct{} `type:"structure"` @@ -6524,6 +7488,22 @@ func (s *ListMultipartUploadsOutput) SetUploadsList(v []*UploadListElement) *Lis return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListMultipartUploadsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.UploadsList) > 0 { + v := s.UploadsList + + e.SetList(protocol.BodyTarget, "UploadsList", encodeUploadListElementList(v), protocol.Metadata{}) + } + + return nil +} + // Provides options for retrieving a list of parts of an archive that have been // uploaded in a specific multipart upload. type ListPartsInput struct { @@ -6620,6 +7600,37 @@ func (s *ListPartsInput) SetVaultName(v string) *ListPartsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPartsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UploadId != nil { + v := *s.UploadId + + e.SetValue(protocol.PathTarget, "uploadId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the Amazon Glacier response to your request. type ListPartsOutput struct { _ struct{} `type:"structure"` @@ -6704,6 +7715,47 @@ func (s *ListPartsOutput) SetVaultARN(v string) *ListPartsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPartsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ArchiveDescription != nil { + v := *s.ArchiveDescription + + e.SetValue(protocol.BodyTarget, "ArchiveDescription", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MultipartUploadId != nil { + v := *s.MultipartUploadId + + e.SetValue(protocol.BodyTarget, "MultipartUploadId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PartSizeInBytes != nil { + v := *s.PartSizeInBytes + + e.SetValue(protocol.BodyTarget, "PartSizeInBytes", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Parts) > 0 { + v := s.Parts + + e.SetList(protocol.BodyTarget, "Parts", encodePartListElementList(v), protocol.Metadata{}) + } + if s.VaultARN != nil { + v := *s.VaultARN + + e.SetValue(protocol.BodyTarget, "VaultARN", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type ListProvisionedCapacityInput struct { _ struct{} `type:"structure"` @@ -6746,6 +7798,17 @@ func (s *ListProvisionedCapacityInput) SetAccountId(v string) *ListProvisionedCa return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListProvisionedCapacityInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type ListProvisionedCapacityOutput struct { _ struct{} `type:"structure"` @@ -6769,6 +7832,17 @@ func (s *ListProvisionedCapacityOutput) SetProvisionedCapacityList(v []*Provisio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListProvisionedCapacityOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ProvisionedCapacityList) > 0 { + v := s.ProvisionedCapacityList + + e.SetList(protocol.BodyTarget, "ProvisionedCapacityList", encodeProvisionedCapacityDescriptionList(v), protocol.Metadata{}) + } + + return nil +} + // The input value for ListTagsForVaultInput. type ListTagsForVaultInput struct { _ struct{} `type:"structure"` @@ -6826,6 +7900,22 @@ func (s *ListTagsForVaultInput) SetVaultName(v string) *ListTagsForVaultInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTagsForVaultInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the Amazon Glacier response to your request. type ListTagsForVaultOutput struct { _ struct{} `type:"structure"` @@ -6850,6 +7940,17 @@ func (s *ListTagsForVaultOutput) SetTags(v map[string]*string) *ListTagsForVault return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTagsForVaultOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Tags) > 0 { + v := s.Tags + + e.SetMap(protocol.BodyTarget, "Tags", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // Provides options to retrieve the vault list owned by the calling user's account. // The list provides metadata information for each vault. type ListVaultsInput struct { @@ -6916,6 +8017,27 @@ func (s *ListVaultsInput) SetMarker(v string) *ListVaultsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListVaultsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the Amazon Glacier response to your request. type ListVaultsOutput struct { _ struct{} `type:"structure"` @@ -6950,6 +8072,22 @@ func (s *ListVaultsOutput) SetVaultList(v []*DescribeVaultOutput) *ListVaultsOut return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListVaultsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.VaultList) > 0 { + v := s.VaultList + + e.SetList(protocol.BodyTarget, "VaultList", encodeDescribeVaultOutputList(v), protocol.Metadata{}) + } + + return nil +} + // A list of the part sizes of the multipart upload. type PartListElement struct { _ struct{} `type:"structure"` @@ -6984,6 +8122,30 @@ func (s *PartListElement) SetSHA256TreeHash(v string) *PartListElement { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PartListElement) MarshalFields(e protocol.FieldEncoder) error { + if s.RangeInBytes != nil { + v := *s.RangeInBytes + + e.SetValue(protocol.BodyTarget, "RangeInBytes", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SHA256TreeHash != nil { + v := *s.SHA256TreeHash + + e.SetValue(protocol.BodyTarget, "SHA256TreeHash", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodePartListElementList(vs []*PartListElement) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The definition for a provisioned capacity unit. type ProvisionedCapacityDescription struct { _ struct{} `type:"structure"` @@ -7028,6 +8190,35 @@ func (s *ProvisionedCapacityDescription) SetStartDate(v string) *ProvisionedCapa return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ProvisionedCapacityDescription) MarshalFields(e protocol.FieldEncoder) error { + if s.CapacityId != nil { + v := *s.CapacityId + + e.SetValue(protocol.BodyTarget, "CapacityId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ExpirationDate != nil { + v := *s.ExpirationDate + + e.SetValue(protocol.BodyTarget, "ExpirationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartDate != nil { + v := *s.StartDate + + e.SetValue(protocol.BodyTarget, "StartDate", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeProvisionedCapacityDescriptionList(vs []*ProvisionedCapacityDescription) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + type PurchaseProvisionedCapacityInput struct { _ struct{} `type:"structure"` @@ -7070,6 +8261,17 @@ func (s *PurchaseProvisionedCapacityInput) SetAccountId(v string) *PurchaseProvi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PurchaseProvisionedCapacityInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type PurchaseProvisionedCapacityOutput struct { _ struct{} `type:"structure"` @@ -7093,6 +8295,17 @@ func (s *PurchaseProvisionedCapacityOutput) SetCapacityId(v string) *PurchasePro return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PurchaseProvisionedCapacityOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CapacityId != nil { + v := *s.CapacityId + + e.SetValue(protocol.HeaderTarget, "x-amz-capacity-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input value for RemoveTagsFromVaultInput. type RemoveTagsFromVaultInput struct { _ struct{} `type:"structure"` @@ -7159,6 +8372,27 @@ func (s *RemoveTagsFromVaultInput) SetVaultName(v string) *RemoveTagsFromVaultIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RemoveTagsFromVaultInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TagKeys) > 0 { + v := s.TagKeys + + e.SetList(protocol.BodyTarget, "TagKeys", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type RemoveTagsFromVaultOutput struct { _ struct{} `type:"structure"` } @@ -7173,6 +8407,12 @@ func (s RemoveTagsFromVaultOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RemoveTagsFromVaultOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // SetDataRetrievalPolicy input. type SetDataRetrievalPolicyInput struct { _ struct{} `type:"structure"` @@ -7226,6 +8466,22 @@ func (s *SetDataRetrievalPolicyInput) SetPolicy(v *DataRetrievalPolicy) *SetData return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SetDataRetrievalPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Policy != nil { + v := s.Policy + + e.SetFields(protocol.BodyTarget, "Policy", v, protocol.Metadata{}) + } + + return nil +} + type SetDataRetrievalPolicyOutput struct { _ struct{} `type:"structure"` } @@ -7240,6 +8496,12 @@ func (s SetDataRetrievalPolicyOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SetDataRetrievalPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // SetVaultAccessPolicy input. type SetVaultAccessPolicyInput struct { _ struct{} `type:"structure" payload:"Policy"` @@ -7306,6 +8568,27 @@ func (s *SetVaultAccessPolicyInput) SetVaultName(v string) *SetVaultAccessPolicy return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SetVaultAccessPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Policy != nil { + v := s.Policy + + e.SetFields(protocol.PayloadTarget, "policy", v, protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type SetVaultAccessPolicyOutput struct { _ struct{} `type:"structure"` } @@ -7320,6 +8603,12 @@ func (s SetVaultAccessPolicyOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SetVaultAccessPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Provides options to configure notifications that will be sent when specific // events happen to a vault. type SetVaultNotificationsInput struct { @@ -7387,6 +8676,27 @@ func (s *SetVaultNotificationsInput) SetVaultNotificationConfig(v *VaultNotifica return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SetVaultNotificationsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultNotificationConfig != nil { + v := s.VaultNotificationConfig + + e.SetFields(protocol.PayloadTarget, "vaultNotificationConfig", v, protocol.Metadata{}) + } + + return nil +} + type SetVaultNotificationsOutput struct { _ struct{} `type:"structure"` } @@ -7401,6 +8711,12 @@ func (s SetVaultNotificationsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SetVaultNotificationsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Provides options to add an archive to a vault. type UploadArchiveInput struct { _ struct{} `type:"structure" payload:"Body"` @@ -7485,6 +8801,37 @@ func (s *UploadArchiveInput) SetVaultName(v string) *UploadArchiveInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UploadArchiveInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ArchiveDescription != nil { + v := *s.ArchiveDescription + + e.SetValue(protocol.HeaderTarget, "x-amz-archive-description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Body != nil { + v := s.Body + + e.SetStream(protocol.PayloadTarget, "body", protocol.ReadSeekerStream{V: v}, protocol.Metadata{}) + } + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.HeaderTarget, "x-amz-sha256-tree-hash", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A list of in-progress multipart uploads for a vault. type UploadListElement struct { _ struct{} `type:"structure"` @@ -7548,6 +8895,45 @@ func (s *UploadListElement) SetVaultARN(v string) *UploadListElement { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UploadListElement) MarshalFields(e protocol.FieldEncoder) error { + if s.ArchiveDescription != nil { + v := *s.ArchiveDescription + + e.SetValue(protocol.BodyTarget, "ArchiveDescription", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MultipartUploadId != nil { + v := *s.MultipartUploadId + + e.SetValue(protocol.BodyTarget, "MultipartUploadId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PartSizeInBytes != nil { + v := *s.PartSizeInBytes + + e.SetValue(protocol.BodyTarget, "PartSizeInBytes", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.VaultARN != nil { + v := *s.VaultARN + + e.SetValue(protocol.BodyTarget, "VaultARN", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeUploadListElementList(vs []*UploadListElement) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Provides options to upload a part of an archive in a multipart upload operation. type UploadMultipartPartInput struct { _ struct{} `type:"structure" payload:"Body"` @@ -7649,6 +9035,42 @@ func (s *UploadMultipartPartInput) SetVaultName(v string) *UploadMultipartPartIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UploadMultipartPartInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.PathTarget, "accountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Body != nil { + v := s.Body + + e.SetStream(protocol.PayloadTarget, "body", protocol.ReadSeekerStream{V: v}, protocol.Metadata{}) + } + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.HeaderTarget, "x-amz-sha256-tree-hash", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Range != nil { + v := *s.Range + + e.SetValue(protocol.HeaderTarget, "Content-Range", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UploadId != nil { + v := *s.UploadId + + e.SetValue(protocol.PathTarget, "uploadId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VaultName != nil { + v := *s.VaultName + + e.SetValue(protocol.PathTarget, "vaultName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the Amazon Glacier response to your request. type UploadMultipartPartOutput struct { _ struct{} `type:"structure"` @@ -7673,6 +9095,17 @@ func (s *UploadMultipartPartOutput) SetChecksum(v string) *UploadMultipartPartOu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UploadMultipartPartOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.HeaderTarget, "x-amz-sha256-tree-hash", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the vault access policy. type VaultAccessPolicy struct { _ struct{} `type:"structure"` @@ -7697,6 +9130,17 @@ func (s *VaultAccessPolicy) SetPolicy(v string) *VaultAccessPolicy { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VaultAccessPolicy) MarshalFields(e protocol.FieldEncoder) error { + if s.Policy != nil { + v := *s.Policy + + e.SetValue(protocol.BodyTarget, "Policy", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains the vault lock policy. type VaultLockPolicy struct { _ struct{} `type:"structure"` @@ -7721,6 +9165,17 @@ func (s *VaultLockPolicy) SetPolicy(v string) *VaultLockPolicy { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VaultLockPolicy) MarshalFields(e protocol.FieldEncoder) error { + if s.Policy != nil { + v := *s.Policy + + e.SetValue(protocol.BodyTarget, "Policy", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Represents a vault's notification configuration. type VaultNotificationConfig struct { _ struct{} `type:"structure"` @@ -7756,6 +9211,22 @@ func (s *VaultNotificationConfig) SetSNSTopic(v string) *VaultNotificationConfig return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VaultNotificationConfig) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Events) > 0 { + v := s.Events + + e.SetList(protocol.BodyTarget, "Events", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.SNSTopic != nil { + v := *s.SNSTopic + + e.SetValue(protocol.BodyTarget, "SNSTopic", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + const ( // ActionCodeArchiveRetrieval is a ActionCode enum value ActionCodeArchiveRetrieval = "ArchiveRetrieval" diff --git a/service/greengrass/api.go b/service/greengrass/api.go index f1992a4970a..3567393ff42 100644 --- a/service/greengrass/api.go +++ b/service/greengrass/api.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" ) const opAssociateRoleToGroup = "AssociateRoleToGroup" @@ -5221,6 +5222,22 @@ func (s *AssociateRoleToGroupInput) SetRoleArn(v string) *AssociateRoleToGroupIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AssociateRoleToGroupInput) MarshalFields(e protocol.FieldEncoder) error { + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "RoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/AssociateRoleToGroupResponse type AssociateRoleToGroupOutput struct { _ struct{} `type:"structure"` @@ -5245,6 +5262,17 @@ func (s *AssociateRoleToGroupOutput) SetAssociatedAt(v string) *AssociateRoleToG return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AssociateRoleToGroupOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AssociatedAt != nil { + v := *s.AssociatedAt + + e.SetValue(protocol.BodyTarget, "AssociatedAt", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/AssociateServiceRoleToAccountRequest type AssociateServiceRoleToAccountInput struct { _ struct{} `type:"structure"` @@ -5269,6 +5297,17 @@ func (s *AssociateServiceRoleToAccountInput) SetRoleArn(v string) *AssociateServ return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AssociateServiceRoleToAccountInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "RoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/AssociateServiceRoleToAccountResponse type AssociateServiceRoleToAccountOutput struct { _ struct{} `type:"structure"` @@ -5293,6 +5332,17 @@ func (s *AssociateServiceRoleToAccountOutput) SetAssociatedAt(v string) *Associa return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AssociateServiceRoleToAccountOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AssociatedAt != nil { + v := *s.AssociatedAt + + e.SetValue(protocol.BodyTarget, "AssociatedAt", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Connectivity Info // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ConnectivityInfo type ConnectivityInfo struct { @@ -5345,6 +5395,40 @@ func (s *ConnectivityInfo) SetPortNumber(v int64) *ConnectivityInfo { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ConnectivityInfo) MarshalFields(e protocol.FieldEncoder) error { + if s.HostAddress != nil { + v := *s.HostAddress + + e.SetValue(protocol.BodyTarget, "HostAddress", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Metadata != nil { + v := *s.Metadata + + e.SetValue(protocol.BodyTarget, "Metadata", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PortNumber != nil { + v := *s.PortNumber + + e.SetValue(protocol.BodyTarget, "PortNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeConnectivityInfoList(vs []*ConnectivityInfo) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information on the core // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/Core type Core struct { @@ -5398,6 +5482,40 @@ func (s *Core) SetThingArn(v string) *Core { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Core) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateArn != nil { + v := *s.CertificateArn + + e.SetValue(protocol.BodyTarget, "CertificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SyncShadow != nil { + v := *s.SyncShadow + + e.SetValue(protocol.BodyTarget, "SyncShadow", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ThingArn != nil { + v := *s.ThingArn + + e.SetValue(protocol.BodyTarget, "ThingArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCoreList(vs []*Core) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information on core definition version // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CoreDefinitionVersion type CoreDefinitionVersion struct { @@ -5423,6 +5541,17 @@ func (s *CoreDefinitionVersion) SetCores(v []*Core) *CoreDefinitionVersion { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CoreDefinitionVersion) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Cores) > 0 { + v := s.Cores + + e.SetList(protocol.BodyTarget, "Cores", encodeCoreList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateCoreDefinitionRequest type CreateCoreDefinitionInput struct { _ struct{} `type:"structure"` @@ -5463,6 +5592,27 @@ func (s *CreateCoreDefinitionInput) SetName(v string) *CreateCoreDefinitionInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateCoreDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AmznClientToken != nil { + v := *s.AmznClientToken + + e.SetValue(protocol.HeaderTarget, "X-Amzn-Client-Token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InitialVersion != nil { + v := s.InitialVersion + + e.SetFields(protocol.BodyTarget, "InitialVersion", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateCoreDefinitionResponse type CreateCoreDefinitionOutput struct { _ struct{} `type:"structure"` @@ -5534,6 +5684,47 @@ func (s *CreateCoreDefinitionOutput) SetName(v string) *CreateCoreDefinitionOutp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateCoreDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedTimestamp != nil { + v := *s.LastUpdatedTimestamp + + e.SetValue(protocol.BodyTarget, "LastUpdatedTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersion != nil { + v := *s.LatestVersion + + e.SetValue(protocol.BodyTarget, "LatestVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersionArn != nil { + v := *s.LatestVersionArn + + e.SetValue(protocol.BodyTarget, "LatestVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateCoreDefinitionVersionRequest type CreateCoreDefinitionVersionInput struct { _ struct{} `type:"structure"` @@ -5587,6 +5778,27 @@ func (s *CreateCoreDefinitionVersionInput) SetCores(v []*Core) *CreateCoreDefini return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateCoreDefinitionVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AmznClientToken != nil { + v := *s.AmznClientToken + + e.SetValue(protocol.HeaderTarget, "X-Amzn-Client-Token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CoreDefinitionId != nil { + v := *s.CoreDefinitionId + + e.SetValue(protocol.PathTarget, "CoreDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Cores) > 0 { + v := s.Cores + + e.SetList(protocol.BodyTarget, "Cores", encodeCoreList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateCoreDefinitionVersionResponse type CreateCoreDefinitionVersionOutput struct { _ struct{} `type:"structure"` @@ -5634,6 +5846,32 @@ func (s *CreateCoreDefinitionVersionOutput) SetVersion(v string) *CreateCoreDefi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateCoreDefinitionVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Information on Deployment // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateDeploymentRequest type CreateDeploymentInput struct { @@ -5708,6 +5946,37 @@ func (s *CreateDeploymentInput) SetGroupVersionId(v string) *CreateDeploymentInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDeploymentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AmznClientToken != nil { + v := *s.AmznClientToken + + e.SetValue(protocol.HeaderTarget, "X-Amzn-Client-Token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeploymentId != nil { + v := *s.DeploymentId + + e.SetValue(protocol.BodyTarget, "DeploymentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeploymentType != nil { + v := *s.DeploymentType + + e.SetValue(protocol.BodyTarget, "DeploymentType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GroupVersionId != nil { + v := *s.GroupVersionId + + e.SetValue(protocol.BodyTarget, "GroupVersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateDeploymentResponse type CreateDeploymentOutput struct { _ struct{} `type:"structure"` @@ -5741,6 +6010,22 @@ func (s *CreateDeploymentOutput) SetDeploymentId(v string) *CreateDeploymentOutp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDeploymentOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeploymentArn != nil { + v := *s.DeploymentArn + + e.SetValue(protocol.BodyTarget, "DeploymentArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeploymentId != nil { + v := *s.DeploymentId + + e.SetValue(protocol.BodyTarget, "DeploymentId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateDeviceDefinitionRequest type CreateDeviceDefinitionInput struct { _ struct{} `type:"structure"` @@ -5781,6 +6066,27 @@ func (s *CreateDeviceDefinitionInput) SetName(v string) *CreateDeviceDefinitionI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDeviceDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AmznClientToken != nil { + v := *s.AmznClientToken + + e.SetValue(protocol.HeaderTarget, "X-Amzn-Client-Token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InitialVersion != nil { + v := s.InitialVersion + + e.SetFields(protocol.BodyTarget, "InitialVersion", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateDeviceDefinitionResponse type CreateDeviceDefinitionOutput struct { _ struct{} `type:"structure"` @@ -5852,6 +6158,47 @@ func (s *CreateDeviceDefinitionOutput) SetName(v string) *CreateDeviceDefinition return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDeviceDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedTimestamp != nil { + v := *s.LastUpdatedTimestamp + + e.SetValue(protocol.BodyTarget, "LastUpdatedTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersion != nil { + v := *s.LatestVersion + + e.SetValue(protocol.BodyTarget, "LatestVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersionArn != nil { + v := *s.LatestVersionArn + + e.SetValue(protocol.BodyTarget, "LatestVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateDeviceDefinitionVersionRequest type CreateDeviceDefinitionVersionInput struct { _ struct{} `type:"structure"` @@ -5905,6 +6252,27 @@ func (s *CreateDeviceDefinitionVersionInput) SetDevices(v []*Device) *CreateDevi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDeviceDefinitionVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AmznClientToken != nil { + v := *s.AmznClientToken + + e.SetValue(protocol.HeaderTarget, "X-Amzn-Client-Token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeviceDefinitionId != nil { + v := *s.DeviceDefinitionId + + e.SetValue(protocol.PathTarget, "DeviceDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Devices) > 0 { + v := s.Devices + + e.SetList(protocol.BodyTarget, "Devices", encodeDeviceList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateDeviceDefinitionVersionResponse type CreateDeviceDefinitionVersionOutput struct { _ struct{} `type:"structure"` @@ -5952,6 +6320,32 @@ func (s *CreateDeviceDefinitionVersionOutput) SetVersion(v string) *CreateDevice return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateDeviceDefinitionVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateFunctionDefinitionRequest type CreateFunctionDefinitionInput struct { _ struct{} `type:"structure"` @@ -5992,6 +6386,27 @@ func (s *CreateFunctionDefinitionInput) SetName(v string) *CreateFunctionDefinit return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateFunctionDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AmznClientToken != nil { + v := *s.AmznClientToken + + e.SetValue(protocol.HeaderTarget, "X-Amzn-Client-Token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InitialVersion != nil { + v := s.InitialVersion + + e.SetFields(protocol.BodyTarget, "InitialVersion", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateFunctionDefinitionResponse type CreateFunctionDefinitionOutput struct { _ struct{} `type:"structure"` @@ -6063,6 +6478,47 @@ func (s *CreateFunctionDefinitionOutput) SetName(v string) *CreateFunctionDefini return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateFunctionDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedTimestamp != nil { + v := *s.LastUpdatedTimestamp + + e.SetValue(protocol.BodyTarget, "LastUpdatedTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersion != nil { + v := *s.LatestVersion + + e.SetValue(protocol.BodyTarget, "LatestVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersionArn != nil { + v := *s.LatestVersionArn + + e.SetValue(protocol.BodyTarget, "LatestVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateFunctionDefinitionVersionRequest type CreateFunctionDefinitionVersionInput struct { _ struct{} `type:"structure"` @@ -6116,6 +6572,27 @@ func (s *CreateFunctionDefinitionVersionInput) SetFunctions(v []*Function) *Crea return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateFunctionDefinitionVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AmznClientToken != nil { + v := *s.AmznClientToken + + e.SetValue(protocol.HeaderTarget, "X-Amzn-Client-Token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionDefinitionId != nil { + v := *s.FunctionDefinitionId + + e.SetValue(protocol.PathTarget, "FunctionDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Functions) > 0 { + v := s.Functions + + e.SetList(protocol.BodyTarget, "Functions", encodeFunctionList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateFunctionDefinitionVersionResponse type CreateFunctionDefinitionVersionOutput struct { _ struct{} `type:"structure"` @@ -6163,6 +6640,32 @@ func (s *CreateFunctionDefinitionVersionOutput) SetVersion(v string) *CreateFunc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateFunctionDefinitionVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateGroupCertificateAuthorityRequest type CreateGroupCertificateAuthorityInput struct { _ struct{} `type:"structure"` @@ -6208,6 +6711,22 @@ func (s *CreateGroupCertificateAuthorityInput) SetGroupId(v string) *CreateGroup return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateGroupCertificateAuthorityInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AmznClientToken != nil { + v := *s.AmznClientToken + + e.SetValue(protocol.HeaderTarget, "X-Amzn-Client-Token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateGroupCertificateAuthorityResponse type CreateGroupCertificateAuthorityOutput struct { _ struct{} `type:"structure"` @@ -6232,6 +6751,17 @@ func (s *CreateGroupCertificateAuthorityOutput) SetGroupCertificateAuthorityArn( return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateGroupCertificateAuthorityOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.GroupCertificateAuthorityArn != nil { + v := *s.GroupCertificateAuthorityArn + + e.SetValue(protocol.BodyTarget, "GroupCertificateAuthorityArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateGroupRequest type CreateGroupInput struct { _ struct{} `type:"structure"` @@ -6272,6 +6802,27 @@ func (s *CreateGroupInput) SetName(v string) *CreateGroupInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateGroupInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AmznClientToken != nil { + v := *s.AmznClientToken + + e.SetValue(protocol.HeaderTarget, "X-Amzn-Client-Token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InitialVersion != nil { + v := s.InitialVersion + + e.SetFields(protocol.BodyTarget, "InitialVersion", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateGroupResponse type CreateGroupOutput struct { _ struct{} `type:"structure"` @@ -6343,6 +6894,47 @@ func (s *CreateGroupOutput) SetName(v string) *CreateGroupOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateGroupOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedTimestamp != nil { + v := *s.LastUpdatedTimestamp + + e.SetValue(protocol.BodyTarget, "LastUpdatedTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersion != nil { + v := *s.LatestVersion + + e.SetValue(protocol.BodyTarget, "LatestVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersionArn != nil { + v := *s.LatestVersionArn + + e.SetValue(protocol.BodyTarget, "LatestVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateGroupVersionRequest type CreateGroupVersionInput struct { _ struct{} `type:"structure"` @@ -6428,6 +7020,47 @@ func (s *CreateGroupVersionInput) SetSubscriptionDefinitionVersionArn(v string) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateGroupVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AmznClientToken != nil { + v := *s.AmznClientToken + + e.SetValue(protocol.HeaderTarget, "X-Amzn-Client-Token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CoreDefinitionVersionArn != nil { + v := *s.CoreDefinitionVersionArn + + e.SetValue(protocol.BodyTarget, "CoreDefinitionVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeviceDefinitionVersionArn != nil { + v := *s.DeviceDefinitionVersionArn + + e.SetValue(protocol.BodyTarget, "DeviceDefinitionVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionDefinitionVersionArn != nil { + v := *s.FunctionDefinitionVersionArn + + e.SetValue(protocol.BodyTarget, "FunctionDefinitionVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LoggerDefinitionVersionArn != nil { + v := *s.LoggerDefinitionVersionArn + + e.SetValue(protocol.BodyTarget, "LoggerDefinitionVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubscriptionDefinitionVersionArn != nil { + v := *s.SubscriptionDefinitionVersionArn + + e.SetValue(protocol.BodyTarget, "SubscriptionDefinitionVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateGroupVersionResponse type CreateGroupVersionOutput struct { _ struct{} `type:"structure"` @@ -6475,6 +7108,32 @@ func (s *CreateGroupVersionOutput) SetVersion(v string) *CreateGroupVersionOutpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateGroupVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateLoggerDefinitionRequest type CreateLoggerDefinitionInput struct { _ struct{} `type:"structure"` @@ -6515,6 +7174,27 @@ func (s *CreateLoggerDefinitionInput) SetName(v string) *CreateLoggerDefinitionI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateLoggerDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AmznClientToken != nil { + v := *s.AmznClientToken + + e.SetValue(protocol.HeaderTarget, "X-Amzn-Client-Token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InitialVersion != nil { + v := s.InitialVersion + + e.SetFields(protocol.BodyTarget, "InitialVersion", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateLoggerDefinitionResponse type CreateLoggerDefinitionOutput struct { _ struct{} `type:"structure"` @@ -6586,6 +7266,47 @@ func (s *CreateLoggerDefinitionOutput) SetName(v string) *CreateLoggerDefinition return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateLoggerDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedTimestamp != nil { + v := *s.LastUpdatedTimestamp + + e.SetValue(protocol.BodyTarget, "LastUpdatedTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersion != nil { + v := *s.LatestVersion + + e.SetValue(protocol.BodyTarget, "LatestVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersionArn != nil { + v := *s.LatestVersionArn + + e.SetValue(protocol.BodyTarget, "LatestVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateLoggerDefinitionVersionRequest type CreateLoggerDefinitionVersionInput struct { _ struct{} `type:"structure"` @@ -6639,6 +7360,27 @@ func (s *CreateLoggerDefinitionVersionInput) SetLoggers(v []*Logger) *CreateLogg return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateLoggerDefinitionVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AmznClientToken != nil { + v := *s.AmznClientToken + + e.SetValue(protocol.HeaderTarget, "X-Amzn-Client-Token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LoggerDefinitionId != nil { + v := *s.LoggerDefinitionId + + e.SetValue(protocol.PathTarget, "LoggerDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Loggers) > 0 { + v := s.Loggers + + e.SetList(protocol.BodyTarget, "Loggers", encodeLoggerList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateLoggerDefinitionVersionResponse type CreateLoggerDefinitionVersionOutput struct { _ struct{} `type:"structure"` @@ -6686,6 +7428,32 @@ func (s *CreateLoggerDefinitionVersionOutput) SetVersion(v string) *CreateLogger return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateLoggerDefinitionVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateSubscriptionDefinitionRequest type CreateSubscriptionDefinitionInput struct { _ struct{} `type:"structure"` @@ -6726,6 +7494,27 @@ func (s *CreateSubscriptionDefinitionInput) SetName(v string) *CreateSubscriptio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateSubscriptionDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AmznClientToken != nil { + v := *s.AmznClientToken + + e.SetValue(protocol.HeaderTarget, "X-Amzn-Client-Token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InitialVersion != nil { + v := s.InitialVersion + + e.SetFields(protocol.BodyTarget, "InitialVersion", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateSubscriptionDefinitionResponse type CreateSubscriptionDefinitionOutput struct { _ struct{} `type:"structure"` @@ -6797,6 +7586,47 @@ func (s *CreateSubscriptionDefinitionOutput) SetName(v string) *CreateSubscripti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateSubscriptionDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedTimestamp != nil { + v := *s.LastUpdatedTimestamp + + e.SetValue(protocol.BodyTarget, "LastUpdatedTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersion != nil { + v := *s.LatestVersion + + e.SetValue(protocol.BodyTarget, "LatestVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersionArn != nil { + v := *s.LatestVersionArn + + e.SetValue(protocol.BodyTarget, "LatestVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateSubscriptionDefinitionVersionRequest type CreateSubscriptionDefinitionVersionInput struct { _ struct{} `type:"structure"` @@ -6850,6 +7680,27 @@ func (s *CreateSubscriptionDefinitionVersionInput) SetSubscriptions(v []*Subscri return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateSubscriptionDefinitionVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AmznClientToken != nil { + v := *s.AmznClientToken + + e.SetValue(protocol.HeaderTarget, "X-Amzn-Client-Token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubscriptionDefinitionId != nil { + v := *s.SubscriptionDefinitionId + + e.SetValue(protocol.PathTarget, "SubscriptionDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Subscriptions) > 0 { + v := s.Subscriptions + + e.SetList(protocol.BodyTarget, "Subscriptions", encodeSubscriptionList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateSubscriptionDefinitionVersionResponse type CreateSubscriptionDefinitionVersionOutput struct { _ struct{} `type:"structure"` @@ -6897,6 +7748,32 @@ func (s *CreateSubscriptionDefinitionVersionOutput) SetVersion(v string) *Create return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateSubscriptionDefinitionVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Information on the Definition // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DefinitionInformation type DefinitionInformation struct { @@ -6976,6 +7853,55 @@ func (s *DefinitionInformation) SetName(v string) *DefinitionInformation { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DefinitionInformation) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedTimestamp != nil { + v := *s.LastUpdatedTimestamp + + e.SetValue(protocol.BodyTarget, "LastUpdatedTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersion != nil { + v := *s.LatestVersion + + e.SetValue(protocol.BodyTarget, "LatestVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersionArn != nil { + v := *s.LatestVersionArn + + e.SetValue(protocol.BodyTarget, "LatestVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDefinitionInformationList(vs []*DefinitionInformation) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteCoreDefinitionRequest type DeleteCoreDefinitionInput struct { _ struct{} `type:"structure"` @@ -7013,6 +7939,17 @@ func (s *DeleteCoreDefinitionInput) SetCoreDefinitionId(v string) *DeleteCoreDef return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteCoreDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CoreDefinitionId != nil { + v := *s.CoreDefinitionId + + e.SetValue(protocol.PathTarget, "CoreDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteCoreDefinitionResponse type DeleteCoreDefinitionOutput struct { _ struct{} `type:"structure"` @@ -7028,6 +7965,12 @@ func (s DeleteCoreDefinitionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteCoreDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteDeviceDefinitionRequest type DeleteDeviceDefinitionInput struct { _ struct{} `type:"structure"` @@ -7065,6 +8008,17 @@ func (s *DeleteDeviceDefinitionInput) SetDeviceDefinitionId(v string) *DeleteDev return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDeviceDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeviceDefinitionId != nil { + v := *s.DeviceDefinitionId + + e.SetValue(protocol.PathTarget, "DeviceDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteDeviceDefinitionResponse type DeleteDeviceDefinitionOutput struct { _ struct{} `type:"structure"` @@ -7080,6 +8034,12 @@ func (s DeleteDeviceDefinitionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDeviceDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteFunctionDefinitionRequest type DeleteFunctionDefinitionInput struct { _ struct{} `type:"structure"` @@ -7117,6 +8077,17 @@ func (s *DeleteFunctionDefinitionInput) SetFunctionDefinitionId(v string) *Delet return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteFunctionDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionDefinitionId != nil { + v := *s.FunctionDefinitionId + + e.SetValue(protocol.PathTarget, "FunctionDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteFunctionDefinitionResponse type DeleteFunctionDefinitionOutput struct { _ struct{} `type:"structure"` @@ -7132,6 +8103,12 @@ func (s DeleteFunctionDefinitionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteFunctionDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteGroupRequest type DeleteGroupInput struct { _ struct{} `type:"structure"` @@ -7169,6 +8146,17 @@ func (s *DeleteGroupInput) SetGroupId(v string) *DeleteGroupInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteGroupInput) MarshalFields(e protocol.FieldEncoder) error { + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteGroupResponse type DeleteGroupOutput struct { _ struct{} `type:"structure"` @@ -7184,6 +8172,12 @@ func (s DeleteGroupOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteGroupOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteLoggerDefinitionRequest type DeleteLoggerDefinitionInput struct { _ struct{} `type:"structure"` @@ -7221,6 +8215,17 @@ func (s *DeleteLoggerDefinitionInput) SetLoggerDefinitionId(v string) *DeleteLog return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteLoggerDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.LoggerDefinitionId != nil { + v := *s.LoggerDefinitionId + + e.SetValue(protocol.PathTarget, "LoggerDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteLoggerDefinitionResponse type DeleteLoggerDefinitionOutput struct { _ struct{} `type:"structure"` @@ -7236,6 +8241,12 @@ func (s DeleteLoggerDefinitionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteLoggerDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteSubscriptionDefinitionRequest type DeleteSubscriptionDefinitionInput struct { _ struct{} `type:"structure"` @@ -7273,6 +8284,17 @@ func (s *DeleteSubscriptionDefinitionInput) SetSubscriptionDefinitionId(v string return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteSubscriptionDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.SubscriptionDefinitionId != nil { + v := *s.SubscriptionDefinitionId + + e.SetValue(protocol.PathTarget, "SubscriptionDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeleteSubscriptionDefinitionResponse type DeleteSubscriptionDefinitionOutput struct { _ struct{} `type:"structure"` @@ -7288,6 +8310,12 @@ func (s DeleteSubscriptionDefinitionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteSubscriptionDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Information on the deployment // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/Deployment type Deployment struct { @@ -7349,6 +8377,45 @@ func (s *Deployment) SetGroupArn(v string) *Deployment { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Deployment) MarshalFields(e protocol.FieldEncoder) error { + if s.CreatedAt != nil { + v := *s.CreatedAt + + e.SetValue(protocol.BodyTarget, "CreatedAt", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeploymentArn != nil { + v := *s.DeploymentArn + + e.SetValue(protocol.BodyTarget, "DeploymentArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeploymentId != nil { + v := *s.DeploymentId + + e.SetValue(protocol.BodyTarget, "DeploymentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeploymentType != nil { + v := *s.DeploymentType + + e.SetValue(protocol.BodyTarget, "DeploymentType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GroupArn != nil { + v := *s.GroupArn + + e.SetValue(protocol.BodyTarget, "GroupArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDeploymentList(vs []*Deployment) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information on a Device // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/Device type Device struct { @@ -7402,6 +8469,40 @@ func (s *Device) SetThingArn(v string) *Device { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Device) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateArn != nil { + v := *s.CertificateArn + + e.SetValue(protocol.BodyTarget, "CertificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SyncShadow != nil { + v := *s.SyncShadow + + e.SetValue(protocol.BodyTarget, "SyncShadow", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ThingArn != nil { + v := *s.ThingArn + + e.SetValue(protocol.BodyTarget, "ThingArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDeviceList(vs []*Device) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information on device definition version // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DeviceDefinitionVersion type DeviceDefinitionVersion struct { @@ -7427,6 +8528,17 @@ func (s *DeviceDefinitionVersion) SetDevices(v []*Device) *DeviceDefinitionVersi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeviceDefinitionVersion) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Devices) > 0 { + v := s.Devices + + e.SetList(protocol.BodyTarget, "Devices", encodeDeviceList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DisassociateRoleFromGroupRequest type DisassociateRoleFromGroupInput struct { _ struct{} `type:"structure"` @@ -7464,6 +8576,17 @@ func (s *DisassociateRoleFromGroupInput) SetGroupId(v string) *DisassociateRoleF return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DisassociateRoleFromGroupInput) MarshalFields(e protocol.FieldEncoder) error { + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DisassociateRoleFromGroupResponse type DisassociateRoleFromGroupOutput struct { _ struct{} `type:"structure"` @@ -7488,6 +8611,17 @@ func (s *DisassociateRoleFromGroupOutput) SetDisassociatedAt(v string) *Disassoc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DisassociateRoleFromGroupOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DisassociatedAt != nil { + v := *s.DisassociatedAt + + e.SetValue(protocol.BodyTarget, "DisassociatedAt", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DisassociateServiceRoleFromAccountRequest type DisassociateServiceRoleFromAccountInput struct { _ struct{} `type:"structure"` @@ -7503,6 +8637,12 @@ func (s DisassociateServiceRoleFromAccountInput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DisassociateServiceRoleFromAccountInput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/DisassociateServiceRoleFromAccountResponse type DisassociateServiceRoleFromAccountOutput struct { _ struct{} `type:"structure"` @@ -7527,6 +8667,17 @@ func (s *DisassociateServiceRoleFromAccountOutput) SetDisassociatedAt(v string) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DisassociateServiceRoleFromAccountOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DisassociatedAt != nil { + v := *s.DisassociatedAt + + e.SetValue(protocol.BodyTarget, "DisassociatedAt", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // ErrorDetail // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ErrorDetail type ErrorDetail struct { @@ -7561,6 +8712,30 @@ func (s *ErrorDetail) SetDetailedErrorMessage(v string) *ErrorDetail { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ErrorDetail) MarshalFields(e protocol.FieldEncoder) error { + if s.DetailedErrorCode != nil { + v := *s.DetailedErrorCode + + e.SetValue(protocol.BodyTarget, "DetailedErrorCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DetailedErrorMessage != nil { + v := *s.DetailedErrorMessage + + e.SetValue(protocol.BodyTarget, "DetailedErrorMessage", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeErrorDetailList(vs []*ErrorDetail) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information on function // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/Function type Function struct { @@ -7604,6 +8779,35 @@ func (s *Function) SetId(v string) *Function { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Function) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionArn != nil { + v := *s.FunctionArn + + e.SetValue(protocol.BodyTarget, "FunctionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionConfiguration != nil { + v := s.FunctionConfiguration + + e.SetFields(protocol.BodyTarget, "FunctionConfiguration", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeFunctionList(vs []*Function) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Configuration of the function // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/FunctionConfiguration type FunctionConfiguration struct { @@ -7676,6 +8880,42 @@ func (s *FunctionConfiguration) SetTimeout(v int64) *FunctionConfiguration { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FunctionConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.Environment != nil { + v := s.Environment + + e.SetFields(protocol.BodyTarget, "Environment", v, protocol.Metadata{}) + } + if s.ExecArgs != nil { + v := *s.ExecArgs + + e.SetValue(protocol.BodyTarget, "ExecArgs", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Executable != nil { + v := *s.Executable + + e.SetValue(protocol.BodyTarget, "Executable", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MemorySize != nil { + v := *s.MemorySize + + e.SetValue(protocol.BodyTarget, "MemorySize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Pinned != nil { + v := *s.Pinned + + e.SetValue(protocol.BodyTarget, "Pinned", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Timeout != nil { + v := *s.Timeout + + e.SetValue(protocol.BodyTarget, "Timeout", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Environment of the function configuration // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/FunctionConfigurationEnvironment type FunctionConfigurationEnvironment struct { @@ -7700,6 +8940,17 @@ func (s *FunctionConfigurationEnvironment) SetVariables(v map[string]*string) *F return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FunctionConfigurationEnvironment) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Variables) > 0 { + v := s.Variables + + e.SetMap(protocol.BodyTarget, "Variables", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // Information on the function definition version // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/FunctionDefinitionVersion type FunctionDefinitionVersion struct { @@ -7725,6 +8976,17 @@ func (s *FunctionDefinitionVersion) SetFunctions(v []*Function) *FunctionDefinit return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FunctionDefinitionVersion) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Functions) > 0 { + v := s.Functions + + e.SetList(protocol.BodyTarget, "Functions", encodeFunctionList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetAssociatedRoleRequest type GetAssociatedRoleInput struct { _ struct{} `type:"structure"` @@ -7762,6 +9024,17 @@ func (s *GetAssociatedRoleInput) SetGroupId(v string) *GetAssociatedRoleInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAssociatedRoleInput) MarshalFields(e protocol.FieldEncoder) error { + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetAssociatedRoleResponse type GetAssociatedRoleOutput struct { _ struct{} `type:"structure"` @@ -7795,6 +9068,22 @@ func (s *GetAssociatedRoleOutput) SetRoleArn(v string) *GetAssociatedRoleOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAssociatedRoleOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AssociatedAt != nil { + v := *s.AssociatedAt + + e.SetValue(protocol.BodyTarget, "AssociatedAt", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "RoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetConnectivityInfoRequest type GetConnectivityInfoInput struct { _ struct{} `type:"structure"` @@ -7832,6 +9121,17 @@ func (s *GetConnectivityInfoInput) SetThingName(v string) *GetConnectivityInfoIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetConnectivityInfoInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ThingName != nil { + v := *s.ThingName + + e.SetValue(protocol.PathTarget, "ThingName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // connectivity info response // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetConnectivityInfoResponse type GetConnectivityInfoOutput struct { @@ -7865,6 +9165,22 @@ func (s *GetConnectivityInfoOutput) SetMessage(v string) *GetConnectivityInfoOut return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetConnectivityInfoOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ConnectivityInfo) > 0 { + v := s.ConnectivityInfo + + e.SetList(protocol.BodyTarget, "ConnectivityInfo", encodeConnectivityInfoList(v), protocol.Metadata{}) + } + if s.Message != nil { + v := *s.Message + + e.SetValue(protocol.BodyTarget, "message", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetCoreDefinitionRequest type GetCoreDefinitionInput struct { _ struct{} `type:"structure"` @@ -7902,6 +9218,17 @@ func (s *GetCoreDefinitionInput) SetCoreDefinitionId(v string) *GetCoreDefinitio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCoreDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CoreDefinitionId != nil { + v := *s.CoreDefinitionId + + e.SetValue(protocol.PathTarget, "CoreDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetCoreDefinitionResponse type GetCoreDefinitionOutput struct { _ struct{} `type:"structure"` @@ -7973,6 +9300,47 @@ func (s *GetCoreDefinitionOutput) SetName(v string) *GetCoreDefinitionOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCoreDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedTimestamp != nil { + v := *s.LastUpdatedTimestamp + + e.SetValue(protocol.BodyTarget, "LastUpdatedTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersion != nil { + v := *s.LatestVersion + + e.SetValue(protocol.BodyTarget, "LatestVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersionArn != nil { + v := *s.LatestVersionArn + + e.SetValue(protocol.BodyTarget, "LatestVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetCoreDefinitionVersionRequest type GetCoreDefinitionVersionInput struct { _ struct{} `type:"structure"` @@ -8022,6 +9390,22 @@ func (s *GetCoreDefinitionVersionInput) SetCoreDefinitionVersionId(v string) *Ge return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCoreDefinitionVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CoreDefinitionId != nil { + v := *s.CoreDefinitionId + + e.SetValue(protocol.PathTarget, "CoreDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CoreDefinitionVersionId != nil { + v := *s.CoreDefinitionVersionId + + e.SetValue(protocol.PathTarget, "CoreDefinitionVersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetCoreDefinitionVersionResponse type GetCoreDefinitionVersionOutput struct { _ struct{} `type:"structure"` @@ -8082,6 +9466,37 @@ func (s *GetCoreDefinitionVersionOutput) SetVersion(v string) *GetCoreDefinition return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCoreDefinitionVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Definition != nil { + v := s.Definition + + e.SetFields(protocol.BodyTarget, "Definition", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetDeploymentStatusRequest type GetDeploymentStatusInput struct { _ struct{} `type:"structure"` @@ -8125,10 +9540,26 @@ func (s *GetDeploymentStatusInput) SetDeploymentId(v string) *GetDeploymentStatu return s } -// SetGroupId sets the GroupId field's value. -func (s *GetDeploymentStatusInput) SetGroupId(v string) *GetDeploymentStatusInput { - s.GroupId = &v - return s +// SetGroupId sets the GroupId field's value. +func (s *GetDeploymentStatusInput) SetGroupId(v string) *GetDeploymentStatusInput { + s.GroupId = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDeploymentStatusInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeploymentId != nil { + v := *s.DeploymentId + + e.SetValue(protocol.PathTarget, "DeploymentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil } // The response body contains the status of a deployment for a group. @@ -8192,6 +9623,37 @@ func (s *GetDeploymentStatusOutput) SetUpdatedAt(v string) *GetDeploymentStatusO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDeploymentStatusOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeploymentStatus != nil { + v := *s.DeploymentStatus + + e.SetValue(protocol.BodyTarget, "DeploymentStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeploymentType != nil { + v := *s.DeploymentType + + e.SetValue(protocol.BodyTarget, "DeploymentType", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.ErrorDetails) > 0 { + v := s.ErrorDetails + + e.SetList(protocol.BodyTarget, "ErrorDetails", encodeErrorDetailList(v), protocol.Metadata{}) + } + if s.ErrorMessage != nil { + v := *s.ErrorMessage + + e.SetValue(protocol.BodyTarget, "ErrorMessage", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UpdatedAt != nil { + v := *s.UpdatedAt + + e.SetValue(protocol.BodyTarget, "UpdatedAt", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetDeviceDefinitionRequest type GetDeviceDefinitionInput struct { _ struct{} `type:"structure"` @@ -8229,6 +9691,17 @@ func (s *GetDeviceDefinitionInput) SetDeviceDefinitionId(v string) *GetDeviceDef return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDeviceDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeviceDefinitionId != nil { + v := *s.DeviceDefinitionId + + e.SetValue(protocol.PathTarget, "DeviceDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetDeviceDefinitionResponse type GetDeviceDefinitionOutput struct { _ struct{} `type:"structure"` @@ -8300,6 +9773,47 @@ func (s *GetDeviceDefinitionOutput) SetName(v string) *GetDeviceDefinitionOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDeviceDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedTimestamp != nil { + v := *s.LastUpdatedTimestamp + + e.SetValue(protocol.BodyTarget, "LastUpdatedTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersion != nil { + v := *s.LatestVersion + + e.SetValue(protocol.BodyTarget, "LatestVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersionArn != nil { + v := *s.LatestVersionArn + + e.SetValue(protocol.BodyTarget, "LatestVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetDeviceDefinitionVersionRequest type GetDeviceDefinitionVersionInput struct { _ struct{} `type:"structure"` @@ -8349,6 +9863,22 @@ func (s *GetDeviceDefinitionVersionInput) SetDeviceDefinitionVersionId(v string) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDeviceDefinitionVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeviceDefinitionId != nil { + v := *s.DeviceDefinitionId + + e.SetValue(protocol.PathTarget, "DeviceDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeviceDefinitionVersionId != nil { + v := *s.DeviceDefinitionVersionId + + e.SetValue(protocol.PathTarget, "DeviceDefinitionVersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetDeviceDefinitionVersionResponse type GetDeviceDefinitionVersionOutput struct { _ struct{} `type:"structure"` @@ -8409,6 +9939,37 @@ func (s *GetDeviceDefinitionVersionOutput) SetVersion(v string) *GetDeviceDefini return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDeviceDefinitionVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Definition != nil { + v := s.Definition + + e.SetFields(protocol.BodyTarget, "Definition", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetFunctionDefinitionRequest type GetFunctionDefinitionInput struct { _ struct{} `type:"structure"` @@ -8446,6 +10007,17 @@ func (s *GetFunctionDefinitionInput) SetFunctionDefinitionId(v string) *GetFunct return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetFunctionDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionDefinitionId != nil { + v := *s.FunctionDefinitionId + + e.SetValue(protocol.PathTarget, "FunctionDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetFunctionDefinitionResponse type GetFunctionDefinitionOutput struct { _ struct{} `type:"structure"` @@ -8517,6 +10089,47 @@ func (s *GetFunctionDefinitionOutput) SetName(v string) *GetFunctionDefinitionOu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetFunctionDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedTimestamp != nil { + v := *s.LastUpdatedTimestamp + + e.SetValue(protocol.BodyTarget, "LastUpdatedTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersion != nil { + v := *s.LatestVersion + + e.SetValue(protocol.BodyTarget, "LatestVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersionArn != nil { + v := *s.LatestVersionArn + + e.SetValue(protocol.BodyTarget, "LatestVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetFunctionDefinitionVersionRequest type GetFunctionDefinitionVersionInput struct { _ struct{} `type:"structure"` @@ -8566,6 +10179,22 @@ func (s *GetFunctionDefinitionVersionInput) SetFunctionDefinitionVersionId(v str return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetFunctionDefinitionVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionDefinitionId != nil { + v := *s.FunctionDefinitionId + + e.SetValue(protocol.PathTarget, "FunctionDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionDefinitionVersionId != nil { + v := *s.FunctionDefinitionVersionId + + e.SetValue(protocol.PathTarget, "FunctionDefinitionVersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Function definition version // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetFunctionDefinitionVersionResponse type GetFunctionDefinitionVersionOutput struct { @@ -8627,6 +10256,37 @@ func (s *GetFunctionDefinitionVersionOutput) SetVersion(v string) *GetFunctionDe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetFunctionDefinitionVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Definition != nil { + v := s.Definition + + e.SetFields(protocol.BodyTarget, "Definition", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroupCertificateAuthorityRequest type GetGroupCertificateAuthorityInput struct { _ struct{} `type:"structure"` @@ -8676,6 +10336,22 @@ func (s *GetGroupCertificateAuthorityInput) SetGroupId(v string) *GetGroupCertif return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetGroupCertificateAuthorityInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateAuthorityId != nil { + v := *s.CertificateAuthorityId + + e.SetValue(protocol.PathTarget, "CertificateAuthorityId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Certificate authority for the group. // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroupCertificateAuthorityResponse type GetGroupCertificateAuthorityOutput struct { @@ -8719,6 +10395,27 @@ func (s *GetGroupCertificateAuthorityOutput) SetPemEncodedCertificate(v string) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetGroupCertificateAuthorityOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.GroupCertificateAuthorityArn != nil { + v := *s.GroupCertificateAuthorityArn + + e.SetValue(protocol.BodyTarget, "GroupCertificateAuthorityArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GroupCertificateAuthorityId != nil { + v := *s.GroupCertificateAuthorityId + + e.SetValue(protocol.BodyTarget, "GroupCertificateAuthorityId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PemEncodedCertificate != nil { + v := *s.PemEncodedCertificate + + e.SetValue(protocol.BodyTarget, "PemEncodedCertificate", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroupCertificateConfigurationRequest type GetGroupCertificateConfigurationInput struct { _ struct{} `type:"structure"` @@ -8756,6 +10453,17 @@ func (s *GetGroupCertificateConfigurationInput) SetGroupId(v string) *GetGroupCe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetGroupCertificateConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroupCertificateConfigurationResponse type GetGroupCertificateConfigurationOutput struct { _ struct{} `type:"structure"` @@ -8795,6 +10503,27 @@ func (s *GetGroupCertificateConfigurationOutput) SetGroupId(v string) *GetGroupC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetGroupCertificateConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateAuthorityExpiryInMilliseconds != nil { + v := *s.CertificateAuthorityExpiryInMilliseconds + + e.SetValue(protocol.BodyTarget, "CertificateAuthorityExpiryInMilliseconds", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateExpiryInMilliseconds != nil { + v := *s.CertificateExpiryInMilliseconds + + e.SetValue(protocol.BodyTarget, "CertificateExpiryInMilliseconds", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.BodyTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroupRequest type GetGroupInput struct { _ struct{} `type:"structure"` @@ -8832,6 +10561,17 @@ func (s *GetGroupInput) SetGroupId(v string) *GetGroupInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetGroupInput) MarshalFields(e protocol.FieldEncoder) error { + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroupResponse type GetGroupOutput struct { _ struct{} `type:"structure"` @@ -8903,6 +10643,47 @@ func (s *GetGroupOutput) SetName(v string) *GetGroupOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetGroupOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedTimestamp != nil { + v := *s.LastUpdatedTimestamp + + e.SetValue(protocol.BodyTarget, "LastUpdatedTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersion != nil { + v := *s.LatestVersion + + e.SetValue(protocol.BodyTarget, "LatestVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersionArn != nil { + v := *s.LatestVersionArn + + e.SetValue(protocol.BodyTarget, "LatestVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroupVersionRequest type GetGroupVersionInput struct { _ struct{} `type:"structure"` @@ -8952,6 +10733,22 @@ func (s *GetGroupVersionInput) SetGroupVersionId(v string) *GetGroupVersionInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetGroupVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GroupVersionId != nil { + v := *s.GroupVersionId + + e.SetValue(protocol.PathTarget, "GroupVersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Information on the group version // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetGroupVersionResponse type GetGroupVersionOutput struct { @@ -9013,6 +10810,37 @@ func (s *GetGroupVersionOutput) SetVersion(v string) *GetGroupVersionOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetGroupVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Definition != nil { + v := s.Definition + + e.SetFields(protocol.BodyTarget, "Definition", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetLoggerDefinitionRequest type GetLoggerDefinitionInput struct { _ struct{} `type:"structure"` @@ -9050,6 +10878,17 @@ func (s *GetLoggerDefinitionInput) SetLoggerDefinitionId(v string) *GetLoggerDef return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetLoggerDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.LoggerDefinitionId != nil { + v := *s.LoggerDefinitionId + + e.SetValue(protocol.PathTarget, "LoggerDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetLoggerDefinitionResponse type GetLoggerDefinitionOutput struct { _ struct{} `type:"structure"` @@ -9121,6 +10960,47 @@ func (s *GetLoggerDefinitionOutput) SetName(v string) *GetLoggerDefinitionOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetLoggerDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedTimestamp != nil { + v := *s.LastUpdatedTimestamp + + e.SetValue(protocol.BodyTarget, "LastUpdatedTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersion != nil { + v := *s.LatestVersion + + e.SetValue(protocol.BodyTarget, "LatestVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersionArn != nil { + v := *s.LatestVersionArn + + e.SetValue(protocol.BodyTarget, "LatestVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetLoggerDefinitionVersionRequest type GetLoggerDefinitionVersionInput struct { _ struct{} `type:"structure"` @@ -9170,6 +11050,22 @@ func (s *GetLoggerDefinitionVersionInput) SetLoggerDefinitionVersionId(v string) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetLoggerDefinitionVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.LoggerDefinitionId != nil { + v := *s.LoggerDefinitionId + + e.SetValue(protocol.PathTarget, "LoggerDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LoggerDefinitionVersionId != nil { + v := *s.LoggerDefinitionVersionId + + e.SetValue(protocol.PathTarget, "LoggerDefinitionVersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Information on logger definition version response // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetLoggerDefinitionVersionResponse type GetLoggerDefinitionVersionOutput struct { @@ -9231,6 +11127,37 @@ func (s *GetLoggerDefinitionVersionOutput) SetVersion(v string) *GetLoggerDefini return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetLoggerDefinitionVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Definition != nil { + v := s.Definition + + e.SetFields(protocol.BodyTarget, "Definition", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetServiceRoleForAccountRequest type GetServiceRoleForAccountInput struct { _ struct{} `type:"structure"` @@ -9246,6 +11173,12 @@ func (s GetServiceRoleForAccountInput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetServiceRoleForAccountInput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetServiceRoleForAccountResponse type GetServiceRoleForAccountOutput struct { _ struct{} `type:"structure"` @@ -9279,6 +11212,22 @@ func (s *GetServiceRoleForAccountOutput) SetRoleArn(v string) *GetServiceRoleFor return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetServiceRoleForAccountOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AssociatedAt != nil { + v := *s.AssociatedAt + + e.SetValue(protocol.BodyTarget, "AssociatedAt", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "RoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetSubscriptionDefinitionRequest type GetSubscriptionDefinitionInput struct { _ struct{} `type:"structure"` @@ -9316,6 +11265,17 @@ func (s *GetSubscriptionDefinitionInput) SetSubscriptionDefinitionId(v string) * return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSubscriptionDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.SubscriptionDefinitionId != nil { + v := *s.SubscriptionDefinitionId + + e.SetValue(protocol.PathTarget, "SubscriptionDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetSubscriptionDefinitionResponse type GetSubscriptionDefinitionOutput struct { _ struct{} `type:"structure"` @@ -9387,6 +11347,47 @@ func (s *GetSubscriptionDefinitionOutput) SetName(v string) *GetSubscriptionDefi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSubscriptionDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedTimestamp != nil { + v := *s.LastUpdatedTimestamp + + e.SetValue(protocol.BodyTarget, "LastUpdatedTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersion != nil { + v := *s.LatestVersion + + e.SetValue(protocol.BodyTarget, "LatestVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersionArn != nil { + v := *s.LatestVersionArn + + e.SetValue(protocol.BodyTarget, "LatestVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetSubscriptionDefinitionVersionRequest type GetSubscriptionDefinitionVersionInput struct { _ struct{} `type:"structure"` @@ -9436,6 +11437,22 @@ func (s *GetSubscriptionDefinitionVersionInput) SetSubscriptionDefinitionVersion return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSubscriptionDefinitionVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.SubscriptionDefinitionId != nil { + v := *s.SubscriptionDefinitionId + + e.SetValue(protocol.PathTarget, "SubscriptionDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubscriptionDefinitionVersionId != nil { + v := *s.SubscriptionDefinitionVersionId + + e.SetValue(protocol.PathTarget, "SubscriptionDefinitionVersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Information on the Subscription Definition Version // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GetSubscriptionDefinitionVersionResponse type GetSubscriptionDefinitionVersionOutput struct { @@ -9497,6 +11514,37 @@ func (s *GetSubscriptionDefinitionVersionOutput) SetVersion(v string) *GetSubscr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSubscriptionDefinitionVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Definition != nil { + v := s.Definition + + e.SetFields(protocol.BodyTarget, "Definition", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Information on group certificate authority properties // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GroupCertificateAuthorityProperties type GroupCertificateAuthorityProperties struct { @@ -9531,6 +11579,30 @@ func (s *GroupCertificateAuthorityProperties) SetGroupCertificateAuthorityId(v s return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GroupCertificateAuthorityProperties) MarshalFields(e protocol.FieldEncoder) error { + if s.GroupCertificateAuthorityArn != nil { + v := *s.GroupCertificateAuthorityArn + + e.SetValue(protocol.BodyTarget, "GroupCertificateAuthorityArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GroupCertificateAuthorityId != nil { + v := *s.GroupCertificateAuthorityId + + e.SetValue(protocol.BodyTarget, "GroupCertificateAuthorityId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeGroupCertificateAuthorityPropertiesList(vs []*GroupCertificateAuthorityProperties) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information on the group // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GroupInformation type GroupInformation struct { @@ -9610,6 +11682,55 @@ func (s *GroupInformation) SetName(v string) *GroupInformation { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GroupInformation) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedTimestamp != nil { + v := *s.LastUpdatedTimestamp + + e.SetValue(protocol.BodyTarget, "LastUpdatedTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersion != nil { + v := *s.LatestVersion + + e.SetValue(protocol.BodyTarget, "LatestVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersionArn != nil { + v := *s.LatestVersionArn + + e.SetValue(protocol.BodyTarget, "LatestVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeGroupInformationList(vs []*GroupInformation) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information on group version // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/GroupVersion type GroupVersion struct { @@ -9671,6 +11792,37 @@ func (s *GroupVersion) SetSubscriptionDefinitionVersionArn(v string) *GroupVersi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GroupVersion) MarshalFields(e protocol.FieldEncoder) error { + if s.CoreDefinitionVersionArn != nil { + v := *s.CoreDefinitionVersionArn + + e.SetValue(protocol.BodyTarget, "CoreDefinitionVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeviceDefinitionVersionArn != nil { + v := *s.DeviceDefinitionVersionArn + + e.SetValue(protocol.BodyTarget, "DeviceDefinitionVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionDefinitionVersionArn != nil { + v := *s.FunctionDefinitionVersionArn + + e.SetValue(protocol.BodyTarget, "FunctionDefinitionVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LoggerDefinitionVersionArn != nil { + v := *s.LoggerDefinitionVersionArn + + e.SetValue(protocol.BodyTarget, "LoggerDefinitionVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubscriptionDefinitionVersionArn != nil { + v := *s.SubscriptionDefinitionVersionArn + + e.SetValue(protocol.BodyTarget, "SubscriptionDefinitionVersionArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListCoreDefinitionVersionsRequest type ListCoreDefinitionVersionsInput struct { _ struct{} `type:"structure"` @@ -9724,6 +11876,27 @@ func (s *ListCoreDefinitionVersionsInput) SetNextToken(v string) *ListCoreDefini return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListCoreDefinitionVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CoreDefinitionId != nil { + v := *s.CoreDefinitionId + + e.SetValue(protocol.PathTarget, "CoreDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "MaxResults", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListCoreDefinitionVersionsResponse type ListCoreDefinitionVersionsOutput struct { _ struct{} `type:"structure"` @@ -9755,6 +11928,22 @@ func (s *ListCoreDefinitionVersionsOutput) SetVersions(v []*VersionInformation) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListCoreDefinitionVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Versions) > 0 { + v := s.Versions + + e.SetList(protocol.BodyTarget, "Versions", encodeVersionInformationList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListCoreDefinitionsRequest type ListCoreDefinitionsInput struct { _ struct{} `type:"structure"` @@ -9786,6 +11975,22 @@ func (s *ListCoreDefinitionsInput) SetNextToken(v string) *ListCoreDefinitionsIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListCoreDefinitionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "MaxResults", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListCoreDefinitionsResponse type ListCoreDefinitionsOutput struct { _ struct{} `type:"structure"` @@ -9817,6 +12022,22 @@ func (s *ListCoreDefinitionsOutput) SetNextToken(v string) *ListCoreDefinitionsO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListCoreDefinitionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Definitions) > 0 { + v := s.Definitions + + e.SetList(protocol.BodyTarget, "Definitions", encodeDefinitionInformationList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListDeploymentsRequest type ListDeploymentsInput struct { _ struct{} `type:"structure"` @@ -9870,6 +12091,27 @@ func (s *ListDeploymentsInput) SetNextToken(v string) *ListDeploymentsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDeploymentsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "MaxResults", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListDeploymentsResponse type ListDeploymentsOutput struct { _ struct{} `type:"structure"` @@ -9904,6 +12146,22 @@ func (s *ListDeploymentsOutput) SetNextToken(v string) *ListDeploymentsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDeploymentsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Deployments) > 0 { + v := s.Deployments + + e.SetList(protocol.BodyTarget, "Deployments", encodeDeploymentList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListDeviceDefinitionVersionsRequest type ListDeviceDefinitionVersionsInput struct { _ struct{} `type:"structure"` @@ -9957,6 +12215,27 @@ func (s *ListDeviceDefinitionVersionsInput) SetNextToken(v string) *ListDeviceDe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDeviceDefinitionVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeviceDefinitionId != nil { + v := *s.DeviceDefinitionId + + e.SetValue(protocol.PathTarget, "DeviceDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "MaxResults", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListDeviceDefinitionVersionsResponse type ListDeviceDefinitionVersionsOutput struct { _ struct{} `type:"structure"` @@ -9988,6 +12267,22 @@ func (s *ListDeviceDefinitionVersionsOutput) SetVersions(v []*VersionInformation return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDeviceDefinitionVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Versions) > 0 { + v := s.Versions + + e.SetList(protocol.BodyTarget, "Versions", encodeVersionInformationList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListDeviceDefinitionsRequest type ListDeviceDefinitionsInput struct { _ struct{} `type:"structure"` @@ -10019,6 +12314,22 @@ func (s *ListDeviceDefinitionsInput) SetNextToken(v string) *ListDeviceDefinitio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDeviceDefinitionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "MaxResults", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListDeviceDefinitionsResponse type ListDeviceDefinitionsOutput struct { _ struct{} `type:"structure"` @@ -10050,6 +12361,22 @@ func (s *ListDeviceDefinitionsOutput) SetNextToken(v string) *ListDeviceDefiniti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListDeviceDefinitionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Definitions) > 0 { + v := s.Definitions + + e.SetList(protocol.BodyTarget, "Definitions", encodeDefinitionInformationList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListFunctionDefinitionVersionsRequest type ListFunctionDefinitionVersionsInput struct { _ struct{} `type:"structure"` @@ -10103,6 +12430,27 @@ func (s *ListFunctionDefinitionVersionsInput) SetNextToken(v string) *ListFuncti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListFunctionDefinitionVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionDefinitionId != nil { + v := *s.FunctionDefinitionId + + e.SetValue(protocol.PathTarget, "FunctionDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "MaxResults", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListFunctionDefinitionVersionsResponse type ListFunctionDefinitionVersionsOutput struct { _ struct{} `type:"structure"` @@ -10134,6 +12482,22 @@ func (s *ListFunctionDefinitionVersionsOutput) SetVersions(v []*VersionInformati return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListFunctionDefinitionVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Versions) > 0 { + v := s.Versions + + e.SetList(protocol.BodyTarget, "Versions", encodeVersionInformationList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListFunctionDefinitionsRequest type ListFunctionDefinitionsInput struct { _ struct{} `type:"structure"` @@ -10165,6 +12529,22 @@ func (s *ListFunctionDefinitionsInput) SetNextToken(v string) *ListFunctionDefin return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListFunctionDefinitionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "MaxResults", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListFunctionDefinitionsResponse type ListFunctionDefinitionsOutput struct { _ struct{} `type:"structure"` @@ -10196,6 +12576,22 @@ func (s *ListFunctionDefinitionsOutput) SetNextToken(v string) *ListFunctionDefi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListFunctionDefinitionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Definitions) > 0 { + v := s.Definitions + + e.SetList(protocol.BodyTarget, "Definitions", encodeDefinitionInformationList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListGroupCertificateAuthoritiesRequest type ListGroupCertificateAuthoritiesInput struct { _ struct{} `type:"structure"` @@ -10233,6 +12629,17 @@ func (s *ListGroupCertificateAuthoritiesInput) SetGroupId(v string) *ListGroupCe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListGroupCertificateAuthoritiesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListGroupCertificateAuthoritiesResponse type ListGroupCertificateAuthoritiesOutput struct { _ struct{} `type:"structure"` @@ -10257,6 +12664,17 @@ func (s *ListGroupCertificateAuthoritiesOutput) SetGroupCertificateAuthorities(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListGroupCertificateAuthoritiesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.GroupCertificateAuthorities) > 0 { + v := s.GroupCertificateAuthorities + + e.SetList(protocol.BodyTarget, "GroupCertificateAuthorities", encodeGroupCertificateAuthorityPropertiesList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListGroupVersionsRequest type ListGroupVersionsInput struct { _ struct{} `type:"structure"` @@ -10310,6 +12728,27 @@ func (s *ListGroupVersionsInput) SetNextToken(v string) *ListGroupVersionsInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListGroupVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "MaxResults", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListGroupVersionsResponse type ListGroupVersionsOutput struct { _ struct{} `type:"structure"` @@ -10341,6 +12780,22 @@ func (s *ListGroupVersionsOutput) SetVersions(v []*VersionInformation) *ListGrou return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListGroupVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Versions) > 0 { + v := s.Versions + + e.SetList(protocol.BodyTarget, "Versions", encodeVersionInformationList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListGroupsRequest type ListGroupsInput struct { _ struct{} `type:"structure"` @@ -10372,6 +12827,22 @@ func (s *ListGroupsInput) SetNextToken(v string) *ListGroupsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListGroupsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "MaxResults", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListGroupsResponse type ListGroupsOutput struct { _ struct{} `type:"structure"` @@ -10400,10 +12871,26 @@ func (s *ListGroupsOutput) SetGroups(v []*GroupInformation) *ListGroupsOutput { return s } -// SetNextToken sets the NextToken field's value. -func (s *ListGroupsOutput) SetNextToken(v string) *ListGroupsOutput { - s.NextToken = &v - return s +// SetNextToken sets the NextToken field's value. +func (s *ListGroupsOutput) SetNextToken(v string) *ListGroupsOutput { + s.NextToken = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListGroupsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Groups) > 0 { + v := s.Groups + + e.SetList(protocol.BodyTarget, "Groups", encodeGroupInformationList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil } // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListLoggerDefinitionVersionsRequest @@ -10459,6 +12946,27 @@ func (s *ListLoggerDefinitionVersionsInput) SetNextToken(v string) *ListLoggerDe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListLoggerDefinitionVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.LoggerDefinitionId != nil { + v := *s.LoggerDefinitionId + + e.SetValue(protocol.PathTarget, "LoggerDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "MaxResults", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListLoggerDefinitionVersionsResponse type ListLoggerDefinitionVersionsOutput struct { _ struct{} `type:"structure"` @@ -10490,6 +12998,22 @@ func (s *ListLoggerDefinitionVersionsOutput) SetVersions(v []*VersionInformation return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListLoggerDefinitionVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Versions) > 0 { + v := s.Versions + + e.SetList(protocol.BodyTarget, "Versions", encodeVersionInformationList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListLoggerDefinitionsRequest type ListLoggerDefinitionsInput struct { _ struct{} `type:"structure"` @@ -10521,6 +13045,22 @@ func (s *ListLoggerDefinitionsInput) SetNextToken(v string) *ListLoggerDefinitio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListLoggerDefinitionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "MaxResults", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListLoggerDefinitionsResponse type ListLoggerDefinitionsOutput struct { _ struct{} `type:"structure"` @@ -10552,6 +13092,22 @@ func (s *ListLoggerDefinitionsOutput) SetNextToken(v string) *ListLoggerDefiniti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListLoggerDefinitionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Definitions) > 0 { + v := s.Definitions + + e.SetList(protocol.BodyTarget, "Definitions", encodeDefinitionInformationList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListSubscriptionDefinitionVersionsRequest type ListSubscriptionDefinitionVersionsInput struct { _ struct{} `type:"structure"` @@ -10605,6 +13161,27 @@ func (s *ListSubscriptionDefinitionVersionsInput) SetSubscriptionDefinitionId(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListSubscriptionDefinitionVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "MaxResults", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubscriptionDefinitionId != nil { + v := *s.SubscriptionDefinitionId + + e.SetValue(protocol.PathTarget, "SubscriptionDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListSubscriptionDefinitionVersionsResponse type ListSubscriptionDefinitionVersionsOutput struct { _ struct{} `type:"structure"` @@ -10636,6 +13213,22 @@ func (s *ListSubscriptionDefinitionVersionsOutput) SetVersions(v []*VersionInfor return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListSubscriptionDefinitionVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Versions) > 0 { + v := s.Versions + + e.SetList(protocol.BodyTarget, "Versions", encodeVersionInformationList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListSubscriptionDefinitionsRequest type ListSubscriptionDefinitionsInput struct { _ struct{} `type:"structure"` @@ -10667,6 +13260,22 @@ func (s *ListSubscriptionDefinitionsInput) SetNextToken(v string) *ListSubscript return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListSubscriptionDefinitionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "MaxResults", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ListSubscriptionDefinitionsResponse type ListSubscriptionDefinitionsOutput struct { _ struct{} `type:"structure"` @@ -10698,6 +13307,22 @@ func (s *ListSubscriptionDefinitionsOutput) SetNextToken(v string) *ListSubscrip return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListSubscriptionDefinitionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Definitions) > 0 { + v := s.Definitions + + e.SetList(protocol.BodyTarget, "Definitions", encodeDefinitionInformationList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Information on the Logger // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/Logger type Logger struct { @@ -10760,6 +13385,45 @@ func (s *Logger) SetType(v string) *Logger { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Logger) MarshalFields(e protocol.FieldEncoder) error { + if s.Component != nil { + v := *s.Component + + e.SetValue(protocol.BodyTarget, "Component", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Level != nil { + v := *s.Level + + e.SetValue(protocol.BodyTarget, "Level", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Space != nil { + v := *s.Space + + e.SetValue(protocol.BodyTarget, "Space", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeLoggerList(vs []*Logger) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information on logger definition version // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/LoggerDefinitionVersion type LoggerDefinitionVersion struct { @@ -10785,6 +13449,17 @@ func (s *LoggerDefinitionVersion) SetLoggers(v []*Logger) *LoggerDefinitionVersi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LoggerDefinitionVersion) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Loggers) > 0 { + v := s.Loggers + + e.SetList(protocol.BodyTarget, "Loggers", encodeLoggerList(v), protocol.Metadata{}) + } + + return nil +} + // Information needed to perform a reset of a group's deployments. // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ResetDeploymentsRequest type ResetDeploymentsInput struct { @@ -10840,6 +13515,27 @@ func (s *ResetDeploymentsInput) SetGroupId(v string) *ResetDeploymentsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ResetDeploymentsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AmznClientToken != nil { + v := *s.AmznClientToken + + e.SetValue(protocol.HeaderTarget, "X-Amzn-Client-Token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Force != nil { + v := *s.Force + + e.SetValue(protocol.BodyTarget, "Force", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/ResetDeploymentsResponse type ResetDeploymentsOutput struct { _ struct{} `type:"structure"` @@ -10873,6 +13569,22 @@ func (s *ResetDeploymentsOutput) SetDeploymentId(v string) *ResetDeploymentsOutp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ResetDeploymentsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeploymentArn != nil { + v := *s.DeploymentArn + + e.SetValue(protocol.BodyTarget, "DeploymentArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeploymentId != nil { + v := *s.DeploymentId + + e.SetValue(protocol.BodyTarget, "DeploymentId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Information on subscription // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/Subscription type Subscription struct { @@ -10925,6 +13637,40 @@ func (s *Subscription) SetTarget(v string) *Subscription { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Subscription) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Source != nil { + v := *s.Source + + e.SetValue(protocol.BodyTarget, "Source", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Subject != nil { + v := *s.Subject + + e.SetValue(protocol.BodyTarget, "Subject", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Target != nil { + v := *s.Target + + e.SetValue(protocol.BodyTarget, "Target", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeSubscriptionList(vs []*Subscription) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information on subscription definition version // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/SubscriptionDefinitionVersion type SubscriptionDefinitionVersion struct { @@ -10950,6 +13696,17 @@ func (s *SubscriptionDefinitionVersion) SetSubscriptions(v []*Subscription) *Sub return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SubscriptionDefinitionVersion) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Subscriptions) > 0 { + v := s.Subscriptions + + e.SetList(protocol.BodyTarget, "Subscriptions", encodeSubscriptionList(v), protocol.Metadata{}) + } + + return nil +} + // Information on connectivity info // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateConnectivityInfoRequest type UpdateConnectivityInfoInput struct { @@ -10997,6 +13754,22 @@ func (s *UpdateConnectivityInfoInput) SetThingName(v string) *UpdateConnectivity return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateConnectivityInfoInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ConnectivityInfo) > 0 { + v := s.ConnectivityInfo + + e.SetList(protocol.BodyTarget, "ConnectivityInfo", encodeConnectivityInfoList(v), protocol.Metadata{}) + } + if s.ThingName != nil { + v := *s.ThingName + + e.SetValue(protocol.PathTarget, "ThingName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateConnectivityInfoResponse type UpdateConnectivityInfoOutput struct { _ struct{} `type:"structure"` @@ -11029,6 +13802,22 @@ func (s *UpdateConnectivityInfoOutput) SetVersion(v string) *UpdateConnectivityI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateConnectivityInfoOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Message != nil { + v := *s.Message + + e.SetValue(protocol.BodyTarget, "message", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateCoreDefinitionRequest type UpdateCoreDefinitionInput struct { _ struct{} `type:"structure"` @@ -11074,6 +13863,22 @@ func (s *UpdateCoreDefinitionInput) SetName(v string) *UpdateCoreDefinitionInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateCoreDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CoreDefinitionId != nil { + v := *s.CoreDefinitionId + + e.SetValue(protocol.PathTarget, "CoreDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateCoreDefinitionResponse type UpdateCoreDefinitionOutput struct { _ struct{} `type:"structure"` @@ -11089,6 +13894,12 @@ func (s UpdateCoreDefinitionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateCoreDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateDeviceDefinitionRequest type UpdateDeviceDefinitionInput struct { _ struct{} `type:"structure"` @@ -11134,6 +13945,22 @@ func (s *UpdateDeviceDefinitionInput) SetName(v string) *UpdateDeviceDefinitionI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateDeviceDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeviceDefinitionId != nil { + v := *s.DeviceDefinitionId + + e.SetValue(protocol.PathTarget, "DeviceDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateDeviceDefinitionResponse type UpdateDeviceDefinitionOutput struct { _ struct{} `type:"structure"` @@ -11149,6 +13976,12 @@ func (s UpdateDeviceDefinitionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateDeviceDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateFunctionDefinitionRequest type UpdateFunctionDefinitionInput struct { _ struct{} `type:"structure"` @@ -11194,6 +14027,22 @@ func (s *UpdateFunctionDefinitionInput) SetName(v string) *UpdateFunctionDefinit return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateFunctionDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionDefinitionId != nil { + v := *s.FunctionDefinitionId + + e.SetValue(protocol.PathTarget, "FunctionDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateFunctionDefinitionResponse type UpdateFunctionDefinitionOutput struct { _ struct{} `type:"structure"` @@ -11209,6 +14058,12 @@ func (s UpdateFunctionDefinitionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateFunctionDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateGroupCertificateConfigurationRequest type UpdateGroupCertificateConfigurationInput struct { _ struct{} `type:"structure"` @@ -11255,6 +14110,22 @@ func (s *UpdateGroupCertificateConfigurationInput) SetGroupId(v string) *UpdateG return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateGroupCertificateConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateExpiryInMilliseconds != nil { + v := *s.CertificateExpiryInMilliseconds + + e.SetValue(protocol.BodyTarget, "CertificateExpiryInMilliseconds", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateGroupCertificateConfigurationResponse type UpdateGroupCertificateConfigurationOutput struct { _ struct{} `type:"structure"` @@ -11294,6 +14165,27 @@ func (s *UpdateGroupCertificateConfigurationOutput) SetGroupId(v string) *Update return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateGroupCertificateConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateAuthorityExpiryInMilliseconds != nil { + v := *s.CertificateAuthorityExpiryInMilliseconds + + e.SetValue(protocol.BodyTarget, "CertificateAuthorityExpiryInMilliseconds", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateExpiryInMilliseconds != nil { + v := *s.CertificateExpiryInMilliseconds + + e.SetValue(protocol.BodyTarget, "CertificateExpiryInMilliseconds", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.BodyTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateGroupRequest type UpdateGroupInput struct { _ struct{} `type:"structure"` @@ -11339,6 +14231,22 @@ func (s *UpdateGroupInput) SetName(v string) *UpdateGroupInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateGroupInput) MarshalFields(e protocol.FieldEncoder) error { + if s.GroupId != nil { + v := *s.GroupId + + e.SetValue(protocol.PathTarget, "GroupId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateGroupResponse type UpdateGroupOutput struct { _ struct{} `type:"structure"` @@ -11354,6 +14262,12 @@ func (s UpdateGroupOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateGroupOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateLoggerDefinitionRequest type UpdateLoggerDefinitionInput struct { _ struct{} `type:"structure"` @@ -11399,6 +14313,22 @@ func (s *UpdateLoggerDefinitionInput) SetName(v string) *UpdateLoggerDefinitionI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateLoggerDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.LoggerDefinitionId != nil { + v := *s.LoggerDefinitionId + + e.SetValue(protocol.PathTarget, "LoggerDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateLoggerDefinitionResponse type UpdateLoggerDefinitionOutput struct { _ struct{} `type:"structure"` @@ -11414,6 +14344,12 @@ func (s UpdateLoggerDefinitionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateLoggerDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateSubscriptionDefinitionRequest type UpdateSubscriptionDefinitionInput struct { _ struct{} `type:"structure"` @@ -11459,6 +14395,22 @@ func (s *UpdateSubscriptionDefinitionInput) SetSubscriptionDefinitionId(v string return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateSubscriptionDefinitionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubscriptionDefinitionId != nil { + v := *s.SubscriptionDefinitionId + + e.SetValue(protocol.PathTarget, "SubscriptionDefinitionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/UpdateSubscriptionDefinitionResponse type UpdateSubscriptionDefinitionOutput struct { _ struct{} `type:"structure"` @@ -11474,6 +14426,12 @@ func (s UpdateSubscriptionDefinitionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateSubscriptionDefinitionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Information on the version // Please also see https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/VersionInformation type VersionInformation struct { @@ -11526,6 +14484,40 @@ func (s *VersionInformation) SetVersion(v string) *VersionInformation { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VersionInformation) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "Arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationTimestamp != nil { + v := *s.CreationTimestamp + + e.SetValue(protocol.BodyTarget, "CreationTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeVersionInformationList(vs []*VersionInformation) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + const ( // DeploymentTypeNewDeployment is a DeploymentType enum value DeploymentTypeNewDeployment = "NewDeployment" diff --git a/service/iot/api.go b/service/iot/api.go index f0bf1b5b30b..2b1158a115e 100644 --- a/service/iot/api.go +++ b/service/iot/api.go @@ -5410,6 +5410,22 @@ func (s *AcceptCertificateTransferInput) SetSetAsActive(v bool) *AcceptCertifica return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AcceptCertificateTransferInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.PathTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SetAsActive != nil { + v := *s.SetAsActive + + e.SetValue(protocol.QueryTarget, "setAsActive", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + type AcceptCertificateTransferOutput struct { _ struct{} `type:"structure"` } @@ -5424,6 +5440,12 @@ func (s AcceptCertificateTransferOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AcceptCertificateTransferOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Describes the actions associated with a rule. type Action struct { _ struct{} `type:"structure"` @@ -5633,6 +5655,85 @@ func (s *Action) SetSqs(v *SqsAction) *Action { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Action) MarshalFields(e protocol.FieldEncoder) error { + if s.CloudwatchAlarm != nil { + v := s.CloudwatchAlarm + + e.SetFields(protocol.BodyTarget, "cloudwatchAlarm", v, protocol.Metadata{}) + } + if s.CloudwatchMetric != nil { + v := s.CloudwatchMetric + + e.SetFields(protocol.BodyTarget, "cloudwatchMetric", v, protocol.Metadata{}) + } + if s.DynamoDB != nil { + v := s.DynamoDB + + e.SetFields(protocol.BodyTarget, "dynamoDB", v, protocol.Metadata{}) + } + if s.DynamoDBv2 != nil { + v := s.DynamoDBv2 + + e.SetFields(protocol.BodyTarget, "dynamoDBv2", v, protocol.Metadata{}) + } + if s.Elasticsearch != nil { + v := s.Elasticsearch + + e.SetFields(protocol.BodyTarget, "elasticsearch", v, protocol.Metadata{}) + } + if s.Firehose != nil { + v := s.Firehose + + e.SetFields(protocol.BodyTarget, "firehose", v, protocol.Metadata{}) + } + if s.Kinesis != nil { + v := s.Kinesis + + e.SetFields(protocol.BodyTarget, "kinesis", v, protocol.Metadata{}) + } + if s.Lambda != nil { + v := s.Lambda + + e.SetFields(protocol.BodyTarget, "lambda", v, protocol.Metadata{}) + } + if s.Republish != nil { + v := s.Republish + + e.SetFields(protocol.BodyTarget, "republish", v, protocol.Metadata{}) + } + if s.S3 != nil { + v := s.S3 + + e.SetFields(protocol.BodyTarget, "s3", v, protocol.Metadata{}) + } + if s.Salesforce != nil { + v := s.Salesforce + + e.SetFields(protocol.BodyTarget, "salesforce", v, protocol.Metadata{}) + } + if s.Sns != nil { + v := s.Sns + + e.SetFields(protocol.BodyTarget, "sns", v, protocol.Metadata{}) + } + if s.Sqs != nil { + v := s.Sqs + + e.SetFields(protocol.BodyTarget, "sqs", v, protocol.Metadata{}) + } + + return nil +} + +func encodeActionList(vs []*Action) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The input for the AttachPrincipalPolicy operation. type AttachPrincipalPolicyInput struct { _ struct{} `type:"structure"` @@ -5690,6 +5791,22 @@ func (s *AttachPrincipalPolicyInput) SetPrincipal(v string) *AttachPrincipalPoli return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttachPrincipalPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.PolicyName != nil { + v := *s.PolicyName + + e.SetValue(protocol.PathTarget, "policyName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Principal != nil { + v := *s.Principal + + e.SetValue(protocol.HeaderTarget, "x-amzn-iot-principal", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type AttachPrincipalPolicyOutput struct { _ struct{} `type:"structure"` } @@ -5704,6 +5821,12 @@ func (s AttachPrincipalPolicyOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttachPrincipalPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the AttachThingPrincipal operation. type AttachThingPrincipalInput struct { _ struct{} `type:"structure"` @@ -5760,6 +5883,22 @@ func (s *AttachThingPrincipalInput) SetThingName(v string) *AttachThingPrincipal return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttachThingPrincipalInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Principal != nil { + v := *s.Principal + + e.SetValue(protocol.HeaderTarget, "x-amzn-principal", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThingName != nil { + v := *s.ThingName + + e.SetValue(protocol.PathTarget, "thingName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the AttachThingPrincipal operation. type AttachThingPrincipalOutput struct { _ struct{} `type:"structure"` @@ -5775,6 +5914,12 @@ func (s AttachThingPrincipalOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttachThingPrincipalOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The attribute payload. type AttributePayload struct { _ struct{} `type:"structure"` @@ -5816,6 +5961,22 @@ func (s *AttributePayload) SetMerge(v bool) *AttributePayload { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttributePayload) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetMap(protocol.BodyTarget, "attributes", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.Merge != nil { + v := *s.Merge + + e.SetValue(protocol.BodyTarget, "merge", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // A CA certificate. type CACertificate struct { _ struct{} `type:"structure"` @@ -5869,6 +6030,40 @@ func (s *CACertificate) SetStatus(v string) *CACertificate { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CACertificate) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateArn != nil { + v := *s.CertificateArn + + e.SetValue(protocol.BodyTarget, "certificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.BodyTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "creationDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCACertificateList(vs []*CACertificate) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Describes a CA certificate. type CACertificateDescription struct { _ struct{} `type:"structure"` @@ -5948,6 +6143,47 @@ func (s *CACertificateDescription) SetStatus(v string) *CACertificateDescription return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CACertificateDescription) MarshalFields(e protocol.FieldEncoder) error { + if s.AutoRegistrationStatus != nil { + v := *s.AutoRegistrationStatus + + e.SetValue(protocol.BodyTarget, "autoRegistrationStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateArn != nil { + v := *s.CertificateArn + + e.SetValue(protocol.BodyTarget, "certificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.BodyTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificatePem != nil { + v := *s.CertificatePem + + e.SetValue(protocol.BodyTarget, "certificatePem", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "creationDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.OwnedBy != nil { + v := *s.OwnedBy + + e.SetValue(protocol.BodyTarget, "ownedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the CancelCertificateTransfer operation. type CancelCertificateTransferInput struct { _ struct{} `type:"structure"` @@ -5990,6 +6226,17 @@ func (s *CancelCertificateTransferInput) SetCertificateId(v string) *CancelCerti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CancelCertificateTransferInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.PathTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type CancelCertificateTransferOutput struct { _ struct{} `type:"structure"` } @@ -6004,6 +6251,12 @@ func (s CancelCertificateTransferOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CancelCertificateTransferOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Information about a certificate. type Certificate struct { _ struct{} `type:"structure"` @@ -6057,6 +6310,40 @@ func (s *Certificate) SetStatus(v string) *Certificate { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Certificate) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateArn != nil { + v := *s.CertificateArn + + e.SetValue(protocol.BodyTarget, "certificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.BodyTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "creationDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCertificateList(vs []*Certificate) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Describes a certificate. type CertificateDescription struct { _ struct{} `type:"structure"` @@ -6162,6 +6449,62 @@ func (s *CertificateDescription) SetTransferData(v *TransferData) *CertificateDe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CertificateDescription) MarshalFields(e protocol.FieldEncoder) error { + if s.CaCertificateId != nil { + v := *s.CaCertificateId + + e.SetValue(protocol.BodyTarget, "caCertificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateArn != nil { + v := *s.CertificateArn + + e.SetValue(protocol.BodyTarget, "certificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.BodyTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificatePem != nil { + v := *s.CertificatePem + + e.SetValue(protocol.BodyTarget, "certificatePem", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "creationDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "lastModifiedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.OwnedBy != nil { + v := *s.OwnedBy + + e.SetValue(protocol.BodyTarget, "ownedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PreviousOwnedBy != nil { + v := *s.PreviousOwnedBy + + e.SetValue(protocol.BodyTarget, "previousOwnedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TransferData != nil { + v := s.TransferData + + e.SetFields(protocol.BodyTarget, "transferData", v, protocol.Metadata{}) + } + + return nil +} + // Describes an action that updates a CloudWatch alarm. type CloudwatchAlarmAction struct { _ struct{} `type:"structure"` @@ -6243,6 +6586,32 @@ func (s *CloudwatchAlarmAction) SetStateValue(v string) *CloudwatchAlarmAction { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CloudwatchAlarmAction) MarshalFields(e protocol.FieldEncoder) error { + if s.AlarmName != nil { + v := *s.AlarmName + + e.SetValue(protocol.BodyTarget, "alarmName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StateReason != nil { + v := *s.StateReason + + e.SetValue(protocol.BodyTarget, "stateReason", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StateValue != nil { + v := *s.StateValue + + e.SetValue(protocol.BodyTarget, "stateValue", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes an action that captures a CloudWatch metric. type CloudwatchMetricAction struct { _ struct{} `type:"structure"` @@ -6348,6 +6717,42 @@ func (s *CloudwatchMetricAction) SetRoleArn(v string) *CloudwatchMetricAction { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CloudwatchMetricAction) MarshalFields(e protocol.FieldEncoder) error { + if s.MetricName != nil { + v := *s.MetricName + + e.SetValue(protocol.BodyTarget, "metricName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MetricNamespace != nil { + v := *s.MetricNamespace + + e.SetValue(protocol.BodyTarget, "metricNamespace", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MetricTimestamp != nil { + v := *s.MetricTimestamp + + e.SetValue(protocol.BodyTarget, "metricTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MetricUnit != nil { + v := *s.MetricUnit + + e.SetValue(protocol.BodyTarget, "metricUnit", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MetricValue != nil { + v := *s.MetricValue + + e.SetValue(protocol.BodyTarget, "metricValue", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the CreateCertificateFromCsr operation. type CreateCertificateFromCsrInput struct { _ struct{} `type:"structure"` @@ -6399,6 +6804,22 @@ func (s *CreateCertificateFromCsrInput) SetSetAsActive(v bool) *CreateCertificat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateCertificateFromCsrInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateSigningRequest != nil { + v := *s.CertificateSigningRequest + + e.SetValue(protocol.BodyTarget, "certificateSigningRequest", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SetAsActive != nil { + v := *s.SetAsActive + + e.SetValue(protocol.QueryTarget, "setAsActive", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the CreateCertificateFromCsr operation. type CreateCertificateFromCsrOutput struct { _ struct{} `type:"structure"` @@ -6443,6 +6864,27 @@ func (s *CreateCertificateFromCsrOutput) SetCertificatePem(v string) *CreateCert return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateCertificateFromCsrOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateArn != nil { + v := *s.CertificateArn + + e.SetValue(protocol.BodyTarget, "certificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.BodyTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificatePem != nil { + v := *s.CertificatePem + + e.SetValue(protocol.BodyTarget, "certificatePem", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the CreateKeysAndCertificate operation. type CreateKeysAndCertificateInput struct { _ struct{} `type:"structure"` @@ -6467,6 +6909,17 @@ func (s *CreateKeysAndCertificateInput) SetSetAsActive(v bool) *CreateKeysAndCer return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateKeysAndCertificateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.SetAsActive != nil { + v := *s.SetAsActive + + e.SetValue(protocol.QueryTarget, "setAsActive", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // The output of the CreateKeysAndCertificate operation. type CreateKeysAndCertificateOutput struct { _ struct{} `type:"structure"` @@ -6519,6 +6972,32 @@ func (s *CreateKeysAndCertificateOutput) SetKeyPair(v *KeyPair) *CreateKeysAndCe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateKeysAndCertificateOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateArn != nil { + v := *s.CertificateArn + + e.SetValue(protocol.BodyTarget, "certificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.BodyTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificatePem != nil { + v := *s.CertificatePem + + e.SetValue(protocol.BodyTarget, "certificatePem", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyPair != nil { + v := s.KeyPair + + e.SetFields(protocol.BodyTarget, "keyPair", v, protocol.Metadata{}) + } + + return nil +} + // The input for the CreatePolicy operation. type CreatePolicyInput struct { _ struct{} `type:"structure"` @@ -6576,6 +7055,22 @@ func (s *CreatePolicyInput) SetPolicyName(v string) *CreatePolicyInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreatePolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.PolicyDocument != nil { + v := *s.PolicyDocument + + e.SetValue(protocol.BodyTarget, "policyDocument", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyName != nil { + v := *s.PolicyName + + e.SetValue(protocol.PathTarget, "policyName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the CreatePolicy operation. type CreatePolicyOutput struct { _ struct{} `type:"structure"` @@ -6627,6 +7122,32 @@ func (s *CreatePolicyOutput) SetPolicyVersionId(v string) *CreatePolicyOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreatePolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.PolicyArn != nil { + v := *s.PolicyArn + + e.SetValue(protocol.BodyTarget, "policyArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyDocument != nil { + v := *s.PolicyDocument + + e.SetValue(protocol.BodyTarget, "policyDocument", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyName != nil { + v := *s.PolicyName + + e.SetValue(protocol.BodyTarget, "policyName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyVersionId != nil { + v := *s.PolicyVersionId + + e.SetValue(protocol.BodyTarget, "policyVersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the CreatePolicyVersion operation. type CreatePolicyVersionInput struct { _ struct{} `type:"structure"` @@ -6695,6 +7216,27 @@ func (s *CreatePolicyVersionInput) SetSetAsDefault(v bool) *CreatePolicyVersionI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreatePolicyVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.PolicyDocument != nil { + v := *s.PolicyDocument + + e.SetValue(protocol.BodyTarget, "policyDocument", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyName != nil { + v := *s.PolicyName + + e.SetValue(protocol.PathTarget, "policyName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SetAsDefault != nil { + v := *s.SetAsDefault + + e.SetValue(protocol.QueryTarget, "setAsDefault", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // The output of the CreatePolicyVersion operation. type CreatePolicyVersionOutput struct { _ struct{} `type:"structure"` @@ -6746,6 +7288,32 @@ func (s *CreatePolicyVersionOutput) SetPolicyVersionId(v string) *CreatePolicyVe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreatePolicyVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.IsDefaultVersion != nil { + v := *s.IsDefaultVersion + + e.SetValue(protocol.BodyTarget, "isDefaultVersion", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.PolicyArn != nil { + v := *s.PolicyArn + + e.SetValue(protocol.BodyTarget, "policyArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyDocument != nil { + v := *s.PolicyDocument + + e.SetValue(protocol.BodyTarget, "policyDocument", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyVersionId != nil { + v := *s.PolicyVersionId + + e.SetValue(protocol.BodyTarget, "policyVersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the CreateThing operation. type CreateThingInput struct { _ struct{} `type:"structure"` @@ -6812,6 +7380,27 @@ func (s *CreateThingInput) SetThingTypeName(v string) *CreateThingInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateThingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AttributePayload != nil { + v := s.AttributePayload + + e.SetFields(protocol.BodyTarget, "attributePayload", v, protocol.Metadata{}) + } + if s.ThingName != nil { + v := *s.ThingName + + e.SetValue(protocol.PathTarget, "thingName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThingTypeName != nil { + v := *s.ThingTypeName + + e.SetValue(protocol.BodyTarget, "thingTypeName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output of the CreateThing operation. type CreateThingOutput struct { _ struct{} `type:"structure"` @@ -6845,6 +7434,22 @@ func (s *CreateThingOutput) SetThingName(v string) *CreateThingOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateThingOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ThingArn != nil { + v := *s.ThingArn + + e.SetValue(protocol.BodyTarget, "thingArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThingName != nil { + v := *s.ThingName + + e.SetValue(protocol.BodyTarget, "thingName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the CreateThingType operation. type CreateThingTypeInput struct { _ struct{} `type:"structure"` @@ -6898,6 +7503,22 @@ func (s *CreateThingTypeInput) SetThingTypeProperties(v *ThingTypeProperties) *C return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateThingTypeInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ThingTypeName != nil { + v := *s.ThingTypeName + + e.SetValue(protocol.PathTarget, "thingTypeName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThingTypeProperties != nil { + v := s.ThingTypeProperties + + e.SetFields(protocol.BodyTarget, "thingTypeProperties", v, protocol.Metadata{}) + } + + return nil +} + // The output of the CreateThingType operation. type CreateThingTypeOutput struct { _ struct{} `type:"structure"` @@ -6925,10 +7546,26 @@ func (s *CreateThingTypeOutput) SetThingTypeArn(v string) *CreateThingTypeOutput return s } -// SetThingTypeName sets the ThingTypeName field's value. -func (s *CreateThingTypeOutput) SetThingTypeName(v string) *CreateThingTypeOutput { - s.ThingTypeName = &v - return s +// SetThingTypeName sets the ThingTypeName field's value. +func (s *CreateThingTypeOutput) SetThingTypeName(v string) *CreateThingTypeOutput { + s.ThingTypeName = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateThingTypeOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ThingTypeArn != nil { + v := *s.ThingTypeArn + + e.SetValue(protocol.BodyTarget, "thingTypeArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThingTypeName != nil { + v := *s.ThingTypeName + + e.SetValue(protocol.BodyTarget, "thingTypeName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil } // The input for the CreateTopicRule operation. @@ -6992,6 +7629,22 @@ func (s *CreateTopicRuleInput) SetTopicRulePayload(v *TopicRulePayload) *CreateT return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateTopicRuleInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RuleName != nil { + v := *s.RuleName + + e.SetValue(protocol.PathTarget, "ruleName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TopicRulePayload != nil { + v := s.TopicRulePayload + + e.SetFields(protocol.PayloadTarget, "topicRulePayload", v, protocol.Metadata{}) + } + + return nil +} + type CreateTopicRuleOutput struct { _ struct{} `type:"structure"` } @@ -7006,6 +7659,12 @@ func (s CreateTopicRuleOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateTopicRuleOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Input for the DeleteCACertificate operation. type DeleteCACertificateInput struct { _ struct{} `type:"structure"` @@ -7048,6 +7707,17 @@ func (s *DeleteCACertificateInput) SetCertificateId(v string) *DeleteCACertifica return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteCACertificateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.PathTarget, "caCertificateId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output for the DeleteCACertificate operation. type DeleteCACertificateOutput struct { _ struct{} `type:"structure"` @@ -7063,6 +7733,12 @@ func (s DeleteCACertificateOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteCACertificateOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the DeleteCertificate operation. type DeleteCertificateInput struct { _ struct{} `type:"structure"` @@ -7105,6 +7781,17 @@ func (s *DeleteCertificateInput) SetCertificateId(v string) *DeleteCertificateIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteCertificateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.PathTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteCertificateOutput struct { _ struct{} `type:"structure"` } @@ -7119,6 +7806,12 @@ func (s DeleteCertificateOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteCertificateOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the DeletePolicy operation. type DeletePolicyInput struct { _ struct{} `type:"structure"` @@ -7161,6 +7854,17 @@ func (s *DeletePolicyInput) SetPolicyName(v string) *DeletePolicyInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeletePolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.PolicyName != nil { + v := *s.PolicyName + + e.SetValue(protocol.PathTarget, "policyName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeletePolicyOutput struct { _ struct{} `type:"structure"` } @@ -7175,6 +7879,12 @@ func (s DeletePolicyOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeletePolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the DeletePolicyVersion operation. type DeletePolicyVersionInput struct { _ struct{} `type:"structure"` @@ -7231,6 +7941,22 @@ func (s *DeletePolicyVersionInput) SetPolicyVersionId(v string) *DeletePolicyVer return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeletePolicyVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.PolicyName != nil { + v := *s.PolicyName + + e.SetValue(protocol.PathTarget, "policyName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyVersionId != nil { + v := *s.PolicyVersionId + + e.SetValue(protocol.PathTarget, "policyVersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeletePolicyVersionOutput struct { _ struct{} `type:"structure"` } @@ -7245,6 +7971,12 @@ func (s DeletePolicyVersionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeletePolicyVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the DeleteRegistrationCode operation. type DeleteRegistrationCodeInput struct { _ struct{} `type:"structure"` @@ -7260,6 +7992,12 @@ func (s DeleteRegistrationCodeInput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteRegistrationCodeInput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The output for the DeleteRegistrationCode operation. type DeleteRegistrationCodeOutput struct { _ struct{} `type:"structure"` @@ -7275,6 +8013,12 @@ func (s DeleteRegistrationCodeOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteRegistrationCodeOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the DeleteThing operation. type DeleteThingInput struct { _ struct{} `type:"structure"` @@ -7328,6 +8072,22 @@ func (s *DeleteThingInput) SetThingName(v string) *DeleteThingInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteThingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ExpectedVersion != nil { + v := *s.ExpectedVersion + + e.SetValue(protocol.QueryTarget, "expectedVersion", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ThingName != nil { + v := *s.ThingName + + e.SetValue(protocol.PathTarget, "thingName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output of the DeleteThing operation. type DeleteThingOutput struct { _ struct{} `type:"structure"` @@ -7343,6 +8103,12 @@ func (s DeleteThingOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteThingOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the DeleteThingType operation. type DeleteThingTypeInput struct { _ struct{} `type:"structure"` @@ -7385,6 +8151,17 @@ func (s *DeleteThingTypeInput) SetThingTypeName(v string) *DeleteThingTypeInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteThingTypeInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ThingTypeName != nil { + v := *s.ThingTypeName + + e.SetValue(protocol.PathTarget, "thingTypeName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output for the DeleteThingType operation. type DeleteThingTypeOutput struct { _ struct{} `type:"structure"` @@ -7400,6 +8177,12 @@ func (s DeleteThingTypeOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteThingTypeOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the DeleteTopicRule operation. type DeleteTopicRuleInput struct { _ struct{} `type:"structure"` @@ -7442,6 +8225,17 @@ func (s *DeleteTopicRuleInput) SetRuleName(v string) *DeleteTopicRuleInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteTopicRuleInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RuleName != nil { + v := *s.RuleName + + e.SetValue(protocol.PathTarget, "ruleName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DeleteTopicRuleOutput struct { _ struct{} `type:"structure"` } @@ -7456,6 +8250,12 @@ func (s DeleteTopicRuleOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteTopicRuleOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the DeprecateThingType operation. type DeprecateThingTypeInput struct { _ struct{} `type:"structure"` @@ -7508,6 +8308,22 @@ func (s *DeprecateThingTypeInput) SetUndoDeprecate(v bool) *DeprecateThingTypeIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeprecateThingTypeInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ThingTypeName != nil { + v := *s.ThingTypeName + + e.SetValue(protocol.PathTarget, "thingTypeName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UndoDeprecate != nil { + v := *s.UndoDeprecate + + e.SetValue(protocol.BodyTarget, "undoDeprecate", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // The output for the DeprecateThingType operation. type DeprecateThingTypeOutput struct { _ struct{} `type:"structure"` @@ -7523,6 +8339,12 @@ func (s DeprecateThingTypeOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeprecateThingTypeOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the DescribeCACertificate operation. type DescribeCACertificateInput struct { _ struct{} `type:"structure"` @@ -7565,6 +8387,17 @@ func (s *DescribeCACertificateInput) SetCertificateId(v string) *DescribeCACerti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeCACertificateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.PathTarget, "caCertificateId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the DescribeCACertificate operation. type DescribeCACertificateOutput struct { _ struct{} `type:"structure"` @@ -7589,6 +8422,17 @@ func (s *DescribeCACertificateOutput) SetCertificateDescription(v *CACertificate return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeCACertificateOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateDescription != nil { + v := s.CertificateDescription + + e.SetFields(protocol.BodyTarget, "certificateDescription", v, protocol.Metadata{}) + } + + return nil +} + // The input for the DescribeCertificate operation. type DescribeCertificateInput struct { _ struct{} `type:"structure"` @@ -7631,6 +8475,17 @@ func (s *DescribeCertificateInput) SetCertificateId(v string) *DescribeCertifica return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeCertificateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.PathTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output of the DescribeCertificate operation. type DescribeCertificateOutput struct { _ struct{} `type:"structure"` @@ -7655,6 +8510,17 @@ func (s *DescribeCertificateOutput) SetCertificateDescription(v *CertificateDesc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeCertificateOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateDescription != nil { + v := s.CertificateDescription + + e.SetFields(protocol.BodyTarget, "certificateDescription", v, protocol.Metadata{}) + } + + return nil +} + // The input for the DescribeEndpoint operation. type DescribeEndpointInput struct { _ struct{} `type:"structure"` @@ -7670,6 +8536,12 @@ func (s DescribeEndpointInput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeEndpointInput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The output from the DescribeEndpoint operation. type DescribeEndpointOutput struct { _ struct{} `type:"structure"` @@ -7694,6 +8566,17 @@ func (s *DescribeEndpointOutput) SetEndpointAddress(v string) *DescribeEndpointO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeEndpointOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.EndpointAddress != nil { + v := *s.EndpointAddress + + e.SetValue(protocol.BodyTarget, "endpointAddress", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the DescribeThing operation. type DescribeThingInput struct { _ struct{} `type:"structure"` @@ -7736,6 +8619,17 @@ func (s *DescribeThingInput) SetThingName(v string) *DescribeThingInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeThingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ThingName != nil { + v := *s.ThingName + + e.SetValue(protocol.PathTarget, "thingName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the DescribeThing operation. type DescribeThingOutput struct { _ struct{} `type:"structure"` @@ -7800,6 +8694,37 @@ func (s *DescribeThingOutput) SetVersion(v int64) *DescribeThingOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeThingOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetMap(protocol.BodyTarget, "attributes", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.DefaultClientId != nil { + v := *s.DefaultClientId + + e.SetValue(protocol.BodyTarget, "defaultClientId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThingName != nil { + v := *s.ThingName + + e.SetValue(protocol.BodyTarget, "thingName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThingTypeName != nil { + v := *s.ThingTypeName + + e.SetValue(protocol.BodyTarget, "thingTypeName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The input for the DescribeThingType operation. type DescribeThingTypeInput struct { _ struct{} `type:"structure"` @@ -7842,6 +8767,17 @@ func (s *DescribeThingTypeInput) SetThingTypeName(v string) *DescribeThingTypeIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeThingTypeInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ThingTypeName != nil { + v := *s.ThingTypeName + + e.SetValue(protocol.PathTarget, "thingTypeName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output for the DescribeThingType operation. type DescribeThingTypeOutput struct { _ struct{} `type:"structure"` @@ -7887,6 +8823,27 @@ func (s *DescribeThingTypeOutput) SetThingTypeProperties(v *ThingTypeProperties) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeThingTypeOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ThingTypeMetadata != nil { + v := s.ThingTypeMetadata + + e.SetFields(protocol.BodyTarget, "thingTypeMetadata", v, protocol.Metadata{}) + } + if s.ThingTypeName != nil { + v := *s.ThingTypeName + + e.SetValue(protocol.BodyTarget, "thingTypeName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThingTypeProperties != nil { + v := s.ThingTypeProperties + + e.SetFields(protocol.BodyTarget, "thingTypeProperties", v, protocol.Metadata{}) + } + + return nil +} + // The input for the DetachPrincipalPolicy operation. type DetachPrincipalPolicyInput struct { _ struct{} `type:"structure"` @@ -7946,6 +8903,22 @@ func (s *DetachPrincipalPolicyInput) SetPrincipal(v string) *DetachPrincipalPoli return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DetachPrincipalPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.PolicyName != nil { + v := *s.PolicyName + + e.SetValue(protocol.PathTarget, "policyName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Principal != nil { + v := *s.Principal + + e.SetValue(protocol.HeaderTarget, "x-amzn-iot-principal", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DetachPrincipalPolicyOutput struct { _ struct{} `type:"structure"` } @@ -7960,6 +8933,12 @@ func (s DetachPrincipalPolicyOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DetachPrincipalPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the DetachThingPrincipal operation. type DetachThingPrincipalInput struct { _ struct{} `type:"structure"` @@ -8018,6 +8997,22 @@ func (s *DetachThingPrincipalInput) SetThingName(v string) *DetachThingPrincipal return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DetachThingPrincipalInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Principal != nil { + v := *s.Principal + + e.SetValue(protocol.HeaderTarget, "x-amzn-principal", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThingName != nil { + v := *s.ThingName + + e.SetValue(protocol.PathTarget, "thingName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the DetachThingPrincipal operation. type DetachThingPrincipalOutput struct { _ struct{} `type:"structure"` @@ -8033,6 +9028,12 @@ func (s DetachThingPrincipalOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DetachThingPrincipalOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the DisableTopicRuleRequest operation. type DisableTopicRuleInput struct { _ struct{} `type:"structure"` @@ -8075,6 +9076,17 @@ func (s *DisableTopicRuleInput) SetRuleName(v string) *DisableTopicRuleInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DisableTopicRuleInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RuleName != nil { + v := *s.RuleName + + e.SetValue(protocol.PathTarget, "ruleName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type DisableTopicRuleOutput struct { _ struct{} `type:"structure"` } @@ -8089,6 +9101,12 @@ func (s DisableTopicRuleOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DisableTopicRuleOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Describes an action to write to a DynamoDB table. // // The tableName, hashKeyField, and rangeKeyField values must match the values @@ -8218,28 +9236,84 @@ func (s *DynamoDBAction) SetRangeKeyField(v string) *DynamoDBAction { return s } -// SetRangeKeyType sets the RangeKeyType field's value. -func (s *DynamoDBAction) SetRangeKeyType(v string) *DynamoDBAction { - s.RangeKeyType = &v - return s -} +// SetRangeKeyType sets the RangeKeyType field's value. +func (s *DynamoDBAction) SetRangeKeyType(v string) *DynamoDBAction { + s.RangeKeyType = &v + return s +} + +// SetRangeKeyValue sets the RangeKeyValue field's value. +func (s *DynamoDBAction) SetRangeKeyValue(v string) *DynamoDBAction { + s.RangeKeyValue = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *DynamoDBAction) SetRoleArn(v string) *DynamoDBAction { + s.RoleArn = &v + return s +} + +// SetTableName sets the TableName field's value. +func (s *DynamoDBAction) SetTableName(v string) *DynamoDBAction { + s.TableName = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DynamoDBAction) MarshalFields(e protocol.FieldEncoder) error { + if s.HashKeyField != nil { + v := *s.HashKeyField + + e.SetValue(protocol.BodyTarget, "hashKeyField", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HashKeyType != nil { + v := *s.HashKeyType + + e.SetValue(protocol.BodyTarget, "hashKeyType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HashKeyValue != nil { + v := *s.HashKeyValue + + e.SetValue(protocol.BodyTarget, "hashKeyValue", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Operation != nil { + v := *s.Operation + + e.SetValue(protocol.BodyTarget, "operation", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PayloadField != nil { + v := *s.PayloadField + + e.SetValue(protocol.BodyTarget, "payloadField", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RangeKeyField != nil { + v := *s.RangeKeyField + + e.SetValue(protocol.BodyTarget, "rangeKeyField", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RangeKeyType != nil { + v := *s.RangeKeyType + + e.SetValue(protocol.BodyTarget, "rangeKeyType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RangeKeyValue != nil { + v := *s.RangeKeyValue + + e.SetValue(protocol.BodyTarget, "rangeKeyValue", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn -// SetRangeKeyValue sets the RangeKeyValue field's value. -func (s *DynamoDBAction) SetRangeKeyValue(v string) *DynamoDBAction { - s.RangeKeyValue = &v - return s -} + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TableName != nil { + v := *s.TableName -// SetRoleArn sets the RoleArn field's value. -func (s *DynamoDBAction) SetRoleArn(v string) *DynamoDBAction { - s.RoleArn = &v - return s -} + e.SetValue(protocol.BodyTarget, "tableName", protocol.StringValue(v), protocol.Metadata{}) + } -// SetTableName sets the TableName field's value. -func (s *DynamoDBAction) SetTableName(v string) *DynamoDBAction { - s.TableName = &v - return s + return nil } // Describes an action to write to a DynamoDB table. @@ -8300,6 +9374,22 @@ func (s *DynamoDBv2Action) SetRoleArn(v string) *DynamoDBv2Action { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DynamoDBv2Action) MarshalFields(e protocol.FieldEncoder) error { + if s.PutItem != nil { + v := s.PutItem + + e.SetFields(protocol.BodyTarget, "putItem", v, protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes an action that writes data to an Amazon Elasticsearch Service domain. type ElasticsearchAction struct { _ struct{} `type:"structure"` @@ -8395,6 +9485,37 @@ func (s *ElasticsearchAction) SetType(v string) *ElasticsearchAction { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ElasticsearchAction) MarshalFields(e protocol.FieldEncoder) error { + if s.Endpoint != nil { + v := *s.Endpoint + + e.SetValue(protocol.BodyTarget, "endpoint", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Index != nil { + v := *s.Index + + e.SetValue(protocol.BodyTarget, "index", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the EnableTopicRuleRequest operation. type EnableTopicRuleInput struct { _ struct{} `type:"structure"` @@ -8437,6 +9558,17 @@ func (s *EnableTopicRuleInput) SetRuleName(v string) *EnableTopicRuleInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EnableTopicRuleInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RuleName != nil { + v := *s.RuleName + + e.SetValue(protocol.PathTarget, "ruleName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type EnableTopicRuleOutput struct { _ struct{} `type:"structure"` } @@ -8451,6 +9583,12 @@ func (s EnableTopicRuleOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EnableTopicRuleOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Describes an action that writes data to an Amazon Kinesis Firehose stream. type FirehoseAction struct { _ struct{} `type:"structure"` @@ -8515,6 +9653,27 @@ func (s *FirehoseAction) SetSeparator(v string) *FirehoseAction { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FirehoseAction) MarshalFields(e protocol.FieldEncoder) error { + if s.DeliveryStreamName != nil { + v := *s.DeliveryStreamName + + e.SetValue(protocol.BodyTarget, "deliveryStreamName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Separator != nil { + v := *s.Separator + + e.SetValue(protocol.BodyTarget, "separator", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the GetLoggingOptions operation. type GetLoggingOptionsInput struct { _ struct{} `type:"structure"` @@ -8530,6 +9689,12 @@ func (s GetLoggingOptionsInput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetLoggingOptionsInput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The output from the GetLoggingOptions operation. type GetLoggingOptionsOutput struct { _ struct{} `type:"structure"` @@ -8563,6 +9728,22 @@ func (s *GetLoggingOptionsOutput) SetRoleArn(v string) *GetLoggingOptionsOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetLoggingOptionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.LogLevel != nil { + v := *s.LogLevel + + e.SetValue(protocol.BodyTarget, "logLevel", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the GetPolicy operation. type GetPolicyInput struct { _ struct{} `type:"structure"` @@ -8605,6 +9786,17 @@ func (s *GetPolicyInput) SetPolicyName(v string) *GetPolicyInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.PolicyName != nil { + v := *s.PolicyName + + e.SetValue(protocol.PathTarget, "policyName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the GetPolicy operation. type GetPolicyOutput struct { _ struct{} `type:"structure"` @@ -8656,6 +9848,32 @@ func (s *GetPolicyOutput) SetPolicyName(v string) *GetPolicyOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DefaultVersionId != nil { + v := *s.DefaultVersionId + + e.SetValue(protocol.BodyTarget, "defaultVersionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyArn != nil { + v := *s.PolicyArn + + e.SetValue(protocol.BodyTarget, "policyArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyDocument != nil { + v := *s.PolicyDocument + + e.SetValue(protocol.BodyTarget, "policyDocument", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyName != nil { + v := *s.PolicyName + + e.SetValue(protocol.BodyTarget, "policyName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the GetPolicyVersion operation. type GetPolicyVersionInput struct { _ struct{} `type:"structure"` @@ -8712,6 +9930,22 @@ func (s *GetPolicyVersionInput) SetPolicyVersionId(v string) *GetPolicyVersionIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetPolicyVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.PolicyName != nil { + v := *s.PolicyName + + e.SetValue(protocol.PathTarget, "policyName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyVersionId != nil { + v := *s.PolicyVersionId + + e.SetValue(protocol.PathTarget, "policyVersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the GetPolicyVersion operation. type GetPolicyVersionOutput struct { _ struct{} `type:"structure"` @@ -8772,6 +10006,37 @@ func (s *GetPolicyVersionOutput) SetPolicyVersionId(v string) *GetPolicyVersionO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetPolicyVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.IsDefaultVersion != nil { + v := *s.IsDefaultVersion + + e.SetValue(protocol.BodyTarget, "isDefaultVersion", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.PolicyArn != nil { + v := *s.PolicyArn + + e.SetValue(protocol.BodyTarget, "policyArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyDocument != nil { + v := *s.PolicyDocument + + e.SetValue(protocol.BodyTarget, "policyDocument", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyName != nil { + v := *s.PolicyName + + e.SetValue(protocol.BodyTarget, "policyName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyVersionId != nil { + v := *s.PolicyVersionId + + e.SetValue(protocol.BodyTarget, "policyVersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input to the GetRegistrationCode operation. type GetRegistrationCodeInput struct { _ struct{} `type:"structure"` @@ -8787,6 +10052,12 @@ func (s GetRegistrationCodeInput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetRegistrationCodeInput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The output from the GetRegistrationCode operation. type GetRegistrationCodeOutput struct { _ struct{} `type:"structure"` @@ -8811,6 +10082,17 @@ func (s *GetRegistrationCodeOutput) SetRegistrationCode(v string) *GetRegistrati return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetRegistrationCodeOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.RegistrationCode != nil { + v := *s.RegistrationCode + + e.SetValue(protocol.BodyTarget, "registrationCode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the GetTopicRule operation. type GetTopicRuleInput struct { _ struct{} `type:"structure"` @@ -8853,6 +10135,17 @@ func (s *GetTopicRuleInput) SetRuleName(v string) *GetTopicRuleInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetTopicRuleInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RuleName != nil { + v := *s.RuleName + + e.SetValue(protocol.PathTarget, "ruleName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the GetTopicRule operation. type GetTopicRuleOutput struct { _ struct{} `type:"structure"` @@ -8886,6 +10179,22 @@ func (s *GetTopicRuleOutput) SetRuleArn(v string) *GetTopicRuleOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetTopicRuleOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Rule != nil { + v := s.Rule + + e.SetFields(protocol.BodyTarget, "rule", v, protocol.Metadata{}) + } + if s.RuleArn != nil { + v := *s.RuleArn + + e.SetValue(protocol.BodyTarget, "ruleArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes a key pair. type KeyPair struct { _ struct{} `type:"structure"` @@ -8919,6 +10228,22 @@ func (s *KeyPair) SetPublicKey(v string) *KeyPair { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *KeyPair) MarshalFields(e protocol.FieldEncoder) error { + if s.PrivateKey != nil { + v := *s.PrivateKey + + e.SetValue(protocol.BodyTarget, "PrivateKey", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PublicKey != nil { + v := *s.PublicKey + + e.SetValue(protocol.BodyTarget, "PublicKey", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes an action to write data to an Amazon Kinesis stream. type KinesisAction struct { _ struct{} `type:"structure"` @@ -8981,6 +10306,27 @@ func (s *KinesisAction) SetStreamName(v string) *KinesisAction { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *KinesisAction) MarshalFields(e protocol.FieldEncoder) error { + if s.PartitionKey != nil { + v := *s.PartitionKey + + e.SetValue(protocol.BodyTarget, "partitionKey", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StreamName != nil { + v := *s.StreamName + + e.SetValue(protocol.BodyTarget, "streamName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes an action to invoke a Lambda function. type LambdaAction struct { _ struct{} `type:"structure"` @@ -9020,6 +10366,17 @@ func (s *LambdaAction) SetFunctionArn(v string) *LambdaAction { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LambdaAction) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionArn != nil { + v := *s.FunctionArn + + e.SetValue(protocol.BodyTarget, "functionArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Input for the ListCACertificates operation. type ListCACertificatesInput struct { _ struct{} `type:"structure"` @@ -9075,6 +10432,27 @@ func (s *ListCACertificatesInput) SetPageSize(v int64) *ListCACertificatesInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListCACertificatesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AscendingOrder != nil { + v := *s.AscendingOrder + + e.SetValue(protocol.QueryTarget, "isAscendingOrder", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageSize != nil { + v := *s.PageSize + + e.SetValue(protocol.QueryTarget, "pageSize", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The output from the ListCACertificates operation. type ListCACertificatesOutput struct { _ struct{} `type:"structure"` @@ -9108,6 +10486,22 @@ func (s *ListCACertificatesOutput) SetNextMarker(v string) *ListCACertificatesOu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListCACertificatesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Certificates) > 0 { + v := s.Certificates + + e.SetList(protocol.BodyTarget, "certificates", encodeCACertificateList(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "nextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input to the ListCertificatesByCA operation. type ListCertificatesByCAInput struct { _ struct{} `type:"structure"` @@ -9182,6 +10576,32 @@ func (s *ListCertificatesByCAInput) SetPageSize(v int64) *ListCertificatesByCAIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListCertificatesByCAInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AscendingOrder != nil { + v := *s.AscendingOrder + + e.SetValue(protocol.QueryTarget, "isAscendingOrder", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.CaCertificateId != nil { + v := *s.CaCertificateId + + e.SetValue(protocol.PathTarget, "caCertificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageSize != nil { + v := *s.PageSize + + e.SetValue(protocol.QueryTarget, "pageSize", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The output of the ListCertificatesByCA operation. type ListCertificatesByCAOutput struct { _ struct{} `type:"structure"` @@ -9216,6 +10636,22 @@ func (s *ListCertificatesByCAOutput) SetNextMarker(v string) *ListCertificatesBy return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListCertificatesByCAOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Certificates) > 0 { + v := s.Certificates + + e.SetList(protocol.BodyTarget, "certificates", encodeCertificateList(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "nextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the ListCertificates operation. type ListCertificatesInput struct { _ struct{} `type:"structure"` @@ -9272,6 +10708,27 @@ func (s *ListCertificatesInput) SetPageSize(v int64) *ListCertificatesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListCertificatesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AscendingOrder != nil { + v := *s.AscendingOrder + + e.SetValue(protocol.QueryTarget, "isAscendingOrder", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageSize != nil { + v := *s.PageSize + + e.SetValue(protocol.QueryTarget, "pageSize", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The output of the ListCertificates operation. type ListCertificatesOutput struct { _ struct{} `type:"structure"` @@ -9306,6 +10763,22 @@ func (s *ListCertificatesOutput) SetNextMarker(v string) *ListCertificatesOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListCertificatesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Certificates) > 0 { + v := s.Certificates + + e.SetList(protocol.BodyTarget, "certificates", encodeCertificateList(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "nextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input to the ListOutgoingCertificates operation. type ListOutgoingCertificatesInput struct { _ struct{} `type:"structure"` @@ -9362,6 +10835,27 @@ func (s *ListOutgoingCertificatesInput) SetPageSize(v int64) *ListOutgoingCertif return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListOutgoingCertificatesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AscendingOrder != nil { + v := *s.AscendingOrder + + e.SetValue(protocol.QueryTarget, "isAscendingOrder", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageSize != nil { + v := *s.PageSize + + e.SetValue(protocol.QueryTarget, "pageSize", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The output from the ListOutgoingCertificates operation. type ListOutgoingCertificatesOutput struct { _ struct{} `type:"structure"` @@ -9395,6 +10889,22 @@ func (s *ListOutgoingCertificatesOutput) SetOutgoingCertificates(v []*OutgoingCe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListOutgoingCertificatesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "nextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.OutgoingCertificates) > 0 { + v := s.OutgoingCertificates + + e.SetList(protocol.BodyTarget, "outgoingCertificates", encodeOutgoingCertificateList(v), protocol.Metadata{}) + } + + return nil +} + // The input for the ListPolicies operation. type ListPoliciesInput struct { _ struct{} `type:"structure"` @@ -9451,6 +10961,27 @@ func (s *ListPoliciesInput) SetPageSize(v int64) *ListPoliciesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPoliciesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AscendingOrder != nil { + v := *s.AscendingOrder + + e.SetValue(protocol.QueryTarget, "isAscendingOrder", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageSize != nil { + v := *s.PageSize + + e.SetValue(protocol.QueryTarget, "pageSize", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // The output from the ListPolicies operation. type ListPoliciesOutput struct { _ struct{} `type:"structure"` @@ -9485,6 +11016,22 @@ func (s *ListPoliciesOutput) SetPolicies(v []*Policy) *ListPoliciesOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPoliciesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "nextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Policies) > 0 { + v := s.Policies + + e.SetList(protocol.BodyTarget, "policies", encodePolicyList(v), protocol.Metadata{}) + } + + return nil +} + // The input for the ListPolicyPrincipals operation. type ListPolicyPrincipalsInput struct { _ struct{} `type:"structure"` @@ -9558,6 +11105,32 @@ func (s *ListPolicyPrincipalsInput) SetPolicyName(v string) *ListPolicyPrincipal return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPolicyPrincipalsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AscendingOrder != nil { + v := *s.AscendingOrder + + e.SetValue(protocol.QueryTarget, "isAscendingOrder", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageSize != nil { + v := *s.PageSize + + e.SetValue(protocol.QueryTarget, "pageSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PolicyName != nil { + v := *s.PolicyName + + e.SetValue(protocol.HeaderTarget, "x-amzn-iot-policy", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the ListPolicyPrincipals operation. type ListPolicyPrincipalsOutput struct { _ struct{} `type:"structure"` @@ -9592,6 +11165,22 @@ func (s *ListPolicyPrincipalsOutput) SetPrincipals(v []*string) *ListPolicyPrinc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPolicyPrincipalsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "nextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Principals) > 0 { + v := s.Principals + + e.SetList(protocol.BodyTarget, "principals", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // The input for the ListPolicyVersions operation. type ListPolicyVersionsInput struct { _ struct{} `type:"structure"` @@ -9634,6 +11223,17 @@ func (s *ListPolicyVersionsInput) SetPolicyName(v string) *ListPolicyVersionsInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPolicyVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.PolicyName != nil { + v := *s.PolicyName + + e.SetValue(protocol.PathTarget, "policyName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the ListPolicyVersions operation. type ListPolicyVersionsOutput struct { _ struct{} `type:"structure"` @@ -9658,6 +11258,17 @@ func (s *ListPolicyVersionsOutput) SetPolicyVersions(v []*PolicyVersion) *ListPo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPolicyVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.PolicyVersions) > 0 { + v := s.PolicyVersions + + e.SetList(protocol.BodyTarget, "policyVersions", encodePolicyVersionList(v), protocol.Metadata{}) + } + + return nil +} + // The input for the ListPrincipalPolicies operation. type ListPrincipalPoliciesInput struct { _ struct{} `type:"structure"` @@ -9728,6 +11339,32 @@ func (s *ListPrincipalPoliciesInput) SetPrincipal(v string) *ListPrincipalPolici return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPrincipalPoliciesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AscendingOrder != nil { + v := *s.AscendingOrder + + e.SetValue(protocol.QueryTarget, "isAscendingOrder", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageSize != nil { + v := *s.PageSize + + e.SetValue(protocol.QueryTarget, "pageSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Principal != nil { + v := *s.Principal + + e.SetValue(protocol.HeaderTarget, "x-amzn-iot-principal", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the ListPrincipalPolicies operation. type ListPrincipalPoliciesOutput struct { _ struct{} `type:"structure"` @@ -9762,6 +11399,22 @@ func (s *ListPrincipalPoliciesOutput) SetPolicies(v []*Policy) *ListPrincipalPol return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPrincipalPoliciesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "nextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Policies) > 0 { + v := s.Policies + + e.SetList(protocol.BodyTarget, "policies", encodePolicyList(v), protocol.Metadata{}) + } + + return nil +} + // The input for the ListPrincipalThings operation. type ListPrincipalThingsInput struct { _ struct{} `type:"structure"` @@ -9823,6 +11476,27 @@ func (s *ListPrincipalThingsInput) SetPrincipal(v string) *ListPrincipalThingsIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPrincipalThingsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Principal != nil { + v := *s.Principal + + e.SetValue(protocol.HeaderTarget, "x-amzn-principal", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the ListPrincipalThings operation. type ListPrincipalThingsOutput struct { _ struct{} `type:"structure"` @@ -9857,6 +11531,22 @@ func (s *ListPrincipalThingsOutput) SetThings(v []*string) *ListPrincipalThingsO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPrincipalThingsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Things) > 0 { + v := s.Things + + e.SetList(protocol.BodyTarget, "things", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // The input for the ListThingPrincipal operation. type ListThingPrincipalsInput struct { _ struct{} `type:"structure"` @@ -9899,6 +11589,17 @@ func (s *ListThingPrincipalsInput) SetThingName(v string) *ListThingPrincipalsIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListThingPrincipalsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ThingName != nil { + v := *s.ThingName + + e.SetValue(protocol.PathTarget, "thingName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the ListThingPrincipals operation. type ListThingPrincipalsOutput struct { _ struct{} `type:"structure"` @@ -9923,6 +11624,17 @@ func (s *ListThingPrincipalsOutput) SetPrincipals(v []*string) *ListThingPrincip return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListThingPrincipalsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Principals) > 0 { + v := s.Principals + + e.SetList(protocol.BodyTarget, "principals", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // The input for the ListThingTypes operation. type ListThingTypesInput struct { _ struct{} `type:"structure"` @@ -9982,6 +11694,27 @@ func (s *ListThingTypesInput) SetThingTypeName(v string) *ListThingTypesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListThingTypesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThingTypeName != nil { + v := *s.ThingTypeName + + e.SetValue(protocol.QueryTarget, "thingTypeName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output for the ListThingTypes operation. type ListThingTypesOutput struct { _ struct{} `type:"structure"` @@ -10016,6 +11749,22 @@ func (s *ListThingTypesOutput) SetThingTypes(v []*ThingTypeDefinition) *ListThin return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListThingTypesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.ThingTypes) > 0 { + v := s.ThingTypes + + e.SetList(protocol.BodyTarget, "thingTypes", encodeThingTypeDefinitionList(v), protocol.Metadata{}) + } + + return nil +} + // The input for the ListThings operation. type ListThingsInput struct { _ struct{} `type:"structure"` @@ -10093,6 +11842,37 @@ func (s *ListThingsInput) SetThingTypeName(v string) *ListThingsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListThingsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AttributeName != nil { + v := *s.AttributeName + + e.SetValue(protocol.QueryTarget, "attributeName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AttributeValue != nil { + v := *s.AttributeValue + + e.SetValue(protocol.QueryTarget, "attributeValue", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThingTypeName != nil { + v := *s.ThingTypeName + + e.SetValue(protocol.QueryTarget, "thingTypeName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the ListThings operation. type ListThingsOutput struct { _ struct{} `type:"structure"` @@ -10127,6 +11907,22 @@ func (s *ListThingsOutput) SetThings(v []*ThingAttribute) *ListThingsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListThingsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Things) > 0 { + v := s.Things + + e.SetList(protocol.BodyTarget, "things", encodeThingAttributeList(v), protocol.Metadata{}) + } + + return nil +} + // The input for the ListTopicRules operation. type ListTopicRulesInput struct { _ struct{} `type:"structure"` @@ -10191,6 +11987,32 @@ func (s *ListTopicRulesInput) SetTopic(v string) *ListTopicRulesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTopicRulesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RuleDisabled != nil { + v := *s.RuleDisabled + + e.SetValue(protocol.QueryTarget, "ruleDisabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Topic != nil { + v := *s.Topic + + e.SetValue(protocol.QueryTarget, "topic", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the ListTopicRules operation. type ListTopicRulesOutput struct { _ struct{} `type:"structure"` @@ -10224,6 +12046,22 @@ func (s *ListTopicRulesOutput) SetRules(v []*TopicRuleListItem) *ListTopicRulesO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTopicRulesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Rules) > 0 { + v := s.Rules + + e.SetList(protocol.BodyTarget, "rules", encodeTopicRuleListItemList(v), protocol.Metadata{}) + } + + return nil +} + // Describes the logging options payload. type LoggingOptionsPayload struct { _ struct{} `type:"structure"` @@ -10272,6 +12110,22 @@ func (s *LoggingOptionsPayload) SetRoleArn(v string) *LoggingOptionsPayload { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LoggingOptionsPayload) MarshalFields(e protocol.FieldEncoder) error { + if s.LogLevel != nil { + v := *s.LogLevel + + e.SetValue(protocol.BodyTarget, "logLevel", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A certificate that has been transfered but not yet accepted. type OutgoingCertificate struct { _ struct{} `type:"structure"` @@ -10341,6 +12195,50 @@ func (s *OutgoingCertificate) SetTransferredTo(v string) *OutgoingCertificate { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutgoingCertificate) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateArn != nil { + v := *s.CertificateArn + + e.SetValue(protocol.BodyTarget, "certificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.BodyTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "creationDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.TransferDate != nil { + v := *s.TransferDate + + e.SetValue(protocol.BodyTarget, "transferDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.TransferMessage != nil { + v := *s.TransferMessage + + e.SetValue(protocol.BodyTarget, "transferMessage", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TransferredTo != nil { + v := *s.TransferredTo + + e.SetValue(protocol.BodyTarget, "transferredTo", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeOutgoingCertificateList(vs []*OutgoingCertificate) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Describes an AWS IoT policy. type Policy struct { _ struct{} `type:"structure"` @@ -10374,6 +12272,30 @@ func (s *Policy) SetPolicyName(v string) *Policy { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Policy) MarshalFields(e protocol.FieldEncoder) error { + if s.PolicyArn != nil { + v := *s.PolicyArn + + e.SetValue(protocol.BodyTarget, "policyArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyName != nil { + v := *s.PolicyName + + e.SetValue(protocol.BodyTarget, "policyName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodePolicyList(vs []*Policy) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Describes a policy version. type PolicyVersion struct { _ struct{} `type:"structure"` @@ -10416,6 +12338,35 @@ func (s *PolicyVersion) SetVersionId(v string) *PolicyVersion { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PolicyVersion) MarshalFields(e protocol.FieldEncoder) error { + if s.CreateDate != nil { + v := *s.CreateDate + + e.SetValue(protocol.BodyTarget, "createDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.IsDefaultVersion != nil { + v := *s.IsDefaultVersion + + e.SetValue(protocol.BodyTarget, "isDefaultVersion", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.BodyTarget, "versionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodePolicyVersionList(vs []*PolicyVersion) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The input for the DynamoActionVS action that specifies the DynamoDB table // to which the message data will be written. type PutItemInput struct { @@ -10456,6 +12407,17 @@ func (s *PutItemInput) SetTableName(v string) *PutItemInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutItemInput) MarshalFields(e protocol.FieldEncoder) error { + if s.TableName != nil { + v := *s.TableName + + e.SetValue(protocol.BodyTarget, "tableName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input to the RegisterCACertificate operation. type RegisterCACertificateInput struct { _ struct{} `type:"structure"` @@ -10533,6 +12495,32 @@ func (s *RegisterCACertificateInput) SetVerificationCertificate(v string) *Regis return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RegisterCACertificateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AllowAutoRegistration != nil { + v := *s.AllowAutoRegistration + + e.SetValue(protocol.QueryTarget, "allowAutoRegistration", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.CaCertificate != nil { + v := *s.CaCertificate + + e.SetValue(protocol.BodyTarget, "caCertificate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SetAsActive != nil { + v := *s.SetAsActive + + e.SetValue(protocol.QueryTarget, "setAsActive", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.VerificationCertificate != nil { + v := *s.VerificationCertificate + + e.SetValue(protocol.BodyTarget, "verificationCertificate", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the RegisterCACertificateResponse operation. type RegisterCACertificateOutput struct { _ struct{} `type:"structure"` @@ -10566,6 +12554,22 @@ func (s *RegisterCACertificateOutput) SetCertificateId(v string) *RegisterCACert return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RegisterCACertificateOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateArn != nil { + v := *s.CertificateArn + + e.SetValue(protocol.BodyTarget, "certificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.BodyTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input to the RegisterCertificate operation. type RegisterCertificateInput struct { _ struct{} `type:"structure"` @@ -10638,6 +12642,32 @@ func (s *RegisterCertificateInput) SetStatus(v string) *RegisterCertificateInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RegisterCertificateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CaCertificatePem != nil { + v := *s.CaCertificatePem + + e.SetValue(protocol.BodyTarget, "caCertificatePem", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificatePem != nil { + v := *s.CertificatePem + + e.SetValue(protocol.BodyTarget, "certificatePem", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SetAsActive != nil { + v := *s.SetAsActive + + e.SetValue(protocol.QueryTarget, "setAsActive", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the RegisterCertificate operation. type RegisterCertificateOutput struct { _ struct{} `type:"structure"` @@ -10671,6 +12701,22 @@ func (s *RegisterCertificateOutput) SetCertificateId(v string) *RegisterCertific return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RegisterCertificateOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateArn != nil { + v := *s.CertificateArn + + e.SetValue(protocol.BodyTarget, "certificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.BodyTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the RejectCertificateTransfer operation. type RejectCertificateTransferInput struct { _ struct{} `type:"structure"` @@ -10722,6 +12768,22 @@ func (s *RejectCertificateTransferInput) SetRejectReason(v string) *RejectCertif return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RejectCertificateTransferInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.PathTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RejectReason != nil { + v := *s.RejectReason + + e.SetValue(protocol.BodyTarget, "rejectReason", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type RejectCertificateTransferOutput struct { _ struct{} `type:"structure"` } @@ -10736,6 +12798,12 @@ func (s RejectCertificateTransferOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RejectCertificateTransferOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the ReplaceTopicRule operation. type ReplaceTopicRuleInput struct { _ struct{} `type:"structure" payload:"TopicRulePayload"` @@ -10797,6 +12865,22 @@ func (s *ReplaceTopicRuleInput) SetTopicRulePayload(v *TopicRulePayload) *Replac return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ReplaceTopicRuleInput) MarshalFields(e protocol.FieldEncoder) error { + if s.RuleName != nil { + v := *s.RuleName + + e.SetValue(protocol.PathTarget, "ruleName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TopicRulePayload != nil { + v := s.TopicRulePayload + + e.SetFields(protocol.PayloadTarget, "topicRulePayload", v, protocol.Metadata{}) + } + + return nil +} + type ReplaceTopicRuleOutput struct { _ struct{} `type:"structure"` } @@ -10811,6 +12895,12 @@ func (s ReplaceTopicRuleOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ReplaceTopicRuleOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Describes an action to republish to another topic. type RepublishAction struct { _ struct{} `type:"structure"` @@ -10864,6 +12954,22 @@ func (s *RepublishAction) SetTopic(v string) *RepublishAction { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RepublishAction) MarshalFields(e protocol.FieldEncoder) error { + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Topic != nil { + v := *s.Topic + + e.SetValue(protocol.BodyTarget, "topic", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes an action to write data to an Amazon S3 bucket. type S3Action struct { _ struct{} `type:"structure"` @@ -10941,6 +13047,32 @@ func (s *S3Action) SetRoleArn(v string) *S3Action { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *S3Action) MarshalFields(e protocol.FieldEncoder) error { + if s.BucketName != nil { + v := *s.BucketName + + e.SetValue(protocol.BodyTarget, "bucketName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CannedAcl != nil { + v := *s.CannedAcl + + e.SetValue(protocol.BodyTarget, "cannedAcl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes an action to write a message to a Salesforce IoT Cloud Input Stream. type SalesforceAction struct { _ struct{} `type:"structure"` @@ -11000,6 +13132,22 @@ func (s *SalesforceAction) SetUrl(v string) *SalesforceAction { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SalesforceAction) MarshalFields(e protocol.FieldEncoder) error { + if s.Token != nil { + v := *s.Token + + e.SetValue(protocol.BodyTarget, "token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "url", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the SetDefaultPolicyVersion operation. type SetDefaultPolicyVersionInput struct { _ struct{} `type:"structure"` @@ -11056,6 +13204,22 @@ func (s *SetDefaultPolicyVersionInput) SetPolicyVersionId(v string) *SetDefaultP return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SetDefaultPolicyVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.PolicyName != nil { + v := *s.PolicyName + + e.SetValue(protocol.PathTarget, "policyName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PolicyVersionId != nil { + v := *s.PolicyVersionId + + e.SetValue(protocol.PathTarget, "policyVersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type SetDefaultPolicyVersionOutput struct { _ struct{} `type:"structure"` } @@ -11070,6 +13234,12 @@ func (s SetDefaultPolicyVersionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SetDefaultPolicyVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the SetLoggingOptions operation. type SetLoggingOptionsInput struct { _ struct{} `type:"structure" payload:"LoggingOptionsPayload"` @@ -11114,6 +13284,17 @@ func (s *SetLoggingOptionsInput) SetLoggingOptionsPayload(v *LoggingOptionsPaylo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SetLoggingOptionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.LoggingOptionsPayload != nil { + v := s.LoggingOptionsPayload + + e.SetFields(protocol.PayloadTarget, "loggingOptionsPayload", v, protocol.Metadata{}) + } + + return nil +} + type SetLoggingOptionsOutput struct { _ struct{} `type:"structure"` } @@ -11128,6 +13309,12 @@ func (s SetLoggingOptionsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SetLoggingOptionsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Describes an action to publish to an Amazon SNS topic. type SnsAction struct { _ struct{} `type:"structure"` @@ -11195,6 +13382,27 @@ func (s *SnsAction) SetTargetArn(v string) *SnsAction { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SnsAction) MarshalFields(e protocol.FieldEncoder) error { + if s.MessageFormat != nil { + v := *s.MessageFormat + + e.SetValue(protocol.BodyTarget, "messageFormat", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TargetArn != nil { + v := *s.TargetArn + + e.SetValue(protocol.BodyTarget, "targetArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes an action to publish data to an Amazon SQS queue. type SqsAction struct { _ struct{} `type:"structure"` @@ -11257,6 +13465,27 @@ func (s *SqsAction) SetUseBase64(v bool) *SqsAction { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SqsAction) MarshalFields(e protocol.FieldEncoder) error { + if s.QueueUrl != nil { + v := *s.QueueUrl + + e.SetValue(protocol.BodyTarget, "queueUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UseBase64 != nil { + v := *s.UseBase64 + + e.SetValue(protocol.BodyTarget, "useBase64", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // The properties of the thing, including thing name, thing type name, and a // list of thing attributes. type ThingAttribute struct { @@ -11309,6 +13538,40 @@ func (s *ThingAttribute) SetVersion(v int64) *ThingAttribute { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ThingAttribute) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetMap(protocol.BodyTarget, "attributes", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.ThingName != nil { + v := *s.ThingName + + e.SetValue(protocol.BodyTarget, "thingName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThingTypeName != nil { + v := *s.ThingTypeName + + e.SetValue(protocol.BodyTarget, "thingTypeName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeThingAttributeList(vs []*ThingAttribute) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The definition of the thing type, including thing type name and description. type ThingTypeDefinition struct { _ struct{} `type:"structure"` @@ -11353,6 +13616,35 @@ func (s *ThingTypeDefinition) SetThingTypeProperties(v *ThingTypeProperties) *Th return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ThingTypeDefinition) MarshalFields(e protocol.FieldEncoder) error { + if s.ThingTypeMetadata != nil { + v := s.ThingTypeMetadata + + e.SetFields(protocol.BodyTarget, "thingTypeMetadata", v, protocol.Metadata{}) + } + if s.ThingTypeName != nil { + v := *s.ThingTypeName + + e.SetValue(protocol.BodyTarget, "thingTypeName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThingTypeProperties != nil { + v := s.ThingTypeProperties + + e.SetFields(protocol.BodyTarget, "thingTypeProperties", v, protocol.Metadata{}) + } + + return nil +} + +func encodeThingTypeDefinitionList(vs []*ThingTypeDefinition) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The ThingTypeMetadata contains additional information about the thing type // including: creation date and time, a value indicating whether the thing type // is deprecated, and a date and time when time was deprecated. @@ -11398,6 +13690,27 @@ func (s *ThingTypeMetadata) SetDeprecationDate(v time.Time) *ThingTypeMetadata { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ThingTypeMetadata) MarshalFields(e protocol.FieldEncoder) error { + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "creationDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Deprecated != nil { + v := *s.Deprecated + + e.SetValue(protocol.BodyTarget, "deprecated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.DeprecationDate != nil { + v := *s.DeprecationDate + + e.SetValue(protocol.BodyTarget, "deprecationDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + + return nil +} + // The ThingTypeProperties contains information about the thing type including: // a thing type description, and a list of searchable thing attribute names. type ThingTypeProperties struct { @@ -11432,6 +13745,22 @@ func (s *ThingTypeProperties) SetThingTypeDescription(v string) *ThingTypeProper return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ThingTypeProperties) MarshalFields(e protocol.FieldEncoder) error { + if len(s.SearchableAttributes) > 0 { + v := s.SearchableAttributes + + e.SetList(protocol.BodyTarget, "searchableAttributes", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.ThingTypeDescription != nil { + v := *s.ThingTypeDescription + + e.SetValue(protocol.BodyTarget, "thingTypeDescription", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes a rule. type TopicRule struct { _ struct{} `type:"structure"` @@ -11511,6 +13840,47 @@ func (s *TopicRule) SetSql(v string) *TopicRule { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TopicRule) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Actions) > 0 { + v := s.Actions + + e.SetList(protocol.BodyTarget, "actions", encodeActionList(v), protocol.Metadata{}) + } + if s.AwsIotSqlVersion != nil { + v := *s.AwsIotSqlVersion + + e.SetValue(protocol.BodyTarget, "awsIotSqlVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedAt != nil { + v := *s.CreatedAt + + e.SetValue(protocol.BodyTarget, "createdAt", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RuleDisabled != nil { + v := *s.RuleDisabled + + e.SetValue(protocol.BodyTarget, "ruleDisabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.RuleName != nil { + v := *s.RuleName + + e.SetValue(protocol.BodyTarget, "ruleName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Sql != nil { + v := *s.Sql + + e.SetValue(protocol.BodyTarget, "sql", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes a rule. type TopicRuleListItem struct { _ struct{} `type:"structure"` @@ -11571,6 +13941,45 @@ func (s *TopicRuleListItem) SetTopicPattern(v string) *TopicRuleListItem { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TopicRuleListItem) MarshalFields(e protocol.FieldEncoder) error { + if s.CreatedAt != nil { + v := *s.CreatedAt + + e.SetValue(protocol.BodyTarget, "createdAt", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.RuleArn != nil { + v := *s.RuleArn + + e.SetValue(protocol.BodyTarget, "ruleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RuleDisabled != nil { + v := *s.RuleDisabled + + e.SetValue(protocol.BodyTarget, "ruleDisabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.RuleName != nil { + v := *s.RuleName + + e.SetValue(protocol.BodyTarget, "ruleName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TopicPattern != nil { + v := *s.TopicPattern + + e.SetValue(protocol.BodyTarget, "topicPattern", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTopicRuleListItemList(vs []*TopicRuleListItem) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Describes a rule. type TopicRulePayload struct { _ struct{} `type:"structure"` @@ -11663,6 +14072,37 @@ func (s *TopicRulePayload) SetSql(v string) *TopicRulePayload { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TopicRulePayload) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Actions) > 0 { + v := s.Actions + + e.SetList(protocol.BodyTarget, "actions", encodeActionList(v), protocol.Metadata{}) + } + if s.AwsIotSqlVersion != nil { + v := *s.AwsIotSqlVersion + + e.SetValue(protocol.BodyTarget, "awsIotSqlVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RuleDisabled != nil { + v := *s.RuleDisabled + + e.SetValue(protocol.BodyTarget, "ruleDisabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Sql != nil { + v := *s.Sql + + e.SetValue(protocol.BodyTarget, "sql", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input for the TransferCertificate operation. type TransferCertificateInput struct { _ struct{} `type:"structure"` @@ -11728,6 +14168,27 @@ func (s *TransferCertificateInput) SetTransferMessage(v string) *TransferCertifi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TransferCertificateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.PathTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TargetAwsAccount != nil { + v := *s.TargetAwsAccount + + e.SetValue(protocol.QueryTarget, "targetAwsAccount", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TransferMessage != nil { + v := *s.TransferMessage + + e.SetValue(protocol.BodyTarget, "transferMessage", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the TransferCertificate operation. type TransferCertificateOutput struct { _ struct{} `type:"structure"` @@ -11752,6 +14213,17 @@ func (s *TransferCertificateOutput) SetTransferredCertificateArn(v string) *Tran return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TransferCertificateOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.TransferredCertificateArn != nil { + v := *s.TransferredCertificateArn + + e.SetValue(protocol.BodyTarget, "transferredCertificateArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Data used to transfer a certificate to an AWS account. type TransferData struct { _ struct{} `type:"structure"` @@ -11812,6 +14284,37 @@ func (s *TransferData) SetTransferMessage(v string) *TransferData { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TransferData) MarshalFields(e protocol.FieldEncoder) error { + if s.AcceptDate != nil { + v := *s.AcceptDate + + e.SetValue(protocol.BodyTarget, "acceptDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.RejectDate != nil { + v := *s.RejectDate + + e.SetValue(protocol.BodyTarget, "rejectDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.RejectReason != nil { + v := *s.RejectReason + + e.SetValue(protocol.BodyTarget, "rejectReason", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TransferDate != nil { + v := *s.TransferDate + + e.SetValue(protocol.BodyTarget, "transferDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.TransferMessage != nil { + v := *s.TransferMessage + + e.SetValue(protocol.BodyTarget, "transferMessage", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The input to the UpdateCACertificate operation. type UpdateCACertificateInput struct { _ struct{} `type:"structure"` @@ -11876,6 +14379,27 @@ func (s *UpdateCACertificateInput) SetNewStatus(v string) *UpdateCACertificateIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateCACertificateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.PathTarget, "caCertificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NewAutoRegistrationStatus != nil { + v := *s.NewAutoRegistrationStatus + + e.SetValue(protocol.QueryTarget, "newAutoRegistrationStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NewStatus != nil { + v := *s.NewStatus + + e.SetValue(protocol.QueryTarget, "newStatus", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type UpdateCACertificateOutput struct { _ struct{} `type:"structure"` } @@ -11890,6 +14414,12 @@ func (s UpdateCACertificateOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateCACertificateOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the UpdateCertificate operation. type UpdateCertificateInput struct { _ struct{} `type:"structure"` @@ -11953,6 +14483,22 @@ func (s *UpdateCertificateInput) SetNewStatus(v string) *UpdateCertificateInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateCertificateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CertificateId != nil { + v := *s.CertificateId + + e.SetValue(protocol.PathTarget, "certificateId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NewStatus != nil { + v := *s.NewStatus + + e.SetValue(protocol.QueryTarget, "newStatus", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type UpdateCertificateOutput struct { _ struct{} `type:"structure"` } @@ -11967,6 +14513,12 @@ func (s UpdateCertificateOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateCertificateOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the UpdateThing operation. type UpdateThingInput struct { _ struct{} `type:"structure"` @@ -12055,6 +14607,37 @@ func (s *UpdateThingInput) SetThingTypeName(v string) *UpdateThingInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateThingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AttributePayload != nil { + v := s.AttributePayload + + e.SetFields(protocol.BodyTarget, "attributePayload", v, protocol.Metadata{}) + } + if s.ExpectedVersion != nil { + v := *s.ExpectedVersion + + e.SetValue(protocol.BodyTarget, "expectedVersion", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RemoveThingType != nil { + v := *s.RemoveThingType + + e.SetValue(protocol.BodyTarget, "removeThingType", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ThingName != nil { + v := *s.ThingName + + e.SetValue(protocol.PathTarget, "thingName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThingTypeName != nil { + v := *s.ThingTypeName + + e.SetValue(protocol.BodyTarget, "thingTypeName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the UpdateThing operation. type UpdateThingOutput struct { _ struct{} `type:"structure"` @@ -12070,6 +14653,12 @@ func (s UpdateThingOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateThingOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + const ( // AutoRegistrationStatusEnable is a AutoRegistrationStatus enum value AutoRegistrationStatusEnable = "ENABLE" diff --git a/service/iotdataplane/api.go b/service/iotdataplane/api.go index bd86a4d8421..28e98abc97c 100644 --- a/service/iotdataplane/api.go +++ b/service/iotdataplane/api.go @@ -445,6 +445,17 @@ func (s *DeleteThingShadowInput) SetThingName(v string) *DeleteThingShadowInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteThingShadowInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ThingName != nil { + v := *s.ThingName + + e.SetValue(protocol.PathTarget, "thingName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the DeleteThingShadow operation. type DeleteThingShadowOutput struct { _ struct{} `type:"structure" payload:"Payload"` @@ -471,6 +482,17 @@ func (s *DeleteThingShadowOutput) SetPayload(v []byte) *DeleteThingShadowOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteThingShadowOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Payload != nil { + v := s.Payload + + e.SetStream(protocol.PayloadTarget, "payload", protocol.BytesStream(v), protocol.Metadata{}) + } + + return nil +} + // The input for the GetThingShadow operation. type GetThingShadowInput struct { _ struct{} `type:"structure"` @@ -513,6 +535,17 @@ func (s *GetThingShadowInput) SetThingName(v string) *GetThingShadowInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetThingShadowInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ThingName != nil { + v := *s.ThingName + + e.SetValue(protocol.PathTarget, "thingName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the GetThingShadow operation. type GetThingShadowOutput struct { _ struct{} `type:"structure" payload:"Payload"` @@ -537,6 +570,17 @@ func (s *GetThingShadowOutput) SetPayload(v []byte) *GetThingShadowOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetThingShadowOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Payload != nil { + v := s.Payload + + e.SetStream(protocol.PayloadTarget, "payload", protocol.BytesStream(v), protocol.Metadata{}) + } + + return nil +} + // The input for the Publish operation. type PublishInput struct { _ struct{} `type:"structure" payload:"Payload"` @@ -594,6 +638,27 @@ func (s *PublishInput) SetTopic(v string) *PublishInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PublishInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Payload != nil { + v := s.Payload + + e.SetStream(protocol.PayloadTarget, "payload", protocol.BytesStream(v), protocol.Metadata{}) + } + if s.Qos != nil { + v := *s.Qos + + e.SetValue(protocol.QueryTarget, "qos", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Topic != nil { + v := *s.Topic + + e.SetValue(protocol.PathTarget, "topic", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + type PublishOutput struct { _ struct{} `type:"structure"` } @@ -608,6 +673,12 @@ func (s PublishOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PublishOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The input for the UpdateThingShadow operation. type UpdateThingShadowInput struct { _ struct{} `type:"structure" payload:"Payload"` @@ -664,6 +735,22 @@ func (s *UpdateThingShadowInput) SetThingName(v string) *UpdateThingShadowInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateThingShadowInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Payload != nil { + v := s.Payload + + e.SetStream(protocol.PayloadTarget, "payload", protocol.BytesStream(v), protocol.Metadata{}) + } + if s.ThingName != nil { + v := *s.ThingName + + e.SetValue(protocol.PathTarget, "thingName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The output from the UpdateThingShadow operation. type UpdateThingShadowOutput struct { _ struct{} `type:"structure" payload:"Payload"` @@ -687,3 +774,14 @@ func (s *UpdateThingShadowOutput) SetPayload(v []byte) *UpdateThingShadowOutput s.Payload = v return s } + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateThingShadowOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Payload != nil { + v := s.Payload + + e.SetStream(protocol.PayloadTarget, "payload", protocol.BytesStream(v), protocol.Metadata{}) + } + + return nil +} diff --git a/service/lambda/api.go b/service/lambda/api.go index 9c4bc147a2e..5c39e5444ce 100644 --- a/service/lambda/api.go +++ b/service/lambda/api.go @@ -3058,6 +3058,32 @@ func (s *AccountLimit) SetTotalCodeSize(v int64) *AccountLimit { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AccountLimit) MarshalFields(e protocol.FieldEncoder) error { + if s.CodeSizeUnzipped != nil { + v := *s.CodeSizeUnzipped + + e.SetValue(protocol.BodyTarget, "CodeSizeUnzipped", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.CodeSizeZipped != nil { + v := *s.CodeSizeZipped + + e.SetValue(protocol.BodyTarget, "CodeSizeZipped", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ConcurrentExecutions != nil { + v := *s.ConcurrentExecutions + + e.SetValue(protocol.BodyTarget, "ConcurrentExecutions", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TotalCodeSize != nil { + v := *s.TotalCodeSize + + e.SetValue(protocol.BodyTarget, "TotalCodeSize", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Provides code size usage and function count associated with the current account // and region. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AccountUsage @@ -3093,6 +3119,22 @@ func (s *AccountUsage) SetTotalCodeSize(v int64) *AccountUsage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AccountUsage) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionCount != nil { + v := *s.FunctionCount + + e.SetValue(protocol.BodyTarget, "FunctionCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TotalCodeSize != nil { + v := *s.TotalCodeSize + + e.SetValue(protocol.BodyTarget, "TotalCodeSize", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermissionRequest type AddPermissionInput struct { _ struct{} `type:"structure"` @@ -3264,6 +3306,52 @@ func (s *AddPermissionInput) SetStatementId(v string) *AddPermissionInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AddPermissionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Action != nil { + v := *s.Action + + e.SetValue(protocol.BodyTarget, "Action", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EventSourceToken != nil { + v := *s.EventSourceToken + + e.SetValue(protocol.BodyTarget, "EventSourceToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Principal != nil { + v := *s.Principal + + e.SetValue(protocol.BodyTarget, "Principal", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Qualifier != nil { + v := *s.Qualifier + + e.SetValue(protocol.QueryTarget, "Qualifier", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SourceAccount != nil { + v := *s.SourceAccount + + e.SetValue(protocol.BodyTarget, "SourceAccount", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SourceArn != nil { + v := *s.SourceArn + + e.SetValue(protocol.BodyTarget, "SourceArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatementId != nil { + v := *s.StatementId + + e.SetValue(protocol.BodyTarget, "StatementId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddPermissionResponse type AddPermissionOutput struct { _ struct{} `type:"structure"` @@ -3290,6 +3378,17 @@ func (s *AddPermissionOutput) SetStatement(v string) *AddPermissionOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AddPermissionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Statement != nil { + v := *s.Statement + + e.SetValue(protocol.BodyTarget, "Statement", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Provides configuration information about a Lambda function version alias. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AliasConfiguration type AliasConfiguration struct { @@ -3344,6 +3443,40 @@ func (s *AliasConfiguration) SetName(v string) *AliasConfiguration { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AliasConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.AliasArn != nil { + v := *s.AliasArn + + e.SetValue(protocol.BodyTarget, "AliasArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionVersion != nil { + v := *s.FunctionVersion + + e.SetValue(protocol.BodyTarget, "FunctionVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeAliasConfigurationList(vs []*AliasConfiguration) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAliasRequest type CreateAliasInput struct { _ struct{} `type:"structure"` @@ -3431,6 +3564,32 @@ func (s *CreateAliasInput) SetName(v string) *CreateAliasInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateAliasInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionVersion != nil { + v := *s.FunctionVersion + + e.SetValue(protocol.BodyTarget, "FunctionVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateEventSourceMappingRequest type CreateEventSourceMappingInput struct { _ struct{} `type:"structure"` @@ -3559,6 +3718,42 @@ func (s *CreateEventSourceMappingInput) SetStartingPositionTimestamp(v time.Time return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateEventSourceMappingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BatchSize != nil { + v := *s.BatchSize + + e.SetValue(protocol.BodyTarget, "BatchSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.EventSourceArn != nil { + v := *s.EventSourceArn + + e.SetValue(protocol.BodyTarget, "EventSourceArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.BodyTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartingPosition != nil { + v := *s.StartingPosition + + e.SetValue(protocol.BodyTarget, "StartingPosition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartingPositionTimestamp != nil { + v := *s.StartingPositionTimestamp + + e.SetValue(protocol.BodyTarget, "StartingPositionTimestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateFunctionRequest type CreateFunctionInput struct { _ struct{} `type:"structure"` @@ -3795,6 +3990,87 @@ func (s *CreateFunctionInput) SetVpcConfig(v *VpcConfig) *CreateFunctionInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateFunctionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Code != nil { + v := s.Code + + e.SetFields(protocol.BodyTarget, "Code", v, protocol.Metadata{}) + } + if s.DeadLetterConfig != nil { + v := s.DeadLetterConfig + + e.SetFields(protocol.BodyTarget, "DeadLetterConfig", v, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Environment != nil { + v := s.Environment + + e.SetFields(protocol.BodyTarget, "Environment", v, protocol.Metadata{}) + } + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.BodyTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Handler != nil { + v := *s.Handler + + e.SetValue(protocol.BodyTarget, "Handler", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KMSKeyArn != nil { + v := *s.KMSKeyArn + + e.SetValue(protocol.BodyTarget, "KMSKeyArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MemorySize != nil { + v := *s.MemorySize + + e.SetValue(protocol.BodyTarget, "MemorySize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Publish != nil { + v := *s.Publish + + e.SetValue(protocol.BodyTarget, "Publish", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Role != nil { + v := *s.Role + + e.SetValue(protocol.BodyTarget, "Role", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Runtime != nil { + v := *s.Runtime + + e.SetValue(protocol.BodyTarget, "Runtime", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Tags) > 0 { + v := s.Tags + + e.SetMap(protocol.BodyTarget, "Tags", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.Timeout != nil { + v := *s.Timeout + + e.SetValue(protocol.BodyTarget, "Timeout", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TracingConfig != nil { + v := s.TracingConfig + + e.SetFields(protocol.BodyTarget, "TracingConfig", v, protocol.Metadata{}) + } + if s.VpcConfig != nil { + v := s.VpcConfig + + e.SetFields(protocol.BodyTarget, "VpcConfig", v, protocol.Metadata{}) + } + + return nil +} + // The parent object that contains the target ARN (Amazon Resource Name) of // an Amazon SQS queue or Amazon SNS topic. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeadLetterConfig @@ -3822,6 +4098,17 @@ func (s *DeadLetterConfig) SetTargetArn(v string) *DeadLetterConfig { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeadLetterConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.TargetArn != nil { + v := *s.TargetArn + + e.SetValue(protocol.BodyTarget, "TargetArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAliasRequest type DeleteAliasInput struct { _ struct{} `type:"structure"` @@ -3884,6 +4171,22 @@ func (s *DeleteAliasInput) SetName(v string) *DeleteAliasInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteAliasInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAliasOutput type DeleteAliasOutput struct { _ struct{} `type:"structure"` @@ -3899,6 +4202,12 @@ func (s DeleteAliasOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteAliasOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteEventSourceMappingRequest type DeleteEventSourceMappingInput struct { _ struct{} `type:"structure"` @@ -3938,6 +4247,17 @@ func (s *DeleteEventSourceMappingInput) SetUUID(v string) *DeleteEventSourceMapp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteEventSourceMappingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.UUID != nil { + v := *s.UUID + + e.SetValue(protocol.PathTarget, "UUID", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunctionRequest type DeleteFunctionInput struct { _ struct{} `type:"structure"` @@ -4013,6 +4333,22 @@ func (s *DeleteFunctionInput) SetQualifier(v string) *DeleteFunctionInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteFunctionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Qualifier != nil { + v := *s.Qualifier + + e.SetValue(protocol.QueryTarget, "Qualifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteFunctionOutput type DeleteFunctionOutput struct { _ struct{} `type:"structure"` @@ -4028,6 +4364,12 @@ func (s DeleteFunctionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteFunctionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The parent object that contains your environment's configuration settings. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/Environment type Environment struct { @@ -4053,6 +4395,17 @@ func (s *Environment) SetVariables(v map[string]*string) *Environment { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Environment) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Variables) > 0 { + v := s.Variables + + e.SetMap(protocol.BodyTarget, "Variables", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // The parent object that contains error information associated with your configuration // settings. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/EnvironmentError @@ -4088,6 +4441,22 @@ func (s *EnvironmentError) SetMessage(v string) *EnvironmentError { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EnvironmentError) MarshalFields(e protocol.FieldEncoder) error { + if s.ErrorCode != nil { + v := *s.ErrorCode + + e.SetValue(protocol.BodyTarget, "ErrorCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Message != nil { + v := *s.Message + + e.SetValue(protocol.BodyTarget, "Message", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The parent object returned that contains your environment's configuration // settings or any error information associated with your configuration settings. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/EnvironmentResponse @@ -4125,6 +4494,22 @@ func (s *EnvironmentResponse) SetVariables(v map[string]*string) *EnvironmentRes return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EnvironmentResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.Error != nil { + v := s.Error + + e.SetFields(protocol.BodyTarget, "Error", v, protocol.Metadata{}) + } + if len(s.Variables) > 0 { + v := s.Variables + + e.SetMap(protocol.BodyTarget, "Variables", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // Describes mapping between an Amazon Kinesis stream and a Lambda function. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/EventSourceMappingConfiguration type EventSourceMappingConfiguration struct { @@ -4218,6 +4603,60 @@ func (s *EventSourceMappingConfiguration) SetUUID(v string) *EventSourceMappingC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EventSourceMappingConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.BatchSize != nil { + v := *s.BatchSize + + e.SetValue(protocol.BodyTarget, "BatchSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.EventSourceArn != nil { + v := *s.EventSourceArn + + e.SetValue(protocol.BodyTarget, "EventSourceArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionArn != nil { + v := *s.FunctionArn + + e.SetValue(protocol.BodyTarget, "FunctionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModified != nil { + v := *s.LastModified + + e.SetValue(protocol.BodyTarget, "LastModified", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.LastProcessingResult != nil { + v := *s.LastProcessingResult + + e.SetValue(protocol.BodyTarget, "LastProcessingResult", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "State", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StateTransitionReason != nil { + v := *s.StateTransitionReason + + e.SetValue(protocol.BodyTarget, "StateTransitionReason", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UUID != nil { + v := *s.UUID + + e.SetValue(protocol.BodyTarget, "UUID", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeEventSourceMappingConfigurationList(vs []*EventSourceMappingConfiguration) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The code for the Lambda function. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/FunctionCode type FunctionCode struct { @@ -4298,6 +4737,32 @@ func (s *FunctionCode) SetZipFile(v []byte) *FunctionCode { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FunctionCode) MarshalFields(e protocol.FieldEncoder) error { + if s.S3Bucket != nil { + v := *s.S3Bucket + + e.SetValue(protocol.BodyTarget, "S3Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.S3Key != nil { + v := *s.S3Key + + e.SetValue(protocol.BodyTarget, "S3Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.S3ObjectVersion != nil { + v := *s.S3ObjectVersion + + e.SetValue(protocol.BodyTarget, "S3ObjectVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ZipFile != nil { + v := s.ZipFile + + e.SetValue(protocol.BodyTarget, "ZipFile", protocol.BytesValue(v), protocol.Metadata{}) + } + + return nil +} + // The object for the Lambda function location. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/FunctionCodeLocation type FunctionCodeLocation struct { @@ -4333,6 +4798,22 @@ func (s *FunctionCodeLocation) SetRepositoryType(v string) *FunctionCodeLocation return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FunctionCodeLocation) MarshalFields(e protocol.FieldEncoder) error { + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.BodyTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RepositoryType != nil { + v := *s.RepositoryType + + e.SetValue(protocol.BodyTarget, "RepositoryType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that describes function metadata. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/FunctionConfiguration type FunctionConfiguration struct { @@ -4523,6 +5004,110 @@ func (s *FunctionConfiguration) SetVpcConfig(v *VpcConfigResponse) *FunctionConf return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FunctionConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.CodeSha256 != nil { + v := *s.CodeSha256 + + e.SetValue(protocol.BodyTarget, "CodeSha256", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CodeSize != nil { + v := *s.CodeSize + + e.SetValue(protocol.BodyTarget, "CodeSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.DeadLetterConfig != nil { + v := s.DeadLetterConfig + + e.SetFields(protocol.BodyTarget, "DeadLetterConfig", v, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Environment != nil { + v := s.Environment + + e.SetFields(protocol.BodyTarget, "Environment", v, protocol.Metadata{}) + } + if s.FunctionArn != nil { + v := *s.FunctionArn + + e.SetValue(protocol.BodyTarget, "FunctionArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.BodyTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Handler != nil { + v := *s.Handler + + e.SetValue(protocol.BodyTarget, "Handler", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KMSKeyArn != nil { + v := *s.KMSKeyArn + + e.SetValue(protocol.BodyTarget, "KMSKeyArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModified != nil { + v := *s.LastModified + + e.SetValue(protocol.BodyTarget, "LastModified", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MasterArn != nil { + v := *s.MasterArn + + e.SetValue(protocol.BodyTarget, "MasterArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MemorySize != nil { + v := *s.MemorySize + + e.SetValue(protocol.BodyTarget, "MemorySize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Role != nil { + v := *s.Role + + e.SetValue(protocol.BodyTarget, "Role", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Runtime != nil { + v := *s.Runtime + + e.SetValue(protocol.BodyTarget, "Runtime", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Timeout != nil { + v := *s.Timeout + + e.SetValue(protocol.BodyTarget, "Timeout", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TracingConfig != nil { + v := s.TracingConfig + + e.SetFields(protocol.BodyTarget, "TracingConfig", v, protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VpcConfig != nil { + v := s.VpcConfig + + e.SetFields(protocol.BodyTarget, "VpcConfig", v, protocol.Metadata{}) + } + + return nil +} + +func encodeFunctionConfigurationList(vs []*FunctionConfiguration) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettingsRequest type GetAccountSettingsInput struct { _ struct{} `type:"structure"` @@ -4538,6 +5123,12 @@ func (s GetAccountSettingsInput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAccountSettingsInput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAccountSettingsResponse type GetAccountSettingsOutput struct { _ struct{} `type:"structure"` @@ -4573,6 +5164,22 @@ func (s *GetAccountSettingsOutput) SetAccountUsage(v *AccountUsage) *GetAccountS return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAccountSettingsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountLimit != nil { + v := s.AccountLimit + + e.SetFields(protocol.BodyTarget, "AccountLimit", v, protocol.Metadata{}) + } + if s.AccountUsage != nil { + v := s.AccountUsage + + e.SetFields(protocol.BodyTarget, "AccountUsage", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAliasRequest type GetAliasInput struct { _ struct{} `type:"structure"` @@ -4636,6 +5243,22 @@ func (s *GetAliasInput) SetName(v string) *GetAliasInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAliasInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMappingRequest type GetEventSourceMappingInput struct { _ struct{} `type:"structure"` @@ -4675,6 +5298,17 @@ func (s *GetEventSourceMappingInput) SetUUID(v string) *GetEventSourceMappingInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetEventSourceMappingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.UUID != nil { + v := *s.UUID + + e.SetValue(protocol.PathTarget, "UUID", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionConfigurationRequest type GetFunctionConfigurationInput struct { _ struct{} `type:"structure"` @@ -4743,6 +5377,22 @@ func (s *GetFunctionConfigurationInput) SetQualifier(v string) *GetFunctionConfi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetFunctionConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Qualifier != nil { + v := *s.Qualifier + + e.SetValue(protocol.QueryTarget, "Qualifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionRequest type GetFunctionInput struct { _ struct{} `type:"structure"` @@ -4809,6 +5459,22 @@ func (s *GetFunctionInput) SetQualifier(v string) *GetFunctionInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetFunctionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Qualifier != nil { + v := *s.Qualifier + + e.SetValue(protocol.QueryTarget, "Qualifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // This response contains the object for the Lambda function location (see FunctionCodeLocation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetFunctionResponse type GetFunctionOutput struct { @@ -4852,6 +5518,27 @@ func (s *GetFunctionOutput) SetTags(v map[string]*string) *GetFunctionOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetFunctionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Code != nil { + v := s.Code + + e.SetFields(protocol.BodyTarget, "Code", v, protocol.Metadata{}) + } + if s.Configuration != nil { + v := s.Configuration + + e.SetFields(protocol.BodyTarget, "Configuration", v, protocol.Metadata{}) + } + if len(s.Tags) > 0 { + v := s.Tags + + e.SetMap(protocol.BodyTarget, "Tags", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicyRequest type GetPolicyInput struct { _ struct{} `type:"structure"` @@ -4918,6 +5605,22 @@ func (s *GetPolicyInput) SetQualifier(v string) *GetPolicyInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Qualifier != nil { + v := *s.Qualifier + + e.SetValue(protocol.QueryTarget, "Qualifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicyResponse type GetPolicyOutput struct { _ struct{} `type:"structure"` @@ -4944,6 +5647,17 @@ func (s *GetPolicyOutput) SetPolicy(v string) *GetPolicyOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Policy != nil { + v := *s.Policy + + e.SetValue(protocol.BodyTarget, "Policy", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsyncRequest type InvokeAsyncInput struct { _ struct{} `deprecated:"true" type:"structure" payload:"InvokeArgs"` @@ -5002,6 +5716,22 @@ func (s *InvokeAsyncInput) SetInvokeArgs(v io.ReadSeeker) *InvokeAsyncInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InvokeAsyncInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InvokeArgs != nil { + v := s.InvokeArgs + + e.SetStream(protocol.PayloadTarget, "InvokeArgs", protocol.ReadSeekerStream{V: v}, protocol.Metadata{}) + } + + return nil +} + // Upon success, it returns empty response. Otherwise, throws an exception. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvokeAsyncResponse type InvokeAsyncOutput struct { @@ -5027,6 +5757,13 @@ func (s *InvokeAsyncOutput) SetStatus(v int64) *InvokeAsyncOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InvokeAsyncOutput) MarshalFields(e protocol.FieldEncoder) error { + // ignoring invalid encode state, StatusCode. Status + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/InvocationRequest type InvokeInput struct { _ struct{} `type:"structure" payload:"Payload"` @@ -5139,10 +5876,46 @@ func (s *InvokeInput) SetPayload(v []byte) *InvokeInput { return s } -// SetQualifier sets the Qualifier field's value. -func (s *InvokeInput) SetQualifier(v string) *InvokeInput { - s.Qualifier = &v - return s +// SetQualifier sets the Qualifier field's value. +func (s *InvokeInput) SetQualifier(v string) *InvokeInput { + s.Qualifier = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InvokeInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ClientContext != nil { + v := *s.ClientContext + + e.SetValue(protocol.HeaderTarget, "X-Amz-Client-Context", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InvocationType != nil { + v := *s.InvocationType + + e.SetValue(protocol.HeaderTarget, "X-Amz-Invocation-Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LogType != nil { + v := *s.LogType + + e.SetValue(protocol.HeaderTarget, "X-Amz-Log-Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Payload != nil { + v := s.Payload + + e.SetStream(protocol.PayloadTarget, "Payload", protocol.BytesStream(v), protocol.Metadata{}) + } + if s.Qualifier != nil { + v := *s.Qualifier + + e.SetValue(protocol.QueryTarget, "Qualifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil } // Upon success, returns an empty response. Otherwise, throws an exception. @@ -5212,6 +5985,28 @@ func (s *InvokeOutput) SetStatusCode(v int64) *InvokeOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InvokeOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionError != nil { + v := *s.FunctionError + + e.SetValue(protocol.HeaderTarget, "X-Amz-Function-Error", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LogResult != nil { + v := *s.LogResult + + e.SetValue(protocol.HeaderTarget, "X-Amz-Log-Result", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Payload != nil { + v := s.Payload + + e.SetStream(protocol.PayloadTarget, "Payload", protocol.BytesStream(v), protocol.Metadata{}) + } + // ignoring invalid encode state, StatusCode. StatusCode + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliasesRequest type ListAliasesInput struct { _ struct{} `type:"structure"` @@ -5293,6 +6088,32 @@ func (s *ListAliasesInput) SetMaxItems(v int64) *ListAliasesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListAliasesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionVersion != nil { + v := *s.FunctionVersion + + e.SetValue(protocol.QueryTarget, "FunctionVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliasesResponse type ListAliasesOutput struct { _ struct{} `type:"structure"` @@ -5326,6 +6147,22 @@ func (s *ListAliasesOutput) SetNextMarker(v string) *ListAliasesOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListAliasesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Aliases) > 0 { + v := s.Aliases + + e.SetList(protocol.BodyTarget, "Aliases", encodeAliasConfigurationList(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "NextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappingsRequest type ListEventSourceMappingsInput struct { _ struct{} `type:"structure"` @@ -5406,6 +6243,32 @@ func (s *ListEventSourceMappingsInput) SetMaxItems(v int64) *ListEventSourceMapp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListEventSourceMappingsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.EventSourceArn != nil { + v := *s.EventSourceArn + + e.SetValue(protocol.QueryTarget, "EventSourceArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.QueryTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Contains a list of event sources (see EventSourceMappingConfiguration) // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappingsResponse type ListEventSourceMappingsOutput struct { @@ -5440,6 +6303,22 @@ func (s *ListEventSourceMappingsOutput) SetNextMarker(v string) *ListEventSource return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListEventSourceMappingsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.EventSourceMappings) > 0 { + v := s.EventSourceMappings + + e.SetList(protocol.BodyTarget, "EventSourceMappings", encodeEventSourceMappingConfigurationList(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "NextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctionsRequest type ListFunctionsInput struct { _ struct{} `type:"structure"` @@ -5521,6 +6400,32 @@ func (s *ListFunctionsInput) SetMaxItems(v int64) *ListFunctionsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListFunctionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionVersion != nil { + v := *s.FunctionVersion + + e.SetValue(protocol.QueryTarget, "FunctionVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MasterRegion != nil { + v := *s.MasterRegion + + e.SetValue(protocol.QueryTarget, "MasterRegion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Contains a list of AWS Lambda function configurations (see FunctionConfiguration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListFunctionsResponse type ListFunctionsOutput struct { @@ -5555,6 +6460,22 @@ func (s *ListFunctionsOutput) SetNextMarker(v string) *ListFunctionsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListFunctionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Functions) > 0 { + v := s.Functions + + e.SetList(protocol.BodyTarget, "Functions", encodeFunctionConfigurationList(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "NextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTagsRequest type ListTagsInput struct { _ struct{} `type:"structure"` @@ -5594,6 +6515,17 @@ func (s *ListTagsInput) SetResource(v string) *ListTagsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTagsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Resource != nil { + v := *s.Resource + + e.SetValue(protocol.PathTarget, "ARN", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTagsResponse type ListTagsOutput struct { _ struct{} `type:"structure"` @@ -5618,6 +6550,17 @@ func (s *ListTagsOutput) SetTags(v map[string]*string) *ListTagsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTagsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Tags) > 0 { + v := s.Tags + + e.SetMap(protocol.BodyTarget, "Tags", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunctionRequest type ListVersionsByFunctionInput struct { _ struct{} `type:"structure"` @@ -5688,6 +6631,27 @@ func (s *ListVersionsByFunctionInput) SetMaxItems(v int64) *ListVersionsByFuncti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListVersionsByFunctionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "MaxItems", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunctionResponse type ListVersionsByFunctionOutput struct { _ struct{} `type:"structure"` @@ -5721,6 +6685,22 @@ func (s *ListVersionsByFunctionOutput) SetVersions(v []*FunctionConfiguration) * return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListVersionsByFunctionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "NextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Versions) > 0 { + v := s.Versions + + e.SetList(protocol.BodyTarget, "Versions", encodeFunctionConfigurationList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersionRequest type PublishVersionInput struct { _ struct{} `type:"structure"` @@ -5790,6 +6770,27 @@ func (s *PublishVersionInput) SetFunctionName(v string) *PublishVersionInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PublishVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CodeSha256 != nil { + v := *s.CodeSha256 + + e.SetValue(protocol.BodyTarget, "CodeSha256", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermissionRequest type RemovePermissionInput struct { _ struct{} `type:"structure"` @@ -5870,6 +6871,27 @@ func (s *RemovePermissionInput) SetStatementId(v string) *RemovePermissionInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RemovePermissionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Qualifier != nil { + v := *s.Qualifier + + e.SetValue(protocol.QueryTarget, "Qualifier", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatementId != nil { + v := *s.StatementId + + e.SetValue(protocol.PathTarget, "StatementId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermissionOutput type RemovePermissionOutput struct { _ struct{} `type:"structure"` @@ -5885,6 +6907,12 @@ func (s RemovePermissionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RemovePermissionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResourceRequest type TagResourceInput struct { _ struct{} `type:"structure"` @@ -5938,6 +6966,22 @@ func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TagResourceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Resource != nil { + v := *s.Resource + + e.SetValue(protocol.PathTarget, "ARN", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Tags) > 0 { + v := s.Tags + + e.SetMap(protocol.BodyTarget, "Tags", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResourceOutput type TagResourceOutput struct { _ struct{} `type:"structure"` @@ -5953,6 +6997,12 @@ func (s TagResourceOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TagResourceOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // The parent object that contains your function's tracing settings. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TracingConfig type TracingConfig struct { @@ -5982,6 +7032,17 @@ func (s *TracingConfig) SetMode(v string) *TracingConfig { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TracingConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.Mode != nil { + v := *s.Mode + + e.SetValue(protocol.BodyTarget, "Mode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Parent object of the tracing information associated with your Lambda function. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TracingConfigResponse type TracingConfigResponse struct { @@ -6007,6 +7068,17 @@ func (s *TracingConfigResponse) SetMode(v string) *TracingConfigResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TracingConfigResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.Mode != nil { + v := *s.Mode + + e.SetValue(protocol.BodyTarget, "Mode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResourceRequest type UntagResourceInput struct { _ struct{} `type:"structure"` @@ -6060,6 +7132,22 @@ func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UntagResourceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Resource != nil { + v := *s.Resource + + e.SetValue(protocol.PathTarget, "ARN", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TagKeys) > 0 { + v := s.TagKeys + + e.SetList(protocol.QueryTarget, "tagKeys", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResourceOutput type UntagResourceOutput struct { _ struct{} `type:"structure"` @@ -6075,6 +7163,12 @@ func (s UntagResourceOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UntagResourceOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAliasRequest type UpdateAliasInput struct { _ struct{} `type:"structure"` @@ -6158,6 +7252,32 @@ func (s *UpdateAliasInput) SetName(v string) *UpdateAliasInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateAliasInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FunctionVersion != nil { + v := *s.FunctionVersion + + e.SetValue(protocol.BodyTarget, "FunctionVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMappingRequest type UpdateEventSourceMappingInput struct { _ struct{} `type:"structure"` @@ -6246,6 +7366,32 @@ func (s *UpdateEventSourceMappingInput) SetUUID(v string) *UpdateEventSourceMapp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateEventSourceMappingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BatchSize != nil { + v := *s.BatchSize + + e.SetValue(protocol.BodyTarget, "BatchSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.BodyTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UUID != nil { + v := *s.UUID + + e.SetValue(protocol.PathTarget, "UUID", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCodeRequest type UpdateFunctionCodeInput struct { _ struct{} `type:"structure"` @@ -6372,6 +7518,47 @@ func (s *UpdateFunctionCodeInput) SetZipFile(v []byte) *UpdateFunctionCodeInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateFunctionCodeInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DryRun != nil { + v := *s.DryRun + + e.SetValue(protocol.BodyTarget, "DryRun", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Publish != nil { + v := *s.Publish + + e.SetValue(protocol.BodyTarget, "Publish", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.S3Bucket != nil { + v := *s.S3Bucket + + e.SetValue(protocol.BodyTarget, "S3Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.S3Key != nil { + v := *s.S3Key + + e.SetValue(protocol.BodyTarget, "S3Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.S3ObjectVersion != nil { + v := *s.S3ObjectVersion + + e.SetValue(protocol.BodyTarget, "S3ObjectVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ZipFile != nil { + v := s.ZipFile + + e.SetValue(protocol.BodyTarget, "ZipFile", protocol.BytesValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfigurationRequest type UpdateFunctionConfigurationInput struct { _ struct{} `type:"structure"` @@ -6555,6 +7742,72 @@ func (s *UpdateFunctionConfigurationInput) SetVpcConfig(v *VpcConfig) *UpdateFun return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateFunctionConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeadLetterConfig != nil { + v := s.DeadLetterConfig + + e.SetFields(protocol.BodyTarget, "DeadLetterConfig", v, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Environment != nil { + v := s.Environment + + e.SetFields(protocol.BodyTarget, "Environment", v, protocol.Metadata{}) + } + if s.FunctionName != nil { + v := *s.FunctionName + + e.SetValue(protocol.PathTarget, "FunctionName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Handler != nil { + v := *s.Handler + + e.SetValue(protocol.BodyTarget, "Handler", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KMSKeyArn != nil { + v := *s.KMSKeyArn + + e.SetValue(protocol.BodyTarget, "KMSKeyArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MemorySize != nil { + v := *s.MemorySize + + e.SetValue(protocol.BodyTarget, "MemorySize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Role != nil { + v := *s.Role + + e.SetValue(protocol.BodyTarget, "Role", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Runtime != nil { + v := *s.Runtime + + e.SetValue(protocol.BodyTarget, "Runtime", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Timeout != nil { + v := *s.Timeout + + e.SetValue(protocol.BodyTarget, "Timeout", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TracingConfig != nil { + v := s.TracingConfig + + e.SetFields(protocol.BodyTarget, "TracingConfig", v, protocol.Metadata{}) + } + if s.VpcConfig != nil { + v := s.VpcConfig + + e.SetFields(protocol.BodyTarget, "VpcConfig", v, protocol.Metadata{}) + } + + return nil +} + // If your Lambda function accesses resources in a VPC, you provide this parameter // identifying the list of security group IDs and subnet IDs. These must belong // to the same VPC. You must provide at least one security group and one subnet @@ -6592,6 +7845,22 @@ func (s *VpcConfig) SetSubnetIds(v []*string) *VpcConfig { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VpcConfig) MarshalFields(e protocol.FieldEncoder) error { + if len(s.SecurityGroupIds) > 0 { + v := s.SecurityGroupIds + + e.SetList(protocol.BodyTarget, "SecurityGroupIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.SubnetIds) > 0 { + v := s.SubnetIds + + e.SetList(protocol.BodyTarget, "SubnetIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // VPC configuration associated with your Lambda function. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/VpcConfigResponse type VpcConfigResponse struct { @@ -6635,6 +7904,27 @@ func (s *VpcConfigResponse) SetVpcId(v string) *VpcConfigResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VpcConfigResponse) MarshalFields(e protocol.FieldEncoder) error { + if len(s.SecurityGroupIds) > 0 { + v := s.SecurityGroupIds + + e.SetList(protocol.BodyTarget, "SecurityGroupIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.SubnetIds) > 0 { + v := s.SubnetIds + + e.SetList(protocol.BodyTarget, "SubnetIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.VpcId != nil { + v := *s.VpcId + + e.SetValue(protocol.BodyTarget, "VpcId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + const ( // EventSourcePositionTrimHorizon is a EventSourcePosition enum value EventSourcePositionTrimHorizon = "TRIM_HORIZON" diff --git a/service/lexmodelbuildingservice/api.go b/service/lexmodelbuildingservice/api.go index b4d8fdfb649..3ae0cfdb296 100644 --- a/service/lexmodelbuildingservice/api.go +++ b/service/lexmodelbuildingservice/api.go @@ -4137,6 +4137,55 @@ func (s *BotAliasMetadata) SetName(v string) *BotAliasMetadata { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BotAliasMetadata) MarshalFields(e protocol.FieldEncoder) error { + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.BodyTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BotVersion != nil { + v := *s.BotVersion + + e.SetValue(protocol.BodyTarget, "botVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeBotAliasMetadataList(vs []*BotAliasMetadata) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Represents an association between an Amazon Lex bot and an external messaging // platform. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/BotChannelAssociation @@ -4223,6 +4272,55 @@ func (s *BotChannelAssociation) SetType(v string) *BotChannelAssociation { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BotChannelAssociation) MarshalFields(e protocol.FieldEncoder) error { + if s.BotAlias != nil { + v := *s.BotAlias + + e.SetValue(protocol.BodyTarget, "botAlias", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.BotConfiguration) > 0 { + v := s.BotConfiguration + + e.SetMap(protocol.BodyTarget, "botConfiguration", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.BodyTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeBotChannelAssociationList(vs []*BotChannelAssociation) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Provides information about a bot. . // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/BotMetadata type BotMetadata struct { @@ -4294,6 +4392,50 @@ func (s *BotMetadata) SetVersion(v string) *BotMetadata { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BotMetadata) MarshalFields(e protocol.FieldEncoder) error { + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeBotMetadataList(vs []*BotMetadata) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Provides metadata for a built-in intent. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/BuiltinIntentMetadata type BuiltinIntentMetadata struct { @@ -4330,6 +4472,30 @@ func (s *BuiltinIntentMetadata) SetSupportedLocales(v []*string) *BuiltinIntentM return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BuiltinIntentMetadata) MarshalFields(e protocol.FieldEncoder) error { + if s.Signature != nil { + v := *s.Signature + + e.SetValue(protocol.BodyTarget, "signature", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SupportedLocales) > 0 { + v := s.SupportedLocales + + e.SetList(protocol.BodyTarget, "supportedLocales", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeBuiltinIntentMetadataList(vs []*BuiltinIntentMetadata) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Provides information about a slot used in a built-in intent. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/BuiltinIntentSlot type BuiltinIntentSlot struct { @@ -4355,6 +4521,25 @@ func (s *BuiltinIntentSlot) SetName(v string) *BuiltinIntentSlot { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BuiltinIntentSlot) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeBuiltinIntentSlotList(vs []*BuiltinIntentSlot) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Provides information about a built in slot type. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/BuiltinSlotTypeMetadata type BuiltinSlotTypeMetadata struct { @@ -4391,6 +4576,30 @@ func (s *BuiltinSlotTypeMetadata) SetSupportedLocales(v []*string) *BuiltinSlotT return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BuiltinSlotTypeMetadata) MarshalFields(e protocol.FieldEncoder) error { + if s.Signature != nil { + v := *s.Signature + + e.SetValue(protocol.BodyTarget, "signature", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SupportedLocales) > 0 { + v := s.SupportedLocales + + e.SetList(protocol.BodyTarget, "supportedLocales", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeBuiltinSlotTypeMetadataList(vs []*BuiltinSlotTypeMetadata) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Specifies a Lambda function that verifies requests to a bot or fulfills the // user's request to a bot.. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CodeHook @@ -4453,6 +4662,22 @@ func (s *CodeHook) SetUri(v string) *CodeHook { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CodeHook) MarshalFields(e protocol.FieldEncoder) error { + if s.MessageVersion != nil { + v := *s.MessageVersion + + e.SetValue(protocol.BodyTarget, "messageVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Uri != nil { + v := *s.Uri + + e.SetValue(protocol.BodyTarget, "uri", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateBotVersionRequest type CreateBotVersionInput struct { _ struct{} `type:"structure"` @@ -4509,6 +4734,22 @@ func (s *CreateBotVersionInput) SetName(v string) *CreateBotVersionInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateBotVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateBotVersionResponse type CreateBotVersionOutput struct { _ struct{} `type:"structure"` @@ -4689,6 +4930,87 @@ func (s *CreateBotVersionOutput) SetVoiceId(v string) *CreateBotVersionOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateBotVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AbortStatement != nil { + v := s.AbortStatement + + e.SetFields(protocol.BodyTarget, "abortStatement", v, protocol.Metadata{}) + } + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ChildDirected != nil { + v := *s.ChildDirected + + e.SetValue(protocol.BodyTarget, "childDirected", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ClarificationPrompt != nil { + v := s.ClarificationPrompt + + e.SetFields(protocol.BodyTarget, "clarificationPrompt", v, protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FailureReason != nil { + v := *s.FailureReason + + e.SetValue(protocol.BodyTarget, "failureReason", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdleSessionTTLInSeconds != nil { + v := *s.IdleSessionTTLInSeconds + + e.SetValue(protocol.BodyTarget, "idleSessionTTLInSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Intents) > 0 { + v := s.Intents + + e.SetList(protocol.BodyTarget, "intents", encodeIntentList(v), protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Locale != nil { + v := *s.Locale + + e.SetValue(protocol.BodyTarget, "locale", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VoiceId != nil { + v := *s.VoiceId + + e.SetValue(protocol.BodyTarget, "voiceId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateIntentVersionRequest type CreateIntentVersionInput struct { _ struct{} `type:"structure"` @@ -4745,6 +5067,22 @@ func (s *CreateIntentVersionInput) SetName(v string) *CreateIntentVersionInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateIntentVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateIntentVersionResponse type CreateIntentVersionOutput struct { _ struct{} `type:"structure"` @@ -4900,6 +5238,87 @@ func (s *CreateIntentVersionOutput) SetVersion(v string) *CreateIntentVersionOut return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateIntentVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ConclusionStatement != nil { + v := s.ConclusionStatement + + e.SetFields(protocol.BodyTarget, "conclusionStatement", v, protocol.Metadata{}) + } + if s.ConfirmationPrompt != nil { + v := s.ConfirmationPrompt + + e.SetFields(protocol.BodyTarget, "confirmationPrompt", v, protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DialogCodeHook != nil { + v := s.DialogCodeHook + + e.SetFields(protocol.BodyTarget, "dialogCodeHook", v, protocol.Metadata{}) + } + if s.FollowUpPrompt != nil { + v := s.FollowUpPrompt + + e.SetFields(protocol.BodyTarget, "followUpPrompt", v, protocol.Metadata{}) + } + if s.FulfillmentActivity != nil { + v := s.FulfillmentActivity + + e.SetFields(protocol.BodyTarget, "fulfillmentActivity", v, protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParentIntentSignature != nil { + v := *s.ParentIntentSignature + + e.SetValue(protocol.BodyTarget, "parentIntentSignature", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RejectionStatement != nil { + v := s.RejectionStatement + + e.SetFields(protocol.BodyTarget, "rejectionStatement", v, protocol.Metadata{}) + } + if len(s.SampleUtterances) > 0 { + v := s.SampleUtterances + + e.SetList(protocol.BodyTarget, "sampleUtterances", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.Slots) > 0 { + v := s.Slots + + e.SetList(protocol.BodyTarget, "slots", encodeSlotList(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateSlotTypeVersionRequest type CreateSlotTypeVersionInput struct { _ struct{} `type:"structure"` @@ -4956,6 +5375,22 @@ func (s *CreateSlotTypeVersionInput) SetName(v string) *CreateSlotTypeVersionInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateSlotTypeVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/CreateSlotTypeVersionResponse type CreateSlotTypeVersionOutput struct { _ struct{} `type:"structure"` @@ -5046,6 +5481,52 @@ func (s *CreateSlotTypeVersionOutput) SetVersion(v string) *CreateSlotTypeVersio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateSlotTypeVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.EnumerationValues) > 0 { + v := s.EnumerationValues + + e.SetList(protocol.BodyTarget, "enumerationValues", encodeEnumerationValueList(v), protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ValueSelectionStrategy != nil { + v := *s.ValueSelectionStrategy + + e.SetValue(protocol.BodyTarget, "valueSelectionStrategy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotAliasRequest type DeleteBotAliasInput struct { _ struct{} `type:"structure"` @@ -5105,6 +5586,22 @@ func (s *DeleteBotAliasInput) SetName(v string) *DeleteBotAliasInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBotAliasInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.PathTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotAliasOutput type DeleteBotAliasOutput struct { _ struct{} `type:"structure"` @@ -5120,6 +5617,12 @@ func (s DeleteBotAliasOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBotAliasOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotChannelAssociationRequest type DeleteBotChannelAssociationInput struct { _ struct{} `type:"structure"` @@ -5197,6 +5700,27 @@ func (s *DeleteBotChannelAssociationInput) SetName(v string) *DeleteBotChannelAs return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBotChannelAssociationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BotAlias != nil { + v := *s.BotAlias + + e.SetValue(protocol.PathTarget, "aliasName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.PathTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotChannelAssociationOutput type DeleteBotChannelAssociationOutput struct { _ struct{} `type:"structure"` @@ -5212,6 +5736,12 @@ func (s DeleteBotChannelAssociationOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBotChannelAssociationOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotRequest type DeleteBotInput struct { _ struct{} `type:"structure"` @@ -5254,6 +5784,17 @@ func (s *DeleteBotInput) SetName(v string) *DeleteBotInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBotInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotOutput type DeleteBotOutput struct { _ struct{} `type:"structure"` @@ -5269,6 +5810,12 @@ func (s DeleteBotOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBotOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotVersionRequest type DeleteBotVersionInput struct { _ struct{} `type:"structure"` @@ -5329,6 +5876,22 @@ func (s *DeleteBotVersionInput) SetVersion(v string) *DeleteBotVersionInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBotVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.PathTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteBotVersionOutput type DeleteBotVersionOutput struct { _ struct{} `type:"structure"` @@ -5344,6 +5907,12 @@ func (s DeleteBotVersionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBotVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntentRequest type DeleteIntentInput struct { _ struct{} `type:"structure"` @@ -5386,6 +5955,17 @@ func (s *DeleteIntentInput) SetName(v string) *DeleteIntentInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteIntentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntentOutput type DeleteIntentOutput struct { _ struct{} `type:"structure"` @@ -5401,6 +5981,12 @@ func (s DeleteIntentOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteIntentOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntentVersionRequest type DeleteIntentVersionInput struct { _ struct{} `type:"structure"` @@ -5461,6 +6047,22 @@ func (s *DeleteIntentVersionInput) SetVersion(v string) *DeleteIntentVersionInpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteIntentVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.PathTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteIntentVersionOutput type DeleteIntentVersionOutput struct { _ struct{} `type:"structure"` @@ -5476,6 +6078,12 @@ func (s DeleteIntentVersionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteIntentVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotTypeRequest type DeleteSlotTypeInput struct { _ struct{} `type:"structure"` @@ -5518,6 +6126,17 @@ func (s *DeleteSlotTypeInput) SetName(v string) *DeleteSlotTypeInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteSlotTypeInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotTypeOutput type DeleteSlotTypeOutput struct { _ struct{} `type:"structure"` @@ -5533,6 +6152,12 @@ func (s DeleteSlotTypeOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteSlotTypeOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotTypeVersionRequest type DeleteSlotTypeVersionInput struct { _ struct{} `type:"structure"` @@ -5593,6 +6218,22 @@ func (s *DeleteSlotTypeVersionInput) SetVersion(v string) *DeleteSlotTypeVersion return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteSlotTypeVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.PathTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteSlotTypeVersionOutput type DeleteSlotTypeVersionOutput struct { _ struct{} `type:"structure"` @@ -5608,6 +6249,12 @@ func (s DeleteSlotTypeVersionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteSlotTypeVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteUtterancesRequest type DeleteUtterancesInput struct { _ struct{} `type:"structure"` @@ -5670,6 +6317,22 @@ func (s *DeleteUtterancesInput) SetUserId(v string) *DeleteUtterancesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteUtterancesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.PathTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UserId != nil { + v := *s.UserId + + e.SetValue(protocol.PathTarget, "userId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/DeleteUtterancesOutput type DeleteUtterancesOutput struct { _ struct{} `type:"structure"` @@ -5685,6 +6348,12 @@ func (s DeleteUtterancesOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteUtterancesOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Each slot type can have a set of values. Each enumeration value represents // a value the slot type can take. // @@ -5748,6 +6417,30 @@ func (s *EnumerationValue) SetValue(v string) *EnumerationValue { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EnumerationValue) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Synonyms) > 0 { + v := s.Synonyms + + e.SetList(protocol.BodyTarget, "synonyms", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeEnumerationValueList(vs []*EnumerationValue) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A prompt for additional activity after an intent is fulfilled. For example, // after the OrderPizza intent is fulfilled, you might prompt the user to find // out whether the user wants to order drinks. @@ -5815,6 +6508,22 @@ func (s *FollowUpPrompt) SetRejectionStatement(v *Statement) *FollowUpPrompt { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FollowUpPrompt) MarshalFields(e protocol.FieldEncoder) error { + if s.Prompt != nil { + v := s.Prompt + + e.SetFields(protocol.BodyTarget, "prompt", v, protocol.Metadata{}) + } + if s.RejectionStatement != nil { + v := s.RejectionStatement + + e.SetFields(protocol.BodyTarget, "rejectionStatement", v, protocol.Metadata{}) + } + + return nil +} + // Describes how the intent is fulfilled after the user provides all of the // information required for the intent. You can provide a Lambda function to // process the intent, or you can return the intent information to the client @@ -5887,6 +6596,22 @@ func (s *FulfillmentActivity) SetType(v string) *FulfillmentActivity { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FulfillmentActivity) MarshalFields(e protocol.FieldEncoder) error { + if s.CodeHook != nil { + v := s.CodeHook + + e.SetFields(protocol.BodyTarget, "codeHook", v, protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAliasRequest type GetBotAliasInput struct { _ struct{} `type:"structure"` @@ -5946,6 +6671,22 @@ func (s *GetBotAliasInput) SetName(v string) *GetBotAliasInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBotAliasInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.PathTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAliasResponse type GetBotAliasOutput struct { _ struct{} `type:"structure"` @@ -6025,6 +6766,47 @@ func (s *GetBotAliasOutput) SetName(v string) *GetBotAliasOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBotAliasOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.BodyTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BotVersion != nil { + v := *s.BotVersion + + e.SetValue(protocol.BodyTarget, "botVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAliasesRequest type GetBotAliasesInput struct { _ struct{} `type:"structure"` @@ -6106,6 +6888,32 @@ func (s *GetBotAliasesInput) SetNextToken(v string) *GetBotAliasesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBotAliasesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.PathTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NameContains != nil { + v := *s.NameContains + + e.SetValue(protocol.QueryTarget, "nameContains", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotAliasesResponse type GetBotAliasesOutput struct { _ struct{} `type:"structure"` @@ -6142,6 +6950,22 @@ func (s *GetBotAliasesOutput) SetNextToken(v string) *GetBotAliasesOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBotAliasesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.BotAliases) > 0 { + v := s.BotAliases + + e.SetList(protocol.BodyTarget, "BotAliases", encodeBotAliasMetadataList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociationRequest type GetBotChannelAssociationInput struct { _ struct{} `type:"structure"` @@ -6220,6 +7044,27 @@ func (s *GetBotChannelAssociationInput) SetName(v string) *GetBotChannelAssociat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBotChannelAssociationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BotAlias != nil { + v := *s.BotAlias + + e.SetValue(protocol.PathTarget, "aliasName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.PathTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociationResponse type GetBotChannelAssociationOutput struct { _ struct{} `type:"structure"` @@ -6288,16 +7133,57 @@ func (s *GetBotChannelAssociationOutput) SetDescription(v string) *GetBotChannel return s } -// SetName sets the Name field's value. -func (s *GetBotChannelAssociationOutput) SetName(v string) *GetBotChannelAssociationOutput { - s.Name = &v - return s -} +// SetName sets the Name field's value. +func (s *GetBotChannelAssociationOutput) SetName(v string) *GetBotChannelAssociationOutput { + s.Name = &v + return s +} + +// SetType sets the Type field's value. +func (s *GetBotChannelAssociationOutput) SetType(v string) *GetBotChannelAssociationOutput { + s.Type = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBotChannelAssociationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.BotAlias != nil { + v := *s.BotAlias + + e.SetValue(protocol.BodyTarget, "botAlias", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.BotConfiguration) > 0 { + v := s.BotConfiguration + + e.SetMap(protocol.BodyTarget, "botConfiguration", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.BodyTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } -// SetType sets the Type field's value. -func (s *GetBotChannelAssociationOutput) SetType(v string) *GetBotChannelAssociationOutput { - s.Type = &v - return s + return nil } // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociationsRequest @@ -6400,6 +7286,37 @@ func (s *GetBotChannelAssociationsInput) SetNextToken(v string) *GetBotChannelAs return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBotChannelAssociationsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BotAlias != nil { + v := *s.BotAlias + + e.SetValue(protocol.PathTarget, "aliasName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.PathTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NameContains != nil { + v := *s.NameContains + + e.SetValue(protocol.QueryTarget, "nameContains", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotChannelAssociationsResponse type GetBotChannelAssociationsOutput struct { _ struct{} `type:"structure"` @@ -6437,6 +7354,22 @@ func (s *GetBotChannelAssociationsOutput) SetNextToken(v string) *GetBotChannelA return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBotChannelAssociationsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.BotChannelAssociations) > 0 { + v := s.BotChannelAssociations + + e.SetList(protocol.BodyTarget, "botChannelAssociations", encodeBotChannelAssociationList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotRequest type GetBotInput struct { _ struct{} `type:"structure"` @@ -6493,6 +7426,22 @@ func (s *GetBotInput) SetVersionOrAlias(v string) *GetBotInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBotInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionOrAlias != nil { + v := *s.VersionOrAlias + + e.SetValue(protocol.PathTarget, "versionoralias", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotResponse type GetBotOutput struct { _ struct{} `type:"structure"` @@ -6674,6 +7623,87 @@ func (s *GetBotOutput) SetVoiceId(v string) *GetBotOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBotOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AbortStatement != nil { + v := s.AbortStatement + + e.SetFields(protocol.BodyTarget, "abortStatement", v, protocol.Metadata{}) + } + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ChildDirected != nil { + v := *s.ChildDirected + + e.SetValue(protocol.BodyTarget, "childDirected", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ClarificationPrompt != nil { + v := s.ClarificationPrompt + + e.SetFields(protocol.BodyTarget, "clarificationPrompt", v, protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FailureReason != nil { + v := *s.FailureReason + + e.SetValue(protocol.BodyTarget, "failureReason", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdleSessionTTLInSeconds != nil { + v := *s.IdleSessionTTLInSeconds + + e.SetValue(protocol.BodyTarget, "idleSessionTTLInSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Intents) > 0 { + v := s.Intents + + e.SetList(protocol.BodyTarget, "intents", encodeIntentList(v), protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Locale != nil { + v := *s.Locale + + e.SetValue(protocol.BodyTarget, "locale", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VoiceId != nil { + v := *s.VoiceId + + e.SetValue(protocol.BodyTarget, "voiceId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotVersionsRequest type GetBotVersionsInput struct { _ struct{} `type:"structure"` @@ -6741,6 +7771,27 @@ func (s *GetBotVersionsInput) SetNextToken(v string) *GetBotVersionsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBotVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotVersionsResponse type GetBotVersionsOutput struct { _ struct{} `type:"structure"` @@ -6778,6 +7829,22 @@ func (s *GetBotVersionsOutput) SetNextToken(v string) *GetBotVersionsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBotVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Bots) > 0 { + v := s.Bots + + e.SetList(protocol.BodyTarget, "bots", encodeBotMetadataList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotsRequest type GetBotsInput struct { _ struct{} `type:"structure"` @@ -6842,6 +7909,27 @@ func (s *GetBotsInput) SetNextToken(v string) *GetBotsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBotsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NameContains != nil { + v := *s.NameContains + + e.SetValue(protocol.QueryTarget, "nameContains", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBotsResponse type GetBotsOutput struct { _ struct{} `type:"structure"` @@ -6876,6 +7964,22 @@ func (s *GetBotsOutput) SetNextToken(v string) *GetBotsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBotsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Bots) > 0 { + v := s.Bots + + e.SetList(protocol.BodyTarget, "bots", encodeBotMetadataList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntentRequest type GetBuiltinIntentInput struct { _ struct{} `type:"structure"` @@ -6917,6 +8021,17 @@ func (s *GetBuiltinIntentInput) SetSignature(v string) *GetBuiltinIntentInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBuiltinIntentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Signature != nil { + v := *s.Signature + + e.SetValue(protocol.PathTarget, "signature", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntentResponse type GetBuiltinIntentOutput struct { _ struct{} `type:"structure"` @@ -6960,6 +8075,27 @@ func (s *GetBuiltinIntentOutput) SetSupportedLocales(v []*string) *GetBuiltinInt return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBuiltinIntentOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Signature != nil { + v := *s.Signature + + e.SetValue(protocol.BodyTarget, "signature", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Slots) > 0 { + v := s.Slots + + e.SetList(protocol.BodyTarget, "slots", encodeBuiltinIntentSlotList(v), protocol.Metadata{}) + } + if len(s.SupportedLocales) > 0 { + v := s.SupportedLocales + + e.SetList(protocol.BodyTarget, "supportedLocales", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntentsRequest type GetBuiltinIntentsInput struct { _ struct{} `type:"structure"` @@ -7030,6 +8166,32 @@ func (s *GetBuiltinIntentsInput) SetSignatureContains(v string) *GetBuiltinInten return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBuiltinIntentsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Locale != nil { + v := *s.Locale + + e.SetValue(protocol.QueryTarget, "locale", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SignatureContains != nil { + v := *s.SignatureContains + + e.SetValue(protocol.QueryTarget, "signatureContains", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinIntentsResponse type GetBuiltinIntentsOutput struct { _ struct{} `type:"structure"` @@ -7066,6 +8228,22 @@ func (s *GetBuiltinIntentsOutput) SetNextToken(v string) *GetBuiltinIntentsOutpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBuiltinIntentsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Intents) > 0 { + v := s.Intents + + e.SetList(protocol.BodyTarget, "intents", encodeBuiltinIntentMetadataList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinSlotTypesRequest type GetBuiltinSlotTypesInput struct { _ struct{} `type:"structure"` @@ -7136,6 +8314,32 @@ func (s *GetBuiltinSlotTypesInput) SetSignatureContains(v string) *GetBuiltinSlo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBuiltinSlotTypesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Locale != nil { + v := *s.Locale + + e.SetValue(protocol.QueryTarget, "locale", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SignatureContains != nil { + v := *s.SignatureContains + + e.SetValue(protocol.QueryTarget, "signatureContains", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetBuiltinSlotTypesResponse type GetBuiltinSlotTypesOutput struct { _ struct{} `type:"structure"` @@ -7171,6 +8375,22 @@ func (s *GetBuiltinSlotTypesOutput) SetSlotTypes(v []*BuiltinSlotTypeMetadata) * return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBuiltinSlotTypesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SlotTypes) > 0 { + v := s.SlotTypes + + e.SetList(protocol.BodyTarget, "slotTypes", encodeBuiltinSlotTypeMetadataList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetExportRequest type GetExportInput struct { _ struct{} `type:"structure"` @@ -7258,6 +8478,32 @@ func (s *GetExportInput) SetVersion(v string) *GetExportInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetExportInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ExportType != nil { + v := *s.ExportType + + e.SetValue(protocol.QueryTarget, "exportType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.QueryTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceType != nil { + v := *s.ResourceType + + e.SetValue(protocol.QueryTarget, "resourceType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.QueryTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetExportResponse type GetExportOutput struct { _ struct{} `type:"structure"` @@ -7346,6 +8592,47 @@ func (s *GetExportOutput) SetVersion(v string) *GetExportOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetExportOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ExportStatus != nil { + v := *s.ExportStatus + + e.SetValue(protocol.BodyTarget, "exportStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ExportType != nil { + v := *s.ExportType + + e.SetValue(protocol.BodyTarget, "exportType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FailureReason != nil { + v := *s.FailureReason + + e.SetValue(protocol.BodyTarget, "failureReason", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceType != nil { + v := *s.ResourceType + + e.SetValue(protocol.BodyTarget, "resourceType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "url", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentRequest type GetIntentInput struct { _ struct{} `type:"structure"` @@ -7405,6 +8692,22 @@ func (s *GetIntentInput) SetVersion(v string) *GetIntentInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetIntentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.PathTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentResponse type GetIntentOutput struct { _ struct{} `type:"structure"` @@ -7543,22 +8846,103 @@ func (s *GetIntentOutput) SetRejectionStatement(v *Statement) *GetIntentOutput { return s } -// SetSampleUtterances sets the SampleUtterances field's value. -func (s *GetIntentOutput) SetSampleUtterances(v []*string) *GetIntentOutput { - s.SampleUtterances = v - return s -} +// SetSampleUtterances sets the SampleUtterances field's value. +func (s *GetIntentOutput) SetSampleUtterances(v []*string) *GetIntentOutput { + s.SampleUtterances = v + return s +} + +// SetSlots sets the Slots field's value. +func (s *GetIntentOutput) SetSlots(v []*Slot) *GetIntentOutput { + s.Slots = v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetIntentOutput) SetVersion(v string) *GetIntentOutput { + s.Version = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetIntentOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ConclusionStatement != nil { + v := s.ConclusionStatement + + e.SetFields(protocol.BodyTarget, "conclusionStatement", v, protocol.Metadata{}) + } + if s.ConfirmationPrompt != nil { + v := s.ConfirmationPrompt + + e.SetFields(protocol.BodyTarget, "confirmationPrompt", v, protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DialogCodeHook != nil { + v := s.DialogCodeHook + + e.SetFields(protocol.BodyTarget, "dialogCodeHook", v, protocol.Metadata{}) + } + if s.FollowUpPrompt != nil { + v := s.FollowUpPrompt + + e.SetFields(protocol.BodyTarget, "followUpPrompt", v, protocol.Metadata{}) + } + if s.FulfillmentActivity != nil { + v := s.FulfillmentActivity + + e.SetFields(protocol.BodyTarget, "fulfillmentActivity", v, protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParentIntentSignature != nil { + v := *s.ParentIntentSignature + + e.SetValue(protocol.BodyTarget, "parentIntentSignature", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RejectionStatement != nil { + v := s.RejectionStatement + + e.SetFields(protocol.BodyTarget, "rejectionStatement", v, protocol.Metadata{}) + } + if len(s.SampleUtterances) > 0 { + v := s.SampleUtterances + + e.SetList(protocol.BodyTarget, "sampleUtterances", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.Slots) > 0 { + v := s.Slots -// SetSlots sets the Slots field's value. -func (s *GetIntentOutput) SetSlots(v []*Slot) *GetIntentOutput { - s.Slots = v - return s -} + e.SetList(protocol.BodyTarget, "slots", encodeSlotList(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version -// SetVersion sets the Version field's value. -func (s *GetIntentOutput) SetVersion(v string) *GetIntentOutput { - s.Version = &v - return s + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil } // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentVersionsRequest @@ -7628,6 +9012,27 @@ func (s *GetIntentVersionsInput) SetNextToken(v string) *GetIntentVersionsInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetIntentVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentVersionsResponse type GetIntentVersionsOutput struct { _ struct{} `type:"structure"` @@ -7665,6 +9070,22 @@ func (s *GetIntentVersionsOutput) SetNextToken(v string) *GetIntentVersionsOutpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetIntentVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Intents) > 0 { + v := s.Intents + + e.SetList(protocol.BodyTarget, "intents", encodeIntentMetadataList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentsRequest type GetIntentsInput struct { _ struct{} `type:"structure"` @@ -7728,6 +9149,27 @@ func (s *GetIntentsInput) SetNextToken(v string) *GetIntentsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetIntentsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NameContains != nil { + v := *s.NameContains + + e.SetValue(protocol.QueryTarget, "nameContains", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetIntentsResponse type GetIntentsOutput struct { _ struct{} `type:"structure"` @@ -7762,6 +9204,22 @@ func (s *GetIntentsOutput) SetNextToken(v string) *GetIntentsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetIntentsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Intents) > 0 { + v := s.Intents + + e.SetList(protocol.BodyTarget, "intents", encodeIntentMetadataList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypeRequest type GetSlotTypeInput struct { _ struct{} `type:"structure"` @@ -7821,6 +9279,22 @@ func (s *GetSlotTypeInput) SetVersion(v string) *GetSlotTypeInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSlotTypeInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.PathTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypeResponse type GetSlotTypeOutput struct { _ struct{} `type:"structure"` @@ -7911,6 +9385,52 @@ func (s *GetSlotTypeOutput) SetVersion(v string) *GetSlotTypeOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSlotTypeOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.EnumerationValues) > 0 { + v := s.EnumerationValues + + e.SetList(protocol.BodyTarget, "enumerationValues", encodeEnumerationValueList(v), protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ValueSelectionStrategy != nil { + v := *s.ValueSelectionStrategy + + e.SetValue(protocol.BodyTarget, "valueSelectionStrategy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypeVersionsRequest type GetSlotTypeVersionsInput struct { _ struct{} `type:"structure"` @@ -7978,6 +9498,27 @@ func (s *GetSlotTypeVersionsInput) SetNextToken(v string) *GetSlotTypeVersionsIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSlotTypeVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypeVersionsResponse type GetSlotTypeVersionsOutput struct { _ struct{} `type:"structure"` @@ -8015,6 +9556,22 @@ func (s *GetSlotTypeVersionsOutput) SetSlotTypes(v []*SlotTypeMetadata) *GetSlot return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSlotTypeVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SlotTypes) > 0 { + v := s.SlotTypes + + e.SetList(protocol.BodyTarget, "slotTypes", encodeSlotTypeMetadataList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypesRequest type GetSlotTypesInput struct { _ struct{} `type:"structure"` @@ -8079,6 +9636,27 @@ func (s *GetSlotTypesInput) SetNextToken(v string) *GetSlotTypesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSlotTypesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NameContains != nil { + v := *s.NameContains + + e.SetValue(protocol.QueryTarget, "nameContains", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetSlotTypesResponse type GetSlotTypesOutput struct { _ struct{} `type:"structure"` @@ -8114,6 +9692,22 @@ func (s *GetSlotTypesOutput) SetSlotTypes(v []*SlotTypeMetadata) *GetSlotTypesOu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSlotTypesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SlotTypes) > 0 { + v := s.SlotTypes + + e.SetList(protocol.BodyTarget, "slotTypes", encodeSlotTypeMetadataList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetUtterancesViewRequest type GetUtterancesViewInput struct { _ struct{} `type:"structure"` @@ -8189,6 +9783,27 @@ func (s *GetUtterancesViewInput) SetStatusType(v string) *GetUtterancesViewInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetUtterancesViewInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.PathTarget, "botname", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.BotVersions) > 0 { + v := s.BotVersions + + e.SetList(protocol.QueryTarget, "bot_versions", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.StatusType != nil { + v := *s.StatusType + + e.SetValue(protocol.QueryTarget, "status_type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/GetUtterancesViewResponse type GetUtterancesViewOutput struct { _ struct{} `type:"structure"` @@ -8224,6 +9839,22 @@ func (s *GetUtterancesViewOutput) SetUtterances(v []*UtteranceList) *GetUtteranc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetUtterancesViewOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.BodyTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Utterances) > 0 { + v := s.Utterances + + e.SetList(protocol.BodyTarget, "utterances", encodeUtteranceListList(v), protocol.Metadata{}) + } + + return nil +} + // Identifies the specific version of an intent. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/Intent type Intent struct { @@ -8284,6 +9915,30 @@ func (s *Intent) SetIntentVersion(v string) *Intent { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Intent) MarshalFields(e protocol.FieldEncoder) error { + if s.IntentName != nil { + v := *s.IntentName + + e.SetValue(protocol.BodyTarget, "intentName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IntentVersion != nil { + v := *s.IntentVersion + + e.SetValue(protocol.BodyTarget, "intentVersion", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeIntentList(vs []*Intent) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Provides information about an intent. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/IntentMetadata type IntentMetadata struct { @@ -8346,6 +10001,45 @@ func (s *IntentMetadata) SetVersion(v string) *IntentMetadata { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *IntentMetadata) MarshalFields(e protocol.FieldEncoder) error { + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeIntentMetadataList(vs []*IntentMetadata) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The message object that provides the message text and its type. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/Message type Message struct { @@ -8403,6 +10097,30 @@ func (s *Message) SetContentType(v string) *Message { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Message) MarshalFields(e protocol.FieldEncoder) error { + if s.Content != nil { + v := *s.Content + + e.SetValue(protocol.BodyTarget, "content", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.BodyTarget, "contentType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeMessageList(vs []*Message) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Obtains information from the user. To define a prompt, provide one or more // messages and specify the number of attempts to get information from the user. // If you provide more than one message, Amazon Lex chooses one of the messages @@ -8492,6 +10210,27 @@ func (s *Prompt) SetResponseCard(v string) *Prompt { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Prompt) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxAttempts != nil { + v := *s.MaxAttempts + + e.SetValue(protocol.BodyTarget, "maxAttempts", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Messages) > 0 { + v := s.Messages + + e.SetList(protocol.BodyTarget, "messages", encodeMessageList(v), protocol.Metadata{}) + } + if s.ResponseCard != nil { + v := *s.ResponseCard + + e.SetValue(protocol.BodyTarget, "responseCard", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBotAliasRequest type PutBotAliasInput struct { _ struct{} `type:"structure"` @@ -8594,6 +10333,37 @@ func (s *PutBotAliasInput) SetName(v string) *PutBotAliasInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBotAliasInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.PathTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BotVersion != nil { + v := *s.BotVersion + + e.SetValue(protocol.BodyTarget, "botVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBotAliasResponse type PutBotAliasOutput struct { _ struct{} `type:"structure"` @@ -8673,6 +10443,47 @@ func (s *PutBotAliasOutput) SetName(v string) *PutBotAliasOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBotAliasOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.BodyTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BotVersion != nil { + v := *s.BotVersion + + e.SetValue(protocol.BodyTarget, "botVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBotRequest type PutBotInput struct { _ struct{} `type:"structure"` @@ -8899,22 +10710,83 @@ func (s *PutBotInput) SetLocale(v string) *PutBotInput { return s } -// SetName sets the Name field's value. -func (s *PutBotInput) SetName(v string) *PutBotInput { - s.Name = &v - return s -} +// SetName sets the Name field's value. +func (s *PutBotInput) SetName(v string) *PutBotInput { + s.Name = &v + return s +} + +// SetProcessBehavior sets the ProcessBehavior field's value. +func (s *PutBotInput) SetProcessBehavior(v string) *PutBotInput { + s.ProcessBehavior = &v + return s +} + +// SetVoiceId sets the VoiceId field's value. +func (s *PutBotInput) SetVoiceId(v string) *PutBotInput { + s.VoiceId = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBotInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AbortStatement != nil { + v := s.AbortStatement + + e.SetFields(protocol.BodyTarget, "abortStatement", v, protocol.Metadata{}) + } + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ChildDirected != nil { + v := *s.ChildDirected + + e.SetValue(protocol.BodyTarget, "childDirected", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ClarificationPrompt != nil { + v := s.ClarificationPrompt + + e.SetFields(protocol.BodyTarget, "clarificationPrompt", v, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdleSessionTTLInSeconds != nil { + v := *s.IdleSessionTTLInSeconds + + e.SetValue(protocol.BodyTarget, "idleSessionTTLInSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Intents) > 0 { + v := s.Intents + + e.SetList(protocol.BodyTarget, "intents", encodeIntentList(v), protocol.Metadata{}) + } + if s.Locale != nil { + v := *s.Locale + + e.SetValue(protocol.BodyTarget, "locale", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name -// SetProcessBehavior sets the ProcessBehavior field's value. -func (s *PutBotInput) SetProcessBehavior(v string) *PutBotInput { - s.ProcessBehavior = &v - return s -} + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ProcessBehavior != nil { + v := *s.ProcessBehavior -// SetVoiceId sets the VoiceId field's value. -func (s *PutBotInput) SetVoiceId(v string) *PutBotInput { - s.VoiceId = &v - return s + e.SetValue(protocol.BodyTarget, "processBehavior", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VoiceId != nil { + v := *s.VoiceId + + e.SetValue(protocol.BodyTarget, "voiceId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil } // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutBotResponse @@ -9102,6 +10974,87 @@ func (s *PutBotOutput) SetVoiceId(v string) *PutBotOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBotOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AbortStatement != nil { + v := s.AbortStatement + + e.SetFields(protocol.BodyTarget, "abortStatement", v, protocol.Metadata{}) + } + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ChildDirected != nil { + v := *s.ChildDirected + + e.SetValue(protocol.BodyTarget, "childDirected", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ClarificationPrompt != nil { + v := s.ClarificationPrompt + + e.SetFields(protocol.BodyTarget, "clarificationPrompt", v, protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FailureReason != nil { + v := *s.FailureReason + + e.SetValue(protocol.BodyTarget, "failureReason", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IdleSessionTTLInSeconds != nil { + v := *s.IdleSessionTTLInSeconds + + e.SetValue(protocol.BodyTarget, "idleSessionTTLInSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Intents) > 0 { + v := s.Intents + + e.SetList(protocol.BodyTarget, "intents", encodeIntentList(v), protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Locale != nil { + v := *s.Locale + + e.SetValue(protocol.BodyTarget, "locale", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VoiceId != nil { + v := *s.VoiceId + + e.SetValue(protocol.BodyTarget, "voiceId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutIntentRequest type PutIntentInput struct { _ struct{} `type:"structure"` @@ -9360,6 +11313,72 @@ func (s *PutIntentInput) SetSlots(v []*Slot) *PutIntentInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutIntentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ConclusionStatement != nil { + v := s.ConclusionStatement + + e.SetFields(protocol.BodyTarget, "conclusionStatement", v, protocol.Metadata{}) + } + if s.ConfirmationPrompt != nil { + v := s.ConfirmationPrompt + + e.SetFields(protocol.BodyTarget, "confirmationPrompt", v, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DialogCodeHook != nil { + v := s.DialogCodeHook + + e.SetFields(protocol.BodyTarget, "dialogCodeHook", v, protocol.Metadata{}) + } + if s.FollowUpPrompt != nil { + v := s.FollowUpPrompt + + e.SetFields(protocol.BodyTarget, "followUpPrompt", v, protocol.Metadata{}) + } + if s.FulfillmentActivity != nil { + v := s.FulfillmentActivity + + e.SetFields(protocol.BodyTarget, "fulfillmentActivity", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParentIntentSignature != nil { + v := *s.ParentIntentSignature + + e.SetValue(protocol.BodyTarget, "parentIntentSignature", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RejectionStatement != nil { + v := s.RejectionStatement + + e.SetFields(protocol.BodyTarget, "rejectionStatement", v, protocol.Metadata{}) + } + if len(s.SampleUtterances) > 0 { + v := s.SampleUtterances + + e.SetList(protocol.BodyTarget, "sampleUtterances", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.Slots) > 0 { + v := s.Slots + + e.SetList(protocol.BodyTarget, "slots", encodeSlotList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutIntentResponse type PutIntentOutput struct { _ struct{} `type:"structure"` @@ -9518,6 +11537,87 @@ func (s *PutIntentOutput) SetVersion(v string) *PutIntentOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutIntentOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ConclusionStatement != nil { + v := s.ConclusionStatement + + e.SetFields(protocol.BodyTarget, "conclusionStatement", v, protocol.Metadata{}) + } + if s.ConfirmationPrompt != nil { + v := s.ConfirmationPrompt + + e.SetFields(protocol.BodyTarget, "confirmationPrompt", v, protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DialogCodeHook != nil { + v := s.DialogCodeHook + + e.SetFields(protocol.BodyTarget, "dialogCodeHook", v, protocol.Metadata{}) + } + if s.FollowUpPrompt != nil { + v := s.FollowUpPrompt + + e.SetFields(protocol.BodyTarget, "followUpPrompt", v, protocol.Metadata{}) + } + if s.FulfillmentActivity != nil { + v := s.FulfillmentActivity + + e.SetFields(protocol.BodyTarget, "fulfillmentActivity", v, protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParentIntentSignature != nil { + v := *s.ParentIntentSignature + + e.SetValue(protocol.BodyTarget, "parentIntentSignature", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RejectionStatement != nil { + v := s.RejectionStatement + + e.SetFields(protocol.BodyTarget, "rejectionStatement", v, protocol.Metadata{}) + } + if len(s.SampleUtterances) > 0 { + v := s.SampleUtterances + + e.SetList(protocol.BodyTarget, "sampleUtterances", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.Slots) > 0 { + v := s.Slots + + e.SetList(protocol.BodyTarget, "slots", encodeSlotList(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutSlotTypeRequest type PutSlotTypeInput struct { _ struct{} `type:"structure"` @@ -9644,6 +11744,37 @@ func (s *PutSlotTypeInput) SetValueSelectionStrategy(v string) *PutSlotTypeInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutSlotTypeInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.EnumerationValues) > 0 { + v := s.EnumerationValues + + e.SetList(protocol.BodyTarget, "enumerationValues", encodeEnumerationValueList(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ValueSelectionStrategy != nil { + v := *s.ValueSelectionStrategy + + e.SetValue(protocol.BodyTarget, "valueSelectionStrategy", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/PutSlotTypeResponse type PutSlotTypeOutput struct { _ struct{} `type:"structure"` @@ -9735,6 +11866,52 @@ func (s *PutSlotTypeOutput) SetVersion(v string) *PutSlotTypeOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutSlotTypeOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Checksum != nil { + v := *s.Checksum + + e.SetValue(protocol.BodyTarget, "checksum", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.EnumerationValues) > 0 { + v := s.EnumerationValues + + e.SetList(protocol.BodyTarget, "enumerationValues", encodeEnumerationValueList(v), protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ValueSelectionStrategy != nil { + v := *s.ValueSelectionStrategy + + e.SetValue(protocol.BodyTarget, "valueSelectionStrategy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes the resource that refers to the resource that you are attempting // to delete. This object is returned as part of the ResourceInUseException // exception. @@ -9773,6 +11950,22 @@ func (s *ResourceReference) SetVersion(v string) *ResourceReference { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ResourceReference) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Identifies the version of a specific slot. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/Slot type Slot struct { @@ -9918,6 +12111,65 @@ func (s *Slot) SetValueElicitationPrompt(v *Prompt) *Slot { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Slot) MarshalFields(e protocol.FieldEncoder) error { + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Priority != nil { + v := *s.Priority + + e.SetValue(protocol.BodyTarget, "priority", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ResponseCard != nil { + v := *s.ResponseCard + + e.SetValue(protocol.BodyTarget, "responseCard", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SampleUtterances) > 0 { + v := s.SampleUtterances + + e.SetList(protocol.BodyTarget, "sampleUtterances", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.SlotConstraint != nil { + v := *s.SlotConstraint + + e.SetValue(protocol.BodyTarget, "slotConstraint", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SlotType != nil { + v := *s.SlotType + + e.SetValue(protocol.BodyTarget, "slotType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SlotTypeVersion != nil { + v := *s.SlotTypeVersion + + e.SetValue(protocol.BodyTarget, "slotTypeVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ValueElicitationPrompt != nil { + v := s.ValueElicitationPrompt + + e.SetFields(protocol.BodyTarget, "valueElicitationPrompt", v, protocol.Metadata{}) + } + + return nil +} + +func encodeSlotList(vs []*Slot) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Provides information about a slot type.. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/SlotTypeMetadata type SlotTypeMetadata struct { @@ -9980,6 +12232,45 @@ func (s *SlotTypeMetadata) SetVersion(v string) *SlotTypeMetadata { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SlotTypeMetadata) MarshalFields(e protocol.FieldEncoder) error { + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeSlotTypeMetadataList(vs []*SlotTypeMetadata) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A collection of messages that convey information to the user. At runtime, // Amazon Lex selects the message to convey. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/Statement @@ -10049,6 +12340,22 @@ func (s *Statement) SetResponseCard(v string) *Statement { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Statement) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Messages) > 0 { + v := s.Messages + + e.SetList(protocol.BodyTarget, "messages", encodeMessageList(v), protocol.Metadata{}) + } + if s.ResponseCard != nil { + v := *s.ResponseCard + + e.SetValue(protocol.BodyTarget, "responseCard", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Provides information about a single utterance that was made to your bot. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/UtteranceData type UtteranceData struct { @@ -10111,6 +12418,45 @@ func (s *UtteranceData) SetUtteranceString(v string) *UtteranceData { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UtteranceData) MarshalFields(e protocol.FieldEncoder) error { + if s.Count != nil { + v := *s.Count + + e.SetValue(protocol.BodyTarget, "count", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.DistinctUsers != nil { + v := *s.DistinctUsers + + e.SetValue(protocol.BodyTarget, "distinctUsers", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FirstUtteredDate != nil { + v := *s.FirstUtteredDate + + e.SetValue(protocol.BodyTarget, "firstUtteredDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.LastUtteredDate != nil { + v := *s.LastUtteredDate + + e.SetValue(protocol.BodyTarget, "lastUtteredDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.UtteranceString != nil { + v := *s.UtteranceString + + e.SetValue(protocol.BodyTarget, "utteranceString", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeUtteranceDataList(vs []*UtteranceData) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Provides a list of utterances that have been made to a specific version of // your bot. The list contains a maximum of 100 utterances. // Please also see https://docs.aws.amazon.com/goto/WebAPI/lex-models-2017-04-19/UtteranceList @@ -10147,6 +12493,30 @@ func (s *UtteranceList) SetUtterances(v []*UtteranceData) *UtteranceList { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UtteranceList) MarshalFields(e protocol.FieldEncoder) error { + if s.BotVersion != nil { + v := *s.BotVersion + + e.SetValue(protocol.BodyTarget, "botVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Utterances) > 0 { + v := s.Utterances + + e.SetList(protocol.BodyTarget, "utterances", encodeUtteranceDataList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeUtteranceListList(vs []*UtteranceList) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + const ( // ChannelTypeFacebook is a ChannelType enum value ChannelTypeFacebook = "Facebook" diff --git a/service/lexruntimeservice/api.go b/service/lexruntimeservice/api.go index 4790f8544b0..b91cf4f24c5 100644 --- a/service/lexruntimeservice/api.go +++ b/service/lexruntimeservice/api.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol" ) const opPostContent = "PostContent" @@ -390,6 +391,30 @@ func (s *Button) SetValue(v string) *Button { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Button) MarshalFields(e protocol.FieldEncoder) error { + if s.Text != nil { + v := *s.Text + + e.SetValue(protocol.BodyTarget, "text", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeButtonList(vs []*Button) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Represents an option rendered to the user when a prompt is shown. It could // be an image, a button, a link, or text. // Please also see https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/GenericAttachment @@ -452,6 +477,45 @@ func (s *GenericAttachment) SetTitle(v string) *GenericAttachment { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GenericAttachment) MarshalFields(e protocol.FieldEncoder) error { + if s.AttachmentLinkUrl != nil { + v := *s.AttachmentLinkUrl + + e.SetValue(protocol.BodyTarget, "attachmentLinkUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Buttons) > 0 { + v := s.Buttons + + e.SetList(protocol.BodyTarget, "buttons", encodeButtonList(v), protocol.Metadata{}) + } + if s.ImageUrl != nil { + v := *s.ImageUrl + + e.SetValue(protocol.BodyTarget, "imageUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubTitle != nil { + v := *s.SubTitle + + e.SetValue(protocol.BodyTarget, "subTitle", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Title != nil { + v := *s.Title + + e.SetValue(protocol.BodyTarget, "title", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeGenericAttachmentList(vs []*GenericAttachment) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostContentRequest type PostContentInput struct { _ struct{} `type:"structure" payload:"InputStream"` @@ -664,6 +728,52 @@ func (s *PostContentInput) SetUserId(v string) *PostContentInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PostContentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Accept != nil { + v := *s.Accept + + e.SetValue(protocol.HeaderTarget, "Accept", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BotAlias != nil { + v := *s.BotAlias + + e.SetValue(protocol.PathTarget, "botAlias", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.PathTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InputStream != nil { + v := s.InputStream + + e.SetStream(protocol.PayloadTarget, "inputStream", protocol.ReadSeekerStream{V: v}, protocol.Metadata{}) + } + if s.RequestAttributes != nil { + v := s.RequestAttributes + + e.SetValue(protocol.HeaderTarget, "x-amz-lex-request-attributes", protocol.JSONValue{V: v, Base64: true}, protocol.Metadata{}) + } + if s.SessionAttributes != nil { + v := s.SessionAttributes + + e.SetValue(protocol.HeaderTarget, "x-amz-lex-session-attributes", protocol.JSONValue{V: v, Base64: true}, protocol.Metadata{}) + } + if s.UserId != nil { + v := *s.UserId + + e.SetValue(protocol.PathTarget, "userId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostContentResponse type PostContentOutput struct { _ struct{} `type:"structure" payload:"AudioStream"` @@ -833,6 +943,53 @@ func (s *PostContentOutput) SetSlots(v aws.JSONValue) *PostContentOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PostContentOutput) MarshalFields(e protocol.FieldEncoder) error { + // Skipping AudioStream Output type's body not valid. + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DialogState != nil { + v := *s.DialogState + + e.SetValue(protocol.HeaderTarget, "x-amz-lex-dialog-state", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InputTranscript != nil { + v := *s.InputTranscript + + e.SetValue(protocol.HeaderTarget, "x-amz-lex-input-transcript", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IntentName != nil { + v := *s.IntentName + + e.SetValue(protocol.HeaderTarget, "x-amz-lex-intent-name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Message != nil { + v := *s.Message + + e.SetValue(protocol.HeaderTarget, "x-amz-lex-message", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SessionAttributes != nil { + v := s.SessionAttributes + + e.SetValue(protocol.HeaderTarget, "x-amz-lex-session-attributes", protocol.JSONValue{V: v, Base64: true}, protocol.Metadata{}) + } + if s.SlotToElicit != nil { + v := *s.SlotToElicit + + e.SetValue(protocol.HeaderTarget, "x-amz-lex-slot-to-elicit", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Slots != nil { + v := s.Slots + + e.SetValue(protocol.HeaderTarget, "x-amz-lex-slots", protocol.JSONValue{V: v, Base64: true}, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostTextRequest type PostTextInput struct { _ struct{} `type:"structure"` @@ -967,6 +1124,42 @@ func (s *PostTextInput) SetUserId(v string) *PostTextInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PostTextInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BotAlias != nil { + v := *s.BotAlias + + e.SetValue(protocol.PathTarget, "botAlias", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BotName != nil { + v := *s.BotName + + e.SetValue(protocol.PathTarget, "botName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InputText != nil { + v := *s.InputText + + e.SetValue(protocol.BodyTarget, "inputText", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.RequestAttributes) > 0 { + v := s.RequestAttributes + + e.SetMap(protocol.BodyTarget, "requestAttributes", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if len(s.SessionAttributes) > 0 { + v := s.SessionAttributes + + e.SetMap(protocol.BodyTarget, "sessionAttributes", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.UserId != nil { + v := *s.UserId + + e.SetValue(protocol.PathTarget, "userId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/runtime.lex-2016-11-28/PostTextResponse type PostTextOutput struct { _ struct{} `type:"structure"` @@ -1109,6 +1302,47 @@ func (s *PostTextOutput) SetSlots(v map[string]*string) *PostTextOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PostTextOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DialogState != nil { + v := *s.DialogState + + e.SetValue(protocol.BodyTarget, "dialogState", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IntentName != nil { + v := *s.IntentName + + e.SetValue(protocol.BodyTarget, "intentName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Message != nil { + v := *s.Message + + e.SetValue(protocol.BodyTarget, "message", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResponseCard != nil { + v := s.ResponseCard + + e.SetFields(protocol.BodyTarget, "responseCard", v, protocol.Metadata{}) + } + if len(s.SessionAttributes) > 0 { + v := s.SessionAttributes + + e.SetMap(protocol.BodyTarget, "sessionAttributes", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.SlotToElicit != nil { + v := *s.SlotToElicit + + e.SetValue(protocol.BodyTarget, "slotToElicit", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Slots) > 0 { + v := s.Slots + + e.SetMap(protocol.BodyTarget, "slots", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // If you configure a response card when creating your bots, Amazon Lex substitutes // the session attributes and slot values that are available, and then returns // it. The response card can also come from a Lambda function ( dialogCodeHook @@ -1155,6 +1389,27 @@ func (s *ResponseCard) SetVersion(v string) *ResponseCard { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ResponseCard) MarshalFields(e protocol.FieldEncoder) error { + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.BodyTarget, "contentType", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.GenericAttachments) > 0 { + v := s.GenericAttachments + + e.SetList(protocol.BodyTarget, "genericAttachments", encodeGenericAttachmentList(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + const ( // ContentTypeApplicationVndAmazonawsCardGeneric is a ContentType enum value ContentTypeApplicationVndAmazonawsCardGeneric = "application/vnd.amazonaws.card.generic" diff --git a/service/mediaconvert/api.go b/service/mediaconvert/api.go index e2770ae3ac6..ba6e952b82b 100644 --- a/service/mediaconvert/api.go +++ b/service/mediaconvert/api.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" ) const opCancelJob = "CancelJob" @@ -1898,6 +1899,57 @@ func (s *AacSettings) SetVbrQuality(v string) *AacSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AacSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AudioDescriptionBroadcasterMix != nil { + v := *s.AudioDescriptionBroadcasterMix + + e.SetValue(protocol.BodyTarget, "audioDescriptionBroadcasterMix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Bitrate != nil { + v := *s.Bitrate + + e.SetValue(protocol.BodyTarget, "bitrate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.CodecProfile != nil { + v := *s.CodecProfile + + e.SetValue(protocol.BodyTarget, "codecProfile", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CodingMode != nil { + v := *s.CodingMode + + e.SetValue(protocol.BodyTarget, "codingMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RateControlMode != nil { + v := *s.RateControlMode + + e.SetValue(protocol.BodyTarget, "rateControlMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RawFormat != nil { + v := *s.RawFormat + + e.SetValue(protocol.BodyTarget, "rawFormat", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SampleRate != nil { + v := *s.SampleRate + + e.SetValue(protocol.BodyTarget, "sampleRate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Specification != nil { + v := *s.Specification + + e.SetValue(protocol.BodyTarget, "specification", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VbrQuality != nil { + v := *s.VbrQuality + + e.SetValue(protocol.BodyTarget, "vbrQuality", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to // the value AC3. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/Ac3Settings @@ -1993,6 +2045,52 @@ func (s *Ac3Settings) SetSampleRate(v int64) *Ac3Settings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Ac3Settings) MarshalFields(e protocol.FieldEncoder) error { + if s.Bitrate != nil { + v := *s.Bitrate + + e.SetValue(protocol.BodyTarget, "bitrate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.BitstreamMode != nil { + v := *s.BitstreamMode + + e.SetValue(protocol.BodyTarget, "bitstreamMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CodingMode != nil { + v := *s.CodingMode + + e.SetValue(protocol.BodyTarget, "codingMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Dialnorm != nil { + v := *s.Dialnorm + + e.SetValue(protocol.BodyTarget, "dialnorm", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.DynamicRangeCompressionProfile != nil { + v := *s.DynamicRangeCompressionProfile + + e.SetValue(protocol.BodyTarget, "dynamicRangeCompressionProfile", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LfeFilter != nil { + v := *s.LfeFilter + + e.SetValue(protocol.BodyTarget, "lfeFilter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MetadataControl != nil { + v := *s.MetadataControl + + e.SetValue(protocol.BodyTarget, "metadataControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SampleRate != nil { + v := *s.SampleRate + + e.SetValue(protocol.BodyTarget, "sampleRate", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to // the value AIFF. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/AiffSettings @@ -2040,6 +2138,27 @@ func (s *AiffSettings) SetSampleRate(v int64) *AiffSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AiffSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.BitDepth != nil { + v := *s.BitDepth + + e.SetValue(protocol.BodyTarget, "bitDepth", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Channels != nil { + v := *s.Channels + + e.SetValue(protocol.BodyTarget, "channels", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SampleRate != nil { + v := *s.SampleRate + + e.SetValue(protocol.BodyTarget, "sampleRate", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Settings for ancillary captions source. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/AncillarySourceSettings type AncillarySourceSettings struct { @@ -2066,6 +2185,17 @@ func (s *AncillarySourceSettings) SetSourceAncillaryChannelNumber(v int64) *Anci return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AncillarySourceSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.SourceAncillaryChannelNumber != nil { + v := *s.SourceAncillaryChannelNumber + + e.SetValue(protocol.BodyTarget, "sourceAncillaryChannelNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Audio codec settings (CodecSettings) under (AudioDescriptions) contains the // group of settings related to audio encoding. The settings in this group vary // depending on the value you choose for Audio codec (Codec). For each codec @@ -2156,6 +2286,47 @@ func (s *AudioCodecSettings) SetWavSettings(v *WavSettings) *AudioCodecSettings return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioCodecSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AacSettings != nil { + v := s.AacSettings + + e.SetFields(protocol.BodyTarget, "aacSettings", v, protocol.Metadata{}) + } + if s.Ac3Settings != nil { + v := s.Ac3Settings + + e.SetFields(protocol.BodyTarget, "ac3Settings", v, protocol.Metadata{}) + } + if s.AiffSettings != nil { + v := s.AiffSettings + + e.SetFields(protocol.BodyTarget, "aiffSettings", v, protocol.Metadata{}) + } + if s.Codec != nil { + v := *s.Codec + + e.SetValue(protocol.BodyTarget, "codec", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Eac3Settings != nil { + v := s.Eac3Settings + + e.SetFields(protocol.BodyTarget, "eac3Settings", v, protocol.Metadata{}) + } + if s.Mp2Settings != nil { + v := s.Mp2Settings + + e.SetFields(protocol.BodyTarget, "mp2Settings", v, protocol.Metadata{}) + } + if s.WavSettings != nil { + v := s.WavSettings + + e.SetFields(protocol.BodyTarget, "wavSettings", v, protocol.Metadata{}) + } + + return nil +} + // Description of audio output // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/AudioDescription type AudioDescription struct { @@ -2282,6 +2453,65 @@ func (s *AudioDescription) SetStreamName(v string) *AudioDescription { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioDescription) MarshalFields(e protocol.FieldEncoder) error { + if s.AudioNormalizationSettings != nil { + v := s.AudioNormalizationSettings + + e.SetFields(protocol.BodyTarget, "audioNormalizationSettings", v, protocol.Metadata{}) + } + if s.AudioSourceName != nil { + v := *s.AudioSourceName + + e.SetValue(protocol.BodyTarget, "audioSourceName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AudioType != nil { + v := *s.AudioType + + e.SetValue(protocol.BodyTarget, "audioType", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.AudioTypeControl != nil { + v := *s.AudioTypeControl + + e.SetValue(protocol.BodyTarget, "audioTypeControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CodecSettings != nil { + v := s.CodecSettings + + e.SetFields(protocol.BodyTarget, "codecSettings", v, protocol.Metadata{}) + } + if s.LanguageCode != nil { + v := *s.LanguageCode + + e.SetValue(protocol.BodyTarget, "languageCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LanguageCodeControl != nil { + v := *s.LanguageCodeControl + + e.SetValue(protocol.BodyTarget, "languageCodeControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RemixSettings != nil { + v := s.RemixSettings + + e.SetFields(protocol.BodyTarget, "remixSettings", v, protocol.Metadata{}) + } + if s.StreamName != nil { + v := *s.StreamName + + e.SetValue(protocol.BodyTarget, "streamName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeAudioDescriptionList(vs []*AudioDescription) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Advanced audio normalization settings. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/AudioNormalizationSettings type AudioNormalizationSettings struct { @@ -2360,6 +2590,42 @@ func (s *AudioNormalizationSettings) SetTargetLkfs(v float64) *AudioNormalizatio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioNormalizationSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Algorithm != nil { + v := *s.Algorithm + + e.SetValue(protocol.BodyTarget, "algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AlgorithmControl != nil { + v := *s.AlgorithmControl + + e.SetValue(protocol.BodyTarget, "algorithmControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CorrectionGateLevel != nil { + v := *s.CorrectionGateLevel + + e.SetValue(protocol.BodyTarget, "correctionGateLevel", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.LoudnessLogging != nil { + v := *s.LoudnessLogging + + e.SetValue(protocol.BodyTarget, "loudnessLogging", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PeakCalculation != nil { + v := *s.PeakCalculation + + e.SetValue(protocol.BodyTarget, "peakCalculation", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TargetLkfs != nil { + v := *s.TargetLkfs + + e.SetValue(protocol.BodyTarget, "targetLkfs", protocol.Float64Value(v), protocol.Metadata{}) + } + + return nil +} + // Selector for Audio // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/AudioSelector type AudioSelector struct { @@ -2470,6 +2736,65 @@ func (s *AudioSelector) SetTracks(v []*int64) *AudioSelector { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioSelector) MarshalFields(e protocol.FieldEncoder) error { + if s.DefaultSelection != nil { + v := *s.DefaultSelection + + e.SetValue(protocol.BodyTarget, "defaultSelection", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ExternalAudioFileInput != nil { + v := *s.ExternalAudioFileInput + + e.SetValue(protocol.BodyTarget, "externalAudioFileInput", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LanguageCode != nil { + v := *s.LanguageCode + + e.SetValue(protocol.BodyTarget, "languageCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Offset != nil { + v := *s.Offset + + e.SetValue(protocol.BodyTarget, "offset", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Pids) > 0 { + v := s.Pids + + e.SetList(protocol.BodyTarget, "pids", protocol.EncodeInt64List(v), protocol.Metadata{}) + } + if s.ProgramSelection != nil { + v := *s.ProgramSelection + + e.SetValue(protocol.BodyTarget, "programSelection", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RemixSettings != nil { + v := s.RemixSettings + + e.SetFields(protocol.BodyTarget, "remixSettings", v, protocol.Metadata{}) + } + if s.SelectorType != nil { + v := *s.SelectorType + + e.SetValue(protocol.BodyTarget, "selectorType", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Tracks) > 0 { + v := s.Tracks + + e.SetList(protocol.BodyTarget, "tracks", protocol.EncodeInt64List(v), protocol.Metadata{}) + } + + return nil +} + +func encodeAudioSelectorMap(vs map[string]*AudioSelector) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // Group of Audio Selectors // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/AudioSelectorGroup type AudioSelectorGroup struct { @@ -2498,6 +2823,25 @@ func (s *AudioSelectorGroup) SetAudioSelectorNames(v []*string) *AudioSelectorGr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioSelectorGroup) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AudioSelectorNames) > 0 { + v := s.AudioSelectorNames + + e.SetList(protocol.BodyTarget, "audioSelectorNames", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeAudioSelectorGroupMap(vs map[string]*AudioSelectorGroup) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // Settings for Avail Blanking // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/AvailBlanking type AvailBlanking struct { @@ -2524,6 +2868,17 @@ func (s *AvailBlanking) SetAvailBlankingImage(v string) *AvailBlanking { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AvailBlanking) MarshalFields(e protocol.FieldEncoder) error { + if s.AvailBlankingImage != nil { + v := *s.AvailBlankingImage + + e.SetValue(protocol.BodyTarget, "availBlankingImage", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Burn-In Destination Settings. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/BurninDestinationSettings type BurninDestinationSettings struct { @@ -2728,6 +3083,92 @@ func (s *BurninDestinationSettings) SetYPosition(v int64) *BurninDestinationSett return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BurninDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Alignment != nil { + v := *s.Alignment + + e.SetValue(protocol.BodyTarget, "alignment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BackgroundColor != nil { + v := *s.BackgroundColor + + e.SetValue(protocol.BodyTarget, "backgroundColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BackgroundOpacity != nil { + v := *s.BackgroundOpacity + + e.SetValue(protocol.BodyTarget, "backgroundOpacity", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FontColor != nil { + v := *s.FontColor + + e.SetValue(protocol.BodyTarget, "fontColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FontOpacity != nil { + v := *s.FontOpacity + + e.SetValue(protocol.BodyTarget, "fontOpacity", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FontResolution != nil { + v := *s.FontResolution + + e.SetValue(protocol.BodyTarget, "fontResolution", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FontSize != nil { + v := *s.FontSize + + e.SetValue(protocol.BodyTarget, "fontSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.OutlineColor != nil { + v := *s.OutlineColor + + e.SetValue(protocol.BodyTarget, "outlineColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OutlineSize != nil { + v := *s.OutlineSize + + e.SetValue(protocol.BodyTarget, "outlineSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ShadowColor != nil { + v := *s.ShadowColor + + e.SetValue(protocol.BodyTarget, "shadowColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ShadowOpacity != nil { + v := *s.ShadowOpacity + + e.SetValue(protocol.BodyTarget, "shadowOpacity", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ShadowXOffset != nil { + v := *s.ShadowXOffset + + e.SetValue(protocol.BodyTarget, "shadowXOffset", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ShadowYOffset != nil { + v := *s.ShadowYOffset + + e.SetValue(protocol.BodyTarget, "shadowYOffset", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TeletextSpacing != nil { + v := *s.TeletextSpacing + + e.SetValue(protocol.BodyTarget, "teletextSpacing", protocol.StringValue(v), protocol.Metadata{}) + } + if s.XPosition != nil { + v := *s.XPosition + + e.SetValue(protocol.BodyTarget, "xPosition", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.YPosition != nil { + v := *s.YPosition + + e.SetValue(protocol.BodyTarget, "yPosition", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Cancel a job by sending a request with the job ID // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CancelJobRequest type CancelJobInput struct { @@ -2768,6 +3209,17 @@ func (s *CancelJobInput) SetId(v string) *CancelJobInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CancelJobInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A cancel job request will receive a response with an empty body. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CancelJobResponse type CancelJobOutput struct { @@ -2784,6 +3236,12 @@ func (s CancelJobOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CancelJobOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Description of Caption output // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CaptionDescription type CaptionDescription struct { @@ -2842,6 +3300,40 @@ func (s *CaptionDescription) SetLanguageDescription(v string) *CaptionDescriptio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CaptionDescription) MarshalFields(e protocol.FieldEncoder) error { + if s.CaptionSelectorName != nil { + v := *s.CaptionSelectorName + + e.SetValue(protocol.BodyTarget, "captionSelectorName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DestinationSettings != nil { + v := s.DestinationSettings + + e.SetFields(protocol.BodyTarget, "destinationSettings", v, protocol.Metadata{}) + } + if s.LanguageCode != nil { + v := *s.LanguageCode + + e.SetValue(protocol.BodyTarget, "languageCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LanguageDescription != nil { + v := *s.LanguageDescription + + e.SetValue(protocol.BodyTarget, "languageDescription", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCaptionDescriptionList(vs []*CaptionDescription) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Caption Description for preset // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CaptionDescriptionPreset type CaptionDescriptionPreset struct { @@ -2888,6 +3380,35 @@ func (s *CaptionDescriptionPreset) SetLanguageDescription(v string) *CaptionDesc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CaptionDescriptionPreset) MarshalFields(e protocol.FieldEncoder) error { + if s.DestinationSettings != nil { + v := s.DestinationSettings + + e.SetFields(protocol.BodyTarget, "destinationSettings", v, protocol.Metadata{}) + } + if s.LanguageCode != nil { + v := *s.LanguageCode + + e.SetValue(protocol.BodyTarget, "languageCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LanguageDescription != nil { + v := *s.LanguageDescription + + e.SetValue(protocol.BodyTarget, "languageDescription", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCaptionDescriptionPresetList(vs []*CaptionDescriptionPreset) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Specific settings required by destination type. Note that burnin_destination_settings // are not available if the source of the caption data is Embedded or Teletext. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CaptionDestinationSettings @@ -2961,6 +3482,42 @@ func (s *CaptionDestinationSettings) SetTtmlDestinationSettings(v *TtmlDestinati return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CaptionDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.BurninDestinationSettings != nil { + v := s.BurninDestinationSettings + + e.SetFields(protocol.BodyTarget, "burninDestinationSettings", v, protocol.Metadata{}) + } + if s.DestinationType != nil { + v := *s.DestinationType + + e.SetValue(protocol.BodyTarget, "destinationType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DvbSubDestinationSettings != nil { + v := s.DvbSubDestinationSettings + + e.SetFields(protocol.BodyTarget, "dvbSubDestinationSettings", v, protocol.Metadata{}) + } + if s.SccDestinationSettings != nil { + v := s.SccDestinationSettings + + e.SetFields(protocol.BodyTarget, "sccDestinationSettings", v, protocol.Metadata{}) + } + if s.TeletextDestinationSettings != nil { + v := s.TeletextDestinationSettings + + e.SetFields(protocol.BodyTarget, "teletextDestinationSettings", v, protocol.Metadata{}) + } + if s.TtmlDestinationSettings != nil { + v := s.TtmlDestinationSettings + + e.SetFields(protocol.BodyTarget, "ttmlDestinationSettings", v, protocol.Metadata{}) + } + + return nil +} + // Caption inputs to be mapped to caption outputs. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CaptionSelector type CaptionSelector struct { @@ -3001,16 +3558,40 @@ func (s *CaptionSelector) SetSourceSettings(v *CaptionSourceSettings) *CaptionSe return s } -// Source settings (SourceSettings) contains the group of settings for captions -// in the input. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CaptionSourceSettings -type CaptionSourceSettings struct { - _ struct{} `type:"structure"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CaptionSelector) MarshalFields(e protocol.FieldEncoder) error { + if s.LanguageCode != nil { + v := *s.LanguageCode - // Settings for ancillary captions source. - AncillarySourceSettings *AncillarySourceSettings `locationName:"ancillarySourceSettings" type:"structure"` + e.SetValue(protocol.BodyTarget, "languageCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SourceSettings != nil { + v := s.SourceSettings - // DVB Sub Source Settings + e.SetFields(protocol.BodyTarget, "sourceSettings", v, protocol.Metadata{}) + } + + return nil +} + +func encodeCaptionSelectorMap(vs map[string]*CaptionSelector) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + +// Source settings (SourceSettings) contains the group of settings for captions +// in the input. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CaptionSourceSettings +type CaptionSourceSettings struct { + _ struct{} `type:"structure"` + + // Settings for ancillary captions source. + AncillarySourceSettings *AncillarySourceSettings `locationName:"ancillarySourceSettings" type:"structure"` + + // DVB Sub Source Settings DvbSubSourceSettings *DvbSubSourceSettings `locationName:"dvbSubSourceSettings" type:"structure"` // Settings for embedded captions Source @@ -3073,6 +3654,42 @@ func (s *CaptionSourceSettings) SetTeletextSourceSettings(v *TeletextSourceSetti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CaptionSourceSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AncillarySourceSettings != nil { + v := s.AncillarySourceSettings + + e.SetFields(protocol.BodyTarget, "ancillarySourceSettings", v, protocol.Metadata{}) + } + if s.DvbSubSourceSettings != nil { + v := s.DvbSubSourceSettings + + e.SetFields(protocol.BodyTarget, "dvbSubSourceSettings", v, protocol.Metadata{}) + } + if s.EmbeddedSourceSettings != nil { + v := s.EmbeddedSourceSettings + + e.SetFields(protocol.BodyTarget, "embeddedSourceSettings", v, protocol.Metadata{}) + } + if s.FileSourceSettings != nil { + v := s.FileSourceSettings + + e.SetFields(protocol.BodyTarget, "fileSourceSettings", v, protocol.Metadata{}) + } + if s.SourceType != nil { + v := *s.SourceType + + e.SetValue(protocol.BodyTarget, "sourceType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TeletextSourceSettings != nil { + v := s.TeletextSourceSettings + + e.SetFields(protocol.BodyTarget, "teletextSourceSettings", v, protocol.Metadata{}) + } + + return nil +} + // Channel mapping (ChannelMapping) contains the group of fields that hold the // remixing value for each channel. Units are in dB. Acceptable values are within // the range from -60 (mute) through 6. A setting of 0 passes the input channel @@ -3101,6 +3718,17 @@ func (s *ChannelMapping) SetOutputChannels(v []*OutputChannelMapping) *ChannelMa return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ChannelMapping) MarshalFields(e protocol.FieldEncoder) error { + if len(s.OutputChannels) > 0 { + v := s.OutputChannels + + e.SetList(protocol.BodyTarget, "outputChannels", encodeOutputChannelMappingList(v), protocol.Metadata{}) + } + + return nil +} + // Settings for color correction. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ColorCorrector type ColorCorrector struct { @@ -3178,6 +3806,42 @@ func (s *ColorCorrector) SetSaturation(v int64) *ColorCorrector { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ColorCorrector) MarshalFields(e protocol.FieldEncoder) error { + if s.Brightness != nil { + v := *s.Brightness + + e.SetValue(protocol.BodyTarget, "brightness", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ColorSpaceConversion != nil { + v := *s.ColorSpaceConversion + + e.SetValue(protocol.BodyTarget, "colorSpaceConversion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Contrast != nil { + v := *s.Contrast + + e.SetValue(protocol.BodyTarget, "contrast", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Hdr10Metadata != nil { + v := s.Hdr10Metadata + + e.SetFields(protocol.BodyTarget, "hdr10Metadata", v, protocol.Metadata{}) + } + if s.Hue != nil { + v := *s.Hue + + e.SetValue(protocol.BodyTarget, "hue", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Saturation != nil { + v := *s.Saturation + + e.SetValue(protocol.BodyTarget, "saturation", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Container specific settings. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ContainerSettings type ContainerSettings struct { @@ -3249,6 +3913,42 @@ func (s *ContainerSettings) SetMp4Settings(v *Mp4Settings) *ContainerSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ContainerSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Container != nil { + v := *s.Container + + e.SetValue(protocol.BodyTarget, "container", protocol.StringValue(v), protocol.Metadata{}) + } + if s.F4vSettings != nil { + v := s.F4vSettings + + e.SetFields(protocol.BodyTarget, "f4vSettings", v, protocol.Metadata{}) + } + if s.M2tsSettings != nil { + v := s.M2tsSettings + + e.SetFields(protocol.BodyTarget, "m2tsSettings", v, protocol.Metadata{}) + } + if s.M3u8Settings != nil { + v := s.M3u8Settings + + e.SetFields(protocol.BodyTarget, "m3u8Settings", v, protocol.Metadata{}) + } + if s.MovSettings != nil { + v := s.MovSettings + + e.SetFields(protocol.BodyTarget, "movSettings", v, protocol.Metadata{}) + } + if s.Mp4Settings != nil { + v := s.Mp4Settings + + e.SetFields(protocol.BodyTarget, "mp4Settings", v, protocol.Metadata{}) + } + + return nil +} + // Send your create job request with your job settings and IAM role. Optionally, // include user metadata and the ARN for the queue. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateJobRequest @@ -3325,6 +4025,48 @@ func (s *CreateJobInput) SetUserMetadata(v map[string]*string) *CreateJobInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateJobInput) MarshalFields(e protocol.FieldEncoder) error { + var ClientRequestToken string + if s.ClientRequestToken != nil { + ClientRequestToken = *s.ClientRequestToken + } else { + ClientRequestToken = protocol.GetIdempotencyToken() + } + { + v := ClientRequestToken + + e.SetValue(protocol.BodyTarget, "clientRequestToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobTemplate != nil { + v := *s.JobTemplate + + e.SetValue(protocol.BodyTarget, "jobTemplate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Queue != nil { + v := *s.Queue + + e.SetValue(protocol.BodyTarget, "queue", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Role != nil { + v := *s.Role + + e.SetValue(protocol.BodyTarget, "role", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Settings != nil { + v := s.Settings + + e.SetFields(protocol.BodyTarget, "settings", v, protocol.Metadata{}) + } + if len(s.UserMetadata) > 0 { + v := s.UserMetadata + + e.SetMap(protocol.BodyTarget, "userMetadata", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + // Successful create job requests will return the job JSON. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateJobResponse type CreateJobOutput struct { @@ -3351,6 +4093,17 @@ func (s *CreateJobOutput) SetJob(v *Job) *CreateJobOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateJobOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Job != nil { + v := s.Job + + e.SetFields(protocol.BodyTarget, "job", v, protocol.Metadata{}) + } + + return nil +} + // Send your create job template request with the name of the template and the // JSON for the template. The template JSON should include everything in a valid // job, except for input location and filename, IAM role, and user metadata. @@ -3416,6 +4169,37 @@ func (s *CreateJobTemplateInput) SetSettings(v *JobTemplateSettings) *CreateJobT return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateJobTemplateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Category != nil { + v := *s.Category + + e.SetValue(protocol.BodyTarget, "category", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Queue != nil { + v := *s.Queue + + e.SetValue(protocol.BodyTarget, "queue", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Settings != nil { + v := s.Settings + + e.SetFields(protocol.BodyTarget, "settings", v, protocol.Metadata{}) + } + + return nil +} + // Successful create job template requests will return the template JSON. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateJobTemplateResponse type CreateJobTemplateOutput struct { @@ -3442,6 +4226,17 @@ func (s *CreateJobTemplateOutput) SetJobTemplate(v *JobTemplate) *CreateJobTempl return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateJobTemplateOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.JobTemplate != nil { + v := s.JobTemplate + + e.SetFields(protocol.BodyTarget, "jobTemplate", v, protocol.Metadata{}) + } + + return nil +} + // Send your create preset request with the name of the preset and the JSON // for the output settings specified by the preset. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreatePresetRequest @@ -3495,6 +4290,32 @@ func (s *CreatePresetInput) SetSettings(v *PresetSettings) *CreatePresetInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreatePresetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Category != nil { + v := *s.Category + + e.SetValue(protocol.BodyTarget, "category", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Settings != nil { + v := s.Settings + + e.SetFields(protocol.BodyTarget, "settings", v, protocol.Metadata{}) + } + + return nil +} + // Successful create preset requests will return the preset JSON. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreatePresetResponse type CreatePresetOutput struct { @@ -3521,6 +4342,17 @@ func (s *CreatePresetOutput) SetPreset(v *Preset) *CreatePresetOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreatePresetOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Preset != nil { + v := s.Preset + + e.SetFields(protocol.BodyTarget, "preset", v, protocol.Metadata{}) + } + + return nil +} + // Send your create queue request with the name of the queue. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateQueueRequest type CreateQueueInput struct { @@ -3555,6 +4387,22 @@ func (s *CreateQueueInput) SetName(v string) *CreateQueueInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateQueueInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Successful create queue requests will return the name of the queue you just // created and information about it. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/CreateQueueResponse @@ -3583,6 +4431,17 @@ func (s *CreateQueueOutput) SetQueue(v *Queue) *CreateQueueOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateQueueOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Queue != nil { + v := s.Queue + + e.SetFields(protocol.BodyTarget, "queue", v, protocol.Metadata{}) + } + + return nil +} + // Specifies DRM settings for DASH outputs. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DashIsoEncryptionSettings type DashIsoEncryptionSettings struct { @@ -3608,6 +4467,17 @@ func (s *DashIsoEncryptionSettings) SetSpekeKeyProvider(v *SpekeKeyProvider) *Da return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DashIsoEncryptionSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.SpekeKeyProvider != nil { + v := s.SpekeKeyProvider + + e.SetFields(protocol.BodyTarget, "spekeKeyProvider", v, protocol.Metadata{}) + } + + return nil +} + // Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to // DASH_ISO_GROUP_SETTINGS. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DashIsoGroupSettings @@ -3715,6 +4585,52 @@ func (s *DashIsoGroupSettings) SetSegmentLength(v int64) *DashIsoGroupSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DashIsoGroupSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.BaseUrl != nil { + v := *s.BaseUrl + + e.SetValue(protocol.BodyTarget, "baseUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Destination != nil { + v := *s.Destination + + e.SetValue(protocol.BodyTarget, "destination", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Encryption != nil { + v := s.Encryption + + e.SetFields(protocol.BodyTarget, "encryption", v, protocol.Metadata{}) + } + if s.FragmentLength != nil { + v := *s.FragmentLength + + e.SetValue(protocol.BodyTarget, "fragmentLength", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.HbbtvCompliance != nil { + v := *s.HbbtvCompliance + + e.SetValue(protocol.BodyTarget, "hbbtvCompliance", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MinBufferTime != nil { + v := *s.MinBufferTime + + e.SetValue(protocol.BodyTarget, "minBufferTime", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SegmentControl != nil { + v := *s.SegmentControl + + e.SetValue(protocol.BodyTarget, "segmentControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentLength != nil { + v := *s.SegmentLength + + e.SetValue(protocol.BodyTarget, "segmentLength", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Settings for deinterlacer // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/Deinterlacer type Deinterlacer struct { @@ -3772,6 +4688,27 @@ func (s *Deinterlacer) SetMode(v string) *Deinterlacer { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Deinterlacer) MarshalFields(e protocol.FieldEncoder) error { + if s.Algorithm != nil { + v := *s.Algorithm + + e.SetValue(protocol.BodyTarget, "algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Control != nil { + v := *s.Control + + e.SetValue(protocol.BodyTarget, "control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Mode != nil { + v := *s.Mode + + e.SetValue(protocol.BodyTarget, "mode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Delete a job template by sending a request with the job template name // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeleteJobTemplateRequest type DeleteJobTemplateInput struct { @@ -3812,6 +4749,17 @@ func (s *DeleteJobTemplateInput) SetName(v string) *DeleteJobTemplateInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteJobTemplateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Delete job template requests will return an OK message or error message with // an empty body. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeleteJobTemplateResponse @@ -3829,6 +4777,12 @@ func (s DeleteJobTemplateOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteJobTemplateOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Delete a preset by sending a request with the preset name // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeletePresetRequest type DeletePresetInput struct { @@ -3869,6 +4823,17 @@ func (s *DeletePresetInput) SetName(v string) *DeletePresetInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeletePresetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Delete preset requests will return an OK message or error message with an // empty body. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeletePresetResponse @@ -3886,6 +4851,12 @@ func (s DeletePresetOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeletePresetOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Delete a queue by sending a request with the queue name // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeleteQueueRequest type DeleteQueueInput struct { @@ -3926,6 +4897,17 @@ func (s *DeleteQueueInput) SetName(v string) *DeleteQueueInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteQueueInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Delete queue requests will return an OK message or error message with an // empty body. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DeleteQueueResponse @@ -3943,6 +4925,12 @@ func (s DeleteQueueOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteQueueOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Send an request with an empty body to the regional API endpoint to get your // account API endpoint. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DescribeEndpointsRequest @@ -3980,6 +4968,22 @@ func (s *DescribeEndpointsInput) SetNextToken(v string) *DescribeEndpointsInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeEndpointsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.BodyTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Successful describe endpoints requests will return your account API endpoint. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DescribeEndpointsResponse type DescribeEndpointsOutput struct { @@ -4014,6 +5018,22 @@ func (s *DescribeEndpointsOutput) SetNextToken(v string) *DescribeEndpointsOutpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeEndpointsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Endpoints) > 0 { + v := s.Endpoints + + e.SetList(protocol.BodyTarget, "endpoints", encodeEndpointList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Inserts DVB Network Information Table (NIT) at the specified table repetition // interval. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DvbNitSettings @@ -4060,6 +5080,27 @@ func (s *DvbNitSettings) SetNitInterval(v int64) *DvbNitSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DvbNitSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.NetworkId != nil { + v := *s.NetworkId + + e.SetValue(protocol.BodyTarget, "networkId", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NetworkName != nil { + v := *s.NetworkName + + e.SetValue(protocol.BodyTarget, "networkName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NitInterval != nil { + v := *s.NitInterval + + e.SetValue(protocol.BodyTarget, "nitInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Inserts DVB Service Description Table (NIT) at the specified table repetition // interval. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DvbSdtSettings @@ -4121,6 +5162,32 @@ func (s *DvbSdtSettings) SetServiceProviderName(v string) *DvbSdtSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DvbSdtSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.OutputSdt != nil { + v := *s.OutputSdt + + e.SetValue(protocol.BodyTarget, "outputSdt", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SdtInterval != nil { + v := *s.SdtInterval + + e.SetValue(protocol.BodyTarget, "sdtInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ServiceName != nil { + v := *s.ServiceName + + e.SetValue(protocol.BodyTarget, "serviceName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServiceProviderName != nil { + v := *s.ServiceProviderName + + e.SetValue(protocol.BodyTarget, "serviceProviderName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // DVB-Sub Destination Settings // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DvbSubDestinationSettings type DvbSubDestinationSettings struct { @@ -4325,12 +5392,98 @@ func (s *DvbSubDestinationSettings) SetYPosition(v int64) *DvbSubDestinationSett return s } -// DVB Sub Source Settings -// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DvbSubSourceSettings -type DvbSubSourceSettings struct { - _ struct{} `type:"structure"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DvbSubDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Alignment != nil { + v := *s.Alignment - // When using DVB-Sub with Burn-In or SMPTE-TT, use this PID for the source + e.SetValue(protocol.BodyTarget, "alignment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BackgroundColor != nil { + v := *s.BackgroundColor + + e.SetValue(protocol.BodyTarget, "backgroundColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BackgroundOpacity != nil { + v := *s.BackgroundOpacity + + e.SetValue(protocol.BodyTarget, "backgroundOpacity", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FontColor != nil { + v := *s.FontColor + + e.SetValue(protocol.BodyTarget, "fontColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FontOpacity != nil { + v := *s.FontOpacity + + e.SetValue(protocol.BodyTarget, "fontOpacity", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FontResolution != nil { + v := *s.FontResolution + + e.SetValue(protocol.BodyTarget, "fontResolution", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FontSize != nil { + v := *s.FontSize + + e.SetValue(protocol.BodyTarget, "fontSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.OutlineColor != nil { + v := *s.OutlineColor + + e.SetValue(protocol.BodyTarget, "outlineColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OutlineSize != nil { + v := *s.OutlineSize + + e.SetValue(protocol.BodyTarget, "outlineSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ShadowColor != nil { + v := *s.ShadowColor + + e.SetValue(protocol.BodyTarget, "shadowColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ShadowOpacity != nil { + v := *s.ShadowOpacity + + e.SetValue(protocol.BodyTarget, "shadowOpacity", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ShadowXOffset != nil { + v := *s.ShadowXOffset + + e.SetValue(protocol.BodyTarget, "shadowXOffset", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ShadowYOffset != nil { + v := *s.ShadowYOffset + + e.SetValue(protocol.BodyTarget, "shadowYOffset", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TeletextSpacing != nil { + v := *s.TeletextSpacing + + e.SetValue(protocol.BodyTarget, "teletextSpacing", protocol.StringValue(v), protocol.Metadata{}) + } + if s.XPosition != nil { + v := *s.XPosition + + e.SetValue(protocol.BodyTarget, "xPosition", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.YPosition != nil { + v := *s.YPosition + + e.SetValue(protocol.BodyTarget, "yPosition", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +// DVB Sub Source Settings +// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DvbSubSourceSettings +type DvbSubSourceSettings struct { + _ struct{} `type:"structure"` + + // When using DVB-Sub with Burn-In or SMPTE-TT, use this PID for the source // content. Unused for DVB-Sub passthrough. All DVB-Sub content is passed through, // regardless of selectors. Pid *int64 `locationName:"pid" type:"integer"` @@ -4352,6 +5505,17 @@ func (s *DvbSubSourceSettings) SetPid(v int64) *DvbSubSourceSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DvbSubSourceSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Pid != nil { + v := *s.Pid + + e.SetValue(protocol.BodyTarget, "pid", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Inserts DVB Time and Date Table (TDT) at the specified table repetition interval. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/DvbTdtSettings type DvbTdtSettings struct { @@ -4378,6 +5542,17 @@ func (s *DvbTdtSettings) SetTdtInterval(v int64) *DvbTdtSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DvbTdtSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.TdtInterval != nil { + v := *s.TdtInterval + + e.SetValue(protocol.BodyTarget, "tdtInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to // the value EAC3. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/Eac3Settings @@ -4602,6 +5777,117 @@ func (s *Eac3Settings) SetSurroundMode(v string) *Eac3Settings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Eac3Settings) MarshalFields(e protocol.FieldEncoder) error { + if s.AttenuationControl != nil { + v := *s.AttenuationControl + + e.SetValue(protocol.BodyTarget, "attenuationControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Bitrate != nil { + v := *s.Bitrate + + e.SetValue(protocol.BodyTarget, "bitrate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.BitstreamMode != nil { + v := *s.BitstreamMode + + e.SetValue(protocol.BodyTarget, "bitstreamMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CodingMode != nil { + v := *s.CodingMode + + e.SetValue(protocol.BodyTarget, "codingMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DcFilter != nil { + v := *s.DcFilter + + e.SetValue(protocol.BodyTarget, "dcFilter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Dialnorm != nil { + v := *s.Dialnorm + + e.SetValue(protocol.BodyTarget, "dialnorm", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.DynamicRangeCompressionLine != nil { + v := *s.DynamicRangeCompressionLine + + e.SetValue(protocol.BodyTarget, "dynamicRangeCompressionLine", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DynamicRangeCompressionRf != nil { + v := *s.DynamicRangeCompressionRf + + e.SetValue(protocol.BodyTarget, "dynamicRangeCompressionRf", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LfeControl != nil { + v := *s.LfeControl + + e.SetValue(protocol.BodyTarget, "lfeControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LfeFilter != nil { + v := *s.LfeFilter + + e.SetValue(protocol.BodyTarget, "lfeFilter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LoRoCenterMixLevel != nil { + v := *s.LoRoCenterMixLevel + + e.SetValue(protocol.BodyTarget, "loRoCenterMixLevel", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.LoRoSurroundMixLevel != nil { + v := *s.LoRoSurroundMixLevel + + e.SetValue(protocol.BodyTarget, "loRoSurroundMixLevel", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.LtRtCenterMixLevel != nil { + v := *s.LtRtCenterMixLevel + + e.SetValue(protocol.BodyTarget, "ltRtCenterMixLevel", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.LtRtSurroundMixLevel != nil { + v := *s.LtRtSurroundMixLevel + + e.SetValue(protocol.BodyTarget, "ltRtSurroundMixLevel", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.MetadataControl != nil { + v := *s.MetadataControl + + e.SetValue(protocol.BodyTarget, "metadataControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PassthroughControl != nil { + v := *s.PassthroughControl + + e.SetValue(protocol.BodyTarget, "passthroughControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PhaseControl != nil { + v := *s.PhaseControl + + e.SetValue(protocol.BodyTarget, "phaseControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SampleRate != nil { + v := *s.SampleRate + + e.SetValue(protocol.BodyTarget, "sampleRate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StereoDownmix != nil { + v := *s.StereoDownmix + + e.SetValue(protocol.BodyTarget, "stereoDownmix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SurroundExMode != nil { + v := *s.SurroundExMode + + e.SetValue(protocol.BodyTarget, "surroundExMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SurroundMode != nil { + v := *s.SurroundMode + + e.SetValue(protocol.BodyTarget, "surroundMode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Settings for embedded captions Source // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/EmbeddedSourceSettings type EmbeddedSourceSettings struct { @@ -4649,6 +5935,27 @@ func (s *EmbeddedSourceSettings) SetSource608TrackNumber(v int64) *EmbeddedSourc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EmbeddedSourceSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Convert608To708 != nil { + v := *s.Convert608To708 + + e.SetValue(protocol.BodyTarget, "convert608To708", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Source608ChannelNumber != nil { + v := *s.Source608ChannelNumber + + e.SetValue(protocol.BodyTarget, "source608ChannelNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Source608TrackNumber != nil { + v := *s.Source608TrackNumber + + e.SetValue(protocol.BodyTarget, "source608TrackNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Describes account specific API endpoint // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/Endpoint type Endpoint struct { @@ -4674,6 +5981,25 @@ func (s *Endpoint) SetUrl(v string) *Endpoint { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Endpoint) MarshalFields(e protocol.FieldEncoder) error { + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "url", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeEndpointList(vs []*Endpoint) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Settings for F4v container // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/F4vSettings type F4vSettings struct { @@ -4701,6 +6027,17 @@ func (s *F4vSettings) SetMoovPlacement(v string) *F4vSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *F4vSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.MoovPlacement != nil { + v := *s.MoovPlacement + + e.SetValue(protocol.BodyTarget, "moovPlacement", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to // FILE_GROUP_SETTINGS. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/FileGroupSettings @@ -4731,6 +6068,17 @@ func (s *FileGroupSettings) SetDestination(v string) *FileGroupSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FileGroupSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Destination != nil { + v := *s.Destination + + e.SetValue(protocol.BodyTarget, "destination", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Settings for File-based Captions in Source // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/FileSourceSettings type FileSourceSettings struct { @@ -4779,6 +6127,27 @@ func (s *FileSourceSettings) SetTimeDelta(v int64) *FileSourceSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FileSourceSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Convert608To708 != nil { + v := *s.Convert608To708 + + e.SetValue(protocol.BodyTarget, "convert608To708", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SourceFile != nil { + v := *s.SourceFile + + e.SetValue(protocol.BodyTarget, "sourceFile", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimeDelta != nil { + v := *s.TimeDelta + + e.SetValue(protocol.BodyTarget, "timeDelta", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Required when you set (Codec) under (VideoDescription)>(CodecSettings) to // the value FRAME_CAPTURE. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/FrameCaptureSettings @@ -4842,6 +6211,32 @@ func (s *FrameCaptureSettings) SetQuality(v int64) *FrameCaptureSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FrameCaptureSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.FramerateDenominator != nil { + v := *s.FramerateDenominator + + e.SetValue(protocol.BodyTarget, "framerateDenominator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FramerateNumerator != nil { + v := *s.FramerateNumerator + + e.SetValue(protocol.BodyTarget, "framerateNumerator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MaxCaptures != nil { + v := *s.MaxCaptures + + e.SetValue(protocol.BodyTarget, "maxCaptures", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Quality != nil { + v := *s.Quality + + e.SetValue(protocol.BodyTarget, "quality", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Query a job by sending a request with the job ID. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetJobRequest type GetJobInput struct { @@ -4882,6 +6277,17 @@ func (s *GetJobInput) SetId(v string) *GetJobInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetJobInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Successful get job requests will return an OK message and the job JSON. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetJobResponse type GetJobOutput struct { @@ -4908,6 +6314,17 @@ func (s *GetJobOutput) SetJob(v *Job) *GetJobOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetJobOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Job != nil { + v := s.Job + + e.SetFields(protocol.BodyTarget, "job", v, protocol.Metadata{}) + } + + return nil +} + // Query a job template by sending a request with the job template name. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetJobTemplateRequest type GetJobTemplateInput struct { @@ -4948,6 +6365,17 @@ func (s *GetJobTemplateInput) SetName(v string) *GetJobTemplateInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetJobTemplateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Successful get job template requests will return an OK message and the job // template JSON. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetJobTemplateResponse @@ -4975,6 +6403,17 @@ func (s *GetJobTemplateOutput) SetJobTemplate(v *JobTemplate) *GetJobTemplateOut return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetJobTemplateOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.JobTemplate != nil { + v := s.JobTemplate + + e.SetFields(protocol.BodyTarget, "jobTemplate", v, protocol.Metadata{}) + } + + return nil +} + // Query a preset by sending a request with the preset name. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetPresetRequest type GetPresetInput struct { @@ -5015,6 +6454,17 @@ func (s *GetPresetInput) SetName(v string) *GetPresetInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetPresetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Successful get preset requests will return an OK message and the preset JSON. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetPresetResponse type GetPresetOutput struct { @@ -5041,6 +6491,17 @@ func (s *GetPresetOutput) SetPreset(v *Preset) *GetPresetOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetPresetOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Preset != nil { + v := s.Preset + + e.SetFields(protocol.BodyTarget, "preset", v, protocol.Metadata{}) + } + + return nil +} + // Query a queue by sending a request with the queue name. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetQueueRequest type GetQueueInput struct { @@ -5081,6 +6542,17 @@ func (s *GetQueueInput) SetName(v string) *GetQueueInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetQueueInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Successful get queue requests will return an OK message and the queue JSON. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/GetQueueResponse type GetQueueOutput struct { @@ -5108,6 +6580,17 @@ func (s *GetQueueOutput) SetQueue(v *Queue) *GetQueueOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetQueueOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Queue != nil { + v := s.Queue + + e.SetFields(protocol.BodyTarget, "queue", v, protocol.Metadata{}) + } + + return nil +} + // Required when you set (Codec) under (VideoDescription)>(CodecSettings) to // the value H_264. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/H264Settings @@ -5513,63 +6996,254 @@ func (s *H264Settings) SetUnregisteredSeiTimecode(v string) *H264Settings { return s } -// Settings for H265 codec -// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/H265Settings -type H265Settings struct { - _ struct{} `type:"structure"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *H264Settings) MarshalFields(e protocol.FieldEncoder) error { + if s.AdaptiveQuantization != nil { + v := *s.AdaptiveQuantization - // Adaptive quantization. Allows intra-frame quantizers to vary to improve visual - // quality. - AdaptiveQuantization *string `locationName:"adaptiveQuantization" type:"string" enum:"H265AdaptiveQuantization"` + e.SetValue(protocol.BodyTarget, "adaptiveQuantization", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Bitrate != nil { + v := *s.Bitrate - // Enables Alternate Transfer Function SEI message for outputs using Hybrid - // Log Gamma (HLG) Electro-Optical Transfer Function (EOTF). - AlternateTransferFunctionSei *string `locationName:"alternateTransferFunctionSei" type:"string" enum:"H265AlternateTransferFunctionSei"` + e.SetValue(protocol.BodyTarget, "bitrate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.CodecLevel != nil { + v := *s.CodecLevel - // Average bitrate in bits/second. Required for VBR, CBR, and ABR. Five megabits - // can be entered as 5000000 or 5m. Five hundred kilobits can be entered as - // 500000 or 0.5m. For MS Smooth outputs, bitrates must be unique when rounded - // down to the nearest multiple of 1000. - Bitrate *int64 `locationName:"bitrate" type:"integer"` + e.SetValue(protocol.BodyTarget, "codecLevel", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CodecProfile != nil { + v := *s.CodecProfile - // H.265 Level. - CodecLevel *string `locationName:"codecLevel" type:"string" enum:"H265CodecLevel"` + e.SetValue(protocol.BodyTarget, "codecProfile", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EntropyEncoding != nil { + v := *s.EntropyEncoding - // Represents the Profile and Tier, per the HEVC (H.265) specification. Selections - // are grouped as [Profile] / [Tier], so "Main/High" represents Main Profile - // with High Tier. 4:2:2 profiles are only available with the HEVC 4:2:2 License. - CodecProfile *string `locationName:"codecProfile" type:"string" enum:"H265CodecProfile"` + e.SetValue(protocol.BodyTarget, "entropyEncoding", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FieldEncoding != nil { + v := *s.FieldEncoding - // Adjust quantization within each frame to reduce flicker or 'pop' on I-frames. - FlickerAdaptiveQuantization *string `locationName:"flickerAdaptiveQuantization" type:"string" enum:"H265FlickerAdaptiveQuantization"` + e.SetValue(protocol.BodyTarget, "fieldEncoding", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FlickerAdaptiveQuantization != nil { + v := *s.FlickerAdaptiveQuantization - // Using the API, set FramerateControl to INITIALIZE_FROM_SOURCE if you want - // the service to use the framerate from the input. Using the console, do this - // by choosing INITIALIZE_FROM_SOURCE for Framerate. - FramerateControl *string `locationName:"framerateControl" type:"string" enum:"H265FramerateControl"` + e.SetValue(protocol.BodyTarget, "flickerAdaptiveQuantization", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FramerateControl != nil { + v := *s.FramerateControl - // When set to INTERPOLATE, produces smoother motion during framerate conversion. - FramerateConversionAlgorithm *string `locationName:"framerateConversionAlgorithm" type:"string" enum:"H265FramerateConversionAlgorithm"` + e.SetValue(protocol.BodyTarget, "framerateControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FramerateConversionAlgorithm != nil { + v := *s.FramerateConversionAlgorithm - // Framerate denominator. - FramerateDenominator *int64 `locationName:"framerateDenominator" type:"integer"` + e.SetValue(protocol.BodyTarget, "framerateConversionAlgorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FramerateDenominator != nil { + v := *s.FramerateDenominator - // Framerate numerator - framerate is a fraction, e.g. 24000 / 1001 = 23.976 - // fps. - FramerateNumerator *int64 `locationName:"framerateNumerator" type:"integer"` + e.SetValue(protocol.BodyTarget, "framerateDenominator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FramerateNumerator != nil { + v := *s.FramerateNumerator - // If enable, use reference B frames for GOP structures that have B frames > - // 1. - GopBReference *string `locationName:"gopBReference" type:"string" enum:"H265GopBReference"` + e.SetValue(protocol.BodyTarget, "framerateNumerator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.GopBReference != nil { + v := *s.GopBReference - // Frequency of closed GOPs. In streaming applications, it is recommended that - // this be set to 1 so a decoder joining mid-stream will receive an IDR frame - // as quickly as possible. Setting this value to 0 will break output segmenting. - GopClosedCadence *int64 `locationName:"gopClosedCadence" type:"integer"` + e.SetValue(protocol.BodyTarget, "gopBReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GopClosedCadence != nil { + v := *s.GopClosedCadence - // GOP Length (keyframe interval) in frames or seconds. Must be greater than - // zero. - GopSize *float64 `locationName:"gopSize" type:"double"` + e.SetValue(protocol.BodyTarget, "gopClosedCadence", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.GopSize != nil { + v := *s.GopSize + + e.SetValue(protocol.BodyTarget, "gopSize", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.GopSizeUnits != nil { + v := *s.GopSizeUnits + + e.SetValue(protocol.BodyTarget, "gopSizeUnits", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HrdBufferInitialFillPercentage != nil { + v := *s.HrdBufferInitialFillPercentage + + e.SetValue(protocol.BodyTarget, "hrdBufferInitialFillPercentage", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.HrdBufferSize != nil { + v := *s.HrdBufferSize + + e.SetValue(protocol.BodyTarget, "hrdBufferSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.InterlaceMode != nil { + v := *s.InterlaceMode + + e.SetValue(protocol.BodyTarget, "interlaceMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxBitrate != nil { + v := *s.MaxBitrate + + e.SetValue(protocol.BodyTarget, "maxBitrate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MinIInterval != nil { + v := *s.MinIInterval + + e.SetValue(protocol.BodyTarget, "minIInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NumberBFramesBetweenReferenceFrames != nil { + v := *s.NumberBFramesBetweenReferenceFrames + + e.SetValue(protocol.BodyTarget, "numberBFramesBetweenReferenceFrames", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NumberReferenceFrames != nil { + v := *s.NumberReferenceFrames + + e.SetValue(protocol.BodyTarget, "numberReferenceFrames", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ParControl != nil { + v := *s.ParControl + + e.SetValue(protocol.BodyTarget, "parControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParDenominator != nil { + v := *s.ParDenominator + + e.SetValue(protocol.BodyTarget, "parDenominator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ParNumerator != nil { + v := *s.ParNumerator + + e.SetValue(protocol.BodyTarget, "parNumerator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.QualityTuningLevel != nil { + v := *s.QualityTuningLevel + + e.SetValue(protocol.BodyTarget, "qualityTuningLevel", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RateControlMode != nil { + v := *s.RateControlMode + + e.SetValue(protocol.BodyTarget, "rateControlMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RepeatPps != nil { + v := *s.RepeatPps + + e.SetValue(protocol.BodyTarget, "repeatPps", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SceneChangeDetect != nil { + v := *s.SceneChangeDetect + + e.SetValue(protocol.BodyTarget, "sceneChangeDetect", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Slices != nil { + v := *s.Slices + + e.SetValue(protocol.BodyTarget, "slices", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SlowPal != nil { + v := *s.SlowPal + + e.SetValue(protocol.BodyTarget, "slowPal", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Softness != nil { + v := *s.Softness + + e.SetValue(protocol.BodyTarget, "softness", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SpatialAdaptiveQuantization != nil { + v := *s.SpatialAdaptiveQuantization + + e.SetValue(protocol.BodyTarget, "spatialAdaptiveQuantization", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Syntax != nil { + v := *s.Syntax + + e.SetValue(protocol.BodyTarget, "syntax", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Telecine != nil { + v := *s.Telecine + + e.SetValue(protocol.BodyTarget, "telecine", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TemporalAdaptiveQuantization != nil { + v := *s.TemporalAdaptiveQuantization + + e.SetValue(protocol.BodyTarget, "temporalAdaptiveQuantization", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UnregisteredSeiTimecode != nil { + v := *s.UnregisteredSeiTimecode + + e.SetValue(protocol.BodyTarget, "unregisteredSeiTimecode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +// Settings for H265 codec +// Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/H265Settings +type H265Settings struct { + _ struct{} `type:"structure"` + + // Adaptive quantization. Allows intra-frame quantizers to vary to improve visual + // quality. + AdaptiveQuantization *string `locationName:"adaptiveQuantization" type:"string" enum:"H265AdaptiveQuantization"` + + // Enables Alternate Transfer Function SEI message for outputs using Hybrid + // Log Gamma (HLG) Electro-Optical Transfer Function (EOTF). + AlternateTransferFunctionSei *string `locationName:"alternateTransferFunctionSei" type:"string" enum:"H265AlternateTransferFunctionSei"` + + // Average bitrate in bits/second. Required for VBR, CBR, and ABR. Five megabits + // can be entered as 5000000 or 5m. Five hundred kilobits can be entered as + // 500000 or 0.5m. For MS Smooth outputs, bitrates must be unique when rounded + // down to the nearest multiple of 1000. + Bitrate *int64 `locationName:"bitrate" type:"integer"` + + // H.265 Level. + CodecLevel *string `locationName:"codecLevel" type:"string" enum:"H265CodecLevel"` + + // Represents the Profile and Tier, per the HEVC (H.265) specification. Selections + // are grouped as [Profile] / [Tier], so "Main/High" represents Main Profile + // with High Tier. 4:2:2 profiles are only available with the HEVC 4:2:2 License. + CodecProfile *string `locationName:"codecProfile" type:"string" enum:"H265CodecProfile"` + + // Adjust quantization within each frame to reduce flicker or 'pop' on I-frames. + FlickerAdaptiveQuantization *string `locationName:"flickerAdaptiveQuantization" type:"string" enum:"H265FlickerAdaptiveQuantization"` + + // Using the API, set FramerateControl to INITIALIZE_FROM_SOURCE if you want + // the service to use the framerate from the input. Using the console, do this + // by choosing INITIALIZE_FROM_SOURCE for Framerate. + FramerateControl *string `locationName:"framerateControl" type:"string" enum:"H265FramerateControl"` + + // When set to INTERPOLATE, produces smoother motion during framerate conversion. + FramerateConversionAlgorithm *string `locationName:"framerateConversionAlgorithm" type:"string" enum:"H265FramerateConversionAlgorithm"` + + // Framerate denominator. + FramerateDenominator *int64 `locationName:"framerateDenominator" type:"integer"` + + // Framerate numerator - framerate is a fraction, e.g. 24000 / 1001 = 23.976 + // fps. + FramerateNumerator *int64 `locationName:"framerateNumerator" type:"integer"` + + // If enable, use reference B frames for GOP structures that have B frames > + // 1. + GopBReference *string `locationName:"gopBReference" type:"string" enum:"H265GopBReference"` + + // Frequency of closed GOPs. In streaming applications, it is recommended that + // this be set to 1 so a decoder joining mid-stream will receive an IDR frame + // as quickly as possible. Setting this value to 0 will break output segmenting. + GopClosedCadence *int64 `locationName:"gopClosedCadence" type:"integer"` + + // GOP Length (keyframe interval) in frames or seconds. Must be greater than + // zero. + GopSize *float64 `locationName:"gopSize" type:"double"` // Indicates if the GOP Size in H265 is specified in frames or seconds. If seconds // the system will convert the GOP Size into a frame count at run time. @@ -5913,6 +7587,192 @@ func (s *H265Settings) SetUnregisteredSeiTimecode(v string) *H265Settings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *H265Settings) MarshalFields(e protocol.FieldEncoder) error { + if s.AdaptiveQuantization != nil { + v := *s.AdaptiveQuantization + + e.SetValue(protocol.BodyTarget, "adaptiveQuantization", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AlternateTransferFunctionSei != nil { + v := *s.AlternateTransferFunctionSei + + e.SetValue(protocol.BodyTarget, "alternateTransferFunctionSei", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Bitrate != nil { + v := *s.Bitrate + + e.SetValue(protocol.BodyTarget, "bitrate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.CodecLevel != nil { + v := *s.CodecLevel + + e.SetValue(protocol.BodyTarget, "codecLevel", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CodecProfile != nil { + v := *s.CodecProfile + + e.SetValue(protocol.BodyTarget, "codecProfile", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FlickerAdaptiveQuantization != nil { + v := *s.FlickerAdaptiveQuantization + + e.SetValue(protocol.BodyTarget, "flickerAdaptiveQuantization", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FramerateControl != nil { + v := *s.FramerateControl + + e.SetValue(protocol.BodyTarget, "framerateControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FramerateConversionAlgorithm != nil { + v := *s.FramerateConversionAlgorithm + + e.SetValue(protocol.BodyTarget, "framerateConversionAlgorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FramerateDenominator != nil { + v := *s.FramerateDenominator + + e.SetValue(protocol.BodyTarget, "framerateDenominator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FramerateNumerator != nil { + v := *s.FramerateNumerator + + e.SetValue(protocol.BodyTarget, "framerateNumerator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.GopBReference != nil { + v := *s.GopBReference + + e.SetValue(protocol.BodyTarget, "gopBReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GopClosedCadence != nil { + v := *s.GopClosedCadence + + e.SetValue(protocol.BodyTarget, "gopClosedCadence", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.GopSize != nil { + v := *s.GopSize + + e.SetValue(protocol.BodyTarget, "gopSize", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.GopSizeUnits != nil { + v := *s.GopSizeUnits + + e.SetValue(protocol.BodyTarget, "gopSizeUnits", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HrdBufferInitialFillPercentage != nil { + v := *s.HrdBufferInitialFillPercentage + + e.SetValue(protocol.BodyTarget, "hrdBufferInitialFillPercentage", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.HrdBufferSize != nil { + v := *s.HrdBufferSize + + e.SetValue(protocol.BodyTarget, "hrdBufferSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.InterlaceMode != nil { + v := *s.InterlaceMode + + e.SetValue(protocol.BodyTarget, "interlaceMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxBitrate != nil { + v := *s.MaxBitrate + + e.SetValue(protocol.BodyTarget, "maxBitrate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MinIInterval != nil { + v := *s.MinIInterval + + e.SetValue(protocol.BodyTarget, "minIInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NumberBFramesBetweenReferenceFrames != nil { + v := *s.NumberBFramesBetweenReferenceFrames + + e.SetValue(protocol.BodyTarget, "numberBFramesBetweenReferenceFrames", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NumberReferenceFrames != nil { + v := *s.NumberReferenceFrames + + e.SetValue(protocol.BodyTarget, "numberReferenceFrames", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ParControl != nil { + v := *s.ParControl + + e.SetValue(protocol.BodyTarget, "parControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParDenominator != nil { + v := *s.ParDenominator + + e.SetValue(protocol.BodyTarget, "parDenominator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ParNumerator != nil { + v := *s.ParNumerator + + e.SetValue(protocol.BodyTarget, "parNumerator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.QualityTuningLevel != nil { + v := *s.QualityTuningLevel + + e.SetValue(protocol.BodyTarget, "qualityTuningLevel", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RateControlMode != nil { + v := *s.RateControlMode + + e.SetValue(protocol.BodyTarget, "rateControlMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SampleAdaptiveOffsetFilterMode != nil { + v := *s.SampleAdaptiveOffsetFilterMode + + e.SetValue(protocol.BodyTarget, "sampleAdaptiveOffsetFilterMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SceneChangeDetect != nil { + v := *s.SceneChangeDetect + + e.SetValue(protocol.BodyTarget, "sceneChangeDetect", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Slices != nil { + v := *s.Slices + + e.SetValue(protocol.BodyTarget, "slices", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SlowPal != nil { + v := *s.SlowPal + + e.SetValue(protocol.BodyTarget, "slowPal", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SpatialAdaptiveQuantization != nil { + v := *s.SpatialAdaptiveQuantization + + e.SetValue(protocol.BodyTarget, "spatialAdaptiveQuantization", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Telecine != nil { + v := *s.Telecine + + e.SetValue(protocol.BodyTarget, "telecine", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TemporalAdaptiveQuantization != nil { + v := *s.TemporalAdaptiveQuantization + + e.SetValue(protocol.BodyTarget, "temporalAdaptiveQuantization", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TemporalIds != nil { + v := *s.TemporalIds + + e.SetValue(protocol.BodyTarget, "temporalIds", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Tiles != nil { + v := *s.Tiles + + e.SetValue(protocol.BodyTarget, "tiles", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UnregisteredSeiTimecode != nil { + v := *s.UnregisteredSeiTimecode + + e.SetValue(protocol.BodyTarget, "unregisteredSeiTimecode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Use the HDR master display (Hdr10Metadata) settings to provide values for // HDR color. These values vary depending on the input video and must be provided // by a color grader. Range is 0 to 50,000, each increment represents 0.00002 @@ -6060,6 +7920,72 @@ func (s *Hdr10Metadata) SetWhitePointY(v int64) *Hdr10Metadata { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Hdr10Metadata) MarshalFields(e protocol.FieldEncoder) error { + if s.BluePrimaryX != nil { + v := *s.BluePrimaryX + + e.SetValue(protocol.BodyTarget, "bluePrimaryX", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.BluePrimaryY != nil { + v := *s.BluePrimaryY + + e.SetValue(protocol.BodyTarget, "bluePrimaryY", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.GreenPrimaryX != nil { + v := *s.GreenPrimaryX + + e.SetValue(protocol.BodyTarget, "greenPrimaryX", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.GreenPrimaryY != nil { + v := *s.GreenPrimaryY + + e.SetValue(protocol.BodyTarget, "greenPrimaryY", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MaxContentLightLevel != nil { + v := *s.MaxContentLightLevel + + e.SetValue(protocol.BodyTarget, "maxContentLightLevel", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MaxFrameAverageLightLevel != nil { + v := *s.MaxFrameAverageLightLevel + + e.SetValue(protocol.BodyTarget, "maxFrameAverageLightLevel", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MaxLuminance != nil { + v := *s.MaxLuminance + + e.SetValue(protocol.BodyTarget, "maxLuminance", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MinLuminance != nil { + v := *s.MinLuminance + + e.SetValue(protocol.BodyTarget, "minLuminance", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RedPrimaryX != nil { + v := *s.RedPrimaryX + + e.SetValue(protocol.BodyTarget, "redPrimaryX", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RedPrimaryY != nil { + v := *s.RedPrimaryY + + e.SetValue(protocol.BodyTarget, "redPrimaryY", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.WhitePointX != nil { + v := *s.WhitePointX + + e.SetValue(protocol.BodyTarget, "whitePointX", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.WhitePointY != nil { + v := *s.WhitePointY + + e.SetValue(protocol.BodyTarget, "whitePointY", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Caption Language Mapping // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/HlsCaptionLanguageMapping type HlsCaptionLanguageMapping struct { @@ -6104,6 +8030,35 @@ func (s *HlsCaptionLanguageMapping) SetLanguageDescription(v string) *HlsCaption return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsCaptionLanguageMapping) MarshalFields(e protocol.FieldEncoder) error { + if s.CaptionChannel != nil { + v := *s.CaptionChannel + + e.SetValue(protocol.BodyTarget, "captionChannel", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.LanguageCode != nil { + v := *s.LanguageCode + + e.SetValue(protocol.BodyTarget, "languageCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LanguageDescription != nil { + v := *s.LanguageDescription + + e.SetValue(protocol.BodyTarget, "languageDescription", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeHlsCaptionLanguageMappingList(vs []*HlsCaptionLanguageMapping) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Settings for HLS encryption // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/HlsEncryptionSettings type HlsEncryptionSettings struct { @@ -6179,6 +8134,42 @@ func (s *HlsEncryptionSettings) SetType(v string) *HlsEncryptionSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsEncryptionSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.ConstantInitializationVector != nil { + v := *s.ConstantInitializationVector + + e.SetValue(protocol.BodyTarget, "constantInitializationVector", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EncryptionMethod != nil { + v := *s.EncryptionMethod + + e.SetValue(protocol.BodyTarget, "encryptionMethod", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InitializationVectorInManifest != nil { + v := *s.InitializationVectorInManifest + + e.SetValue(protocol.BodyTarget, "initializationVectorInManifest", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SpekeKeyProvider != nil { + v := s.SpekeKeyProvider + + e.SetFields(protocol.BodyTarget, "spekeKeyProvider", v, protocol.Metadata{}) + } + if s.StaticKeyProvider != nil { + v := s.StaticKeyProvider + + e.SetFields(protocol.BodyTarget, "staticKeyProvider", v, protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to // HLS_GROUP_SETTINGS. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/HlsGroupSettings @@ -6423,6 +8414,122 @@ func (s *HlsGroupSettings) SetTimestampDeltaMilliseconds(v int64) *HlsGroupSetti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsGroupSettings) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AdMarkers) > 0 { + v := s.AdMarkers + + e.SetList(protocol.BodyTarget, "adMarkers", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.BaseUrl != nil { + v := *s.BaseUrl + + e.SetValue(protocol.BodyTarget, "baseUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.CaptionLanguageMappings) > 0 { + v := s.CaptionLanguageMappings + + e.SetList(protocol.BodyTarget, "captionLanguageMappings", encodeHlsCaptionLanguageMappingList(v), protocol.Metadata{}) + } + if s.CaptionLanguageSetting != nil { + v := *s.CaptionLanguageSetting + + e.SetValue(protocol.BodyTarget, "captionLanguageSetting", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ClientCache != nil { + v := *s.ClientCache + + e.SetValue(protocol.BodyTarget, "clientCache", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CodecSpecification != nil { + v := *s.CodecSpecification + + e.SetValue(protocol.BodyTarget, "codecSpecification", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Destination != nil { + v := *s.Destination + + e.SetValue(protocol.BodyTarget, "destination", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DirectoryStructure != nil { + v := *s.DirectoryStructure + + e.SetValue(protocol.BodyTarget, "directoryStructure", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Encryption != nil { + v := s.Encryption + + e.SetFields(protocol.BodyTarget, "encryption", v, protocol.Metadata{}) + } + if s.ManifestCompression != nil { + v := *s.ManifestCompression + + e.SetValue(protocol.BodyTarget, "manifestCompression", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ManifestDurationFormat != nil { + v := *s.ManifestDurationFormat + + e.SetValue(protocol.BodyTarget, "manifestDurationFormat", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MinSegmentLength != nil { + v := *s.MinSegmentLength + + e.SetValue(protocol.BodyTarget, "minSegmentLength", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.OutputSelection != nil { + v := *s.OutputSelection + + e.SetValue(protocol.BodyTarget, "outputSelection", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ProgramDateTime != nil { + v := *s.ProgramDateTime + + e.SetValue(protocol.BodyTarget, "programDateTime", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ProgramDateTimePeriod != nil { + v := *s.ProgramDateTimePeriod + + e.SetValue(protocol.BodyTarget, "programDateTimePeriod", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SegmentControl != nil { + v := *s.SegmentControl + + e.SetValue(protocol.BodyTarget, "segmentControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentLength != nil { + v := *s.SegmentLength + + e.SetValue(protocol.BodyTarget, "segmentLength", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SegmentsPerSubdirectory != nil { + v := *s.SegmentsPerSubdirectory + + e.SetValue(protocol.BodyTarget, "segmentsPerSubdirectory", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StreamInfResolution != nil { + v := *s.StreamInfResolution + + e.SetValue(protocol.BodyTarget, "streamInfResolution", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimedMetadataId3Frame != nil { + v := *s.TimedMetadataId3Frame + + e.SetValue(protocol.BodyTarget, "timedMetadataId3Frame", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimedMetadataId3Period != nil { + v := *s.TimedMetadataId3Period + + e.SetValue(protocol.BodyTarget, "timedMetadataId3Period", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TimestampDeltaMilliseconds != nil { + v := *s.TimestampDeltaMilliseconds + + e.SetValue(protocol.BodyTarget, "timestampDeltaMilliseconds", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Settings for HLS output groups // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/HlsSettings type HlsSettings struct { @@ -6496,6 +8603,37 @@ func (s *HlsSettings) SetSegmentModifier(v string) *HlsSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AudioGroupId != nil { + v := *s.AudioGroupId + + e.SetValue(protocol.BodyTarget, "audioGroupId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AudioRenditionSets != nil { + v := *s.AudioRenditionSets + + e.SetValue(protocol.BodyTarget, "audioRenditionSets", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AudioTrackType != nil { + v := *s.AudioTrackType + + e.SetValue(protocol.BodyTarget, "audioTrackType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IFrameOnlyManifest != nil { + v := *s.IFrameOnlyManifest + + e.SetValue(protocol.BodyTarget, "iFrameOnlyManifest", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentModifier != nil { + v := *s.SegmentModifier + + e.SetValue(protocol.BodyTarget, "segmentModifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // To insert ID3 tags in your output, specify two values. Use ID3 tag (Id3) // to specify the base 64 encoded string and use Timecode (TimeCode) to specify // the time when the tag should be inserted. To insert multiple ID3 tags in @@ -6533,6 +8671,30 @@ func (s *Id3Insertion) SetTimecode(v string) *Id3Insertion { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Id3Insertion) MarshalFields(e protocol.FieldEncoder) error { + if s.Id3 != nil { + v := *s.Id3 + + e.SetValue(protocol.BodyTarget, "id3", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Timecode != nil { + v := *s.Timecode + + e.SetValue(protocol.BodyTarget, "timecode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeId3InsertionList(vs []*Id3Insertion) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Enable the Image inserter (ImageInserter) feature to include a graphic overlay // on your video. Enable or disable this feature for each output individually. // This setting is disabled by default. @@ -6561,6 +8723,17 @@ func (s *ImageInserter) SetInsertableImages(v []*InsertableImage) *ImageInserter return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ImageInserter) MarshalFields(e protocol.FieldEncoder) error { + if len(s.InsertableImages) > 0 { + v := s.InsertableImages + + e.SetList(protocol.BodyTarget, "insertableImages", encodeInsertableImageList(v), protocol.Metadata{}) + } + + return nil +} + // Specifies media input // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/Input type Input struct { @@ -6705,28 +8878,107 @@ func (s *Input) SetInputClippings(v []*InputClipping) *Input { return s } -// SetProgramNumber sets the ProgramNumber field's value. -func (s *Input) SetProgramNumber(v int64) *Input { - s.ProgramNumber = &v - return s -} +// SetProgramNumber sets the ProgramNumber field's value. +func (s *Input) SetProgramNumber(v int64) *Input { + s.ProgramNumber = &v + return s +} + +// SetPsiControl sets the PsiControl field's value. +func (s *Input) SetPsiControl(v string) *Input { + s.PsiControl = &v + return s +} + +// SetTimecodeSource sets the TimecodeSource field's value. +func (s *Input) SetTimecodeSource(v string) *Input { + s.TimecodeSource = &v + return s +} + +// SetVideoSelector sets the VideoSelector field's value. +func (s *Input) SetVideoSelector(v *VideoSelector) *Input { + s.VideoSelector = v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Input) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AudioSelectorGroups) > 0 { + v := s.AudioSelectorGroups + + e.SetMap(protocol.BodyTarget, "audioSelectorGroups", encodeAudioSelectorGroupMap(v), protocol.Metadata{}) + } + if len(s.AudioSelectors) > 0 { + v := s.AudioSelectors + + e.SetMap(protocol.BodyTarget, "audioSelectors", encodeAudioSelectorMap(v), protocol.Metadata{}) + } + if len(s.CaptionSelectors) > 0 { + v := s.CaptionSelectors + + e.SetMap(protocol.BodyTarget, "captionSelectors", encodeCaptionSelectorMap(v), protocol.Metadata{}) + } + if s.DeblockFilter != nil { + v := *s.DeblockFilter + + e.SetValue(protocol.BodyTarget, "deblockFilter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DenoiseFilter != nil { + v := *s.DenoiseFilter + + e.SetValue(protocol.BodyTarget, "denoiseFilter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FileInput != nil { + v := *s.FileInput + + e.SetValue(protocol.BodyTarget, "fileInput", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FilterEnable != nil { + v := *s.FilterEnable + + e.SetValue(protocol.BodyTarget, "filterEnable", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FilterStrength != nil { + v := *s.FilterStrength + + e.SetValue(protocol.BodyTarget, "filterStrength", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.InputClippings) > 0 { + v := s.InputClippings + + e.SetList(protocol.BodyTarget, "inputClippings", encodeInputClippingList(v), protocol.Metadata{}) + } + if s.ProgramNumber != nil { + v := *s.ProgramNumber + + e.SetValue(protocol.BodyTarget, "programNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PsiControl != nil { + v := *s.PsiControl -// SetPsiControl sets the PsiControl field's value. -func (s *Input) SetPsiControl(v string) *Input { - s.PsiControl = &v - return s -} + e.SetValue(protocol.BodyTarget, "psiControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimecodeSource != nil { + v := *s.TimecodeSource -// SetTimecodeSource sets the TimecodeSource field's value. -func (s *Input) SetTimecodeSource(v string) *Input { - s.TimecodeSource = &v - return s + e.SetValue(protocol.BodyTarget, "timecodeSource", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VideoSelector != nil { + v := s.VideoSelector + + e.SetFields(protocol.BodyTarget, "videoSelector", v, protocol.Metadata{}) + } + + return nil } -// SetVideoSelector sets the VideoSelector field's value. -func (s *Input) SetVideoSelector(v *VideoSelector) *Input { - s.VideoSelector = v - return s +func encodeInputList(vs []*Input) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } } // Include one instance of (InputClipping) for each input clip. @@ -6774,6 +9026,30 @@ func (s *InputClipping) SetStartTimecode(v string) *InputClipping { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputClipping) MarshalFields(e protocol.FieldEncoder) error { + if s.EndTimecode != nil { + v := *s.EndTimecode + + e.SetValue(protocol.BodyTarget, "endTimecode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartTimecode != nil { + v := *s.StartTimecode + + e.SetValue(protocol.BodyTarget, "startTimecode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeInputClippingList(vs []*InputClipping) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Specified video input in a template. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/InputTemplate type InputTemplate struct { @@ -6931,6 +9207,80 @@ func (s *InputTemplate) SetVideoSelector(v *VideoSelector) *InputTemplate { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputTemplate) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AudioSelectorGroups) > 0 { + v := s.AudioSelectorGroups + + e.SetMap(protocol.BodyTarget, "audioSelectorGroups", encodeAudioSelectorGroupMap(v), protocol.Metadata{}) + } + if len(s.AudioSelectors) > 0 { + v := s.AudioSelectors + + e.SetMap(protocol.BodyTarget, "audioSelectors", encodeAudioSelectorMap(v), protocol.Metadata{}) + } + if len(s.CaptionSelectors) > 0 { + v := s.CaptionSelectors + + e.SetMap(protocol.BodyTarget, "captionSelectors", encodeCaptionSelectorMap(v), protocol.Metadata{}) + } + if s.DeblockFilter != nil { + v := *s.DeblockFilter + + e.SetValue(protocol.BodyTarget, "deblockFilter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DenoiseFilter != nil { + v := *s.DenoiseFilter + + e.SetValue(protocol.BodyTarget, "denoiseFilter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FilterEnable != nil { + v := *s.FilterEnable + + e.SetValue(protocol.BodyTarget, "filterEnable", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FilterStrength != nil { + v := *s.FilterStrength + + e.SetValue(protocol.BodyTarget, "filterStrength", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.InputClippings) > 0 { + v := s.InputClippings + + e.SetList(protocol.BodyTarget, "inputClippings", encodeInputClippingList(v), protocol.Metadata{}) + } + if s.ProgramNumber != nil { + v := *s.ProgramNumber + + e.SetValue(protocol.BodyTarget, "programNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PsiControl != nil { + v := *s.PsiControl + + e.SetValue(protocol.BodyTarget, "psiControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimecodeSource != nil { + v := *s.TimecodeSource + + e.SetValue(protocol.BodyTarget, "timecodeSource", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VideoSelector != nil { + v := s.VideoSelector + + e.SetFields(protocol.BodyTarget, "videoSelector", v, protocol.Metadata{}) + } + + return nil +} + +func encodeInputTemplateList(vs []*InputTemplate) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Settings for Insertable Image // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/InsertableImage type InsertableImage struct { @@ -7064,6 +9414,75 @@ func (s *InsertableImage) SetWidth(v int64) *InsertableImage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InsertableImage) MarshalFields(e protocol.FieldEncoder) error { + if s.Duration != nil { + v := *s.Duration + + e.SetValue(protocol.BodyTarget, "duration", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FadeIn != nil { + v := *s.FadeIn + + e.SetValue(protocol.BodyTarget, "fadeIn", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FadeOut != nil { + v := *s.FadeOut + + e.SetValue(protocol.BodyTarget, "fadeOut", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Height != nil { + v := *s.Height + + e.SetValue(protocol.BodyTarget, "height", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ImageInserterInput != nil { + v := *s.ImageInserterInput + + e.SetValue(protocol.BodyTarget, "imageInserterInput", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ImageX != nil { + v := *s.ImageX + + e.SetValue(protocol.BodyTarget, "imageX", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ImageY != nil { + v := *s.ImageY + + e.SetValue(protocol.BodyTarget, "imageY", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Layer != nil { + v := *s.Layer + + e.SetValue(protocol.BodyTarget, "layer", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Opacity != nil { + v := *s.Opacity + + e.SetValue(protocol.BodyTarget, "opacity", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StartTime != nil { + v := *s.StartTime + + e.SetValue(protocol.BodyTarget, "startTime", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Width != nil { + v := *s.Width + + e.SetValue(protocol.BodyTarget, "width", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeInsertableImageList(vs []*InsertableImage) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Each job converts an input file into an output file or files. For more information, // see the User Guide at http://docs.aws.amazon.com/mediaconvert/latest/ug/what-is.html // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/Job @@ -7205,6 +9624,85 @@ func (s *Job) SetUserMetadata(v map[string]*string) *Job { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Job) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedAt != nil { + v := *s.CreatedAt + + e.SetValue(protocol.BodyTarget, "createdAt", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.ErrorCode != nil { + v := *s.ErrorCode + + e.SetValue(protocol.BodyTarget, "errorCode", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ErrorMessage != nil { + v := *s.ErrorMessage + + e.SetValue(protocol.BodyTarget, "errorMessage", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobTemplate != nil { + v := *s.JobTemplate + + e.SetValue(protocol.BodyTarget, "jobTemplate", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.OutputGroupDetails) > 0 { + v := s.OutputGroupDetails + + e.SetList(protocol.BodyTarget, "outputGroupDetails", encodeOutputGroupDetailList(v), protocol.Metadata{}) + } + if s.Queue != nil { + v := *s.Queue + + e.SetValue(protocol.BodyTarget, "queue", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Role != nil { + v := *s.Role + + e.SetValue(protocol.BodyTarget, "role", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Settings != nil { + v := s.Settings + + e.SetFields(protocol.BodyTarget, "settings", v, protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Timing != nil { + v := s.Timing + + e.SetFields(protocol.BodyTarget, "timing", v, protocol.Metadata{}) + } + if len(s.UserMetadata) > 0 { + v := s.UserMetadata + + e.SetMap(protocol.BodyTarget, "userMetadata", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + +func encodeJobList(vs []*Job) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // JobSettings contains all the transcode settings for a job. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/JobSettings type JobSettings struct { @@ -7299,6 +9797,47 @@ func (s *JobSettings) SetTimedMetadataInsertion(v *TimedMetadataInsertion) *JobS return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *JobSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AdAvailOffset != nil { + v := *s.AdAvailOffset + + e.SetValue(protocol.BodyTarget, "adAvailOffset", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.AvailBlanking != nil { + v := s.AvailBlanking + + e.SetFields(protocol.BodyTarget, "availBlanking", v, protocol.Metadata{}) + } + if len(s.Inputs) > 0 { + v := s.Inputs + + e.SetList(protocol.BodyTarget, "inputs", encodeInputList(v), protocol.Metadata{}) + } + if s.NielsenConfiguration != nil { + v := s.NielsenConfiguration + + e.SetFields(protocol.BodyTarget, "nielsenConfiguration", v, protocol.Metadata{}) + } + if len(s.OutputGroups) > 0 { + v := s.OutputGroups + + e.SetList(protocol.BodyTarget, "outputGroups", encodeOutputGroupList(v), protocol.Metadata{}) + } + if s.TimecodeConfig != nil { + v := s.TimecodeConfig + + e.SetFields(protocol.BodyTarget, "timecodeConfig", v, protocol.Metadata{}) + } + if s.TimedMetadataInsertion != nil { + v := s.TimedMetadataInsertion + + e.SetFields(protocol.BodyTarget, "timedMetadataInsertion", v, protocol.Metadata{}) + } + + return nil +} + // A job template is a pre-made set of encoding instructions that you can use // to quickly create a job. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/JobTemplate @@ -7401,6 +9940,65 @@ func (s *JobTemplate) SetType(v string) *JobTemplate { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *JobTemplate) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Category != nil { + v := *s.Category + + e.SetValue(protocol.BodyTarget, "category", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedAt != nil { + v := *s.CreatedAt + + e.SetValue(protocol.BodyTarget, "createdAt", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdated != nil { + v := *s.LastUpdated + + e.SetValue(protocol.BodyTarget, "lastUpdated", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Queue != nil { + v := *s.Queue + + e.SetValue(protocol.BodyTarget, "queue", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Settings != nil { + v := s.Settings + + e.SetFields(protocol.BodyTarget, "settings", v, protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeJobTemplateList(vs []*JobTemplate) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // JobTemplateSettings contains all the transcode settings saved in the template // that will be applied to jobs created from it. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/JobTemplateSettings @@ -7496,6 +10094,47 @@ func (s *JobTemplateSettings) SetTimedMetadataInsertion(v *TimedMetadataInsertio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *JobTemplateSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AdAvailOffset != nil { + v := *s.AdAvailOffset + + e.SetValue(protocol.BodyTarget, "adAvailOffset", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.AvailBlanking != nil { + v := s.AvailBlanking + + e.SetFields(protocol.BodyTarget, "availBlanking", v, protocol.Metadata{}) + } + if len(s.Inputs) > 0 { + v := s.Inputs + + e.SetList(protocol.BodyTarget, "inputs", encodeInputTemplateList(v), protocol.Metadata{}) + } + if s.NielsenConfiguration != nil { + v := s.NielsenConfiguration + + e.SetFields(protocol.BodyTarget, "nielsenConfiguration", v, protocol.Metadata{}) + } + if len(s.OutputGroups) > 0 { + v := s.OutputGroups + + e.SetList(protocol.BodyTarget, "outputGroups", encodeOutputGroupList(v), protocol.Metadata{}) + } + if s.TimecodeConfig != nil { + v := s.TimecodeConfig + + e.SetFields(protocol.BodyTarget, "timecodeConfig", v, protocol.Metadata{}) + } + if s.TimedMetadataInsertion != nil { + v := s.TimedMetadataInsertion + + e.SetFields(protocol.BodyTarget, "timedMetadataInsertion", v, protocol.Metadata{}) + } + + return nil +} + // You can send list job templates requests with an empty body. Optionally, // you can filter the response by category by specifying it in your request // body. You can also optionally specify the maximum number, up to twenty, of @@ -7566,6 +10205,37 @@ func (s *ListJobTemplatesInput) SetOrder(v string) *ListJobTemplatesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListJobTemplatesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Category != nil { + v := *s.Category + + e.SetValue(protocol.QueryTarget, "category", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ListBy != nil { + v := *s.ListBy + + e.SetValue(protocol.QueryTarget, "listBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Order != nil { + v := *s.Order + + e.SetValue(protocol.QueryTarget, "order", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Successful list job templates requests return a JSON array of job templates. // If you do not specify how they are ordered, you will receive them in alphabetical // order by name. @@ -7602,6 +10272,22 @@ func (s *ListJobTemplatesOutput) SetNextToken(v string) *ListJobTemplatesOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListJobTemplatesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.JobTemplates) > 0 { + v := s.JobTemplates + + e.SetList(protocol.BodyTarget, "jobTemplates", encodeJobTemplateList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // You can send list jobs requests with an empty body. Optionally, you can filter // the response by queue and/or job status by specifying them in your request // body. You can also optionally specify the maximum number, up to twenty, of @@ -7668,6 +10354,37 @@ func (s *ListJobsInput) SetStatus(v string) *ListJobsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListJobsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Order != nil { + v := *s.Order + + e.SetValue(protocol.QueryTarget, "order", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Queue != nil { + v := *s.Queue + + e.SetValue(protocol.QueryTarget, "queue", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.QueryTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Successful list jobs requests return a JSON array of jobs. If you do not // specify how they are ordered, you will receive the most recently created // first. @@ -7704,6 +10421,22 @@ func (s *ListJobsOutput) SetNextToken(v string) *ListJobsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListJobsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Jobs) > 0 { + v := s.Jobs + + e.SetList(protocol.BodyTarget, "jobs", encodeJobList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // You can send list presets requests with an empty body. Optionally, you can // filter the response by category by specifying it in your request body. You // can also optionally specify the maximum number, up to twenty, of queues to @@ -7761,16 +10494,47 @@ func (s *ListPresetsInput) SetMaxResults(v int64) *ListPresetsInput { return s } -// SetNextToken sets the NextToken field's value. -func (s *ListPresetsInput) SetNextToken(v string) *ListPresetsInput { - s.NextToken = &v - return s -} +// SetNextToken sets the NextToken field's value. +func (s *ListPresetsInput) SetNextToken(v string) *ListPresetsInput { + s.NextToken = &v + return s +} + +// SetOrder sets the Order field's value. +func (s *ListPresetsInput) SetOrder(v string) *ListPresetsInput { + s.Order = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPresetsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Category != nil { + v := *s.Category + + e.SetValue(protocol.QueryTarget, "category", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ListBy != nil { + v := *s.ListBy + + e.SetValue(protocol.QueryTarget, "listBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Order != nil { + v := *s.Order + + e.SetValue(protocol.QueryTarget, "order", protocol.StringValue(v), protocol.Metadata{}) + } -// SetOrder sets the Order field's value. -func (s *ListPresetsInput) SetOrder(v string) *ListPresetsInput { - s.Order = &v - return s + return nil } // Successful list presets requests return a JSON array of presets. If you do @@ -7809,6 +10573,22 @@ func (s *ListPresetsOutput) SetPresets(v []*Preset) *ListPresetsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPresetsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Presets) > 0 { + v := s.Presets + + e.SetList(protocol.BodyTarget, "presets", encodePresetList(v), protocol.Metadata{}) + } + + return nil +} + // You can send list queues requests with an empty body. You can optionally // specify the maximum number, up to twenty, of queues to be returned. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListQueuesRequest @@ -7866,6 +10646,32 @@ func (s *ListQueuesInput) SetOrder(v string) *ListQueuesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListQueuesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ListBy != nil { + v := *s.ListBy + + e.SetValue(protocol.QueryTarget, "listBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Order != nil { + v := *s.Order + + e.SetValue(protocol.QueryTarget, "order", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Successful list queues return a JSON array of queues. If you do not specify // how they are ordered, you will receive them alphabetically by name. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ListQueuesResponse @@ -7901,6 +10707,22 @@ func (s *ListQueuesOutput) SetQueues(v []*Queue) *ListQueuesOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListQueuesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Queues) > 0 { + v := s.Queues + + e.SetList(protocol.BodyTarget, "queues", encodeQueueList(v), protocol.Metadata{}) + } + + return nil +} + // Settings for M2TS Container. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/M2tsSettings type M2tsSettings struct { @@ -8262,6 +11084,172 @@ func (s *M2tsSettings) SetVideoPid(v int64) *M2tsSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *M2tsSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AudioBufferModel != nil { + v := *s.AudioBufferModel + + e.SetValue(protocol.BodyTarget, "audioBufferModel", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AudioFramesPerPes != nil { + v := *s.AudioFramesPerPes + + e.SetValue(protocol.BodyTarget, "audioFramesPerPes", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.AudioPids) > 0 { + v := s.AudioPids + + e.SetList(protocol.BodyTarget, "audioPids", protocol.EncodeInt64List(v), protocol.Metadata{}) + } + if s.Bitrate != nil { + v := *s.Bitrate + + e.SetValue(protocol.BodyTarget, "bitrate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.BufferModel != nil { + v := *s.BufferModel + + e.SetValue(protocol.BodyTarget, "bufferModel", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DvbNitSettings != nil { + v := s.DvbNitSettings + + e.SetFields(protocol.BodyTarget, "dvbNitSettings", v, protocol.Metadata{}) + } + if s.DvbSdtSettings != nil { + v := s.DvbSdtSettings + + e.SetFields(protocol.BodyTarget, "dvbSdtSettings", v, protocol.Metadata{}) + } + if len(s.DvbSubPids) > 0 { + v := s.DvbSubPids + + e.SetList(protocol.BodyTarget, "dvbSubPids", protocol.EncodeInt64List(v), protocol.Metadata{}) + } + if s.DvbTdtSettings != nil { + v := s.DvbTdtSettings + + e.SetFields(protocol.BodyTarget, "dvbTdtSettings", v, protocol.Metadata{}) + } + if s.DvbTeletextPid != nil { + v := *s.DvbTeletextPid + + e.SetValue(protocol.BodyTarget, "dvbTeletextPid", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.EbpAudioInterval != nil { + v := *s.EbpAudioInterval + + e.SetValue(protocol.BodyTarget, "ebpAudioInterval", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EbpPlacement != nil { + v := *s.EbpPlacement + + e.SetValue(protocol.BodyTarget, "ebpPlacement", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EsRateInPes != nil { + v := *s.EsRateInPes + + e.SetValue(protocol.BodyTarget, "esRateInPes", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FragmentTime != nil { + v := *s.FragmentTime + + e.SetValue(protocol.BodyTarget, "fragmentTime", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.MaxPcrInterval != nil { + v := *s.MaxPcrInterval + + e.SetValue(protocol.BodyTarget, "maxPcrInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MinEbpInterval != nil { + v := *s.MinEbpInterval + + e.SetValue(protocol.BodyTarget, "minEbpInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NullPacketBitrate != nil { + v := *s.NullPacketBitrate + + e.SetValue(protocol.BodyTarget, "nullPacketBitrate", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.PatInterval != nil { + v := *s.PatInterval + + e.SetValue(protocol.BodyTarget, "patInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PcrControl != nil { + v := *s.PcrControl + + e.SetValue(protocol.BodyTarget, "pcrControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PcrPid != nil { + v := *s.PcrPid + + e.SetValue(protocol.BodyTarget, "pcrPid", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PmtInterval != nil { + v := *s.PmtInterval + + e.SetValue(protocol.BodyTarget, "pmtInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PmtPid != nil { + v := *s.PmtPid + + e.SetValue(protocol.BodyTarget, "pmtPid", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PrivateMetadataPid != nil { + v := *s.PrivateMetadataPid + + e.SetValue(protocol.BodyTarget, "privateMetadataPid", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ProgramNumber != nil { + v := *s.ProgramNumber + + e.SetValue(protocol.BodyTarget, "programNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RateMode != nil { + v := *s.RateMode + + e.SetValue(protocol.BodyTarget, "rateMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Scte35Pid != nil { + v := *s.Scte35Pid + + e.SetValue(protocol.BodyTarget, "scte35Pid", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Scte35Source != nil { + v := *s.Scte35Source + + e.SetValue(protocol.BodyTarget, "scte35Source", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentationMarkers != nil { + v := *s.SegmentationMarkers + + e.SetValue(protocol.BodyTarget, "segmentationMarkers", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentationStyle != nil { + v := *s.SegmentationStyle + + e.SetValue(protocol.BodyTarget, "segmentationStyle", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentationTime != nil { + v := *s.SegmentationTime + + e.SetValue(protocol.BodyTarget, "segmentationTime", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.TransportStreamId != nil { + v := *s.TransportStreamId + + e.SetValue(protocol.BodyTarget, "transportStreamId", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.VideoPid != nil { + v := *s.VideoPid + + e.SetValue(protocol.BodyTarget, "videoPid", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Settings for TS segments in HLS // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/M3u8Settings type M3u8Settings struct { @@ -8428,6 +11416,87 @@ func (s *M3u8Settings) SetVideoPid(v int64) *M3u8Settings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *M3u8Settings) MarshalFields(e protocol.FieldEncoder) error { + if s.AudioFramesPerPes != nil { + v := *s.AudioFramesPerPes + + e.SetValue(protocol.BodyTarget, "audioFramesPerPes", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.AudioPids) > 0 { + v := s.AudioPids + + e.SetList(protocol.BodyTarget, "audioPids", protocol.EncodeInt64List(v), protocol.Metadata{}) + } + if s.PatInterval != nil { + v := *s.PatInterval + + e.SetValue(protocol.BodyTarget, "patInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PcrControl != nil { + v := *s.PcrControl + + e.SetValue(protocol.BodyTarget, "pcrControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PcrPid != nil { + v := *s.PcrPid + + e.SetValue(protocol.BodyTarget, "pcrPid", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PmtInterval != nil { + v := *s.PmtInterval + + e.SetValue(protocol.BodyTarget, "pmtInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PmtPid != nil { + v := *s.PmtPid + + e.SetValue(protocol.BodyTarget, "pmtPid", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PrivateMetadataPid != nil { + v := *s.PrivateMetadataPid + + e.SetValue(protocol.BodyTarget, "privateMetadataPid", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ProgramNumber != nil { + v := *s.ProgramNumber + + e.SetValue(protocol.BodyTarget, "programNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Scte35Pid != nil { + v := *s.Scte35Pid + + e.SetValue(protocol.BodyTarget, "scte35Pid", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Scte35Source != nil { + v := *s.Scte35Source + + e.SetValue(protocol.BodyTarget, "scte35Source", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimedMetadata != nil { + v := *s.TimedMetadata + + e.SetValue(protocol.BodyTarget, "timedMetadata", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimedMetadataPid != nil { + v := *s.TimedMetadataPid + + e.SetValue(protocol.BodyTarget, "timedMetadataPid", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TransportStreamId != nil { + v := *s.TransportStreamId + + e.SetValue(protocol.BodyTarget, "transportStreamId", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.VideoPid != nil { + v := *s.VideoPid + + e.SetValue(protocol.BodyTarget, "videoPid", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Settings for MOV Container. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/MovSettings type MovSettings struct { @@ -8497,6 +11566,37 @@ func (s *MovSettings) SetReference(v string) *MovSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MovSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.ClapAtom != nil { + v := *s.ClapAtom + + e.SetValue(protocol.BodyTarget, "clapAtom", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CslgAtom != nil { + v := *s.CslgAtom + + e.SetValue(protocol.BodyTarget, "cslgAtom", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Mpeg2FourCCControl != nil { + v := *s.Mpeg2FourCCControl + + e.SetValue(protocol.BodyTarget, "mpeg2FourCCControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PaddingControl != nil { + v := *s.PaddingControl + + e.SetValue(protocol.BodyTarget, "paddingControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Reference != nil { + v := *s.Reference + + e.SetValue(protocol.BodyTarget, "reference", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to // the value MP2. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/Mp2Settings @@ -8543,6 +11643,27 @@ func (s *Mp2Settings) SetSampleRate(v int64) *Mp2Settings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Mp2Settings) MarshalFields(e protocol.FieldEncoder) error { + if s.Bitrate != nil { + v := *s.Bitrate + + e.SetValue(protocol.BodyTarget, "bitrate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Channels != nil { + v := *s.Channels + + e.SetValue(protocol.BodyTarget, "channels", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SampleRate != nil { + v := *s.SampleRate + + e.SetValue(protocol.BodyTarget, "sampleRate", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Settings for MP4 Container // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/Mp4Settings type Mp4Settings struct { @@ -8601,6 +11722,32 @@ func (s *Mp4Settings) SetMp4MajorBrand(v string) *Mp4Settings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Mp4Settings) MarshalFields(e protocol.FieldEncoder) error { + if s.CslgAtom != nil { + v := *s.CslgAtom + + e.SetValue(protocol.BodyTarget, "cslgAtom", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FreeSpaceBox != nil { + v := *s.FreeSpaceBox + + e.SetValue(protocol.BodyTarget, "freeSpaceBox", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MoovPlacement != nil { + v := *s.MoovPlacement + + e.SetValue(protocol.BodyTarget, "moovPlacement", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Mp4MajorBrand != nil { + v := *s.Mp4MajorBrand + + e.SetValue(protocol.BodyTarget, "mp4MajorBrand", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Required when you set (Codec) under (VideoDescription)>(CodecSettings) to // the value MPEG2. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/Mpeg2Settings @@ -8902,34 +12049,190 @@ func (s *Mpeg2Settings) SetSlowPal(v string) *Mpeg2Settings { return s } -// SetSoftness sets the Softness field's value. -func (s *Mpeg2Settings) SetSoftness(v int64) *Mpeg2Settings { - s.Softness = &v - return s -} +// SetSoftness sets the Softness field's value. +func (s *Mpeg2Settings) SetSoftness(v int64) *Mpeg2Settings { + s.Softness = &v + return s +} + +// SetSpatialAdaptiveQuantization sets the SpatialAdaptiveQuantization field's value. +func (s *Mpeg2Settings) SetSpatialAdaptiveQuantization(v string) *Mpeg2Settings { + s.SpatialAdaptiveQuantization = &v + return s +} + +// SetSyntax sets the Syntax field's value. +func (s *Mpeg2Settings) SetSyntax(v string) *Mpeg2Settings { + s.Syntax = &v + return s +} + +// SetTelecine sets the Telecine field's value. +func (s *Mpeg2Settings) SetTelecine(v string) *Mpeg2Settings { + s.Telecine = &v + return s +} + +// SetTemporalAdaptiveQuantization sets the TemporalAdaptiveQuantization field's value. +func (s *Mpeg2Settings) SetTemporalAdaptiveQuantization(v string) *Mpeg2Settings { + s.TemporalAdaptiveQuantization = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Mpeg2Settings) MarshalFields(e protocol.FieldEncoder) error { + if s.AdaptiveQuantization != nil { + v := *s.AdaptiveQuantization + + e.SetValue(protocol.BodyTarget, "adaptiveQuantization", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Bitrate != nil { + v := *s.Bitrate + + e.SetValue(protocol.BodyTarget, "bitrate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.CodecLevel != nil { + v := *s.CodecLevel + + e.SetValue(protocol.BodyTarget, "codecLevel", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CodecProfile != nil { + v := *s.CodecProfile + + e.SetValue(protocol.BodyTarget, "codecProfile", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FramerateControl != nil { + v := *s.FramerateControl + + e.SetValue(protocol.BodyTarget, "framerateControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FramerateConversionAlgorithm != nil { + v := *s.FramerateConversionAlgorithm + + e.SetValue(protocol.BodyTarget, "framerateConversionAlgorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FramerateDenominator != nil { + v := *s.FramerateDenominator + + e.SetValue(protocol.BodyTarget, "framerateDenominator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FramerateNumerator != nil { + v := *s.FramerateNumerator + + e.SetValue(protocol.BodyTarget, "framerateNumerator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.GopClosedCadence != nil { + v := *s.GopClosedCadence + + e.SetValue(protocol.BodyTarget, "gopClosedCadence", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.GopSize != nil { + v := *s.GopSize + + e.SetValue(protocol.BodyTarget, "gopSize", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.GopSizeUnits != nil { + v := *s.GopSizeUnits + + e.SetValue(protocol.BodyTarget, "gopSizeUnits", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HrdBufferInitialFillPercentage != nil { + v := *s.HrdBufferInitialFillPercentage + + e.SetValue(protocol.BodyTarget, "hrdBufferInitialFillPercentage", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.HrdBufferSize != nil { + v := *s.HrdBufferSize + + e.SetValue(protocol.BodyTarget, "hrdBufferSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.InterlaceMode != nil { + v := *s.InterlaceMode + + e.SetValue(protocol.BodyTarget, "interlaceMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IntraDcPrecision != nil { + v := *s.IntraDcPrecision + + e.SetValue(protocol.BodyTarget, "intraDcPrecision", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxBitrate != nil { + v := *s.MaxBitrate + + e.SetValue(protocol.BodyTarget, "maxBitrate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MinIInterval != nil { + v := *s.MinIInterval + + e.SetValue(protocol.BodyTarget, "minIInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NumberBFramesBetweenReferenceFrames != nil { + v := *s.NumberBFramesBetweenReferenceFrames + + e.SetValue(protocol.BodyTarget, "numberBFramesBetweenReferenceFrames", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ParControl != nil { + v := *s.ParControl + + e.SetValue(protocol.BodyTarget, "parControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParDenominator != nil { + v := *s.ParDenominator + + e.SetValue(protocol.BodyTarget, "parDenominator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ParNumerator != nil { + v := *s.ParNumerator + + e.SetValue(protocol.BodyTarget, "parNumerator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.QualityTuningLevel != nil { + v := *s.QualityTuningLevel + + e.SetValue(protocol.BodyTarget, "qualityTuningLevel", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RateControlMode != nil { + v := *s.RateControlMode + + e.SetValue(protocol.BodyTarget, "rateControlMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SceneChangeDetect != nil { + v := *s.SceneChangeDetect + + e.SetValue(protocol.BodyTarget, "sceneChangeDetect", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SlowPal != nil { + v := *s.SlowPal + + e.SetValue(protocol.BodyTarget, "slowPal", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Softness != nil { + v := *s.Softness -// SetSpatialAdaptiveQuantization sets the SpatialAdaptiveQuantization field's value. -func (s *Mpeg2Settings) SetSpatialAdaptiveQuantization(v string) *Mpeg2Settings { - s.SpatialAdaptiveQuantization = &v - return s -} + e.SetValue(protocol.BodyTarget, "softness", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SpatialAdaptiveQuantization != nil { + v := *s.SpatialAdaptiveQuantization -// SetSyntax sets the Syntax field's value. -func (s *Mpeg2Settings) SetSyntax(v string) *Mpeg2Settings { - s.Syntax = &v - return s -} + e.SetValue(protocol.BodyTarget, "spatialAdaptiveQuantization", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Syntax != nil { + v := *s.Syntax -// SetTelecine sets the Telecine field's value. -func (s *Mpeg2Settings) SetTelecine(v string) *Mpeg2Settings { - s.Telecine = &v - return s -} + e.SetValue(protocol.BodyTarget, "syntax", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Telecine != nil { + v := *s.Telecine -// SetTemporalAdaptiveQuantization sets the TemporalAdaptiveQuantization field's value. -func (s *Mpeg2Settings) SetTemporalAdaptiveQuantization(v string) *Mpeg2Settings { - s.TemporalAdaptiveQuantization = &v - return s + e.SetValue(protocol.BodyTarget, "telecine", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TemporalAdaptiveQuantization != nil { + v := *s.TemporalAdaptiveQuantization + + e.SetValue(protocol.BodyTarget, "temporalAdaptiveQuantization", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil } // If you are using DRM, set DRM System (MsSmoothEncryptionSettings) to specify @@ -8958,6 +12261,17 @@ func (s *MsSmoothEncryptionSettings) SetSpekeKeyProvider(v *SpekeKeyProvider) *M return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MsSmoothEncryptionSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.SpekeKeyProvider != nil { + v := s.SpekeKeyProvider + + e.SetFields(protocol.BodyTarget, "spekeKeyProvider", v, protocol.Metadata{}) + } + + return nil +} + // Required when you set (Type) under (OutputGroups)>(OutputGroupSettings) to // MS_SMOOTH_GROUP_SETTINGS. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/MsSmoothGroupSettings @@ -9028,6 +12342,37 @@ func (s *MsSmoothGroupSettings) SetManifestEncoding(v string) *MsSmoothGroupSett return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MsSmoothGroupSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AudioDeduplication != nil { + v := *s.AudioDeduplication + + e.SetValue(protocol.BodyTarget, "audioDeduplication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Destination != nil { + v := *s.Destination + + e.SetValue(protocol.BodyTarget, "destination", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Encryption != nil { + v := s.Encryption + + e.SetFields(protocol.BodyTarget, "encryption", v, protocol.Metadata{}) + } + if s.FragmentLength != nil { + v := *s.FragmentLength + + e.SetValue(protocol.BodyTarget, "fragmentLength", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ManifestEncoding != nil { + v := *s.ManifestEncoding + + e.SetValue(protocol.BodyTarget, "manifestEncoding", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Settings for Nielsen Configuration // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/NielsenConfiguration type NielsenConfiguration struct { @@ -9064,6 +12409,22 @@ func (s *NielsenConfiguration) SetDistributorId(v string) *NielsenConfiguration return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *NielsenConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.BreakoutCode != nil { + v := *s.BreakoutCode + + e.SetValue(protocol.BodyTarget, "breakoutCode", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.DistributorId != nil { + v := *s.DistributorId + + e.SetValue(protocol.BodyTarget, "distributorId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Enable the Noise reducer (NoiseReducer) feature to remove noise from your // video output if necessary. Enable or disable this feature for each output // individually. This setting is disabled by default. When you enable Noise @@ -9116,6 +12477,27 @@ func (s *NoiseReducer) SetSpatialFilterSettings(v *NoiseReducerSpatialFilterSett return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *NoiseReducer) MarshalFields(e protocol.FieldEncoder) error { + if s.Filter != nil { + v := *s.Filter + + e.SetValue(protocol.BodyTarget, "filter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FilterSettings != nil { + v := s.FilterSettings + + e.SetFields(protocol.BodyTarget, "filterSettings", v, protocol.Metadata{}) + } + if s.SpatialFilterSettings != nil { + v := s.SpatialFilterSettings + + e.SetFields(protocol.BodyTarget, "spatialFilterSettings", v, protocol.Metadata{}) + } + + return nil +} + // Settings for a noise reducer filter // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/NoiseReducerFilterSettings type NoiseReducerFilterSettings struct { @@ -9142,6 +12524,17 @@ func (s *NoiseReducerFilterSettings) SetStrength(v int64) *NoiseReducerFilterSet return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *NoiseReducerFilterSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Strength != nil { + v := *s.Strength + + e.SetValue(protocol.BodyTarget, "strength", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Noise reducer filter settings for spatial filter. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/NoiseReducerSpatialFilterSettings type NoiseReducerSpatialFilterSettings struct { @@ -9188,6 +12581,27 @@ func (s *NoiseReducerSpatialFilterSettings) SetStrength(v int64) *NoiseReducerSp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *NoiseReducerSpatialFilterSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.PostFilterSharpenStrength != nil { + v := *s.PostFilterSharpenStrength + + e.SetValue(protocol.BodyTarget, "postFilterSharpenStrength", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Speed != nil { + v := *s.Speed + + e.SetValue(protocol.BodyTarget, "speed", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Strength != nil { + v := *s.Strength + + e.SetValue(protocol.BodyTarget, "strength", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // An output object describes the settings for a single output file or stream // in an output group. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/Output @@ -9295,6 +12709,60 @@ func (s *Output) SetVideoDescription(v *VideoDescription) *Output { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Output) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AudioDescriptions) > 0 { + v := s.AudioDescriptions + + e.SetList(protocol.BodyTarget, "audioDescriptions", encodeAudioDescriptionList(v), protocol.Metadata{}) + } + if len(s.CaptionDescriptions) > 0 { + v := s.CaptionDescriptions + + e.SetList(protocol.BodyTarget, "captionDescriptions", encodeCaptionDescriptionList(v), protocol.Metadata{}) + } + if s.ContainerSettings != nil { + v := s.ContainerSettings + + e.SetFields(protocol.BodyTarget, "containerSettings", v, protocol.Metadata{}) + } + if s.Extension != nil { + v := *s.Extension + + e.SetValue(protocol.BodyTarget, "extension", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NameModifier != nil { + v := *s.NameModifier + + e.SetValue(protocol.BodyTarget, "nameModifier", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OutputSettings != nil { + v := s.OutputSettings + + e.SetFields(protocol.BodyTarget, "outputSettings", v, protocol.Metadata{}) + } + if s.Preset != nil { + v := *s.Preset + + e.SetValue(protocol.BodyTarget, "preset", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VideoDescription != nil { + v := s.VideoDescription + + e.SetFields(protocol.BodyTarget, "videoDescription", v, protocol.Metadata{}) + } + + return nil +} + +func encodeOutputList(vs []*Output) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // OutputChannel mapping settings. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/OutputChannelMapping type OutputChannelMapping struct { @@ -9320,6 +12788,25 @@ func (s *OutputChannelMapping) SetInputChannels(v []*int64) *OutputChannelMappin return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputChannelMapping) MarshalFields(e protocol.FieldEncoder) error { + if len(s.InputChannels) > 0 { + v := s.InputChannels + + e.SetList(protocol.BodyTarget, "inputChannels", protocol.EncodeInt64List(v), protocol.Metadata{}) + } + + return nil +} + +func encodeOutputChannelMappingList(vs []*OutputChannelMapping) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Details regarding output // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/OutputDetail type OutputDetail struct { @@ -9354,6 +12841,30 @@ func (s *OutputDetail) SetVideoDetails(v *VideoDetail) *OutputDetail { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputDetail) MarshalFields(e protocol.FieldEncoder) error { + if s.DurationInMs != nil { + v := *s.DurationInMs + + e.SetValue(protocol.BodyTarget, "durationInMs", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.VideoDetails != nil { + v := s.VideoDetails + + e.SetFields(protocol.BodyTarget, "videoDetails", v, protocol.Metadata{}) + } + + return nil +} + +func encodeOutputDetailList(vs []*OutputDetail) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Group of outputs // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/OutputGroup type OutputGroup struct { @@ -9410,6 +12921,40 @@ func (s *OutputGroup) SetOutputs(v []*Output) *OutputGroup { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputGroup) MarshalFields(e protocol.FieldEncoder) error { + if s.CustomName != nil { + v := *s.CustomName + + e.SetValue(protocol.BodyTarget, "customName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OutputGroupSettings != nil { + v := s.OutputGroupSettings + + e.SetFields(protocol.BodyTarget, "outputGroupSettings", v, protocol.Metadata{}) + } + if len(s.Outputs) > 0 { + v := s.Outputs + + e.SetList(protocol.BodyTarget, "outputs", encodeOutputList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeOutputGroupList(vs []*OutputGroup) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Contains details about the output groups specified in the job settings. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/OutputGroupDetail type OutputGroupDetail struct { @@ -9435,6 +12980,25 @@ func (s *OutputGroupDetail) SetOutputDetails(v []*OutputDetail) *OutputGroupDeta return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputGroupDetail) MarshalFields(e protocol.FieldEncoder) error { + if len(s.OutputDetails) > 0 { + v := s.OutputDetails + + e.SetList(protocol.BodyTarget, "outputDetails", encodeOutputDetailList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeOutputGroupDetailList(vs []*OutputGroupDetail) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Output Group settings, including type // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/OutputGroupSettings type OutputGroupSettings struct { @@ -9500,6 +13064,37 @@ func (s *OutputGroupSettings) SetType(v string) *OutputGroupSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputGroupSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.DashIsoGroupSettings != nil { + v := s.DashIsoGroupSettings + + e.SetFields(protocol.BodyTarget, "dashIsoGroupSettings", v, protocol.Metadata{}) + } + if s.FileGroupSettings != nil { + v := s.FileGroupSettings + + e.SetFields(protocol.BodyTarget, "fileGroupSettings", v, protocol.Metadata{}) + } + if s.HlsGroupSettings != nil { + v := s.HlsGroupSettings + + e.SetFields(protocol.BodyTarget, "hlsGroupSettings", v, protocol.Metadata{}) + } + if s.MsSmoothGroupSettings != nil { + v := s.MsSmoothGroupSettings + + e.SetFields(protocol.BodyTarget, "msSmoothGroupSettings", v, protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Specific settings for this type of output. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/OutputSettings type OutputSettings struct { @@ -9525,6 +13120,17 @@ func (s *OutputSettings) SetHlsSettings(v *HlsSettings) *OutputSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.HlsSettings != nil { + v := s.HlsSettings + + e.SetFields(protocol.BodyTarget, "hlsSettings", v, protocol.Metadata{}) + } + + return nil +} + // A preset is a collection of preconfigured media conversion settings that // you want MediaConvert to apply to the output during the conversion process. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/Preset @@ -9615,6 +13221,60 @@ func (s *Preset) SetType(v string) *Preset { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Preset) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Category != nil { + v := *s.Category + + e.SetValue(protocol.BodyTarget, "category", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedAt != nil { + v := *s.CreatedAt + + e.SetValue(protocol.BodyTarget, "createdAt", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdated != nil { + v := *s.LastUpdated + + e.SetValue(protocol.BodyTarget, "lastUpdated", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Settings != nil { + v := s.Settings + + e.SetFields(protocol.BodyTarget, "settings", v, protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodePresetList(vs []*Preset) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Settings for preset // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/PresetSettings type PresetSettings struct { @@ -9672,6 +13332,32 @@ func (s *PresetSettings) SetVideoDescription(v *VideoDescription) *PresetSetting return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PresetSettings) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AudioDescriptions) > 0 { + v := s.AudioDescriptions + + e.SetList(protocol.BodyTarget, "audioDescriptions", encodeAudioDescriptionList(v), protocol.Metadata{}) + } + if len(s.CaptionDescriptions) > 0 { + v := s.CaptionDescriptions + + e.SetList(protocol.BodyTarget, "captionDescriptions", encodeCaptionDescriptionPresetList(v), protocol.Metadata{}) + } + if s.ContainerSettings != nil { + v := s.ContainerSettings + + e.SetFields(protocol.BodyTarget, "containerSettings", v, protocol.Metadata{}) + } + if s.VideoDescription != nil { + v := s.VideoDescription + + e.SetFields(protocol.BodyTarget, "videoDescription", v, protocol.Metadata{}) + } + + return nil +} + // Required when you set (Codec) under (VideoDescription)>(CodecSettings) to // the value PRORES. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/ProresSettings @@ -9812,6 +13498,67 @@ func (s *ProresSettings) SetTelecine(v string) *ProresSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ProresSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.CodecProfile != nil { + v := *s.CodecProfile + + e.SetValue(protocol.BodyTarget, "codecProfile", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FramerateControl != nil { + v := *s.FramerateControl + + e.SetValue(protocol.BodyTarget, "framerateControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FramerateConversionAlgorithm != nil { + v := *s.FramerateConversionAlgorithm + + e.SetValue(protocol.BodyTarget, "framerateConversionAlgorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FramerateDenominator != nil { + v := *s.FramerateDenominator + + e.SetValue(protocol.BodyTarget, "framerateDenominator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FramerateNumerator != nil { + v := *s.FramerateNumerator + + e.SetValue(protocol.BodyTarget, "framerateNumerator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.InterlaceMode != nil { + v := *s.InterlaceMode + + e.SetValue(protocol.BodyTarget, "interlaceMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParControl != nil { + v := *s.ParControl + + e.SetValue(protocol.BodyTarget, "parControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParDenominator != nil { + v := *s.ParDenominator + + e.SetValue(protocol.BodyTarget, "parDenominator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ParNumerator != nil { + v := *s.ParNumerator + + e.SetValue(protocol.BodyTarget, "parNumerator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SlowPal != nil { + v := *s.SlowPal + + e.SetValue(protocol.BodyTarget, "slowPal", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Telecine != nil { + v := *s.Telecine + + e.SetValue(protocol.BodyTarget, "telecine", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // MediaConvert jobs are submitted to a queue. Unless specified otherwise jobs // are submitted to a built-in default queue. User can create additional queues // to separate the jobs of different categories or priority. @@ -9896,6 +13643,55 @@ func (s *Queue) SetType(v string) *Queue { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Queue) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedAt != nil { + v := *s.CreatedAt + + e.SetValue(protocol.BodyTarget, "createdAt", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdated != nil { + v := *s.LastUpdated + + e.SetValue(protocol.BodyTarget, "lastUpdated", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeQueueList(vs []*Queue) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Use Rectangle to identify a specific area of the video frame. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/Rectangle type Rectangle struct { @@ -9950,6 +13746,32 @@ func (s *Rectangle) SetY(v int64) *Rectangle { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Rectangle) MarshalFields(e protocol.FieldEncoder) error { + if s.Height != nil { + v := *s.Height + + e.SetValue(protocol.BodyTarget, "height", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Width != nil { + v := *s.Width + + e.SetValue(protocol.BodyTarget, "width", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.X != nil { + v := *s.X + + e.SetValue(protocol.BodyTarget, "x", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Y != nil { + v := *s.Y + + e.SetValue(protocol.BodyTarget, "y", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Use Manual audio remixing (RemixSettings) to adjust audio levels for each // output channel. With audio remixing, you can output more or fewer audio channels // than your input audio source provides. @@ -10001,6 +13823,27 @@ func (s *RemixSettings) SetChannelsOut(v int64) *RemixSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RemixSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.ChannelMapping != nil { + v := s.ChannelMapping + + e.SetFields(protocol.BodyTarget, "channelMapping", v, protocol.Metadata{}) + } + if s.ChannelsIn != nil { + v := *s.ChannelsIn + + e.SetValue(protocol.BodyTarget, "channelsIn", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ChannelsOut != nil { + v := *s.ChannelsOut + + e.SetValue(protocol.BodyTarget, "channelsOut", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Settings for SCC caption output. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/SccDestinationSettings type SccDestinationSettings struct { @@ -10030,6 +13873,17 @@ func (s *SccDestinationSettings) SetFramerate(v string) *SccDestinationSettings return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SccDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Framerate != nil { + v := *s.Framerate + + e.SetValue(protocol.BodyTarget, "framerate", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Settings for use with a SPEKE key provider // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/SpekeKeyProvider type SpekeKeyProvider struct { @@ -10075,6 +13929,27 @@ func (s *SpekeKeyProvider) SetUrl(v string) *SpekeKeyProvider { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SpekeKeyProvider) MarshalFields(e protocol.FieldEncoder) error { + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.BodyTarget, "resourceId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SystemIds) > 0 { + v := s.SystemIds + + e.SetList(protocol.BodyTarget, "systemIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "url", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Settings for use with a SPEKE key provider. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/StaticKeyProvider type StaticKeyProvider struct { @@ -10132,6 +14007,32 @@ func (s *StaticKeyProvider) SetUrl(v string) *StaticKeyProvider { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StaticKeyProvider) MarshalFields(e protocol.FieldEncoder) error { + if s.KeyFormat != nil { + v := *s.KeyFormat + + e.SetValue(protocol.BodyTarget, "keyFormat", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyFormatVersions != nil { + v := *s.KeyFormatVersions + + e.SetValue(protocol.BodyTarget, "keyFormatVersions", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StaticKeyValue != nil { + v := *s.StaticKeyValue + + e.SetValue(protocol.BodyTarget, "staticKeyValue", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "url", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Settings for Teletext caption output // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/TeletextDestinationSettings type TeletextDestinationSettings struct { @@ -10160,6 +14061,17 @@ func (s *TeletextDestinationSettings) SetPageNumber(v string) *TeletextDestinati return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TeletextDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.PageNumber != nil { + v := *s.PageNumber + + e.SetValue(protocol.BodyTarget, "pageNumber", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Settings specific to Teletext caption sources, including Page number. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/TeletextSourceSettings type TeletextSourceSettings struct { @@ -10187,6 +14099,17 @@ func (s *TeletextSourceSettings) SetPageNumber(v string) *TeletextSourceSettings return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TeletextSourceSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.PageNumber != nil { + v := *s.PageNumber + + e.SetValue(protocol.BodyTarget, "pageNumber", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Timecode burn-in (TimecodeBurnIn)--Burns the output timecode and specified // prefix into the output. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/TimecodeBurnin @@ -10237,6 +14160,27 @@ func (s *TimecodeBurnin) SetPrefix(v string) *TimecodeBurnin { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TimecodeBurnin) MarshalFields(e protocol.FieldEncoder) error { + if s.FontSize != nil { + v := *s.FontSize + + e.SetValue(protocol.BodyTarget, "fontSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := *s.Position + + e.SetValue(protocol.BodyTarget, "position", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "prefix", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains settings used to acquire and adjust timecode information from inputs. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/TimecodeConfig type TimecodeConfig struct { @@ -10317,6 +14261,32 @@ func (s *TimecodeConfig) SetTimestampOffset(v string) *TimecodeConfig { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TimecodeConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.Anchor != nil { + v := *s.Anchor + + e.SetValue(protocol.BodyTarget, "anchor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Source != nil { + v := *s.Source + + e.SetValue(protocol.BodyTarget, "source", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Start != nil { + v := *s.Start + + e.SetValue(protocol.BodyTarget, "start", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimestampOffset != nil { + v := *s.TimestampOffset + + e.SetValue(protocol.BodyTarget, "timestampOffset", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Enable Timed metadata insertion (TimedMetadataInsertion) to include ID3 tags // in your job. To include timed metadata, you must enable it here, enable it // in each output container, and specify tags and timecodes in ID3 insertion @@ -10345,6 +14315,17 @@ func (s *TimedMetadataInsertion) SetId3Insertions(v []*Id3Insertion) *TimedMetad return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TimedMetadataInsertion) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Id3Insertions) > 0 { + v := s.Id3Insertions + + e.SetList(protocol.BodyTarget, "id3Insertions", encodeId3InsertionList(v), protocol.Metadata{}) + } + + return nil +} + // Information about when jobs are submitted, started, and finished is specified // in Unix epoch format in seconds. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/Timing @@ -10389,6 +14370,27 @@ func (s *Timing) SetSubmitTime(v time.Time) *Timing { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Timing) MarshalFields(e protocol.FieldEncoder) error { + if s.FinishTime != nil { + v := *s.FinishTime + + e.SetValue(protocol.BodyTarget, "finishTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.StartTime != nil { + v := *s.StartTime + + e.SetValue(protocol.BodyTarget, "startTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.SubmitTime != nil { + v := *s.SubmitTime + + e.SetValue(protocol.BodyTarget, "submitTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + + return nil +} + // Settings for TTML caption output // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/TtmlDestinationSettings type TtmlDestinationSettings struct { @@ -10415,6 +14417,17 @@ func (s *TtmlDestinationSettings) SetStylePassthrough(v string) *TtmlDestination return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TtmlDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.StylePassthrough != nil { + v := *s.StylePassthrough + + e.SetValue(protocol.BodyTarget, "stylePassthrough", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Modify a job template by sending a request with the job template name and // any of the following that you wish to change: description, category, and // queue. @@ -10494,6 +14507,37 @@ func (s *UpdateJobTemplateInput) SetSettings(v *JobTemplateSettings) *UpdateJobT return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateJobTemplateInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Category != nil { + v := *s.Category + + e.SetValue(protocol.BodyTarget, "category", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Queue != nil { + v := *s.Queue + + e.SetValue(protocol.BodyTarget, "queue", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Settings != nil { + v := s.Settings + + e.SetFields(protocol.BodyTarget, "settings", v, protocol.Metadata{}) + } + + return nil +} + // Successful update job template requests will return the new job template // JSON. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdateJobTemplateResponse @@ -10521,6 +14565,17 @@ func (s *UpdateJobTemplateOutput) SetJobTemplate(v *JobTemplate) *UpdateJobTempl return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateJobTemplateOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.JobTemplate != nil { + v := s.JobTemplate + + e.SetFields(protocol.BodyTarget, "jobTemplate", v, protocol.Metadata{}) + } + + return nil +} + // Modify a preset by sending a request with the preset name and any of the // following that you wish to change: description, category, and transcoding // settings. @@ -10590,6 +14645,32 @@ func (s *UpdatePresetInput) SetSettings(v *PresetSettings) *UpdatePresetInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdatePresetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Category != nil { + v := *s.Category + + e.SetValue(protocol.BodyTarget, "category", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Settings != nil { + v := s.Settings + + e.SetFields(protocol.BodyTarget, "settings", v, protocol.Metadata{}) + } + + return nil +} + // Successful update preset requests will return the new preset JSON. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdatePresetResponse type UpdatePresetOutput struct { @@ -10616,6 +14697,17 @@ func (s *UpdatePresetOutput) SetPreset(v *Preset) *UpdatePresetOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdatePresetOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Preset != nil { + v := s.Preset + + e.SetFields(protocol.BodyTarget, "preset", v, protocol.Metadata{}) + } + + return nil +} + // Modify a queue by sending a request with the queue name and any of the following // that you wish to change - description, status. You pause or activate a queue // by changing its status between ACTIVE and PAUSED. @@ -10678,6 +14770,27 @@ func (s *UpdateQueueInput) SetStatus(v string) *UpdateQueueInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateQueueInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Successful update queue requests will return the new queue JSON. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/UpdateQueueResponse type UpdateQueueOutput struct { @@ -10705,6 +14818,17 @@ func (s *UpdateQueueOutput) SetQueue(v *Queue) *UpdateQueueOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateQueueOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Queue != nil { + v := s.Queue + + e.SetFields(protocol.BodyTarget, "queue", v, protocol.Metadata{}) + } + + return nil +} + // Video codec settings, (CodecSettings) under (VideoDescription), contains // the group of settings related to video encoding. The settings in this group // vary depending on the value you choose for Video codec (Codec). For each @@ -10785,6 +14909,42 @@ func (s *VideoCodecSettings) SetProresSettings(v *ProresSettings) *VideoCodecSet return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VideoCodecSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Codec != nil { + v := *s.Codec + + e.SetValue(protocol.BodyTarget, "codec", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FrameCaptureSettings != nil { + v := s.FrameCaptureSettings + + e.SetFields(protocol.BodyTarget, "frameCaptureSettings", v, protocol.Metadata{}) + } + if s.H264Settings != nil { + v := s.H264Settings + + e.SetFields(protocol.BodyTarget, "h264Settings", v, protocol.Metadata{}) + } + if s.H265Settings != nil { + v := s.H265Settings + + e.SetFields(protocol.BodyTarget, "h265Settings", v, protocol.Metadata{}) + } + if s.Mpeg2Settings != nil { + v := s.Mpeg2Settings + + e.SetFields(protocol.BodyTarget, "mpeg2Settings", v, protocol.Metadata{}) + } + if s.ProresSettings != nil { + v := s.ProresSettings + + e.SetFields(protocol.BodyTarget, "proresSettings", v, protocol.Metadata{}) + } + + return nil +} + // Settings for video outputs // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/VideoDescription type VideoDescription struct { @@ -10986,6 +15146,87 @@ func (s *VideoDescription) SetWidth(v int64) *VideoDescription { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VideoDescription) MarshalFields(e protocol.FieldEncoder) error { + if s.AfdSignaling != nil { + v := *s.AfdSignaling + + e.SetValue(protocol.BodyTarget, "afdSignaling", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AntiAlias != nil { + v := *s.AntiAlias + + e.SetValue(protocol.BodyTarget, "antiAlias", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CodecSettings != nil { + v := s.CodecSettings + + e.SetFields(protocol.BodyTarget, "codecSettings", v, protocol.Metadata{}) + } + if s.ColorMetadata != nil { + v := *s.ColorMetadata + + e.SetValue(protocol.BodyTarget, "colorMetadata", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Crop != nil { + v := s.Crop + + e.SetFields(protocol.BodyTarget, "crop", v, protocol.Metadata{}) + } + if s.DropFrameTimecode != nil { + v := *s.DropFrameTimecode + + e.SetValue(protocol.BodyTarget, "dropFrameTimecode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FixedAfd != nil { + v := *s.FixedAfd + + e.SetValue(protocol.BodyTarget, "fixedAfd", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Height != nil { + v := *s.Height + + e.SetValue(protocol.BodyTarget, "height", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Position != nil { + v := s.Position + + e.SetFields(protocol.BodyTarget, "position", v, protocol.Metadata{}) + } + if s.RespondToAfd != nil { + v := *s.RespondToAfd + + e.SetValue(protocol.BodyTarget, "respondToAfd", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ScalingBehavior != nil { + v := *s.ScalingBehavior + + e.SetValue(protocol.BodyTarget, "scalingBehavior", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Sharpness != nil { + v := *s.Sharpness + + e.SetValue(protocol.BodyTarget, "sharpness", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TimecodeInsertion != nil { + v := *s.TimecodeInsertion + + e.SetValue(protocol.BodyTarget, "timecodeInsertion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VideoPreprocessors != nil { + v := s.VideoPreprocessors + + e.SetFields(protocol.BodyTarget, "videoPreprocessors", v, protocol.Metadata{}) + } + if s.Width != nil { + v := *s.Width + + e.SetValue(protocol.BodyTarget, "width", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Contains details about the output's video stream // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/VideoDetail type VideoDetail struct { @@ -11020,6 +15261,22 @@ func (s *VideoDetail) SetWidthInPx(v int64) *VideoDetail { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VideoDetail) MarshalFields(e protocol.FieldEncoder) error { + if s.HeightInPx != nil { + v := *s.HeightInPx + + e.SetValue(protocol.BodyTarget, "heightInPx", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.WidthInPx != nil { + v := *s.WidthInPx + + e.SetValue(protocol.BodyTarget, "widthInPx", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Find additional transcoding features under Preprocessors (VideoPreprocessors). // Enable the features at each output individually. These features are disabled // by default. @@ -11091,6 +15348,37 @@ func (s *VideoPreprocessor) SetTimecodeBurnin(v *TimecodeBurnin) *VideoPreproces return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VideoPreprocessor) MarshalFields(e protocol.FieldEncoder) error { + if s.ColorCorrector != nil { + v := s.ColorCorrector + + e.SetFields(protocol.BodyTarget, "colorCorrector", v, protocol.Metadata{}) + } + if s.Deinterlacer != nil { + v := s.Deinterlacer + + e.SetFields(protocol.BodyTarget, "deinterlacer", v, protocol.Metadata{}) + } + if s.ImageInserter != nil { + v := s.ImageInserter + + e.SetFields(protocol.BodyTarget, "imageInserter", v, protocol.Metadata{}) + } + if s.NoiseReducer != nil { + v := s.NoiseReducer + + e.SetFields(protocol.BodyTarget, "noiseReducer", v, protocol.Metadata{}) + } + if s.TimecodeBurnin != nil { + v := s.TimecodeBurnin + + e.SetFields(protocol.BodyTarget, "timecodeBurnin", v, protocol.Metadata{}) + } + + return nil +} + // Selector for video. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/VideoSelector type VideoSelector struct { @@ -11166,6 +15454,37 @@ func (s *VideoSelector) SetProgramNumber(v int64) *VideoSelector { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VideoSelector) MarshalFields(e protocol.FieldEncoder) error { + if s.ColorSpace != nil { + v := *s.ColorSpace + + e.SetValue(protocol.BodyTarget, "colorSpace", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ColorSpaceUsage != nil { + v := *s.ColorSpaceUsage + + e.SetValue(protocol.BodyTarget, "colorSpaceUsage", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Hdr10Metadata != nil { + v := s.Hdr10Metadata + + e.SetFields(protocol.BodyTarget, "hdr10Metadata", v, protocol.Metadata{}) + } + if s.Pid != nil { + v := *s.Pid + + e.SetValue(protocol.BodyTarget, "pid", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ProgramNumber != nil { + v := *s.ProgramNumber + + e.SetValue(protocol.BodyTarget, "programNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Required when you set (Codec) under (AudioDescriptions)>(CodecSettings) to // the value WAV. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediaconvert-2017-08-29/WavSettings @@ -11213,6 +15532,27 @@ func (s *WavSettings) SetSampleRate(v int64) *WavSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *WavSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.BitDepth != nil { + v := *s.BitDepth + + e.SetValue(protocol.BodyTarget, "bitDepth", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Channels != nil { + v := *s.Channels + + e.SetValue(protocol.BodyTarget, "channels", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SampleRate != nil { + v := *s.SampleRate + + e.SetValue(protocol.BodyTarget, "sampleRate", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Choose BROADCASTER_MIXED_AD when the input contains pre-mixed main audio // + audio description (AD) as a stereo pair. The value for AudioType will be // set to 3, which signals to downstream systems that this stream contains "broadcaster diff --git a/service/medialive/api.go b/service/medialive/api.go index fa6f545b7e9..10643d7d446 100644 --- a/service/medialive/api.go +++ b/service/medialive/api.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" ) const opCreateChannel = "CreateChannel" @@ -1542,6 +1543,57 @@ func (s *AacSettings) SetVbrQuality(v string) *AacSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AacSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Bitrate != nil { + v := *s.Bitrate + + e.SetValue(protocol.BodyTarget, "bitrate", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.CodingMode != nil { + v := *s.CodingMode + + e.SetValue(protocol.BodyTarget, "codingMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InputType != nil { + v := *s.InputType + + e.SetValue(protocol.BodyTarget, "inputType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Profile != nil { + v := *s.Profile + + e.SetValue(protocol.BodyTarget, "profile", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RateControlMode != nil { + v := *s.RateControlMode + + e.SetValue(protocol.BodyTarget, "rateControlMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RawFormat != nil { + v := *s.RawFormat + + e.SetValue(protocol.BodyTarget, "rawFormat", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SampleRate != nil { + v := *s.SampleRate + + e.SetValue(protocol.BodyTarget, "sampleRate", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.Spec != nil { + v := *s.Spec + + e.SetValue(protocol.BodyTarget, "spec", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VbrQuality != nil { + v := *s.VbrQuality + + e.SetValue(protocol.BodyTarget, "vbrQuality", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/Ac3Settings type Ac3Settings struct { _ struct{} `type:"structure"` @@ -1626,6 +1678,47 @@ func (s *Ac3Settings) SetMetadataControl(v string) *Ac3Settings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Ac3Settings) MarshalFields(e protocol.FieldEncoder) error { + if s.Bitrate != nil { + v := *s.Bitrate + + e.SetValue(protocol.BodyTarget, "bitrate", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.BitstreamMode != nil { + v := *s.BitstreamMode + + e.SetValue(protocol.BodyTarget, "bitstreamMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CodingMode != nil { + v := *s.CodingMode + + e.SetValue(protocol.BodyTarget, "codingMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Dialnorm != nil { + v := *s.Dialnorm + + e.SetValue(protocol.BodyTarget, "dialnorm", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.DrcProfile != nil { + v := *s.DrcProfile + + e.SetValue(protocol.BodyTarget, "drcProfile", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LfeFilter != nil { + v := *s.LfeFilter + + e.SetValue(protocol.BodyTarget, "lfeFilter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MetadataControl != nil { + v := *s.MetadataControl + + e.SetValue(protocol.BodyTarget, "metadataControl", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ArchiveContainerSettings type ArchiveContainerSettings struct { _ struct{} `type:"structure"` @@ -1649,6 +1742,17 @@ func (s *ArchiveContainerSettings) SetM2tsSettings(v *M2tsSettings) *ArchiveCont return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ArchiveContainerSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.M2tsSettings != nil { + v := s.M2tsSettings + + e.SetFields(protocol.BodyTarget, "m2tsSettings", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ArchiveGroupSettings type ArchiveGroupSettings struct { _ struct{} `type:"structure"` @@ -1685,6 +1789,22 @@ func (s *ArchiveGroupSettings) SetRolloverInterval(v int64) *ArchiveGroupSetting return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ArchiveGroupSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Destination != nil { + v := s.Destination + + e.SetFields(protocol.BodyTarget, "destination", v, protocol.Metadata{}) + } + if s.RolloverInterval != nil { + v := *s.RolloverInterval + + e.SetValue(protocol.BodyTarget, "rolloverInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ArchiveOutputSettings type ArchiveOutputSettings struct { _ struct{} `type:"structure"` @@ -1729,6 +1849,27 @@ func (s *ArchiveOutputSettings) SetNameModifier(v string) *ArchiveOutputSettings return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ArchiveOutputSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.ContainerSettings != nil { + v := s.ContainerSettings + + e.SetFields(protocol.BodyTarget, "containerSettings", v, protocol.Metadata{}) + } + if s.Extension != nil { + v := *s.Extension + + e.SetValue(protocol.BodyTarget, "extension", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NameModifier != nil { + v := *s.NameModifier + + e.SetValue(protocol.BodyTarget, "nameModifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/AribDestinationSettings type AribDestinationSettings struct { _ struct{} `type:"structure"` @@ -1744,6 +1885,12 @@ func (s AribDestinationSettings) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AribDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/AribSourceSettings type AribSourceSettings struct { _ struct{} `type:"structure"` @@ -1759,6 +1906,12 @@ func (s AribSourceSettings) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AribSourceSettings) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/AudioChannelMapping type AudioChannelMapping struct { _ struct{} `type:"structure"` @@ -1793,6 +1946,30 @@ func (s *AudioChannelMapping) SetOutputChannel(v int64) *AudioChannelMapping { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioChannelMapping) MarshalFields(e protocol.FieldEncoder) error { + if len(s.InputChannelLevels) > 0 { + v := s.InputChannelLevels + + e.SetList(protocol.BodyTarget, "inputChannelLevels", encodeInputChannelLevelList(v), protocol.Metadata{}) + } + if s.OutputChannel != nil { + v := *s.OutputChannel + + e.SetValue(protocol.BodyTarget, "outputChannel", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeAudioChannelMappingList(vs []*AudioChannelMapping) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/AudioCodecSettings type AudioCodecSettings struct { _ struct{} `type:"structure"` @@ -1848,6 +2025,37 @@ func (s *AudioCodecSettings) SetPassThroughSettings(v *PassThroughSettings) *Aud return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioCodecSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AacSettings != nil { + v := s.AacSettings + + e.SetFields(protocol.BodyTarget, "aacSettings", v, protocol.Metadata{}) + } + if s.Ac3Settings != nil { + v := s.Ac3Settings + + e.SetFields(protocol.BodyTarget, "ac3Settings", v, protocol.Metadata{}) + } + if s.Eac3Settings != nil { + v := s.Eac3Settings + + e.SetFields(protocol.BodyTarget, "eac3Settings", v, protocol.Metadata{}) + } + if s.Mp2Settings != nil { + v := s.Mp2Settings + + e.SetFields(protocol.BodyTarget, "mp2Settings", v, protocol.Metadata{}) + } + if s.PassThroughSettings != nil { + v := s.PassThroughSettings + + e.SetFields(protocol.BodyTarget, "passThroughSettings", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/AudioDescription type AudioDescription struct { _ struct{} `type:"structure"` @@ -1967,6 +2175,70 @@ func (s *AudioDescription) SetStreamName(v string) *AudioDescription { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioDescription) MarshalFields(e protocol.FieldEncoder) error { + if s.AudioNormalizationSettings != nil { + v := s.AudioNormalizationSettings + + e.SetFields(protocol.BodyTarget, "audioNormalizationSettings", v, protocol.Metadata{}) + } + if s.AudioSelectorName != nil { + v := *s.AudioSelectorName + + e.SetValue(protocol.BodyTarget, "audioSelectorName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AudioType != nil { + v := *s.AudioType + + e.SetValue(protocol.BodyTarget, "audioType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AudioTypeControl != nil { + v := *s.AudioTypeControl + + e.SetValue(protocol.BodyTarget, "audioTypeControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CodecSettings != nil { + v := s.CodecSettings + + e.SetFields(protocol.BodyTarget, "codecSettings", v, protocol.Metadata{}) + } + if s.LanguageCode != nil { + v := *s.LanguageCode + + e.SetValue(protocol.BodyTarget, "languageCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LanguageCodeControl != nil { + v := *s.LanguageCodeControl + + e.SetValue(protocol.BodyTarget, "languageCodeControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RemixSettings != nil { + v := s.RemixSettings + + e.SetFields(protocol.BodyTarget, "remixSettings", v, protocol.Metadata{}) + } + if s.StreamName != nil { + v := *s.StreamName + + e.SetValue(protocol.BodyTarget, "streamName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeAudioDescriptionList(vs []*AudioDescription) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/AudioLanguageSelection type AudioLanguageSelection struct { _ struct{} `type:"structure"` @@ -2005,6 +2277,22 @@ func (s *AudioLanguageSelection) SetLanguageSelectionPolicy(v string) *AudioLang return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioLanguageSelection) MarshalFields(e protocol.FieldEncoder) error { + if s.LanguageCode != nil { + v := *s.LanguageCode + + e.SetValue(protocol.BodyTarget, "languageCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LanguageSelectionPolicy != nil { + v := *s.LanguageSelectionPolicy + + e.SetValue(protocol.BodyTarget, "languageSelectionPolicy", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/AudioNormalizationSettings type AudioNormalizationSettings struct { _ struct{} `type:"structure"` @@ -2052,6 +2340,27 @@ func (s *AudioNormalizationSettings) SetTargetLkfs(v float64) *AudioNormalizatio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioNormalizationSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Algorithm != nil { + v := *s.Algorithm + + e.SetValue(protocol.BodyTarget, "algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AlgorithmControl != nil { + v := *s.AlgorithmControl + + e.SetValue(protocol.BodyTarget, "algorithmControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TargetLkfs != nil { + v := *s.TargetLkfs + + e.SetValue(protocol.BodyTarget, "targetLkfs", protocol.Float64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/AudioOnlyHlsSettings type AudioOnlyHlsSettings struct { _ struct{} `type:"structure"` @@ -2110,6 +2419,27 @@ func (s *AudioOnlyHlsSettings) SetAudioTrackType(v string) *AudioOnlyHlsSettings return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioOnlyHlsSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AudioGroupId != nil { + v := *s.AudioGroupId + + e.SetValue(protocol.BodyTarget, "audioGroupId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AudioOnlyImage != nil { + v := s.AudioOnlyImage + + e.SetFields(protocol.BodyTarget, "audioOnlyImage", v, protocol.Metadata{}) + } + if s.AudioTrackType != nil { + v := *s.AudioTrackType + + e.SetValue(protocol.BodyTarget, "audioTrackType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/AudioPidSelection type AudioPidSelection struct { _ struct{} `type:"structure"` @@ -2134,6 +2464,17 @@ func (s *AudioPidSelection) SetPid(v int64) *AudioPidSelection { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioPidSelection) MarshalFields(e protocol.FieldEncoder) error { + if s.Pid != nil { + v := *s.Pid + + e.SetValue(protocol.BodyTarget, "pid", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/AudioSelector type AudioSelector struct { _ struct{} `type:"structure"` @@ -2168,6 +2509,30 @@ func (s *AudioSelector) SetSelectorSettings(v *AudioSelectorSettings) *AudioSele return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioSelector) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SelectorSettings != nil { + v := s.SelectorSettings + + e.SetFields(protocol.BodyTarget, "selectorSettings", v, protocol.Metadata{}) + } + + return nil +} + +func encodeAudioSelectorList(vs []*AudioSelector) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/AudioSelectorSettings type AudioSelectorSettings struct { _ struct{} `type:"structure"` @@ -2199,6 +2564,22 @@ func (s *AudioSelectorSettings) SetAudioPidSelection(v *AudioPidSelection) *Audi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AudioSelectorSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AudioLanguageSelection != nil { + v := s.AudioLanguageSelection + + e.SetFields(protocol.BodyTarget, "audioLanguageSelection", v, protocol.Metadata{}) + } + if s.AudioPidSelection != nil { + v := s.AudioPidSelection + + e.SetFields(protocol.BodyTarget, "audioPidSelection", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/AvailBlanking type AvailBlanking struct { _ struct{} `type:"structure"` @@ -2234,6 +2615,22 @@ func (s *AvailBlanking) SetState(v string) *AvailBlanking { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AvailBlanking) MarshalFields(e protocol.FieldEncoder) error { + if s.AvailBlankingImage != nil { + v := s.AvailBlankingImage + + e.SetFields(protocol.BodyTarget, "availBlankingImage", v, protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/AvailConfiguration type AvailConfiguration struct { _ struct{} `type:"structure"` @@ -2258,6 +2655,17 @@ func (s *AvailConfiguration) SetAvailSettings(v *AvailSettings) *AvailConfigurat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AvailConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.AvailSettings != nil { + v := s.AvailSettings + + e.SetFields(protocol.BodyTarget, "availSettings", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/AvailSettings type AvailSettings struct { _ struct{} `type:"structure"` @@ -2289,6 +2697,22 @@ func (s *AvailSettings) SetScte35TimeSignalApos(v *Scte35TimeSignalApos) *AvailS return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AvailSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Scte35SpliceInsert != nil { + v := s.Scte35SpliceInsert + + e.SetFields(protocol.BodyTarget, "scte35SpliceInsert", v, protocol.Metadata{}) + } + if s.Scte35TimeSignalApos != nil { + v := s.Scte35TimeSignalApos + + e.SetFields(protocol.BodyTarget, "scte35TimeSignalApos", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/BlackoutSlate type BlackoutSlate struct { _ struct{} `type:"structure"` @@ -2357,6 +2781,37 @@ func (s *BlackoutSlate) SetState(v string) *BlackoutSlate { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BlackoutSlate) MarshalFields(e protocol.FieldEncoder) error { + if s.BlackoutSlateImage != nil { + v := s.BlackoutSlateImage + + e.SetFields(protocol.BodyTarget, "blackoutSlateImage", v, protocol.Metadata{}) + } + if s.NetworkEndBlackout != nil { + v := *s.NetworkEndBlackout + + e.SetValue(protocol.BodyTarget, "networkEndBlackout", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NetworkEndBlackoutImage != nil { + v := s.NetworkEndBlackoutImage + + e.SetFields(protocol.BodyTarget, "networkEndBlackoutImage", v, protocol.Metadata{}) + } + if s.NetworkId != nil { + v := *s.NetworkId + + e.SetValue(protocol.BodyTarget, "networkId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/BurnInDestinationSettings type BurnInDestinationSettings struct { _ struct{} `type:"structure"` @@ -2567,6 +3022,97 @@ func (s *BurnInDestinationSettings) SetYPosition(v int64) *BurnInDestinationSett return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BurnInDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Alignment != nil { + v := *s.Alignment + + e.SetValue(protocol.BodyTarget, "alignment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BackgroundColor != nil { + v := *s.BackgroundColor + + e.SetValue(protocol.BodyTarget, "backgroundColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BackgroundOpacity != nil { + v := *s.BackgroundOpacity + + e.SetValue(protocol.BodyTarget, "backgroundOpacity", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Font != nil { + v := s.Font + + e.SetFields(protocol.BodyTarget, "font", v, protocol.Metadata{}) + } + if s.FontColor != nil { + v := *s.FontColor + + e.SetValue(protocol.BodyTarget, "fontColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FontOpacity != nil { + v := *s.FontOpacity + + e.SetValue(protocol.BodyTarget, "fontOpacity", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FontResolution != nil { + v := *s.FontResolution + + e.SetValue(protocol.BodyTarget, "fontResolution", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FontSize != nil { + v := *s.FontSize + + e.SetValue(protocol.BodyTarget, "fontSize", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OutlineColor != nil { + v := *s.OutlineColor + + e.SetValue(protocol.BodyTarget, "outlineColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OutlineSize != nil { + v := *s.OutlineSize + + e.SetValue(protocol.BodyTarget, "outlineSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ShadowColor != nil { + v := *s.ShadowColor + + e.SetValue(protocol.BodyTarget, "shadowColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ShadowOpacity != nil { + v := *s.ShadowOpacity + + e.SetValue(protocol.BodyTarget, "shadowOpacity", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ShadowXOffset != nil { + v := *s.ShadowXOffset + + e.SetValue(protocol.BodyTarget, "shadowXOffset", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ShadowYOffset != nil { + v := *s.ShadowYOffset + + e.SetValue(protocol.BodyTarget, "shadowYOffset", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TeletextGridControl != nil { + v := *s.TeletextGridControl + + e.SetValue(protocol.BodyTarget, "teletextGridControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.XPosition != nil { + v := *s.XPosition + + e.SetValue(protocol.BodyTarget, "xPosition", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.YPosition != nil { + v := *s.YPosition + + e.SetValue(protocol.BodyTarget, "yPosition", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Output groups for this Live Event. Output groups contain information about // where streams should be distributed. // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CaptionDescription @@ -2633,11 +3179,50 @@ func (s *CaptionDescription) SetName(v string) *CaptionDescription { return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CaptionDestinationSettings -type CaptionDestinationSettings struct { - _ struct{} `type:"structure"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CaptionDescription) MarshalFields(e protocol.FieldEncoder) error { + if s.CaptionSelectorName != nil { + v := *s.CaptionSelectorName - AribDestinationSettings *AribDestinationSettings `locationName:"aribDestinationSettings" type:"structure"` + e.SetValue(protocol.BodyTarget, "captionSelectorName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DestinationSettings != nil { + v := s.DestinationSettings + + e.SetFields(protocol.BodyTarget, "destinationSettings", v, protocol.Metadata{}) + } + if s.LanguageCode != nil { + v := *s.LanguageCode + + e.SetValue(protocol.BodyTarget, "languageCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LanguageDescription != nil { + v := *s.LanguageDescription + + e.SetValue(protocol.BodyTarget, "languageDescription", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCaptionDescriptionList(vs []*CaptionDescription) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CaptionDestinationSettings +type CaptionDestinationSettings struct { + _ struct{} `type:"structure"` + + AribDestinationSettings *AribDestinationSettings `locationName:"aribDestinationSettings" type:"structure"` BurnInDestinationSettings *BurnInDestinationSettings `locationName:"burnInDestinationSettings" type:"structure"` @@ -2736,6 +3321,67 @@ func (s *CaptionDestinationSettings) SetWebvttDestinationSettings(v *WebvttDesti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CaptionDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AribDestinationSettings != nil { + v := s.AribDestinationSettings + + e.SetFields(protocol.BodyTarget, "aribDestinationSettings", v, protocol.Metadata{}) + } + if s.BurnInDestinationSettings != nil { + v := s.BurnInDestinationSettings + + e.SetFields(protocol.BodyTarget, "burnInDestinationSettings", v, protocol.Metadata{}) + } + if s.DvbSubDestinationSettings != nil { + v := s.DvbSubDestinationSettings + + e.SetFields(protocol.BodyTarget, "dvbSubDestinationSettings", v, protocol.Metadata{}) + } + if s.EmbeddedDestinationSettings != nil { + v := s.EmbeddedDestinationSettings + + e.SetFields(protocol.BodyTarget, "embeddedDestinationSettings", v, protocol.Metadata{}) + } + if s.EmbeddedPlusScte20DestinationSettings != nil { + v := s.EmbeddedPlusScte20DestinationSettings + + e.SetFields(protocol.BodyTarget, "embeddedPlusScte20DestinationSettings", v, protocol.Metadata{}) + } + if s.Scte20PlusEmbeddedDestinationSettings != nil { + v := s.Scte20PlusEmbeddedDestinationSettings + + e.SetFields(protocol.BodyTarget, "scte20PlusEmbeddedDestinationSettings", v, protocol.Metadata{}) + } + if s.Scte27DestinationSettings != nil { + v := s.Scte27DestinationSettings + + e.SetFields(protocol.BodyTarget, "scte27DestinationSettings", v, protocol.Metadata{}) + } + if s.SmpteTtDestinationSettings != nil { + v := s.SmpteTtDestinationSettings + + e.SetFields(protocol.BodyTarget, "smpteTtDestinationSettings", v, protocol.Metadata{}) + } + if s.TeletextDestinationSettings != nil { + v := s.TeletextDestinationSettings + + e.SetFields(protocol.BodyTarget, "teletextDestinationSettings", v, protocol.Metadata{}) + } + if s.TtmlDestinationSettings != nil { + v := s.TtmlDestinationSettings + + e.SetFields(protocol.BodyTarget, "ttmlDestinationSettings", v, protocol.Metadata{}) + } + if s.WebvttDestinationSettings != nil { + v := s.WebvttDestinationSettings + + e.SetFields(protocol.BodyTarget, "webvttDestinationSettings", v, protocol.Metadata{}) + } + + return nil +} + // Maps a caption channel to an ISO 693-2 language code (http://www.loc.gov/standards/iso639-2), // with an optional description. // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CaptionLanguageMapping @@ -2781,6 +3427,35 @@ func (s *CaptionLanguageMapping) SetLanguageDescription(v string) *CaptionLangua return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CaptionLanguageMapping) MarshalFields(e protocol.FieldEncoder) error { + if s.CaptionChannel != nil { + v := *s.CaptionChannel + + e.SetValue(protocol.BodyTarget, "captionChannel", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.LanguageCode != nil { + v := *s.LanguageCode + + e.SetValue(protocol.BodyTarget, "languageCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LanguageDescription != nil { + v := *s.LanguageDescription + + e.SetValue(protocol.BodyTarget, "languageDescription", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCaptionLanguageMappingList(vs []*CaptionLanguageMapping) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Output groups for this Live Event. Output groups contain information about // where streams should be distributed. // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CaptionSelector @@ -2828,6 +3503,35 @@ func (s *CaptionSelector) SetSelectorSettings(v *CaptionSelectorSettings) *Capti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CaptionSelector) MarshalFields(e protocol.FieldEncoder) error { + if s.LanguageCode != nil { + v := *s.LanguageCode + + e.SetValue(protocol.BodyTarget, "languageCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SelectorSettings != nil { + v := s.SelectorSettings + + e.SetFields(protocol.BodyTarget, "selectorSettings", v, protocol.Metadata{}) + } + + return nil +} + +func encodeCaptionSelectorList(vs []*CaptionSelector) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CaptionSelectorSettings type CaptionSelectorSettings struct { _ struct{} `type:"structure"` @@ -2891,6 +3595,42 @@ func (s *CaptionSelectorSettings) SetTeletextSourceSettings(v *TeletextSourceSet return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CaptionSelectorSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AribSourceSettings != nil { + v := s.AribSourceSettings + + e.SetFields(protocol.BodyTarget, "aribSourceSettings", v, protocol.Metadata{}) + } + if s.DvbSubSourceSettings != nil { + v := s.DvbSubSourceSettings + + e.SetFields(protocol.BodyTarget, "dvbSubSourceSettings", v, protocol.Metadata{}) + } + if s.EmbeddedSourceSettings != nil { + v := s.EmbeddedSourceSettings + + e.SetFields(protocol.BodyTarget, "embeddedSourceSettings", v, protocol.Metadata{}) + } + if s.Scte20SourceSettings != nil { + v := s.Scte20SourceSettings + + e.SetFields(protocol.BodyTarget, "scte20SourceSettings", v, protocol.Metadata{}) + } + if s.Scte27SourceSettings != nil { + v := s.Scte27SourceSettings + + e.SetFields(protocol.BodyTarget, "scte27SourceSettings", v, protocol.Metadata{}) + } + if s.TeletextSourceSettings != nil { + v := s.TeletextSourceSettings + + e.SetFields(protocol.BodyTarget, "teletextSourceSettings", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/Channel type Channel struct { _ struct{} `type:"structure"` @@ -2996,6 +3736,62 @@ func (s *Channel) SetState(v string) *Channel { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Channel) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Destinations) > 0 { + v := s.Destinations + + e.SetList(protocol.BodyTarget, "destinations", encodeOutputDestinationList(v), protocol.Metadata{}) + } + if len(s.EgressEndpoints) > 0 { + v := s.EgressEndpoints + + e.SetList(protocol.BodyTarget, "egressEndpoints", encodeChannelEgressEndpointList(v), protocol.Metadata{}) + } + if s.EncoderSettings != nil { + v := s.EncoderSettings + + e.SetFields(protocol.BodyTarget, "encoderSettings", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.InputAttachments) > 0 { + v := s.InputAttachments + + e.SetList(protocol.BodyTarget, "inputAttachments", encodeInputAttachmentList(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PipelinesRunningCount != nil { + v := *s.PipelinesRunningCount + + e.SetValue(protocol.BodyTarget, "pipelinesRunningCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ChannelEgressEndpoint type ChannelEgressEndpoint struct { _ struct{} `type:"structure"` @@ -3020,6 +3816,25 @@ func (s *ChannelEgressEndpoint) SetSourceIp(v string) *ChannelEgressEndpoint { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ChannelEgressEndpoint) MarshalFields(e protocol.FieldEncoder) error { + if s.SourceIp != nil { + v := *s.SourceIp + + e.SetValue(protocol.BodyTarget, "sourceIp", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeChannelEgressEndpointList(vs []*ChannelEgressEndpoint) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ChannelSummary type ChannelSummary struct { _ struct{} `type:"structure"` @@ -3117,6 +3932,65 @@ func (s *ChannelSummary) SetState(v string) *ChannelSummary { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ChannelSummary) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Destinations) > 0 { + v := s.Destinations + + e.SetList(protocol.BodyTarget, "destinations", encodeOutputDestinationList(v), protocol.Metadata{}) + } + if len(s.EgressEndpoints) > 0 { + v := s.EgressEndpoints + + e.SetList(protocol.BodyTarget, "egressEndpoints", encodeChannelEgressEndpointList(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.InputAttachments) > 0 { + v := s.InputAttachments + + e.SetList(protocol.BodyTarget, "inputAttachments", encodeInputAttachmentList(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PipelinesRunningCount != nil { + v := *s.PipelinesRunningCount + + e.SetValue(protocol.BodyTarget, "pipelinesRunningCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeChannelSummaryList(vs []*ChannelSummary) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateChannelRequest type CreateChannelInput struct { _ struct{} `type:"structure"` @@ -3188,6 +4062,53 @@ func (s *CreateChannelInput) SetRoleArn(v string) *CreateChannelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Destinations) > 0 { + v := s.Destinations + + e.SetList(protocol.BodyTarget, "destinations", encodeOutputDestinationList(v), protocol.Metadata{}) + } + if s.EncoderSettings != nil { + v := s.EncoderSettings + + e.SetFields(protocol.BodyTarget, "encoderSettings", v, protocol.Metadata{}) + } + if len(s.InputAttachments) > 0 { + v := s.InputAttachments + + e.SetList(protocol.BodyTarget, "inputAttachments", encodeInputAttachmentList(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + var RequestId string + if s.RequestId != nil { + RequestId = *s.RequestId + } else { + RequestId = protocol.GetIdempotencyToken() + } + { + v := RequestId + + e.SetValue(protocol.BodyTarget, "requestId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Reserved != nil { + v := *s.Reserved + + e.SetValue(protocol.BodyTarget, "reserved", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateChannelResponse type CreateChannelOutput struct { _ struct{} `type:"structure"` @@ -3211,6 +4132,17 @@ func (s *CreateChannelOutput) SetChannel(v *Channel) *CreateChannelOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Channel != nil { + v := s.Channel + + e.SetFields(protocol.BodyTarget, "channel", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateInputRequest type CreateInputInput struct { _ struct{} `type:"structure"` @@ -3274,6 +4206,48 @@ func (s *CreateInputInput) SetType(v string) *CreateInputInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateInputInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Destinations) > 0 { + v := s.Destinations + + e.SetList(protocol.BodyTarget, "destinations", encodeInputDestinationRequestList(v), protocol.Metadata{}) + } + if len(s.InputSecurityGroups) > 0 { + v := s.InputSecurityGroups + + e.SetList(protocol.BodyTarget, "inputSecurityGroups", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + var RequestId string + if s.RequestId != nil { + RequestId = *s.RequestId + } else { + RequestId = protocol.GetIdempotencyToken() + } + { + v := RequestId + + e.SetValue(protocol.BodyTarget, "requestId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Sources) > 0 { + v := s.Sources + + e.SetList(protocol.BodyTarget, "sources", encodeInputSourceRequestList(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateInputResponse type CreateInputOutput struct { _ struct{} `type:"structure"` @@ -3297,6 +4271,17 @@ func (s *CreateInputOutput) SetInput(v *Input) *CreateInputOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateInputOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Input != nil { + v := s.Input + + e.SetFields(protocol.BodyTarget, "input", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateInputSecurityGroupRequest type CreateInputSecurityGroupInput struct { _ struct{} `type:"structure"` @@ -3320,6 +4305,17 @@ func (s *CreateInputSecurityGroupInput) SetWhitelistRules(v []*InputWhitelistRul return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateInputSecurityGroupInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.WhitelistRules) > 0 { + v := s.WhitelistRules + + e.SetList(protocol.BodyTarget, "whitelistRules", encodeInputWhitelistRuleCidrList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/CreateInputSecurityGroupResponse type CreateInputSecurityGroupOutput struct { _ struct{} `type:"structure"` @@ -3344,6 +4340,17 @@ func (s *CreateInputSecurityGroupOutput) SetSecurityGroup(v *InputSecurityGroup) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateInputSecurityGroupOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.SecurityGroup != nil { + v := s.SecurityGroup + + e.SetFields(protocol.BodyTarget, "securityGroup", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteChannelRequest type DeleteChannelInput struct { _ struct{} `type:"structure"` @@ -3381,6 +4388,17 @@ func (s *DeleteChannelInput) SetChannelId(v string) *DeleteChannelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ChannelId != nil { + v := *s.ChannelId + + e.SetValue(protocol.PathTarget, "channelId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteChannelResponse type DeleteChannelOutput struct { _ struct{} `type:"structure"` @@ -3476,6 +4494,62 @@ func (s *DeleteChannelOutput) SetState(v string) *DeleteChannelOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Destinations) > 0 { + v := s.Destinations + + e.SetList(protocol.BodyTarget, "destinations", encodeOutputDestinationList(v), protocol.Metadata{}) + } + if len(s.EgressEndpoints) > 0 { + v := s.EgressEndpoints + + e.SetList(protocol.BodyTarget, "egressEndpoints", encodeChannelEgressEndpointList(v), protocol.Metadata{}) + } + if s.EncoderSettings != nil { + v := s.EncoderSettings + + e.SetFields(protocol.BodyTarget, "encoderSettings", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.InputAttachments) > 0 { + v := s.InputAttachments + + e.SetList(protocol.BodyTarget, "inputAttachments", encodeInputAttachmentList(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PipelinesRunningCount != nil { + v := *s.PipelinesRunningCount + + e.SetValue(protocol.BodyTarget, "pipelinesRunningCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteInputRequest type DeleteInputInput struct { _ struct{} `type:"structure"` @@ -3513,6 +4587,17 @@ func (s *DeleteInputInput) SetInputId(v string) *DeleteInputInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteInputInput) MarshalFields(e protocol.FieldEncoder) error { + if s.InputId != nil { + v := *s.InputId + + e.SetValue(protocol.PathTarget, "inputId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteInputResponse type DeleteInputOutput struct { _ struct{} `type:"structure"` @@ -3528,6 +4613,12 @@ func (s DeleteInputOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteInputOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteInputSecurityGroupRequest type DeleteInputSecurityGroupInput struct { _ struct{} `type:"structure"` @@ -3565,6 +4656,17 @@ func (s *DeleteInputSecurityGroupInput) SetInputSecurityGroupId(v string) *Delet return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteInputSecurityGroupInput) MarshalFields(e protocol.FieldEncoder) error { + if s.InputSecurityGroupId != nil { + v := *s.InputSecurityGroupId + + e.SetValue(protocol.PathTarget, "inputSecurityGroupId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DeleteInputSecurityGroupResponse type DeleteInputSecurityGroupOutput struct { _ struct{} `type:"structure"` @@ -3580,6 +4682,12 @@ func (s DeleteInputSecurityGroupOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteInputSecurityGroupOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeChannelRequest type DescribeChannelInput struct { _ struct{} `type:"structure"` @@ -3617,6 +4725,17 @@ func (s *DescribeChannelInput) SetChannelId(v string) *DescribeChannelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ChannelId != nil { + v := *s.ChannelId + + e.SetValue(protocol.PathTarget, "channelId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeChannelResponse type DescribeChannelOutput struct { _ struct{} `type:"structure"` @@ -3712,6 +4831,62 @@ func (s *DescribeChannelOutput) SetState(v string) *DescribeChannelOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Destinations) > 0 { + v := s.Destinations + + e.SetList(protocol.BodyTarget, "destinations", encodeOutputDestinationList(v), protocol.Metadata{}) + } + if len(s.EgressEndpoints) > 0 { + v := s.EgressEndpoints + + e.SetList(protocol.BodyTarget, "egressEndpoints", encodeChannelEgressEndpointList(v), protocol.Metadata{}) + } + if s.EncoderSettings != nil { + v := s.EncoderSettings + + e.SetFields(protocol.BodyTarget, "encoderSettings", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.InputAttachments) > 0 { + v := s.InputAttachments + + e.SetList(protocol.BodyTarget, "inputAttachments", encodeInputAttachmentList(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PipelinesRunningCount != nil { + v := *s.PipelinesRunningCount + + e.SetValue(protocol.BodyTarget, "pipelinesRunningCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeInputRequest type DescribeInputInput struct { _ struct{} `type:"structure"` @@ -3749,6 +4924,17 @@ func (s *DescribeInputInput) SetInputId(v string) *DescribeInputInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeInputInput) MarshalFields(e protocol.FieldEncoder) error { + if s.InputId != nil { + v := *s.InputId + + e.SetValue(protocol.PathTarget, "inputId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeInputResponse type DescribeInputOutput struct { _ struct{} `type:"structure"` @@ -3836,6 +5022,57 @@ func (s *DescribeInputOutput) SetType(v string) *DescribeInputOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeInputOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.AttachedChannels) > 0 { + v := s.AttachedChannels + + e.SetList(protocol.BodyTarget, "attachedChannels", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.Destinations) > 0 { + v := s.Destinations + + e.SetList(protocol.BodyTarget, "destinations", encodeInputDestinationList(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SecurityGroups) > 0 { + v := s.SecurityGroups + + e.SetList(protocol.BodyTarget, "securityGroups", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.Sources) > 0 { + v := s.Sources + + e.SetList(protocol.BodyTarget, "sources", encodeInputSourceList(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeInputSecurityGroupRequest type DescribeInputSecurityGroupInput struct { _ struct{} `type:"structure"` @@ -3873,6 +5110,17 @@ func (s *DescribeInputSecurityGroupInput) SetInputSecurityGroupId(v string) *Des return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeInputSecurityGroupInput) MarshalFields(e protocol.FieldEncoder) error { + if s.InputSecurityGroupId != nil { + v := *s.InputSecurityGroupId + + e.SetValue(protocol.PathTarget, "inputSecurityGroupId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DescribeInputSecurityGroupResponse type DescribeInputSecurityGroupOutput struct { _ struct{} `type:"structure"` @@ -3912,6 +5160,27 @@ func (s *DescribeInputSecurityGroupOutput) SetWhitelistRules(v []*InputWhitelist return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeInputSecurityGroupOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.WhitelistRules) > 0 { + v := s.WhitelistRules + + e.SetList(protocol.BodyTarget, "whitelistRules", encodeInputWhitelistRuleList(v), protocol.Metadata{}) + } + + return nil +} + // DVB Network Information Table (NIT) // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DvbNitSettings type DvbNitSettings struct { @@ -3957,6 +5226,27 @@ func (s *DvbNitSettings) SetRepInterval(v int64) *DvbNitSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DvbNitSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.NetworkId != nil { + v := *s.NetworkId + + e.SetValue(protocol.BodyTarget, "networkId", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NetworkName != nil { + v := *s.NetworkName + + e.SetValue(protocol.BodyTarget, "networkName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RepInterval != nil { + v := *s.RepInterval + + e.SetValue(protocol.BodyTarget, "repInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // DVB Service Description Table (SDT) // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DvbSdtSettings type DvbSdtSettings struct { @@ -4017,6 +5307,32 @@ func (s *DvbSdtSettings) SetServiceProviderName(v string) *DvbSdtSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DvbSdtSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.OutputSdt != nil { + v := *s.OutputSdt + + e.SetValue(protocol.BodyTarget, "outputSdt", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RepInterval != nil { + v := *s.RepInterval + + e.SetValue(protocol.BodyTarget, "repInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ServiceName != nil { + v := *s.ServiceName + + e.SetValue(protocol.BodyTarget, "serviceName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServiceProviderName != nil { + v := *s.ServiceProviderName + + e.SetValue(protocol.BodyTarget, "serviceProviderName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DvbSubDestinationSettings type DvbSubDestinationSettings struct { _ struct{} `type:"structure"` @@ -4233,6 +5549,97 @@ func (s *DvbSubDestinationSettings) SetYPosition(v int64) *DvbSubDestinationSett return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DvbSubDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Alignment != nil { + v := *s.Alignment + + e.SetValue(protocol.BodyTarget, "alignment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BackgroundColor != nil { + v := *s.BackgroundColor + + e.SetValue(protocol.BodyTarget, "backgroundColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BackgroundOpacity != nil { + v := *s.BackgroundOpacity + + e.SetValue(protocol.BodyTarget, "backgroundOpacity", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Font != nil { + v := s.Font + + e.SetFields(protocol.BodyTarget, "font", v, protocol.Metadata{}) + } + if s.FontColor != nil { + v := *s.FontColor + + e.SetValue(protocol.BodyTarget, "fontColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FontOpacity != nil { + v := *s.FontOpacity + + e.SetValue(protocol.BodyTarget, "fontOpacity", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FontResolution != nil { + v := *s.FontResolution + + e.SetValue(protocol.BodyTarget, "fontResolution", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FontSize != nil { + v := *s.FontSize + + e.SetValue(protocol.BodyTarget, "fontSize", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OutlineColor != nil { + v := *s.OutlineColor + + e.SetValue(protocol.BodyTarget, "outlineColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OutlineSize != nil { + v := *s.OutlineSize + + e.SetValue(protocol.BodyTarget, "outlineSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ShadowColor != nil { + v := *s.ShadowColor + + e.SetValue(protocol.BodyTarget, "shadowColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ShadowOpacity != nil { + v := *s.ShadowOpacity + + e.SetValue(protocol.BodyTarget, "shadowOpacity", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ShadowXOffset != nil { + v := *s.ShadowXOffset + + e.SetValue(protocol.BodyTarget, "shadowXOffset", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ShadowYOffset != nil { + v := *s.ShadowYOffset + + e.SetValue(protocol.BodyTarget, "shadowYOffset", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TeletextGridControl != nil { + v := *s.TeletextGridControl + + e.SetValue(protocol.BodyTarget, "teletextGridControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.XPosition != nil { + v := *s.XPosition + + e.SetValue(protocol.BodyTarget, "xPosition", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.YPosition != nil { + v := *s.YPosition + + e.SetValue(protocol.BodyTarget, "yPosition", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DvbSubSourceSettings type DvbSubSourceSettings struct { _ struct{} `type:"structure"` @@ -4259,6 +5666,17 @@ func (s *DvbSubSourceSettings) SetPid(v int64) *DvbSubSourceSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DvbSubSourceSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Pid != nil { + v := *s.Pid + + e.SetValue(protocol.BodyTarget, "pid", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // DVB Time and Date Table (SDT) // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/DvbTdtSettings type DvbTdtSettings struct { @@ -4285,6 +5703,17 @@ func (s *DvbTdtSettings) SetRepInterval(v int64) *DvbTdtSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DvbTdtSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.RepInterval != nil { + v := *s.RepInterval + + e.SetValue(protocol.BodyTarget, "repInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/Eac3Settings type Eac3Settings struct { _ struct{} `type:"structure"` @@ -4493,6 +5922,112 @@ func (s *Eac3Settings) SetSurroundMode(v string) *Eac3Settings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Eac3Settings) MarshalFields(e protocol.FieldEncoder) error { + if s.AttenuationControl != nil { + v := *s.AttenuationControl + + e.SetValue(protocol.BodyTarget, "attenuationControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Bitrate != nil { + v := *s.Bitrate + + e.SetValue(protocol.BodyTarget, "bitrate", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.BitstreamMode != nil { + v := *s.BitstreamMode + + e.SetValue(protocol.BodyTarget, "bitstreamMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CodingMode != nil { + v := *s.CodingMode + + e.SetValue(protocol.BodyTarget, "codingMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DcFilter != nil { + v := *s.DcFilter + + e.SetValue(protocol.BodyTarget, "dcFilter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Dialnorm != nil { + v := *s.Dialnorm + + e.SetValue(protocol.BodyTarget, "dialnorm", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.DrcLine != nil { + v := *s.DrcLine + + e.SetValue(protocol.BodyTarget, "drcLine", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DrcRf != nil { + v := *s.DrcRf + + e.SetValue(protocol.BodyTarget, "drcRf", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LfeControl != nil { + v := *s.LfeControl + + e.SetValue(protocol.BodyTarget, "lfeControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LfeFilter != nil { + v := *s.LfeFilter + + e.SetValue(protocol.BodyTarget, "lfeFilter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LoRoCenterMixLevel != nil { + v := *s.LoRoCenterMixLevel + + e.SetValue(protocol.BodyTarget, "loRoCenterMixLevel", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.LoRoSurroundMixLevel != nil { + v := *s.LoRoSurroundMixLevel + + e.SetValue(protocol.BodyTarget, "loRoSurroundMixLevel", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.LtRtCenterMixLevel != nil { + v := *s.LtRtCenterMixLevel + + e.SetValue(protocol.BodyTarget, "ltRtCenterMixLevel", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.LtRtSurroundMixLevel != nil { + v := *s.LtRtSurroundMixLevel + + e.SetValue(protocol.BodyTarget, "ltRtSurroundMixLevel", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.MetadataControl != nil { + v := *s.MetadataControl + + e.SetValue(protocol.BodyTarget, "metadataControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PassthroughControl != nil { + v := *s.PassthroughControl + + e.SetValue(protocol.BodyTarget, "passthroughControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PhaseControl != nil { + v := *s.PhaseControl + + e.SetValue(protocol.BodyTarget, "phaseControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StereoDownmix != nil { + v := *s.StereoDownmix + + e.SetValue(protocol.BodyTarget, "stereoDownmix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SurroundExMode != nil { + v := *s.SurroundExMode + + e.SetValue(protocol.BodyTarget, "surroundExMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SurroundMode != nil { + v := *s.SurroundMode + + e.SetValue(protocol.BodyTarget, "surroundMode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/EmbeddedDestinationSettings type EmbeddedDestinationSettings struct { _ struct{} `type:"structure"` @@ -4508,6 +6043,12 @@ func (s EmbeddedDestinationSettings) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EmbeddedDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/EmbeddedPlusScte20DestinationSettings type EmbeddedPlusScte20DestinationSettings struct { _ struct{} `type:"structure"` @@ -4523,6 +6064,12 @@ func (s EmbeddedPlusScte20DestinationSettings) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EmbeddedPlusScte20DestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/EmbeddedSourceSettings type EmbeddedSourceSettings struct { _ struct{} `type:"structure"` @@ -4578,6 +6125,32 @@ func (s *EmbeddedSourceSettings) SetSource608TrackNumber(v int64) *EmbeddedSourc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EmbeddedSourceSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Convert608To708 != nil { + v := *s.Convert608To708 + + e.SetValue(protocol.BodyTarget, "convert608To708", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Scte20Detection != nil { + v := *s.Scte20Detection + + e.SetValue(protocol.BodyTarget, "scte20Detection", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Source608ChannelNumber != nil { + v := *s.Source608ChannelNumber + + e.SetValue(protocol.BodyTarget, "source608ChannelNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Source608TrackNumber != nil { + v := *s.Source608TrackNumber + + e.SetValue(protocol.BodyTarget, "source608TrackNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/EncoderSettings type EncoderSettings struct { _ struct{} `type:"structure"` @@ -4671,6 +6244,57 @@ func (s *EncoderSettings) SetVideoDescriptions(v []*VideoDescription) *EncoderSe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EncoderSettings) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AudioDescriptions) > 0 { + v := s.AudioDescriptions + + e.SetList(protocol.BodyTarget, "audioDescriptions", encodeAudioDescriptionList(v), protocol.Metadata{}) + } + if s.AvailBlanking != nil { + v := s.AvailBlanking + + e.SetFields(protocol.BodyTarget, "availBlanking", v, protocol.Metadata{}) + } + if s.AvailConfiguration != nil { + v := s.AvailConfiguration + + e.SetFields(protocol.BodyTarget, "availConfiguration", v, protocol.Metadata{}) + } + if s.BlackoutSlate != nil { + v := s.BlackoutSlate + + e.SetFields(protocol.BodyTarget, "blackoutSlate", v, protocol.Metadata{}) + } + if len(s.CaptionDescriptions) > 0 { + v := s.CaptionDescriptions + + e.SetList(protocol.BodyTarget, "captionDescriptions", encodeCaptionDescriptionList(v), protocol.Metadata{}) + } + if s.GlobalConfiguration != nil { + v := s.GlobalConfiguration + + e.SetFields(protocol.BodyTarget, "globalConfiguration", v, protocol.Metadata{}) + } + if len(s.OutputGroups) > 0 { + v := s.OutputGroups + + e.SetList(protocol.BodyTarget, "outputGroups", encodeOutputGroupList(v), protocol.Metadata{}) + } + if s.TimecodeConfig != nil { + v := s.TimecodeConfig + + e.SetFields(protocol.BodyTarget, "timecodeConfig", v, protocol.Metadata{}) + } + if len(s.VideoDescriptions) > 0 { + v := s.VideoDescriptions + + e.SetList(protocol.BodyTarget, "videoDescriptions", encodeVideoDescriptionList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/FecOutputSettings type FecOutputSettings struct { _ struct{} `type:"structure"` @@ -4720,6 +6344,27 @@ func (s *FecOutputSettings) SetRowLength(v int64) *FecOutputSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FecOutputSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.ColumnDepth != nil { + v := *s.ColumnDepth + + e.SetValue(protocol.BodyTarget, "columnDepth", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.IncludeFec != nil { + v := *s.IncludeFec + + e.SetValue(protocol.BodyTarget, "includeFec", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RowLength != nil { + v := *s.RowLength + + e.SetValue(protocol.BodyTarget, "rowLength", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/GlobalConfiguration type GlobalConfiguration struct { _ struct{} `type:"structure"` @@ -4790,6 +6435,37 @@ func (s *GlobalConfiguration) SetSupportLowFramerateInputs(v string) *GlobalConf return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GlobalConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.InitialAudioGain != nil { + v := *s.InitialAudioGain + + e.SetValue(protocol.BodyTarget, "initialAudioGain", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.InputEndAction != nil { + v := *s.InputEndAction + + e.SetValue(protocol.BodyTarget, "inputEndAction", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InputLossBehavior != nil { + v := s.InputLossBehavior + + e.SetFields(protocol.BodyTarget, "inputLossBehavior", v, protocol.Metadata{}) + } + if s.OutputTimingSource != nil { + v := *s.OutputTimingSource + + e.SetValue(protocol.BodyTarget, "outputTimingSource", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SupportLowFramerateInputs != nil { + v := *s.SupportLowFramerateInputs + + e.SetValue(protocol.BodyTarget, "supportLowFramerateInputs", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/H264Settings type H264Settings struct { _ struct{} `type:"structure"` @@ -5159,6 +6835,187 @@ func (s *H264Settings) SetTimecodeInsertion(v string) *H264Settings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *H264Settings) MarshalFields(e protocol.FieldEncoder) error { + if s.AdaptiveQuantization != nil { + v := *s.AdaptiveQuantization + + e.SetValue(protocol.BodyTarget, "adaptiveQuantization", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AfdSignaling != nil { + v := *s.AfdSignaling + + e.SetValue(protocol.BodyTarget, "afdSignaling", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Bitrate != nil { + v := *s.Bitrate + + e.SetValue(protocol.BodyTarget, "bitrate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.BufFillPct != nil { + v := *s.BufFillPct + + e.SetValue(protocol.BodyTarget, "bufFillPct", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.BufSize != nil { + v := *s.BufSize + + e.SetValue(protocol.BodyTarget, "bufSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ColorMetadata != nil { + v := *s.ColorMetadata + + e.SetValue(protocol.BodyTarget, "colorMetadata", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EntropyEncoding != nil { + v := *s.EntropyEncoding + + e.SetValue(protocol.BodyTarget, "entropyEncoding", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FixedAfd != nil { + v := *s.FixedAfd + + e.SetValue(protocol.BodyTarget, "fixedAfd", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FlickerAq != nil { + v := *s.FlickerAq + + e.SetValue(protocol.BodyTarget, "flickerAq", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FramerateControl != nil { + v := *s.FramerateControl + + e.SetValue(protocol.BodyTarget, "framerateControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FramerateDenominator != nil { + v := *s.FramerateDenominator + + e.SetValue(protocol.BodyTarget, "framerateDenominator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FramerateNumerator != nil { + v := *s.FramerateNumerator + + e.SetValue(protocol.BodyTarget, "framerateNumerator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.GopBReference != nil { + v := *s.GopBReference + + e.SetValue(protocol.BodyTarget, "gopBReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GopClosedCadence != nil { + v := *s.GopClosedCadence + + e.SetValue(protocol.BodyTarget, "gopClosedCadence", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.GopNumBFrames != nil { + v := *s.GopNumBFrames + + e.SetValue(protocol.BodyTarget, "gopNumBFrames", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.GopSize != nil { + v := *s.GopSize + + e.SetValue(protocol.BodyTarget, "gopSize", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.GopSizeUnits != nil { + v := *s.GopSizeUnits + + e.SetValue(protocol.BodyTarget, "gopSizeUnits", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Level != nil { + v := *s.Level + + e.SetValue(protocol.BodyTarget, "level", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LookAheadRateControl != nil { + v := *s.LookAheadRateControl + + e.SetValue(protocol.BodyTarget, "lookAheadRateControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxBitrate != nil { + v := *s.MaxBitrate + + e.SetValue(protocol.BodyTarget, "maxBitrate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MinIInterval != nil { + v := *s.MinIInterval + + e.SetValue(protocol.BodyTarget, "minIInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NumRefFrames != nil { + v := *s.NumRefFrames + + e.SetValue(protocol.BodyTarget, "numRefFrames", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ParControl != nil { + v := *s.ParControl + + e.SetValue(protocol.BodyTarget, "parControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParDenominator != nil { + v := *s.ParDenominator + + e.SetValue(protocol.BodyTarget, "parDenominator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ParNumerator != nil { + v := *s.ParNumerator + + e.SetValue(protocol.BodyTarget, "parNumerator", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Profile != nil { + v := *s.Profile + + e.SetValue(protocol.BodyTarget, "profile", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RateControlMode != nil { + v := *s.RateControlMode + + e.SetValue(protocol.BodyTarget, "rateControlMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ScanType != nil { + v := *s.ScanType + + e.SetValue(protocol.BodyTarget, "scanType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SceneChangeDetect != nil { + v := *s.SceneChangeDetect + + e.SetValue(protocol.BodyTarget, "sceneChangeDetect", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Slices != nil { + v := *s.Slices + + e.SetValue(protocol.BodyTarget, "slices", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Softness != nil { + v := *s.Softness + + e.SetValue(protocol.BodyTarget, "softness", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SpatialAq != nil { + v := *s.SpatialAq + + e.SetValue(protocol.BodyTarget, "spatialAq", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Syntax != nil { + v := *s.Syntax + + e.SetValue(protocol.BodyTarget, "syntax", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TemporalAq != nil { + v := *s.TemporalAq + + e.SetValue(protocol.BodyTarget, "temporalAq", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimecodeInsertion != nil { + v := *s.TimecodeInsertion + + e.SetValue(protocol.BodyTarget, "timecodeInsertion", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/HlsAkamaiSettings type HlsAkamaiSettings struct { _ struct{} `type:"structure"` @@ -5241,6 +7098,47 @@ func (s *HlsAkamaiSettings) SetToken(v string) *HlsAkamaiSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsAkamaiSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.ConnectionRetryInterval != nil { + v := *s.ConnectionRetryInterval + + e.SetValue(protocol.BodyTarget, "connectionRetryInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FilecacheDuration != nil { + v := *s.FilecacheDuration + + e.SetValue(protocol.BodyTarget, "filecacheDuration", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.HttpTransferMode != nil { + v := *s.HttpTransferMode + + e.SetValue(protocol.BodyTarget, "httpTransferMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NumRetries != nil { + v := *s.NumRetries + + e.SetValue(protocol.BodyTarget, "numRetries", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RestartDelay != nil { + v := *s.RestartDelay + + e.SetValue(protocol.BodyTarget, "restartDelay", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Salt != nil { + v := *s.Salt + + e.SetValue(protocol.BodyTarget, "salt", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Token != nil { + v := *s.Token + + e.SetValue(protocol.BodyTarget, "token", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/HlsBasicPutSettings type HlsBasicPutSettings struct { _ struct{} `type:"structure"` @@ -5295,6 +7193,32 @@ func (s *HlsBasicPutSettings) SetRestartDelay(v int64) *HlsBasicPutSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsBasicPutSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.ConnectionRetryInterval != nil { + v := *s.ConnectionRetryInterval + + e.SetValue(protocol.BodyTarget, "connectionRetryInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FilecacheDuration != nil { + v := *s.FilecacheDuration + + e.SetValue(protocol.BodyTarget, "filecacheDuration", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NumRetries != nil { + v := *s.NumRetries + + e.SetValue(protocol.BodyTarget, "numRetries", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RestartDelay != nil { + v := *s.RestartDelay + + e.SetValue(protocol.BodyTarget, "restartDelay", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/HlsCdnSettings type HlsCdnSettings struct { _ struct{} `type:"structure"` @@ -5342,6 +7266,32 @@ func (s *HlsCdnSettings) SetHlsWebdavSettings(v *HlsWebdavSettings) *HlsCdnSetti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsCdnSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.HlsAkamaiSettings != nil { + v := s.HlsAkamaiSettings + + e.SetFields(protocol.BodyTarget, "hlsAkamaiSettings", v, protocol.Metadata{}) + } + if s.HlsBasicPutSettings != nil { + v := s.HlsBasicPutSettings + + e.SetFields(protocol.BodyTarget, "hlsBasicPutSettings", v, protocol.Metadata{}) + } + if s.HlsMediaStoreSettings != nil { + v := s.HlsMediaStoreSettings + + e.SetFields(protocol.BodyTarget, "hlsMediaStoreSettings", v, protocol.Metadata{}) + } + if s.HlsWebdavSettings != nil { + v := s.HlsWebdavSettings + + e.SetFields(protocol.BodyTarget, "hlsWebdavSettings", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/HlsGroupSettings type HlsGroupSettings struct { _ struct{} `type:"structure"` @@ -5721,6 +7671,187 @@ func (s *HlsGroupSettings) SetTsFileMode(v string) *HlsGroupSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsGroupSettings) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AdMarkers) > 0 { + v := s.AdMarkers + + e.SetList(protocol.BodyTarget, "adMarkers", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.BaseUrlContent != nil { + v := *s.BaseUrlContent + + e.SetValue(protocol.BodyTarget, "baseUrlContent", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BaseUrlManifest != nil { + v := *s.BaseUrlManifest + + e.SetValue(protocol.BodyTarget, "baseUrlManifest", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.CaptionLanguageMappings) > 0 { + v := s.CaptionLanguageMappings + + e.SetList(protocol.BodyTarget, "captionLanguageMappings", encodeCaptionLanguageMappingList(v), protocol.Metadata{}) + } + if s.CaptionLanguageSetting != nil { + v := *s.CaptionLanguageSetting + + e.SetValue(protocol.BodyTarget, "captionLanguageSetting", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ClientCache != nil { + v := *s.ClientCache + + e.SetValue(protocol.BodyTarget, "clientCache", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CodecSpecification != nil { + v := *s.CodecSpecification + + e.SetValue(protocol.BodyTarget, "codecSpecification", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ConstantIv != nil { + v := *s.ConstantIv + + e.SetValue(protocol.BodyTarget, "constantIv", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Destination != nil { + v := s.Destination + + e.SetFields(protocol.BodyTarget, "destination", v, protocol.Metadata{}) + } + if s.DirectoryStructure != nil { + v := *s.DirectoryStructure + + e.SetValue(protocol.BodyTarget, "directoryStructure", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EncryptionType != nil { + v := *s.EncryptionType + + e.SetValue(protocol.BodyTarget, "encryptionType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HlsCdnSettings != nil { + v := s.HlsCdnSettings + + e.SetFields(protocol.BodyTarget, "hlsCdnSettings", v, protocol.Metadata{}) + } + if s.IndexNSegments != nil { + v := *s.IndexNSegments + + e.SetValue(protocol.BodyTarget, "indexNSegments", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.InputLossAction != nil { + v := *s.InputLossAction + + e.SetValue(protocol.BodyTarget, "inputLossAction", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IvInManifest != nil { + v := *s.IvInManifest + + e.SetValue(protocol.BodyTarget, "ivInManifest", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IvSource != nil { + v := *s.IvSource + + e.SetValue(protocol.BodyTarget, "ivSource", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeepSegments != nil { + v := *s.KeepSegments + + e.SetValue(protocol.BodyTarget, "keepSegments", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.KeyFormat != nil { + v := *s.KeyFormat + + e.SetValue(protocol.BodyTarget, "keyFormat", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyFormatVersions != nil { + v := *s.KeyFormatVersions + + e.SetValue(protocol.BodyTarget, "keyFormatVersions", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyProviderSettings != nil { + v := s.KeyProviderSettings + + e.SetFields(protocol.BodyTarget, "keyProviderSettings", v, protocol.Metadata{}) + } + if s.ManifestCompression != nil { + v := *s.ManifestCompression + + e.SetValue(protocol.BodyTarget, "manifestCompression", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ManifestDurationFormat != nil { + v := *s.ManifestDurationFormat + + e.SetValue(protocol.BodyTarget, "manifestDurationFormat", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MinSegmentLength != nil { + v := *s.MinSegmentLength + + e.SetValue(protocol.BodyTarget, "minSegmentLength", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Mode != nil { + v := *s.Mode + + e.SetValue(protocol.BodyTarget, "mode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OutputSelection != nil { + v := *s.OutputSelection + + e.SetValue(protocol.BodyTarget, "outputSelection", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ProgramDateTime != nil { + v := *s.ProgramDateTime + + e.SetValue(protocol.BodyTarget, "programDateTime", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ProgramDateTimePeriod != nil { + v := *s.ProgramDateTimePeriod + + e.SetValue(protocol.BodyTarget, "programDateTimePeriod", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SegmentLength != nil { + v := *s.SegmentLength + + e.SetValue(protocol.BodyTarget, "segmentLength", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SegmentationMode != nil { + v := *s.SegmentationMode + + e.SetValue(protocol.BodyTarget, "segmentationMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentsPerSubdirectory != nil { + v := *s.SegmentsPerSubdirectory + + e.SetValue(protocol.BodyTarget, "segmentsPerSubdirectory", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StreamInfResolution != nil { + v := *s.StreamInfResolution + + e.SetValue(protocol.BodyTarget, "streamInfResolution", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimedMetadataId3Frame != nil { + v := *s.TimedMetadataId3Frame + + e.SetValue(protocol.BodyTarget, "timedMetadataId3Frame", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimedMetadataId3Period != nil { + v := *s.TimedMetadataId3Period + + e.SetValue(protocol.BodyTarget, "timedMetadataId3Period", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TimestampDeltaMilliseconds != nil { + v := *s.TimestampDeltaMilliseconds + + e.SetValue(protocol.BodyTarget, "timestampDeltaMilliseconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TsFileMode != nil { + v := *s.TsFileMode + + e.SetValue(protocol.BodyTarget, "tsFileMode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/HlsInputSettings type HlsInputSettings struct { _ struct{} `type:"structure"` @@ -5779,6 +7910,32 @@ func (s *HlsInputSettings) SetRetryInterval(v int64) *HlsInputSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsInputSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Bandwidth != nil { + v := *s.Bandwidth + + e.SetValue(protocol.BodyTarget, "bandwidth", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.BufferSegments != nil { + v := *s.BufferSegments + + e.SetValue(protocol.BodyTarget, "bufferSegments", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Retries != nil { + v := *s.Retries + + e.SetValue(protocol.BodyTarget, "retries", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RetryInterval != nil { + v := *s.RetryInterval + + e.SetValue(protocol.BodyTarget, "retryInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/HlsMediaStoreSettings type HlsMediaStoreSettings struct { _ struct{} `type:"structure"` @@ -5843,6 +8000,37 @@ func (s *HlsMediaStoreSettings) SetRestartDelay(v int64) *HlsMediaStoreSettings return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsMediaStoreSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.ConnectionRetryInterval != nil { + v := *s.ConnectionRetryInterval + + e.SetValue(protocol.BodyTarget, "connectionRetryInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FilecacheDuration != nil { + v := *s.FilecacheDuration + + e.SetValue(protocol.BodyTarget, "filecacheDuration", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MediaStoreStorageClass != nil { + v := *s.MediaStoreStorageClass + + e.SetValue(protocol.BodyTarget, "mediaStoreStorageClass", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NumRetries != nil { + v := *s.NumRetries + + e.SetValue(protocol.BodyTarget, "numRetries", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RestartDelay != nil { + v := *s.RestartDelay + + e.SetValue(protocol.BodyTarget, "restartDelay", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/HlsOutputSettings type HlsOutputSettings struct { _ struct{} `type:"structure"` @@ -5887,6 +8075,27 @@ func (s *HlsOutputSettings) SetSegmentModifier(v string) *HlsOutputSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsOutputSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.HlsSettings != nil { + v := s.HlsSettings + + e.SetFields(protocol.BodyTarget, "hlsSettings", v, protocol.Metadata{}) + } + if s.NameModifier != nil { + v := *s.NameModifier + + e.SetValue(protocol.BodyTarget, "nameModifier", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentModifier != nil { + v := *s.SegmentModifier + + e.SetValue(protocol.BodyTarget, "segmentModifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/HlsSettings type HlsSettings struct { _ struct{} `type:"structure"` @@ -5918,6 +8127,22 @@ func (s *HlsSettings) SetStandardHlsSettings(v *StandardHlsSettings) *HlsSetting return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AudioOnlyHlsSettings != nil { + v := s.AudioOnlyHlsSettings + + e.SetFields(protocol.BodyTarget, "audioOnlyHlsSettings", v, protocol.Metadata{}) + } + if s.StandardHlsSettings != nil { + v := s.StandardHlsSettings + + e.SetFields(protocol.BodyTarget, "standardHlsSettings", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/HlsWebdavSettings type HlsWebdavSettings struct { _ struct{} `type:"structure"` @@ -5981,6 +8206,37 @@ func (s *HlsWebdavSettings) SetRestartDelay(v int64) *HlsWebdavSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsWebdavSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.ConnectionRetryInterval != nil { + v := *s.ConnectionRetryInterval + + e.SetValue(protocol.BodyTarget, "connectionRetryInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FilecacheDuration != nil { + v := *s.FilecacheDuration + + e.SetValue(protocol.BodyTarget, "filecacheDuration", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.HttpTransferMode != nil { + v := *s.HttpTransferMode + + e.SetValue(protocol.BodyTarget, "httpTransferMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NumRetries != nil { + v := *s.NumRetries + + e.SetValue(protocol.BodyTarget, "numRetries", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RestartDelay != nil { + v := *s.RestartDelay + + e.SetValue(protocol.BodyTarget, "restartDelay", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/Input type Input struct { _ struct{} `type:"structure"` @@ -6076,15 +8332,74 @@ func (s *Input) SetType(v string) *Input { return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/InputAttachment -type InputAttachment struct { - _ struct{} `type:"structure"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn - // The ID of the input - InputId *string `locationName:"inputId" type:"string"` + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.AttachedChannels) > 0 { + v := s.AttachedChannels - // Settings of an input (caption selector, etc.) - InputSettings *InputSettings `locationName:"inputSettings" type:"structure"` + e.SetList(protocol.BodyTarget, "attachedChannels", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.Destinations) > 0 { + v := s.Destinations + + e.SetList(protocol.BodyTarget, "destinations", encodeInputDestinationList(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SecurityGroups) > 0 { + v := s.SecurityGroups + + e.SetList(protocol.BodyTarget, "securityGroups", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.Sources) > 0 { + v := s.Sources + + e.SetList(protocol.BodyTarget, "sources", encodeInputSourceList(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeInputList(vs []*Input) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/InputAttachment +type InputAttachment struct { + _ struct{} `type:"structure"` + + // The ID of the input + InputId *string `locationName:"inputId" type:"string"` + + // Settings of an input (caption selector, etc.) + InputSettings *InputSettings `locationName:"inputSettings" type:"structure"` } // String returns the string representation @@ -6109,6 +8424,30 @@ func (s *InputAttachment) SetInputSettings(v *InputSettings) *InputAttachment { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputAttachment) MarshalFields(e protocol.FieldEncoder) error { + if s.InputId != nil { + v := *s.InputId + + e.SetValue(protocol.BodyTarget, "inputId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InputSettings != nil { + v := s.InputSettings + + e.SetFields(protocol.BodyTarget, "inputSettings", v, protocol.Metadata{}) + } + + return nil +} + +func encodeInputAttachmentList(vs []*InputAttachment) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/InputChannelLevel type InputChannelLevel struct { _ struct{} `type:"structure"` @@ -6143,6 +8482,30 @@ func (s *InputChannelLevel) SetInputChannel(v int64) *InputChannelLevel { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputChannelLevel) MarshalFields(e protocol.FieldEncoder) error { + if s.Gain != nil { + v := *s.Gain + + e.SetValue(protocol.BodyTarget, "gain", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.InputChannel != nil { + v := *s.InputChannel + + e.SetValue(protocol.BodyTarget, "inputChannel", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeInputChannelLevelList(vs []*InputChannelLevel) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Settings for a PUSH type input // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/InputDestination type InputDestination struct { @@ -6187,6 +8550,35 @@ func (s *InputDestination) SetUrl(v string) *InputDestination { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputDestination) MarshalFields(e protocol.FieldEncoder) error { + if s.Ip != nil { + v := *s.Ip + + e.SetValue(protocol.BodyTarget, "ip", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Port != nil { + v := *s.Port + + e.SetValue(protocol.BodyTarget, "port", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "url", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeInputDestinationList(vs []*InputDestination) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Endpoint settings for a PUSH type input // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/InputDestinationRequest type InputDestinationRequest struct { @@ -6212,6 +8604,25 @@ func (s *InputDestinationRequest) SetStreamName(v string) *InputDestinationReque return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputDestinationRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.StreamName != nil { + v := *s.StreamName + + e.SetValue(protocol.BodyTarget, "streamName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeInputDestinationRequestList(vs []*InputDestinationRequest) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/InputLocation type InputLocation struct { _ struct{} `type:"structure"` @@ -6259,6 +8670,27 @@ func (s *InputLocation) SetUsername(v string) *InputLocation { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputLocation) MarshalFields(e protocol.FieldEncoder) error { + if s.PasswordParam != nil { + v := *s.PasswordParam + + e.SetValue(protocol.BodyTarget, "passwordParam", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Uri != nil { + v := *s.Uri + + e.SetValue(protocol.BodyTarget, "uri", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Username != nil { + v := *s.Username + + e.SetValue(protocol.BodyTarget, "username", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/InputLossBehavior type InputLossBehavior struct { _ struct{} `type:"structure"` @@ -6327,6 +8759,37 @@ func (s *InputLossBehavior) SetRepeatFrameMsec(v int64) *InputLossBehavior { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputLossBehavior) MarshalFields(e protocol.FieldEncoder) error { + if s.BlackFrameMsec != nil { + v := *s.BlackFrameMsec + + e.SetValue(protocol.BodyTarget, "blackFrameMsec", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.InputLossImageColor != nil { + v := *s.InputLossImageColor + + e.SetValue(protocol.BodyTarget, "inputLossImageColor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InputLossImageSlate != nil { + v := s.InputLossImageSlate + + e.SetFields(protocol.BodyTarget, "inputLossImageSlate", v, protocol.Metadata{}) + } + if s.InputLossImageType != nil { + v := *s.InputLossImageType + + e.SetValue(protocol.BodyTarget, "inputLossImageType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RepeatFrameMsec != nil { + v := *s.RepeatFrameMsec + + e.SetValue(protocol.BodyTarget, "repeatFrameMsec", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // An Input Security Group // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/InputSecurityGroup type InputSecurityGroup struct { @@ -6370,6 +8833,35 @@ func (s *InputSecurityGroup) SetWhitelistRules(v []*InputWhitelistRule) *InputSe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputSecurityGroup) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.WhitelistRules) > 0 { + v := s.WhitelistRules + + e.SetList(protocol.BodyTarget, "whitelistRules", encodeInputWhitelistRuleList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeInputSecurityGroupList(vs []*InputSecurityGroup) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Live Event input parameters. There can be multiple inputs in a single Live // Event. // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/InputSettings @@ -6472,6 +8964,57 @@ func (s *InputSettings) SetVideoSelector(v *VideoSelector) *InputSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputSettings) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AudioSelectors) > 0 { + v := s.AudioSelectors + + e.SetList(protocol.BodyTarget, "audioSelectors", encodeAudioSelectorList(v), protocol.Metadata{}) + } + if len(s.CaptionSelectors) > 0 { + v := s.CaptionSelectors + + e.SetList(protocol.BodyTarget, "captionSelectors", encodeCaptionSelectorList(v), protocol.Metadata{}) + } + if s.DeblockFilter != nil { + v := *s.DeblockFilter + + e.SetValue(protocol.BodyTarget, "deblockFilter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DenoiseFilter != nil { + v := *s.DenoiseFilter + + e.SetValue(protocol.BodyTarget, "denoiseFilter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FilterStrength != nil { + v := *s.FilterStrength + + e.SetValue(protocol.BodyTarget, "filterStrength", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.InputFilter != nil { + v := *s.InputFilter + + e.SetValue(protocol.BodyTarget, "inputFilter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NetworkInputSettings != nil { + v := s.NetworkInputSettings + + e.SetFields(protocol.BodyTarget, "networkInputSettings", v, protocol.Metadata{}) + } + if s.SourceEndBehavior != nil { + v := *s.SourceEndBehavior + + e.SetValue(protocol.BodyTarget, "sourceEndBehavior", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VideoSelector != nil { + v := s.VideoSelector + + e.SetFields(protocol.BodyTarget, "videoSelector", v, protocol.Metadata{}) + } + + return nil +} + // Settings for a PULL type input // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/InputSource type InputSource struct { @@ -6515,6 +9058,35 @@ func (s *InputSource) SetUsername(v string) *InputSource { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputSource) MarshalFields(e protocol.FieldEncoder) error { + if s.PasswordParam != nil { + v := *s.PasswordParam + + e.SetValue(protocol.BodyTarget, "passwordParam", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "url", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Username != nil { + v := *s.Username + + e.SetValue(protocol.BodyTarget, "username", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeInputSourceList(vs []*InputSource) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Settings for for a PULL type input // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/InputSourceRequest type InputSourceRequest struct { @@ -6558,6 +9130,35 @@ func (s *InputSourceRequest) SetUsername(v string) *InputSourceRequest { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputSourceRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.PasswordParam != nil { + v := *s.PasswordParam + + e.SetValue(protocol.BodyTarget, "passwordParam", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "url", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Username != nil { + v := *s.Username + + e.SetValue(protocol.BodyTarget, "username", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeInputSourceRequestList(vs []*InputSourceRequest) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Whitelist rule // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/InputWhitelistRule type InputWhitelistRule struct { @@ -6583,6 +9184,25 @@ func (s *InputWhitelistRule) SetCidr(v string) *InputWhitelistRule { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputWhitelistRule) MarshalFields(e protocol.FieldEncoder) error { + if s.Cidr != nil { + v := *s.Cidr + + e.SetValue(protocol.BodyTarget, "cidr", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeInputWhitelistRuleList(vs []*InputWhitelistRule) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // An IPv4 CIDR to whitelist. // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/InputWhitelistRuleCidr type InputWhitelistRuleCidr struct { @@ -6608,6 +9228,25 @@ func (s *InputWhitelistRuleCidr) SetCidr(v string) *InputWhitelistRuleCidr { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InputWhitelistRuleCidr) MarshalFields(e protocol.FieldEncoder) error { + if s.Cidr != nil { + v := *s.Cidr + + e.SetValue(protocol.BodyTarget, "cidr", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeInputWhitelistRuleCidrList(vs []*InputWhitelistRuleCidr) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/KeyProviderSettings type KeyProviderSettings struct { _ struct{} `type:"structure"` @@ -6631,6 +9270,17 @@ func (s *KeyProviderSettings) SetStaticKeySettings(v *StaticKeySettings) *KeyPro return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *KeyProviderSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.StaticKeySettings != nil { + v := s.StaticKeySettings + + e.SetFields(protocol.BodyTarget, "staticKeySettings", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListChannelsRequest type ListChannelsInput struct { _ struct{} `type:"structure"` @@ -6675,6 +9325,22 @@ func (s *ListChannelsInput) SetNextToken(v string) *ListChannelsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListChannelsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListChannelsResponse type ListChannelsOutput struct { _ struct{} `type:"structure"` @@ -6706,6 +9372,22 @@ func (s *ListChannelsOutput) SetNextToken(v string) *ListChannelsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListChannelsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Channels) > 0 { + v := s.Channels + + e.SetList(protocol.BodyTarget, "channels", encodeChannelSummaryList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListInputSecurityGroupsRequest type ListInputSecurityGroupsInput struct { _ struct{} `type:"structure"` @@ -6750,6 +9432,22 @@ func (s *ListInputSecurityGroupsInput) SetNextToken(v string) *ListInputSecurity return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListInputSecurityGroupsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListInputSecurityGroupsResponse type ListInputSecurityGroupsOutput struct { _ struct{} `type:"structure"` @@ -6781,6 +9479,22 @@ func (s *ListInputSecurityGroupsOutput) SetNextToken(v string) *ListInputSecurit return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListInputSecurityGroupsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.InputSecurityGroups) > 0 { + v := s.InputSecurityGroups + + e.SetList(protocol.BodyTarget, "inputSecurityGroups", encodeInputSecurityGroupList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListInputsRequest type ListInputsInput struct { _ struct{} `type:"structure"` @@ -6825,6 +9539,22 @@ func (s *ListInputsInput) SetNextToken(v string) *ListInputsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListInputsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ListInputsResponse type ListInputsOutput struct { _ struct{} `type:"structure"` @@ -6856,6 +9586,22 @@ func (s *ListInputsOutput) SetNextToken(v string) *ListInputsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListInputsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Inputs) > 0 { + v := s.Inputs + + e.SetList(protocol.BodyTarget, "inputs", encodeInputList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/M2tsSettings type M2tsSettings struct { _ struct{} `type:"structure"` @@ -7370,31 +10116,267 @@ func (s *M2tsSettings) SetVideoPid(v string) *M2tsSettings { return s } -// Settings information for the .m3u8 container -// Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/M3u8Settings -type M3u8Settings struct { - _ struct{} `type:"structure"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *M2tsSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AbsentInputAudioBehavior != nil { + v := *s.AbsentInputAudioBehavior - // The number of audio frames to insert for each PES packet. - AudioFramesPerPes *int64 `locationName:"audioFramesPerPes" type:"integer"` + e.SetValue(protocol.BodyTarget, "absentInputAudioBehavior", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Arib != nil { + v := *s.Arib - // Packet Identifier (PID) of the elementary audio stream(s) in the transport - // stream. Multiple values are accepted, and can be entered in ranges and/or - // by comma separation. Can be entered as decimal or hexadecimal values. - AudioPids *string `locationName:"audioPids" type:"string"` + e.SetValue(protocol.BodyTarget, "arib", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AribCaptionsPid != nil { + v := *s.AribCaptionsPid - // ThePlatform-protected transport streams using 'microsoft' as Target Client - // include an ECM stream. This ECM stream contains the size, IV, and PTS of - // every sample in the transport stream. This stream PID is specified here. - // This PID has no effect on non ThePlatform-protected streams. - EcmPid *string `locationName:"ecmPid" type:"string"` + e.SetValue(protocol.BodyTarget, "aribCaptionsPid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AribCaptionsPidControl != nil { + v := *s.AribCaptionsPidControl - // The number of milliseconds between instances of this table in the output - // transport stream. A value of \"0\" writes out the PMT once per segment file. - PatInterval *int64 `locationName:"patInterval" type:"integer"` + e.SetValue(protocol.BodyTarget, "aribCaptionsPidControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AudioBufferModel != nil { + v := *s.AudioBufferModel - // When set to pcrEveryPesPacket, a Program Clock Reference value is inserted - // for every Packetized Elementary Stream (PES) header. This parameter is effective + e.SetValue(protocol.BodyTarget, "audioBufferModel", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AudioFramesPerPes != nil { + v := *s.AudioFramesPerPes + + e.SetValue(protocol.BodyTarget, "audioFramesPerPes", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.AudioPids != nil { + v := *s.AudioPids + + e.SetValue(protocol.BodyTarget, "audioPids", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AudioStreamType != nil { + v := *s.AudioStreamType + + e.SetValue(protocol.BodyTarget, "audioStreamType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Bitrate != nil { + v := *s.Bitrate + + e.SetValue(protocol.BodyTarget, "bitrate", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.BufferModel != nil { + v := *s.BufferModel + + e.SetValue(protocol.BodyTarget, "bufferModel", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CcDescriptor != nil { + v := *s.CcDescriptor + + e.SetValue(protocol.BodyTarget, "ccDescriptor", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DvbNitSettings != nil { + v := s.DvbNitSettings + + e.SetFields(protocol.BodyTarget, "dvbNitSettings", v, protocol.Metadata{}) + } + if s.DvbSdtSettings != nil { + v := s.DvbSdtSettings + + e.SetFields(protocol.BodyTarget, "dvbSdtSettings", v, protocol.Metadata{}) + } + if s.DvbSubPids != nil { + v := *s.DvbSubPids + + e.SetValue(protocol.BodyTarget, "dvbSubPids", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DvbTdtSettings != nil { + v := s.DvbTdtSettings + + e.SetFields(protocol.BodyTarget, "dvbTdtSettings", v, protocol.Metadata{}) + } + if s.DvbTeletextPid != nil { + v := *s.DvbTeletextPid + + e.SetValue(protocol.BodyTarget, "dvbTeletextPid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Ebif != nil { + v := *s.Ebif + + e.SetValue(protocol.BodyTarget, "ebif", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EbpAudioInterval != nil { + v := *s.EbpAudioInterval + + e.SetValue(protocol.BodyTarget, "ebpAudioInterval", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EbpLookaheadMs != nil { + v := *s.EbpLookaheadMs + + e.SetValue(protocol.BodyTarget, "ebpLookaheadMs", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.EbpPlacement != nil { + v := *s.EbpPlacement + + e.SetValue(protocol.BodyTarget, "ebpPlacement", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EcmPid != nil { + v := *s.EcmPid + + e.SetValue(protocol.BodyTarget, "ecmPid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EsRateInPes != nil { + v := *s.EsRateInPes + + e.SetValue(protocol.BodyTarget, "esRateInPes", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EtvPlatformPid != nil { + v := *s.EtvPlatformPid + + e.SetValue(protocol.BodyTarget, "etvPlatformPid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EtvSignalPid != nil { + v := *s.EtvSignalPid + + e.SetValue(protocol.BodyTarget, "etvSignalPid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FragmentTime != nil { + v := *s.FragmentTime + + e.SetValue(protocol.BodyTarget, "fragmentTime", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.Klv != nil { + v := *s.Klv + + e.SetValue(protocol.BodyTarget, "klv", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KlvDataPids != nil { + v := *s.KlvDataPids + + e.SetValue(protocol.BodyTarget, "klvDataPids", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NullPacketBitrate != nil { + v := *s.NullPacketBitrate + + e.SetValue(protocol.BodyTarget, "nullPacketBitrate", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.PatInterval != nil { + v := *s.PatInterval + + e.SetValue(protocol.BodyTarget, "patInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PcrControl != nil { + v := *s.PcrControl + + e.SetValue(protocol.BodyTarget, "pcrControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PcrPeriod != nil { + v := *s.PcrPeriod + + e.SetValue(protocol.BodyTarget, "pcrPeriod", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PcrPid != nil { + v := *s.PcrPid + + e.SetValue(protocol.BodyTarget, "pcrPid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PmtInterval != nil { + v := *s.PmtInterval + + e.SetValue(protocol.BodyTarget, "pmtInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PmtPid != nil { + v := *s.PmtPid + + e.SetValue(protocol.BodyTarget, "pmtPid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ProgramNum != nil { + v := *s.ProgramNum + + e.SetValue(protocol.BodyTarget, "programNum", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RateMode != nil { + v := *s.RateMode + + e.SetValue(protocol.BodyTarget, "rateMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Scte27Pids != nil { + v := *s.Scte27Pids + + e.SetValue(protocol.BodyTarget, "scte27Pids", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Scte35Control != nil { + v := *s.Scte35Control + + e.SetValue(protocol.BodyTarget, "scte35Control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Scte35Pid != nil { + v := *s.Scte35Pid + + e.SetValue(protocol.BodyTarget, "scte35Pid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentationMarkers != nil { + v := *s.SegmentationMarkers + + e.SetValue(protocol.BodyTarget, "segmentationMarkers", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentationStyle != nil { + v := *s.SegmentationStyle + + e.SetValue(protocol.BodyTarget, "segmentationStyle", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentationTime != nil { + v := *s.SegmentationTime + + e.SetValue(protocol.BodyTarget, "segmentationTime", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.TimedMetadataBehavior != nil { + v := *s.TimedMetadataBehavior + + e.SetValue(protocol.BodyTarget, "timedMetadataBehavior", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimedMetadataPid != nil { + v := *s.TimedMetadataPid + + e.SetValue(protocol.BodyTarget, "timedMetadataPid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TransportStreamId != nil { + v := *s.TransportStreamId + + e.SetValue(protocol.BodyTarget, "transportStreamId", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.VideoPid != nil { + v := *s.VideoPid + + e.SetValue(protocol.BodyTarget, "videoPid", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +// Settings information for the .m3u8 container +// Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/M3u8Settings +type M3u8Settings struct { + _ struct{} `type:"structure"` + + // The number of audio frames to insert for each PES packet. + AudioFramesPerPes *int64 `locationName:"audioFramesPerPes" type:"integer"` + + // Packet Identifier (PID) of the elementary audio stream(s) in the transport + // stream. Multiple values are accepted, and can be entered in ranges and/or + // by comma separation. Can be entered as decimal or hexadecimal values. + AudioPids *string `locationName:"audioPids" type:"string"` + + // ThePlatform-protected transport streams using 'microsoft' as Target Client + // include an ECM stream. This ECM stream contains the size, IV, and PTS of + // every sample in the transport stream. This stream PID is specified here. + // This PID has no effect on non ThePlatform-protected streams. + EcmPid *string `locationName:"ecmPid" type:"string"` + + // The number of milliseconds between instances of this table in the output + // transport stream. A value of \"0\" writes out the PMT once per segment file. + PatInterval *int64 `locationName:"patInterval" type:"integer"` + + // When set to pcrEveryPesPacket, a Program Clock Reference value is inserted + // for every Packetized Elementary Stream (PES) header. This parameter is effective // only when the PCR PID is the same as the video or audio elementary stream. PcrControl *string `locationName:"pcrControl" type:"string" enum:"M3u8PcrControl"` @@ -7537,6 +10519,87 @@ func (s *M3u8Settings) SetVideoPid(v string) *M3u8Settings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *M3u8Settings) MarshalFields(e protocol.FieldEncoder) error { + if s.AudioFramesPerPes != nil { + v := *s.AudioFramesPerPes + + e.SetValue(protocol.BodyTarget, "audioFramesPerPes", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.AudioPids != nil { + v := *s.AudioPids + + e.SetValue(protocol.BodyTarget, "audioPids", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EcmPid != nil { + v := *s.EcmPid + + e.SetValue(protocol.BodyTarget, "ecmPid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PatInterval != nil { + v := *s.PatInterval + + e.SetValue(protocol.BodyTarget, "patInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PcrControl != nil { + v := *s.PcrControl + + e.SetValue(protocol.BodyTarget, "pcrControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PcrPeriod != nil { + v := *s.PcrPeriod + + e.SetValue(protocol.BodyTarget, "pcrPeriod", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PcrPid != nil { + v := *s.PcrPid + + e.SetValue(protocol.BodyTarget, "pcrPid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PmtInterval != nil { + v := *s.PmtInterval + + e.SetValue(protocol.BodyTarget, "pmtInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PmtPid != nil { + v := *s.PmtPid + + e.SetValue(protocol.BodyTarget, "pmtPid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ProgramNum != nil { + v := *s.ProgramNum + + e.SetValue(protocol.BodyTarget, "programNum", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Scte35Behavior != nil { + v := *s.Scte35Behavior + + e.SetValue(protocol.BodyTarget, "scte35Behavior", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Scte35Pid != nil { + v := *s.Scte35Pid + + e.SetValue(protocol.BodyTarget, "scte35Pid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimedMetadataBehavior != nil { + v := *s.TimedMetadataBehavior + + e.SetValue(protocol.BodyTarget, "timedMetadataBehavior", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TransportStreamId != nil { + v := *s.TransportStreamId + + e.SetValue(protocol.BodyTarget, "transportStreamId", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.VideoPid != nil { + v := *s.VideoPid + + e.SetValue(protocol.BodyTarget, "videoPid", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/Mp2Settings type Mp2Settings struct { _ struct{} `type:"structure"` @@ -7580,6 +10643,27 @@ func (s *Mp2Settings) SetSampleRate(v float64) *Mp2Settings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Mp2Settings) MarshalFields(e protocol.FieldEncoder) error { + if s.Bitrate != nil { + v := *s.Bitrate + + e.SetValue(protocol.BodyTarget, "bitrate", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.CodingMode != nil { + v := *s.CodingMode + + e.SetValue(protocol.BodyTarget, "codingMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SampleRate != nil { + v := *s.SampleRate + + e.SetValue(protocol.BodyTarget, "sampleRate", protocol.Float64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/MsSmoothGroupSettings type MsSmoothGroupSettings struct { _ struct{} `type:"structure"` @@ -7797,6 +10881,107 @@ func (s *MsSmoothGroupSettings) SetTimestampOffsetMode(v string) *MsSmoothGroupS return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MsSmoothGroupSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AcquisitionPointId != nil { + v := *s.AcquisitionPointId + + e.SetValue(protocol.BodyTarget, "acquisitionPointId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AudioOnlyTimecodeControl != nil { + v := *s.AudioOnlyTimecodeControl + + e.SetValue(protocol.BodyTarget, "audioOnlyTimecodeControl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CertificateMode != nil { + v := *s.CertificateMode + + e.SetValue(protocol.BodyTarget, "certificateMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ConnectionRetryInterval != nil { + v := *s.ConnectionRetryInterval + + e.SetValue(protocol.BodyTarget, "connectionRetryInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Destination != nil { + v := s.Destination + + e.SetFields(protocol.BodyTarget, "destination", v, protocol.Metadata{}) + } + if s.EventId != nil { + v := *s.EventId + + e.SetValue(protocol.BodyTarget, "eventId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EventIdMode != nil { + v := *s.EventIdMode + + e.SetValue(protocol.BodyTarget, "eventIdMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EventStopBehavior != nil { + v := *s.EventStopBehavior + + e.SetValue(protocol.BodyTarget, "eventStopBehavior", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FilecacheDuration != nil { + v := *s.FilecacheDuration + + e.SetValue(protocol.BodyTarget, "filecacheDuration", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FragmentLength != nil { + v := *s.FragmentLength + + e.SetValue(protocol.BodyTarget, "fragmentLength", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.InputLossAction != nil { + v := *s.InputLossAction + + e.SetValue(protocol.BodyTarget, "inputLossAction", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NumRetries != nil { + v := *s.NumRetries + + e.SetValue(protocol.BodyTarget, "numRetries", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RestartDelay != nil { + v := *s.RestartDelay + + e.SetValue(protocol.BodyTarget, "restartDelay", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SegmentationMode != nil { + v := *s.SegmentationMode + + e.SetValue(protocol.BodyTarget, "segmentationMode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SendDelayMs != nil { + v := *s.SendDelayMs + + e.SetValue(protocol.BodyTarget, "sendDelayMs", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SparseTrackType != nil { + v := *s.SparseTrackType + + e.SetValue(protocol.BodyTarget, "sparseTrackType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StreamManifestBehavior != nil { + v := *s.StreamManifestBehavior + + e.SetValue(protocol.BodyTarget, "streamManifestBehavior", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimestampOffset != nil { + v := *s.TimestampOffset + + e.SetValue(protocol.BodyTarget, "timestampOffset", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimestampOffsetMode != nil { + v := *s.TimestampOffsetMode + + e.SetValue(protocol.BodyTarget, "timestampOffsetMode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/MsSmoothOutputSettings type MsSmoothOutputSettings struct { _ struct{} `type:"structure"` @@ -7822,6 +11007,17 @@ func (s *MsSmoothOutputSettings) SetNameModifier(v string) *MsSmoothOutputSettin return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MsSmoothOutputSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.NameModifier != nil { + v := *s.NameModifier + + e.SetValue(protocol.BodyTarget, "nameModifier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Network source to transcode. Must be accessible to the Elemental Live node // that is running the live event through a network connection. // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/NetworkInputSettings @@ -7862,6 +11058,22 @@ func (s *NetworkInputSettings) SetServerValidation(v string) *NetworkInputSettin return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *NetworkInputSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.HlsInputSettings != nil { + v := s.HlsInputSettings + + e.SetFields(protocol.BodyTarget, "hlsInputSettings", v, protocol.Metadata{}) + } + if s.ServerValidation != nil { + v := *s.ServerValidation + + e.SetValue(protocol.BodyTarget, "serverValidation", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Output settings. There can be multiple outputs within a group. // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/Output type Output struct { @@ -7923,6 +11135,45 @@ func (s *Output) SetVideoDescriptionName(v string) *Output { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Output) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AudioDescriptionNames) > 0 { + v := s.AudioDescriptionNames + + e.SetList(protocol.BodyTarget, "audioDescriptionNames", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if len(s.CaptionDescriptionNames) > 0 { + v := s.CaptionDescriptionNames + + e.SetList(protocol.BodyTarget, "captionDescriptionNames", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.OutputName != nil { + v := *s.OutputName + + e.SetValue(protocol.BodyTarget, "outputName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OutputSettings != nil { + v := s.OutputSettings + + e.SetFields(protocol.BodyTarget, "outputSettings", v, protocol.Metadata{}) + } + if s.VideoDescriptionName != nil { + v := *s.VideoDescriptionName + + e.SetValue(protocol.BodyTarget, "videoDescriptionName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeOutputList(vs []*Output) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/OutputDestination type OutputDestination struct { _ struct{} `type:"structure"` @@ -7956,6 +11207,30 @@ func (s *OutputDestination) SetSettings(v []*OutputDestinationSettings) *OutputD return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputDestination) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Settings) > 0 { + v := s.Settings + + e.SetList(protocol.BodyTarget, "settings", encodeOutputDestinationSettingsList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeOutputDestinationList(vs []*OutputDestination) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/OutputDestinationSettings type OutputDestinationSettings struct { _ struct{} `type:"structure"` @@ -7998,6 +11273,35 @@ func (s *OutputDestinationSettings) SetUsername(v string) *OutputDestinationSett return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.PasswordParam != nil { + v := *s.PasswordParam + + e.SetValue(protocol.BodyTarget, "passwordParam", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "url", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Username != nil { + v := *s.Username + + e.SetValue(protocol.BodyTarget, "username", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeOutputDestinationSettingsList(vs []*OutputDestinationSettings) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Output groups for this Live Event. Output groups contain information about // where streams should be distributed. // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/OutputGroup @@ -8042,6 +11346,35 @@ func (s *OutputGroup) SetOutputs(v []*Output) *OutputGroup { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputGroup) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OutputGroupSettings != nil { + v := s.OutputGroupSettings + + e.SetFields(protocol.BodyTarget, "outputGroupSettings", v, protocol.Metadata{}) + } + if len(s.Outputs) > 0 { + v := s.Outputs + + e.SetList(protocol.BodyTarget, "outputs", encodeOutputList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeOutputGroupList(vs []*OutputGroup) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/OutputGroupSettings type OutputGroupSettings struct { _ struct{} `type:"structure"` @@ -8089,6 +11422,32 @@ func (s *OutputGroupSettings) SetUdpGroupSettings(v *UdpGroupSettings) *OutputGr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputGroupSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.ArchiveGroupSettings != nil { + v := s.ArchiveGroupSettings + + e.SetFields(protocol.BodyTarget, "archiveGroupSettings", v, protocol.Metadata{}) + } + if s.HlsGroupSettings != nil { + v := s.HlsGroupSettings + + e.SetFields(protocol.BodyTarget, "hlsGroupSettings", v, protocol.Metadata{}) + } + if s.MsSmoothGroupSettings != nil { + v := s.MsSmoothGroupSettings + + e.SetFields(protocol.BodyTarget, "msSmoothGroupSettings", v, protocol.Metadata{}) + } + if s.UdpGroupSettings != nil { + v := s.UdpGroupSettings + + e.SetFields(protocol.BodyTarget, "udpGroupSettings", v, protocol.Metadata{}) + } + + return nil +} + // Reference to an OutputDestination ID defined in the channel // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/OutputLocationRef type OutputLocationRef struct { @@ -8113,6 +11472,17 @@ func (s *OutputLocationRef) SetDestinationRefId(v string) *OutputLocationRef { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputLocationRef) MarshalFields(e protocol.FieldEncoder) error { + if s.DestinationRefId != nil { + v := *s.DestinationRefId + + e.SetValue(protocol.BodyTarget, "destinationRefId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/OutputSettings type OutputSettings struct { _ struct{} `type:"structure"` @@ -8160,6 +11530,32 @@ func (s *OutputSettings) SetUdpOutputSettings(v *UdpOutputSettings) *OutputSetti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OutputSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.ArchiveOutputSettings != nil { + v := s.ArchiveOutputSettings + + e.SetFields(protocol.BodyTarget, "archiveOutputSettings", v, protocol.Metadata{}) + } + if s.HlsOutputSettings != nil { + v := s.HlsOutputSettings + + e.SetFields(protocol.BodyTarget, "hlsOutputSettings", v, protocol.Metadata{}) + } + if s.MsSmoothOutputSettings != nil { + v := s.MsSmoothOutputSettings + + e.SetFields(protocol.BodyTarget, "msSmoothOutputSettings", v, protocol.Metadata{}) + } + if s.UdpOutputSettings != nil { + v := s.UdpOutputSettings + + e.SetFields(protocol.BodyTarget, "udpOutputSettings", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/PassThroughSettings type PassThroughSettings struct { _ struct{} `type:"structure"` @@ -8175,6 +11571,12 @@ func (s PassThroughSettings) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PassThroughSettings) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/RemixSettings type RemixSettings struct { _ struct{} `type:"structure"` @@ -8217,6 +11619,27 @@ func (s *RemixSettings) SetChannelsOut(v int64) *RemixSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RemixSettings) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ChannelMappings) > 0 { + v := s.ChannelMappings + + e.SetList(protocol.BodyTarget, "channelMappings", encodeAudioChannelMappingList(v), protocol.Metadata{}) + } + if s.ChannelsIn != nil { + v := *s.ChannelsIn + + e.SetValue(protocol.BodyTarget, "channelsIn", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ChannelsOut != nil { + v := *s.ChannelsOut + + e.SetValue(protocol.BodyTarget, "channelsOut", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/Scte20PlusEmbeddedDestinationSettings type Scte20PlusEmbeddedDestinationSettings struct { _ struct{} `type:"structure"` @@ -8232,6 +11655,12 @@ func (s Scte20PlusEmbeddedDestinationSettings) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Scte20PlusEmbeddedDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/Scte20SourceSettings type Scte20SourceSettings struct { _ struct{} `type:"structure"` @@ -8268,6 +11697,22 @@ func (s *Scte20SourceSettings) SetSource608ChannelNumber(v int64) *Scte20SourceS return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Scte20SourceSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Convert608To708 != nil { + v := *s.Convert608To708 + + e.SetValue(protocol.BodyTarget, "convert608To708", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Source608ChannelNumber != nil { + v := *s.Source608ChannelNumber + + e.SetValue(protocol.BodyTarget, "source608ChannelNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/Scte27DestinationSettings type Scte27DestinationSettings struct { _ struct{} `type:"structure"` @@ -8283,6 +11728,12 @@ func (s Scte27DestinationSettings) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Scte27DestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/Scte27SourceSettings type Scte27SourceSettings struct { _ struct{} `type:"structure"` @@ -8313,6 +11764,17 @@ func (s *Scte27SourceSettings) SetPid(v int64) *Scte27SourceSettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Scte27SourceSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.Pid != nil { + v := *s.Pid + + e.SetValue(protocol.BodyTarget, "pid", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/Scte35SpliceInsert type Scte35SpliceInsert struct { _ struct{} `type:"structure"` @@ -8359,6 +11821,27 @@ func (s *Scte35SpliceInsert) SetWebDeliveryAllowedFlag(v string) *Scte35SpliceIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Scte35SpliceInsert) MarshalFields(e protocol.FieldEncoder) error { + if s.AdAvailOffset != nil { + v := *s.AdAvailOffset + + e.SetValue(protocol.BodyTarget, "adAvailOffset", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NoRegionalBlackoutFlag != nil { + v := *s.NoRegionalBlackoutFlag + + e.SetValue(protocol.BodyTarget, "noRegionalBlackoutFlag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.WebDeliveryAllowedFlag != nil { + v := *s.WebDeliveryAllowedFlag + + e.SetValue(protocol.BodyTarget, "webDeliveryAllowedFlag", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/Scte35TimeSignalApos type Scte35TimeSignalApos struct { _ struct{} `type:"structure"` @@ -8405,6 +11888,27 @@ func (s *Scte35TimeSignalApos) SetWebDeliveryAllowedFlag(v string) *Scte35TimeSi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Scte35TimeSignalApos) MarshalFields(e protocol.FieldEncoder) error { + if s.AdAvailOffset != nil { + v := *s.AdAvailOffset + + e.SetValue(protocol.BodyTarget, "adAvailOffset", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NoRegionalBlackoutFlag != nil { + v := *s.NoRegionalBlackoutFlag + + e.SetValue(protocol.BodyTarget, "noRegionalBlackoutFlag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.WebDeliveryAllowedFlag != nil { + v := *s.WebDeliveryAllowedFlag + + e.SetValue(protocol.BodyTarget, "webDeliveryAllowedFlag", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/SmpteTtDestinationSettings type SmpteTtDestinationSettings struct { _ struct{} `type:"structure"` @@ -8420,6 +11924,12 @@ func (s SmpteTtDestinationSettings) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SmpteTtDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StandardHlsSettings type StandardHlsSettings struct { _ struct{} `type:"structure"` @@ -8454,6 +11964,22 @@ func (s *StandardHlsSettings) SetM3u8Settings(v *M3u8Settings) *StandardHlsSetti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StandardHlsSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.AudioRenditionSets != nil { + v := *s.AudioRenditionSets + + e.SetValue(protocol.BodyTarget, "audioRenditionSets", protocol.StringValue(v), protocol.Metadata{}) + } + if s.M3u8Settings != nil { + v := s.M3u8Settings + + e.SetFields(protocol.BodyTarget, "m3u8Settings", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StartChannelRequest type StartChannelInput struct { _ struct{} `type:"structure"` @@ -8491,6 +12017,17 @@ func (s *StartChannelInput) SetChannelId(v string) *StartChannelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StartChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ChannelId != nil { + v := *s.ChannelId + + e.SetValue(protocol.PathTarget, "channelId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StartChannelResponse type StartChannelOutput struct { _ struct{} `type:"structure"` @@ -8586,6 +12123,62 @@ func (s *StartChannelOutput) SetState(v string) *StartChannelOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StartChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Destinations) > 0 { + v := s.Destinations + + e.SetList(protocol.BodyTarget, "destinations", encodeOutputDestinationList(v), protocol.Metadata{}) + } + if len(s.EgressEndpoints) > 0 { + v := s.EgressEndpoints + + e.SetList(protocol.BodyTarget, "egressEndpoints", encodeChannelEgressEndpointList(v), protocol.Metadata{}) + } + if s.EncoderSettings != nil { + v := s.EncoderSettings + + e.SetFields(protocol.BodyTarget, "encoderSettings", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.InputAttachments) > 0 { + v := s.InputAttachments + + e.SetList(protocol.BodyTarget, "inputAttachments", encodeInputAttachmentList(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PipelinesRunningCount != nil { + v := *s.PipelinesRunningCount + + e.SetValue(protocol.BodyTarget, "pipelinesRunningCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StaticKeySettings type StaticKeySettings struct { _ struct{} `type:"structure"` @@ -8619,6 +12212,22 @@ func (s *StaticKeySettings) SetStaticKeyValue(v string) *StaticKeySettings { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StaticKeySettings) MarshalFields(e protocol.FieldEncoder) error { + if s.KeyProviderServer != nil { + v := s.KeyProviderServer + + e.SetFields(protocol.BodyTarget, "keyProviderServer", v, protocol.Metadata{}) + } + if s.StaticKeyValue != nil { + v := *s.StaticKeyValue + + e.SetValue(protocol.BodyTarget, "staticKeyValue", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StopChannelRequest type StopChannelInput struct { _ struct{} `type:"structure"` @@ -8656,6 +12265,17 @@ func (s *StopChannelInput) SetChannelId(v string) *StopChannelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StopChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ChannelId != nil { + v := *s.ChannelId + + e.SetValue(protocol.PathTarget, "channelId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/StopChannelResponse type StopChannelOutput struct { _ struct{} `type:"structure"` @@ -8751,6 +12371,62 @@ func (s *StopChannelOutput) SetState(v string) *StopChannelOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StopChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Destinations) > 0 { + v := s.Destinations + + e.SetList(protocol.BodyTarget, "destinations", encodeOutputDestinationList(v), protocol.Metadata{}) + } + if len(s.EgressEndpoints) > 0 { + v := s.EgressEndpoints + + e.SetList(protocol.BodyTarget, "egressEndpoints", encodeChannelEgressEndpointList(v), protocol.Metadata{}) + } + if s.EncoderSettings != nil { + v := s.EncoderSettings + + e.SetFields(protocol.BodyTarget, "encoderSettings", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.InputAttachments) > 0 { + v := s.InputAttachments + + e.SetList(protocol.BodyTarget, "inputAttachments", encodeInputAttachmentList(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PipelinesRunningCount != nil { + v := *s.PipelinesRunningCount + + e.SetValue(protocol.BodyTarget, "pipelinesRunningCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/TeletextDestinationSettings type TeletextDestinationSettings struct { _ struct{} `type:"structure"` @@ -8766,6 +12442,12 @@ func (s TeletextDestinationSettings) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TeletextDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/TeletextSourceSettings type TeletextSourceSettings struct { _ struct{} `type:"structure"` @@ -8792,6 +12474,17 @@ func (s *TeletextSourceSettings) SetPageNumber(v string) *TeletextSourceSettings return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TeletextSourceSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.PageNumber != nil { + v := *s.PageNumber + + e.SetValue(protocol.BodyTarget, "pageNumber", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/TimecodeConfig type TimecodeConfig struct { _ struct{} `type:"structure"` @@ -8833,6 +12526,22 @@ func (s *TimecodeConfig) SetSyncThreshold(v int64) *TimecodeConfig { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TimecodeConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.Source != nil { + v := *s.Source + + e.SetValue(protocol.BodyTarget, "source", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SyncThreshold != nil { + v := *s.SyncThreshold + + e.SetValue(protocol.BodyTarget, "syncThreshold", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/TtmlDestinationSettings type TtmlDestinationSettings struct { _ struct{} `type:"structure"` @@ -8859,6 +12568,17 @@ func (s *TtmlDestinationSettings) SetStyleControl(v string) *TtmlDestinationSett return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TtmlDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.StyleControl != nil { + v := *s.StyleControl + + e.SetValue(protocol.BodyTarget, "styleControl", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UdpContainerSettings type UdpContainerSettings struct { _ struct{} `type:"structure"` @@ -8882,6 +12602,17 @@ func (s *UdpContainerSettings) SetM2tsSettings(v *M2tsSettings) *UdpContainerSet return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UdpContainerSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.M2tsSettings != nil { + v := s.M2tsSettings + + e.SetFields(protocol.BodyTarget, "m2tsSettings", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UdpGroupSettings type UdpGroupSettings struct { _ struct{} `type:"structure"` @@ -8930,6 +12661,27 @@ func (s *UdpGroupSettings) SetTimedMetadataId3Period(v int64) *UdpGroupSettings return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UdpGroupSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.InputLossAction != nil { + v := *s.InputLossAction + + e.SetValue(protocol.BodyTarget, "inputLossAction", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimedMetadataId3Frame != nil { + v := *s.TimedMetadataId3Frame + + e.SetValue(protocol.BodyTarget, "timedMetadataId3Frame", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimedMetadataId3Period != nil { + v := *s.TimedMetadataId3Period + + e.SetValue(protocol.BodyTarget, "timedMetadataId3Period", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/UdpOutputSettings type UdpOutputSettings struct { _ struct{} `type:"structure"` @@ -8984,6 +12736,32 @@ func (s *UdpOutputSettings) SetFecOutputSettings(v *FecOutputSettings) *UdpOutpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UdpOutputSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.BufferMsec != nil { + v := *s.BufferMsec + + e.SetValue(protocol.BodyTarget, "bufferMsec", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ContainerSettings != nil { + v := s.ContainerSettings + + e.SetFields(protocol.BodyTarget, "containerSettings", v, protocol.Metadata{}) + } + if s.Destination != nil { + v := s.Destination + + e.SetFields(protocol.BodyTarget, "destination", v, protocol.Metadata{}) + } + if s.FecOutputSettings != nil { + v := s.FecOutputSettings + + e.SetFields(protocol.BodyTarget, "fecOutputSettings", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/ValidationError type ValidationError struct { _ struct{} `type:"structure"` @@ -9015,6 +12793,30 @@ func (s *ValidationError) SetErrorMessage(v string) *ValidationError { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ValidationError) MarshalFields(e protocol.FieldEncoder) error { + if s.ElementPath != nil { + v := *s.ElementPath + + e.SetValue(protocol.BodyTarget, "elementPath", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ErrorMessage != nil { + v := *s.ErrorMessage + + e.SetValue(protocol.BodyTarget, "errorMessage", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeValidationErrorList(vs []*ValidationError) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/VideoCodecSettings type VideoCodecSettings struct { _ struct{} `type:"structure"` @@ -9038,6 +12840,17 @@ func (s *VideoCodecSettings) SetH264Settings(v *H264Settings) *VideoCodecSetting return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VideoCodecSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.H264Settings != nil { + v := s.H264Settings + + e.SetFields(protocol.BodyTarget, "h264Settings", v, protocol.Metadata{}) + } + + return nil +} + // Video settings for this stream. // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/VideoDescription type VideoDescription struct { @@ -9128,6 +12941,55 @@ func (s *VideoDescription) SetWidth(v int64) *VideoDescription { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VideoDescription) MarshalFields(e protocol.FieldEncoder) error { + if s.CodecSettings != nil { + v := s.CodecSettings + + e.SetFields(protocol.BodyTarget, "codecSettings", v, protocol.Metadata{}) + } + if s.Height != nil { + v := *s.Height + + e.SetValue(protocol.BodyTarget, "height", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RespondToAfd != nil { + v := *s.RespondToAfd + + e.SetValue(protocol.BodyTarget, "respondToAfd", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ScalingBehavior != nil { + v := *s.ScalingBehavior + + e.SetValue(protocol.BodyTarget, "scalingBehavior", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Sharpness != nil { + v := *s.Sharpness + + e.SetValue(protocol.BodyTarget, "sharpness", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Width != nil { + v := *s.Width + + e.SetValue(protocol.BodyTarget, "width", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeVideoDescriptionList(vs []*VideoDescription) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Specifies a particular video stream within an input source. An input may // have only a single video selector. // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/VideoSelector @@ -9180,6 +13042,27 @@ func (s *VideoSelector) SetSelectorSettings(v *VideoSelectorSettings) *VideoSele return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VideoSelector) MarshalFields(e protocol.FieldEncoder) error { + if s.ColorSpace != nil { + v := *s.ColorSpace + + e.SetValue(protocol.BodyTarget, "colorSpace", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ColorSpaceUsage != nil { + v := *s.ColorSpaceUsage + + e.SetValue(protocol.BodyTarget, "colorSpaceUsage", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SelectorSettings != nil { + v := s.SelectorSettings + + e.SetFields(protocol.BodyTarget, "selectorSettings", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/VideoSelectorPid type VideoSelectorPid struct { _ struct{} `type:"structure"` @@ -9204,6 +13087,17 @@ func (s *VideoSelectorPid) SetPid(v int64) *VideoSelectorPid { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VideoSelectorPid) MarshalFields(e protocol.FieldEncoder) error { + if s.Pid != nil { + v := *s.Pid + + e.SetValue(protocol.BodyTarget, "pid", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/VideoSelectorProgramId type VideoSelectorProgramId struct { _ struct{} `type:"structure"` @@ -9230,6 +13124,17 @@ func (s *VideoSelectorProgramId) SetProgramId(v int64) *VideoSelectorProgramId { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VideoSelectorProgramId) MarshalFields(e protocol.FieldEncoder) error { + if s.ProgramId != nil { + v := *s.ProgramId + + e.SetValue(protocol.BodyTarget, "programId", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/VideoSelectorSettings type VideoSelectorSettings struct { _ struct{} `type:"structure"` @@ -9261,6 +13166,22 @@ func (s *VideoSelectorSettings) SetVideoSelectorProgramId(v *VideoSelectorProgra return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VideoSelectorSettings) MarshalFields(e protocol.FieldEncoder) error { + if s.VideoSelectorPid != nil { + v := s.VideoSelectorPid + + e.SetFields(protocol.BodyTarget, "videoSelectorPid", v, protocol.Metadata{}) + } + if s.VideoSelectorProgramId != nil { + v := s.VideoSelectorProgramId + + e.SetFields(protocol.BodyTarget, "videoSelectorProgramId", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/WebvttDestinationSettings type WebvttDestinationSettings struct { _ struct{} `type:"structure"` @@ -9276,6 +13197,12 @@ func (s WebvttDestinationSettings) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *WebvttDestinationSettings) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + const ( // AacCodingModeAdReceiverMix is a AacCodingMode enum value AacCodingModeAdReceiverMix = "AD_RECEIVER_MIX" diff --git a/service/mediapackage/api.go b/service/mediapackage/api.go index 1d386d16951..59cfaa43feb 100644 --- a/service/mediapackage/api.go +++ b/service/mediapackage/api.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" ) const opCreateChannel = "CreateChannel" @@ -1140,6 +1141,40 @@ func (s *Channel) SetId(v string) *Channel { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Channel) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HlsIngest != nil { + v := s.HlsIngest + + e.SetFields(protocol.BodyTarget, "hlsIngest", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeChannelList(vs []*Channel) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/CreateChannelRequest type CreateChannelInput struct { _ struct{} `type:"structure"` @@ -1185,6 +1220,22 @@ func (s *CreateChannelInput) SetId(v string) *CreateChannelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/CreateChannelResponse type CreateChannelOutput struct { _ struct{} `type:"structure"` @@ -1233,6 +1284,32 @@ func (s *CreateChannelOutput) SetId(v string) *CreateChannelOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HlsIngest != nil { + v := s.HlsIngest + + e.SetFields(protocol.BodyTarget, "hlsIngest", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/CreateOriginEndpointRequest type CreateOriginEndpointInput struct { _ struct{} `type:"structure"` @@ -1364,6 +1441,62 @@ func (s *CreateOriginEndpointInput) SetWhitelist(v []*string) *CreateOriginEndpo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateOriginEndpointInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ChannelId != nil { + v := *s.ChannelId + + e.SetValue(protocol.BodyTarget, "channelId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DashPackage != nil { + v := s.DashPackage + + e.SetFields(protocol.BodyTarget, "dashPackage", v, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HlsPackage != nil { + v := s.HlsPackage + + e.SetFields(protocol.BodyTarget, "hlsPackage", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ManifestName != nil { + v := *s.ManifestName + + e.SetValue(protocol.BodyTarget, "manifestName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MssPackage != nil { + v := s.MssPackage + + e.SetFields(protocol.BodyTarget, "mssPackage", v, protocol.Metadata{}) + } + if s.StartoverWindowSeconds != nil { + v := *s.StartoverWindowSeconds + + e.SetValue(protocol.BodyTarget, "startoverWindowSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TimeDelaySeconds != nil { + v := *s.TimeDelaySeconds + + e.SetValue(protocol.BodyTarget, "timeDelaySeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Whitelist) > 0 { + v := s.Whitelist + + e.SetList(protocol.BodyTarget, "whitelist", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/CreateOriginEndpointResponse type CreateOriginEndpointOutput struct { _ struct{} `type:"structure"` @@ -1478,6 +1611,72 @@ func (s *CreateOriginEndpointOutput) SetWhitelist(v []*string) *CreateOriginEndp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateOriginEndpointOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ChannelId != nil { + v := *s.ChannelId + + e.SetValue(protocol.BodyTarget, "channelId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DashPackage != nil { + v := s.DashPackage + + e.SetFields(protocol.BodyTarget, "dashPackage", v, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HlsPackage != nil { + v := s.HlsPackage + + e.SetFields(protocol.BodyTarget, "hlsPackage", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ManifestName != nil { + v := *s.ManifestName + + e.SetValue(protocol.BodyTarget, "manifestName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MssPackage != nil { + v := s.MssPackage + + e.SetFields(protocol.BodyTarget, "mssPackage", v, protocol.Metadata{}) + } + if s.StartoverWindowSeconds != nil { + v := *s.StartoverWindowSeconds + + e.SetValue(protocol.BodyTarget, "startoverWindowSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TimeDelaySeconds != nil { + v := *s.TimeDelaySeconds + + e.SetValue(protocol.BodyTarget, "timeDelaySeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "url", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Whitelist) > 0 { + v := s.Whitelist + + e.SetList(protocol.BodyTarget, "whitelist", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DashEncryption type DashEncryption struct { @@ -1533,6 +1732,22 @@ func (s *DashEncryption) SetSpekeKeyProvider(v *SpekeKeyProvider) *DashEncryptio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DashEncryption) MarshalFields(e protocol.FieldEncoder) error { + if s.KeyRotationIntervalSeconds != nil { + v := *s.KeyRotationIntervalSeconds + + e.SetValue(protocol.BodyTarget, "keyRotationIntervalSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SpekeKeyProvider != nil { + v := s.SpekeKeyProvider + + e.SetFields(protocol.BodyTarget, "spekeKeyProvider", v, protocol.Metadata{}) + } + + return nil +} + // A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DashPackage type DashPackage struct { @@ -1640,6 +1855,52 @@ func (s *DashPackage) SetSuggestedPresentationDelaySeconds(v int64) *DashPackage return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DashPackage) MarshalFields(e protocol.FieldEncoder) error { + if s.Encryption != nil { + v := s.Encryption + + e.SetFields(protocol.BodyTarget, "encryption", v, protocol.Metadata{}) + } + if s.ManifestWindowSeconds != nil { + v := *s.ManifestWindowSeconds + + e.SetValue(protocol.BodyTarget, "manifestWindowSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MinBufferTimeSeconds != nil { + v := *s.MinBufferTimeSeconds + + e.SetValue(protocol.BodyTarget, "minBufferTimeSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MinUpdatePeriodSeconds != nil { + v := *s.MinUpdatePeriodSeconds + + e.SetValue(protocol.BodyTarget, "minUpdatePeriodSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Profile != nil { + v := *s.Profile + + e.SetValue(protocol.BodyTarget, "profile", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentDurationSeconds != nil { + v := *s.SegmentDurationSeconds + + e.SetValue(protocol.BodyTarget, "segmentDurationSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StreamSelection != nil { + v := s.StreamSelection + + e.SetFields(protocol.BodyTarget, "streamSelection", v, protocol.Metadata{}) + } + if s.SuggestedPresentationDelaySeconds != nil { + v := *s.SuggestedPresentationDelaySeconds + + e.SetValue(protocol.BodyTarget, "suggestedPresentationDelaySeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DeleteChannelRequest type DeleteChannelInput struct { _ struct{} `type:"structure"` @@ -1677,6 +1938,17 @@ func (s *DeleteChannelInput) SetId(v string) *DeleteChannelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DeleteChannelResponse type DeleteChannelOutput struct { _ struct{} `type:"structure"` @@ -1692,6 +1964,12 @@ func (s DeleteChannelOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DeleteOriginEndpointRequest type DeleteOriginEndpointInput struct { _ struct{} `type:"structure"` @@ -1729,6 +2007,17 @@ func (s *DeleteOriginEndpointInput) SetId(v string) *DeleteOriginEndpointInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteOriginEndpointInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DeleteOriginEndpointResponse type DeleteOriginEndpointOutput struct { _ struct{} `type:"structure"` @@ -1744,6 +2033,12 @@ func (s DeleteOriginEndpointOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteOriginEndpointOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DescribeChannelRequest type DescribeChannelInput struct { _ struct{} `type:"structure"` @@ -1781,6 +2076,17 @@ func (s *DescribeChannelInput) SetId(v string) *DescribeChannelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DescribeChannelResponse type DescribeChannelOutput struct { _ struct{} `type:"structure"` @@ -1829,6 +2135,32 @@ func (s *DescribeChannelOutput) SetId(v string) *DescribeChannelOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HlsIngest != nil { + v := s.HlsIngest + + e.SetFields(protocol.BodyTarget, "hlsIngest", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DescribeOriginEndpointRequest type DescribeOriginEndpointInput struct { _ struct{} `type:"structure"` @@ -1866,6 +2198,17 @@ func (s *DescribeOriginEndpointInput) SetId(v string) *DescribeOriginEndpointInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeOriginEndpointInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/DescribeOriginEndpointResponse type DescribeOriginEndpointOutput struct { _ struct{} `type:"structure"` @@ -1980,6 +2323,72 @@ func (s *DescribeOriginEndpointOutput) SetWhitelist(v []*string) *DescribeOrigin return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeOriginEndpointOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ChannelId != nil { + v := *s.ChannelId + + e.SetValue(protocol.BodyTarget, "channelId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DashPackage != nil { + v := s.DashPackage + + e.SetFields(protocol.BodyTarget, "dashPackage", v, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HlsPackage != nil { + v := s.HlsPackage + + e.SetFields(protocol.BodyTarget, "hlsPackage", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ManifestName != nil { + v := *s.ManifestName + + e.SetValue(protocol.BodyTarget, "manifestName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MssPackage != nil { + v := s.MssPackage + + e.SetFields(protocol.BodyTarget, "mssPackage", v, protocol.Metadata{}) + } + if s.StartoverWindowSeconds != nil { + v := *s.StartoverWindowSeconds + + e.SetValue(protocol.BodyTarget, "startoverWindowSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TimeDelaySeconds != nil { + v := *s.TimeDelaySeconds + + e.SetValue(protocol.BodyTarget, "timeDelaySeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "url", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Whitelist) > 0 { + v := s.Whitelist + + e.SetList(protocol.BodyTarget, "whitelist", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // An HTTP Live Streaming (HLS) encryption configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/HlsEncryption type HlsEncryption struct { @@ -2063,6 +2472,37 @@ func (s *HlsEncryption) SetSpekeKeyProvider(v *SpekeKeyProvider) *HlsEncryption return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsEncryption) MarshalFields(e protocol.FieldEncoder) error { + if s.ConstantInitializationVector != nil { + v := *s.ConstantInitializationVector + + e.SetValue(protocol.BodyTarget, "constantInitializationVector", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EncryptionMethod != nil { + v := *s.EncryptionMethod + + e.SetValue(protocol.BodyTarget, "encryptionMethod", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyRotationIntervalSeconds != nil { + v := *s.KeyRotationIntervalSeconds + + e.SetValue(protocol.BodyTarget, "keyRotationIntervalSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RepeatExtXKey != nil { + v := *s.RepeatExtXKey + + e.SetValue(protocol.BodyTarget, "repeatExtXKey", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.SpekeKeyProvider != nil { + v := s.SpekeKeyProvider + + e.SetFields(protocol.BodyTarget, "spekeKeyProvider", v, protocol.Metadata{}) + } + + return nil +} + // An HTTP Live Streaming (HLS) ingest resource configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/HlsIngest type HlsIngest struct { @@ -2088,6 +2528,17 @@ func (s *HlsIngest) SetIngestEndpoints(v []*IngestEndpoint) *HlsIngest { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsIngest) MarshalFields(e protocol.FieldEncoder) error { + if len(s.IngestEndpoints) > 0 { + v := s.IngestEndpoints + + e.SetList(protocol.BodyTarget, "ingestEndpoints", encodeIngestEndpointList(v), protocol.Metadata{}) + } + + return nil +} + // An HTTP Live Streaming (HLS) packaging configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/HlsPackage type HlsPackage struct { @@ -2214,6 +2665,57 @@ func (s *HlsPackage) SetUseAudioRenditionGroup(v bool) *HlsPackage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HlsPackage) MarshalFields(e protocol.FieldEncoder) error { + if s.AdMarkers != nil { + v := *s.AdMarkers + + e.SetValue(protocol.BodyTarget, "adMarkers", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Encryption != nil { + v := s.Encryption + + e.SetFields(protocol.BodyTarget, "encryption", v, protocol.Metadata{}) + } + if s.IncludeIframeOnlyStream != nil { + v := *s.IncludeIframeOnlyStream + + e.SetValue(protocol.BodyTarget, "includeIframeOnlyStream", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.PlaylistType != nil { + v := *s.PlaylistType + + e.SetValue(protocol.BodyTarget, "playlistType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PlaylistWindowSeconds != nil { + v := *s.PlaylistWindowSeconds + + e.SetValue(protocol.BodyTarget, "playlistWindowSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ProgramDateTimeIntervalSeconds != nil { + v := *s.ProgramDateTimeIntervalSeconds + + e.SetValue(protocol.BodyTarget, "programDateTimeIntervalSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SegmentDurationSeconds != nil { + v := *s.SegmentDurationSeconds + + e.SetValue(protocol.BodyTarget, "segmentDurationSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StreamSelection != nil { + v := s.StreamSelection + + e.SetFields(protocol.BodyTarget, "streamSelection", v, protocol.Metadata{}) + } + if s.UseAudioRenditionGroup != nil { + v := *s.UseAudioRenditionGroup + + e.SetValue(protocol.BodyTarget, "useAudioRenditionGroup", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // An endpoint for ingesting source content for a Channel. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/IngestEndpoint type IngestEndpoint struct { @@ -2257,6 +2759,35 @@ func (s *IngestEndpoint) SetUsername(v string) *IngestEndpoint { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *IngestEndpoint) MarshalFields(e protocol.FieldEncoder) error { + if s.Password != nil { + v := *s.Password + + e.SetValue(protocol.BodyTarget, "password", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "url", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Username != nil { + v := *s.Username + + e.SetValue(protocol.BodyTarget, "username", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeIngestEndpointList(vs []*IngestEndpoint) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListChannelsRequest type ListChannelsInput struct { _ struct{} `type:"structure"` @@ -2301,6 +2832,22 @@ func (s *ListChannelsInput) SetNextToken(v string) *ListChannelsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListChannelsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListChannelsResponse type ListChannelsOutput struct { _ struct{} `type:"structure"` @@ -2332,6 +2879,22 @@ func (s *ListChannelsOutput) SetNextToken(v string) *ListChannelsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListChannelsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Channels) > 0 { + v := s.Channels + + e.SetList(protocol.BodyTarget, "channels", encodeChannelList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListOriginEndpointsRequest type ListOriginEndpointsInput struct { _ struct{} `type:"structure"` @@ -2384,6 +2947,27 @@ func (s *ListOriginEndpointsInput) SetNextToken(v string) *ListOriginEndpointsIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListOriginEndpointsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ChannelId != nil { + v := *s.ChannelId + + e.SetValue(protocol.QueryTarget, "channelId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/ListOriginEndpointsResponse type ListOriginEndpointsOutput struct { _ struct{} `type:"structure"` @@ -2415,6 +2999,22 @@ func (s *ListOriginEndpointsOutput) SetOriginEndpoints(v []*OriginEndpoint) *Lis return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListOriginEndpointsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.OriginEndpoints) > 0 { + v := s.OriginEndpoints + + e.SetList(protocol.BodyTarget, "originEndpoints", encodeOriginEndpointList(v), protocol.Metadata{}) + } + + return nil +} + // A Microsoft Smooth Streaming (MSS) encryption configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/MssEncryption type MssEncryption struct { @@ -2461,6 +3061,17 @@ func (s *MssEncryption) SetSpekeKeyProvider(v *SpekeKeyProvider) *MssEncryption return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MssEncryption) MarshalFields(e protocol.FieldEncoder) error { + if s.SpekeKeyProvider != nil { + v := s.SpekeKeyProvider + + e.SetFields(protocol.BodyTarget, "spekeKeyProvider", v, protocol.Metadata{}) + } + + return nil +} + // A Microsoft Smooth Streaming (MSS) packaging configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/MssPackage type MssPackage struct { @@ -2528,6 +3139,32 @@ func (s *MssPackage) SetStreamSelection(v *StreamSelection) *MssPackage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MssPackage) MarshalFields(e protocol.FieldEncoder) error { + if s.Encryption != nil { + v := s.Encryption + + e.SetFields(protocol.BodyTarget, "encryption", v, protocol.Metadata{}) + } + if s.ManifestWindowSeconds != nil { + v := *s.ManifestWindowSeconds + + e.SetValue(protocol.BodyTarget, "manifestWindowSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SegmentDurationSeconds != nil { + v := *s.SegmentDurationSeconds + + e.SetValue(protocol.BodyTarget, "segmentDurationSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StreamSelection != nil { + v := s.StreamSelection + + e.SetFields(protocol.BodyTarget, "streamSelection", v, protocol.Metadata{}) + } + + return nil +} + // An OriginEndpoint resource configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/OriginEndpoint type OriginEndpoint struct { @@ -2654,6 +3291,80 @@ func (s *OriginEndpoint) SetWhitelist(v []*string) *OriginEndpoint { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *OriginEndpoint) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ChannelId != nil { + v := *s.ChannelId + + e.SetValue(protocol.BodyTarget, "channelId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DashPackage != nil { + v := s.DashPackage + + e.SetFields(protocol.BodyTarget, "dashPackage", v, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HlsPackage != nil { + v := s.HlsPackage + + e.SetFields(protocol.BodyTarget, "hlsPackage", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ManifestName != nil { + v := *s.ManifestName + + e.SetValue(protocol.BodyTarget, "manifestName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MssPackage != nil { + v := s.MssPackage + + e.SetFields(protocol.BodyTarget, "mssPackage", v, protocol.Metadata{}) + } + if s.StartoverWindowSeconds != nil { + v := *s.StartoverWindowSeconds + + e.SetValue(protocol.BodyTarget, "startoverWindowSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TimeDelaySeconds != nil { + v := *s.TimeDelaySeconds + + e.SetValue(protocol.BodyTarget, "timeDelaySeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "url", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Whitelist) > 0 { + v := s.Whitelist + + e.SetList(protocol.BodyTarget, "whitelist", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeOriginEndpointList(vs []*OriginEndpoint) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/RotateChannelCredentialsRequest type RotateChannelCredentialsInput struct { _ struct{} `type:"structure"` @@ -2691,6 +3402,17 @@ func (s *RotateChannelCredentialsInput) SetId(v string) *RotateChannelCredential return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RotateChannelCredentialsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/RotateChannelCredentialsResponse type RotateChannelCredentialsOutput struct { _ struct{} `type:"structure"` @@ -2739,6 +3461,32 @@ func (s *RotateChannelCredentialsOutput) SetId(v string) *RotateChannelCredentia return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RotateChannelCredentialsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HlsIngest != nil { + v := s.HlsIngest + + e.SetFields(protocol.BodyTarget, "hlsIngest", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A configuration for accessing an external Secure Packager and Encoder Key // Exchange (SPEKE) service that will provide encryption keys. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/SpekeKeyProvider @@ -2823,6 +3571,32 @@ func (s *SpekeKeyProvider) SetUrl(v string) *SpekeKeyProvider { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SpekeKeyProvider) MarshalFields(e protocol.FieldEncoder) error { + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.BodyTarget, "resourceId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "roleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SystemIds) > 0 { + v := s.SystemIds + + e.SetList(protocol.BodyTarget, "systemIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "url", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A StreamSelection configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/StreamSelection type StreamSelection struct { @@ -2866,6 +3640,27 @@ func (s *StreamSelection) SetStreamOrder(v string) *StreamSelection { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StreamSelection) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxVideoBitsPerSecond != nil { + v := *s.MaxVideoBitsPerSecond + + e.SetValue(protocol.BodyTarget, "maxVideoBitsPerSecond", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MinVideoBitsPerSecond != nil { + v := *s.MinVideoBitsPerSecond + + e.SetValue(protocol.BodyTarget, "minVideoBitsPerSecond", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StreamOrder != nil { + v := *s.StreamOrder + + e.SetValue(protocol.BodyTarget, "streamOrder", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/UpdateChannelRequest type UpdateChannelInput struct { _ struct{} `type:"structure"` @@ -2911,6 +3706,22 @@ func (s *UpdateChannelInput) SetId(v string) *UpdateChannelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/UpdateChannelResponse type UpdateChannelOutput struct { _ struct{} `type:"structure"` @@ -2959,6 +3770,32 @@ func (s *UpdateChannelOutput) SetId(v string) *UpdateChannelOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HlsIngest != nil { + v := s.HlsIngest + + e.SetFields(protocol.BodyTarget, "hlsIngest", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/UpdateOriginEndpointRequest type UpdateOriginEndpointInput struct { _ struct{} `type:"structure"` @@ -3078,6 +3915,57 @@ func (s *UpdateOriginEndpointInput) SetWhitelist(v []*string) *UpdateOriginEndpo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateOriginEndpointInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DashPackage != nil { + v := s.DashPackage + + e.SetFields(protocol.BodyTarget, "dashPackage", v, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HlsPackage != nil { + v := s.HlsPackage + + e.SetFields(protocol.BodyTarget, "hlsPackage", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ManifestName != nil { + v := *s.ManifestName + + e.SetValue(protocol.BodyTarget, "manifestName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MssPackage != nil { + v := s.MssPackage + + e.SetFields(protocol.BodyTarget, "mssPackage", v, protocol.Metadata{}) + } + if s.StartoverWindowSeconds != nil { + v := *s.StartoverWindowSeconds + + e.SetValue(protocol.BodyTarget, "startoverWindowSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TimeDelaySeconds != nil { + v := *s.TimeDelaySeconds + + e.SetValue(protocol.BodyTarget, "timeDelaySeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Whitelist) > 0 { + v := s.Whitelist + + e.SetList(protocol.BodyTarget, "whitelist", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediapackage-2017-10-12/UpdateOriginEndpointResponse type UpdateOriginEndpointOutput struct { _ struct{} `type:"structure"` @@ -3192,6 +4080,72 @@ func (s *UpdateOriginEndpointOutput) SetWhitelist(v []*string) *UpdateOriginEndp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateOriginEndpointOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ChannelId != nil { + v := *s.ChannelId + + e.SetValue(protocol.BodyTarget, "channelId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DashPackage != nil { + v := s.DashPackage + + e.SetFields(protocol.BodyTarget, "dashPackage", v, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HlsPackage != nil { + v := s.HlsPackage + + e.SetFields(protocol.BodyTarget, "hlsPackage", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ManifestName != nil { + v := *s.ManifestName + + e.SetValue(protocol.BodyTarget, "manifestName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MssPackage != nil { + v := s.MssPackage + + e.SetFields(protocol.BodyTarget, "mssPackage", v, protocol.Metadata{}) + } + if s.StartoverWindowSeconds != nil { + v := *s.StartoverWindowSeconds + + e.SetValue(protocol.BodyTarget, "startoverWindowSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TimeDelaySeconds != nil { + v := *s.TimeDelaySeconds + + e.SetValue(protocol.BodyTarget, "timeDelaySeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "url", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Whitelist) > 0 { + v := s.Whitelist + + e.SetList(protocol.BodyTarget, "whitelist", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + const ( // AdMarkersNone is a AdMarkers enum value AdMarkersNone = "NONE" diff --git a/service/mediastoredata/api.go b/service/mediastoredata/api.go index 6cc79e64f33..f91b225e667 100644 --- a/service/mediastoredata/api.go +++ b/service/mediastoredata/api.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol" ) const opDeleteObject = "DeleteObject" @@ -481,6 +482,17 @@ func (s *DeleteObjectInput) SetPath(v string) *DeleteObjectInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Path != nil { + v := *s.Path + + e.SetValue(protocol.PathTarget, "Path", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DeleteObjectResponse type DeleteObjectOutput struct { _ struct{} `type:"structure"` @@ -496,6 +508,12 @@ func (s DeleteObjectOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DescribeObjectRequest type DescribeObjectInput struct { _ struct{} `type:"structure"` @@ -539,6 +557,17 @@ func (s *DescribeObjectInput) SetPath(v string) *DescribeObjectInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Path != nil { + v := *s.Path + + e.SetValue(protocol.PathTarget, "Path", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DescribeObjectResponse type DescribeObjectOutput struct { _ struct{} `type:"structure"` @@ -603,6 +632,37 @@ func (s *DescribeObjectOutput) SetLastModified(v time.Time) *DescribeObjectOutpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CacheControl != nil { + v := *s.CacheControl + + e.SetValue(protocol.HeaderTarget, "Cache-Control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentLength != nil { + v := *s.ContentLength + + e.SetValue(protocol.HeaderTarget, "Content-Length", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModified != nil { + v := *s.LastModified + + e.SetValue(protocol.HeaderTarget, "Last-Modified", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/GetObjectRequest type GetObjectInput struct { _ struct{} `type:"structure"` @@ -678,6 +738,22 @@ func (s *GetObjectInput) SetRange(v string) *GetObjectInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Path != nil { + v := *s.Path + + e.SetValue(protocol.PathTarget, "Path", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Range != nil { + v := *s.Range + + e.SetValue(protocol.HeaderTarget, "Range", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/GetObjectResponse type GetObjectOutput struct { _ struct{} `type:"structure" payload:"Body"` @@ -781,6 +857,44 @@ func (s *GetObjectOutput) SetStatusCode(v int64) *GetObjectOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + // Skipping Body Output type's body not valid. + if s.CacheControl != nil { + v := *s.CacheControl + + e.SetValue(protocol.HeaderTarget, "Cache-Control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentLength != nil { + v := *s.ContentLength + + e.SetValue(protocol.HeaderTarget, "Content-Length", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ContentRange != nil { + v := *s.ContentRange + + e.SetValue(protocol.HeaderTarget, "Content-Range", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModified != nil { + v := *s.LastModified + + e.SetValue(protocol.HeaderTarget, "Last-Modified", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + // ignoring invalid encode state, StatusCode. StatusCode + + return nil +} + // A metadata entry for a folder or object. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/Item type Item struct { @@ -851,6 +965,50 @@ func (s *Item) SetType(v string) *Item { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Item) MarshalFields(e protocol.FieldEncoder) error { + if s.ContentLength != nil { + v := *s.ContentLength + + e.SetValue(protocol.BodyTarget, "ContentLength", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.BodyTarget, "ContentType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.BodyTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModified != nil { + v := *s.LastModified + + e.SetValue(protocol.BodyTarget, "LastModified", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeItemList(vs []*Item) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/ListItemsRequest type ListItemsInput struct { _ struct{} `type:"structure"` @@ -908,6 +1066,27 @@ func (s *ListItemsInput) SetPath(v string) *ListItemsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListItemsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "MaxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Path != nil { + v := *s.Path + + e.SetValue(protocol.QueryTarget, "Path", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/ListItemsResponse type ListItemsOutput struct { _ struct{} `type:"structure"` @@ -941,6 +1120,22 @@ func (s *ListItemsOutput) SetNextToken(v string) *ListItemsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListItemsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Items) > 0 { + v := s.Items + + e.SetList(protocol.BodyTarget, "Items", encodeItemList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/PutObjectRequest type PutObjectInput struct { _ struct{} `type:"structure" payload:"Body"` @@ -1063,6 +1258,37 @@ func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := s.Body + + e.SetStream(protocol.PayloadTarget, "Body", protocol.ReadSeekerStream{V: v}, protocol.Metadata{}) + } + if s.CacheControl != nil { + v := *s.CacheControl + + e.SetValue(protocol.HeaderTarget, "Cache-Control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Path != nil { + v := *s.Path + + e.SetValue(protocol.PathTarget, "Path", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StorageClass != nil { + v := *s.StorageClass + + e.SetValue(protocol.HeaderTarget, "x-amz-storage-class", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/PutObjectResponse type PutObjectOutput struct { _ struct{} `type:"structure"` @@ -1105,6 +1331,27 @@ func (s *PutObjectOutput) SetStorageClass(v string) *PutObjectOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ContentSHA256 != nil { + v := *s.ContentSHA256 + + e.SetValue(protocol.BodyTarget, "ContentSHA256", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.BodyTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StorageClass != nil { + v := *s.StorageClass + + e.SetValue(protocol.BodyTarget, "StorageClass", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + const ( // ItemTypeObject is a ItemType enum value ItemTypeObject = "OBJECT" diff --git a/service/mobile/api.go b/service/mobile/api.go index 0bca027e0a1..f8bca0d96c6 100644 --- a/service/mobile/api.go +++ b/service/mobile/api.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" ) const opCreateProject = "CreateProject" @@ -1082,6 +1083,50 @@ func (s *BundleDetails) SetVersion(v string) *BundleDetails { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BundleDetails) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AvailablePlatforms) > 0 { + v := s.AvailablePlatforms + + e.SetList(protocol.BodyTarget, "availablePlatforms", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.BundleId != nil { + v := *s.BundleId + + e.SetValue(protocol.BodyTarget, "bundleId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IconUrl != nil { + v := *s.IconUrl + + e.SetValue(protocol.BodyTarget, "iconUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Title != nil { + v := *s.Title + + e.SetValue(protocol.BodyTarget, "title", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeBundleDetailsList(vs []*BundleDetails) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Request structure used to request a project be created. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/CreateProjectRequest type CreateProjectInput struct { @@ -1137,6 +1182,32 @@ func (s *CreateProjectInput) SetSnapshotId(v string) *CreateProjectInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateProjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Contents != nil { + v := s.Contents + + e.SetStream(protocol.PayloadTarget, "contents", protocol.BytesStream(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.QueryTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Region != nil { + v := *s.Region + + e.SetValue(protocol.QueryTarget, "region", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SnapshotId != nil { + v := *s.SnapshotId + + e.SetValue(protocol.QueryTarget, "snapshotId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Result structure used in response to a request to create a project. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/CreateProjectResult type CreateProjectOutput struct { @@ -1162,6 +1233,17 @@ func (s *CreateProjectOutput) SetDetails(v *ProjectDetails) *CreateProjectOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateProjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Details != nil { + v := s.Details + + e.SetFields(protocol.BodyTarget, "details", v, protocol.Metadata{}) + } + + return nil +} + // Request structure used to request a project be deleted. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/DeleteProjectRequest type DeleteProjectInput struct { @@ -1202,6 +1284,17 @@ func (s *DeleteProjectInput) SetProjectId(v string) *DeleteProjectInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteProjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ProjectId != nil { + v := *s.ProjectId + + e.SetValue(protocol.PathTarget, "projectId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Result structure used in response to request to delete a project. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/DeleteProjectResult type DeleteProjectOutput struct { @@ -1237,6 +1330,22 @@ func (s *DeleteProjectOutput) SetOrphanedResources(v []*Resource) *DeleteProject return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteProjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.DeletedResources) > 0 { + v := s.DeletedResources + + e.SetList(protocol.BodyTarget, "deletedResources", encodeResourceList(v), protocol.Metadata{}) + } + if len(s.OrphanedResources) > 0 { + v := s.OrphanedResources + + e.SetList(protocol.BodyTarget, "orphanedResources", encodeResourceList(v), protocol.Metadata{}) + } + + return nil +} + // Request structure to request the details of a specific bundle. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/DescribeBundleRequest type DescribeBundleInput struct { @@ -1277,6 +1386,17 @@ func (s *DescribeBundleInput) SetBundleId(v string) *DescribeBundleInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeBundleInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BundleId != nil { + v := *s.BundleId + + e.SetValue(protocol.PathTarget, "bundleId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Result structure contains the details of the bundle. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/DescribeBundleResult type DescribeBundleOutput struct { @@ -1302,6 +1422,17 @@ func (s *DescribeBundleOutput) SetDetails(v *BundleDetails) *DescribeBundleOutpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeBundleOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Details != nil { + v := s.Details + + e.SetFields(protocol.BodyTarget, "details", v, protocol.Metadata{}) + } + + return nil +} + // Request structure used to request details about a project. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/DescribeProjectRequest type DescribeProjectInput struct { @@ -1353,6 +1484,22 @@ func (s *DescribeProjectInput) SetSyncFromResources(v bool) *DescribeProjectInpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeProjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ProjectId != nil { + v := *s.ProjectId + + e.SetValue(protocol.QueryTarget, "projectId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SyncFromResources != nil { + v := *s.SyncFromResources + + e.SetValue(protocol.QueryTarget, "syncFromResources", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // Result structure used for requests of project details. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/DescribeProjectResult type DescribeProjectOutput struct { @@ -1378,6 +1525,17 @@ func (s *DescribeProjectOutput) SetDetails(v *ProjectDetails) *DescribeProjectOu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeProjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Details != nil { + v := s.Details + + e.SetFields(protocol.BodyTarget, "details", v, protocol.Metadata{}) + } + + return nil +} + // Request structure used to request generation of custom SDK and tool packages // required to integrate mobile web or app clients with backed AWS resources. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/ExportBundleRequest @@ -1437,6 +1595,27 @@ func (s *ExportBundleInput) SetProjectId(v string) *ExportBundleInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ExportBundleInput) MarshalFields(e protocol.FieldEncoder) error { + if s.BundleId != nil { + v := *s.BundleId + + e.SetValue(protocol.PathTarget, "bundleId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Platform != nil { + v := *s.Platform + + e.SetValue(protocol.QueryTarget, "platform", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ProjectId != nil { + v := *s.ProjectId + + e.SetValue(protocol.QueryTarget, "projectId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Result structure which contains link to download custom-generated SDK and // tool packages used to integrate mobile web or app clients with backed AWS // resources. @@ -1466,6 +1645,17 @@ func (s *ExportBundleOutput) SetDownloadUrl(v string) *ExportBundleOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ExportBundleOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DownloadUrl != nil { + v := *s.DownloadUrl + + e.SetValue(protocol.BodyTarget, "downloadUrl", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request structure used in requests to export project configuration details. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/ExportProjectRequest type ExportProjectInput struct { @@ -1506,6 +1696,17 @@ func (s *ExportProjectInput) SetProjectId(v string) *ExportProjectInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ExportProjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ProjectId != nil { + v := *s.ProjectId + + e.SetValue(protocol.PathTarget, "projectId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Result structure used for requests to export project configuration details. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/ExportProjectResult type ExportProjectOutput struct { @@ -1555,6 +1756,27 @@ func (s *ExportProjectOutput) SetSnapshotId(v string) *ExportProjectOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ExportProjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DownloadUrl != nil { + v := *s.DownloadUrl + + e.SetValue(protocol.BodyTarget, "downloadUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ShareUrl != nil { + v := *s.ShareUrl + + e.SetValue(protocol.BodyTarget, "shareUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SnapshotId != nil { + v := *s.SnapshotId + + e.SetValue(protocol.BodyTarget, "snapshotId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request structure to request all available bundles. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/ListBundlesRequest type ListBundlesInput struct { @@ -1591,6 +1813,22 @@ func (s *ListBundlesInput) SetNextToken(v string) *ListBundlesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListBundlesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Result structure contains a list of all available bundles with details. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/ListBundlesResult type ListBundlesOutput struct { @@ -1626,6 +1864,22 @@ func (s *ListBundlesOutput) SetNextToken(v string) *ListBundlesOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListBundlesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.BundleList) > 0 { + v := s.BundleList + + e.SetList(protocol.BodyTarget, "bundleList", encodeBundleDetailsList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request structure used to request projects list in AWS Mobile Hub. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/ListProjectsRequest type ListProjectsInput struct { @@ -1662,6 +1916,22 @@ func (s *ListProjectsInput) SetNextToken(v string) *ListProjectsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListProjectsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxResults", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Result structure used for requests to list projects in AWS Mobile Hub. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/ListProjectsResult type ListProjectsOutput struct { @@ -1698,6 +1968,22 @@ func (s *ListProjectsOutput) SetProjects(v []*ProjectSummary) *ListProjectsOutpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListProjectsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "nextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Projects) > 0 { + v := s.Projects + + e.SetList(protocol.BodyTarget, "projects", encodeProjectSummaryList(v), protocol.Metadata{}) + } + + return nil +} + // Detailed information about an AWS Mobile Hub project. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/ProjectDetails type ProjectDetails struct { @@ -1786,6 +2072,52 @@ func (s *ProjectDetails) SetState(v string) *ProjectDetails { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ProjectDetails) MarshalFields(e protocol.FieldEncoder) error { + if s.ConsoleUrl != nil { + v := *s.ConsoleUrl + + e.SetValue(protocol.BodyTarget, "consoleUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedDate != nil { + v := *s.CreatedDate + + e.SetValue(protocol.BodyTarget, "createdDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.LastUpdatedDate != nil { + v := *s.LastUpdatedDate + + e.SetValue(protocol.BodyTarget, "lastUpdatedDate", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ProjectId != nil { + v := *s.ProjectId + + e.SetValue(protocol.BodyTarget, "projectId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Region != nil { + v := *s.Region + + e.SetValue(protocol.BodyTarget, "region", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Resources) > 0 { + v := s.Resources + + e.SetList(protocol.BodyTarget, "resources", encodeResourceList(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "state", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Summary information about an AWS Mobile Hub project. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/ProjectSummary type ProjectSummary struct { @@ -1820,6 +2152,30 @@ func (s *ProjectSummary) SetProjectId(v string) *ProjectSummary { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ProjectSummary) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ProjectId != nil { + v := *s.ProjectId + + e.SetValue(protocol.BodyTarget, "projectId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeProjectSummaryList(vs []*ProjectSummary) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information about an instance of an AWS resource associated with a project. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/Resource type Resource struct { @@ -1882,6 +2238,45 @@ func (s *Resource) SetType(v string) *Resource { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Resource) MarshalFields(e protocol.FieldEncoder) error { + if s.Arn != nil { + v := *s.Arn + + e.SetValue(protocol.BodyTarget, "arn", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetMap(protocol.BodyTarget, "attributes", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.Feature != nil { + v := *s.Feature + + e.SetValue(protocol.BodyTarget, "feature", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeResourceList(vs []*Resource) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Request structure used for requests to update project configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/UpdateProjectRequest type UpdateProjectInput struct { @@ -1933,6 +2328,22 @@ func (s *UpdateProjectInput) SetProjectId(v string) *UpdateProjectInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateProjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Contents != nil { + v := s.Contents + + e.SetStream(protocol.PayloadTarget, "contents", protocol.BytesStream(v), protocol.Metadata{}) + } + if s.ProjectId != nil { + v := *s.ProjectId + + e.SetValue(protocol.QueryTarget, "projectId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Result structure used for requests to updated project configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/mobile-2017-07-01/UpdateProjectResult type UpdateProjectOutput struct { @@ -1958,6 +2369,17 @@ func (s *UpdateProjectOutput) SetDetails(v *ProjectDetails) *UpdateProjectOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateProjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Details != nil { + v := s.Details + + e.SetFields(protocol.BodyTarget, "details", v, protocol.Metadata{}) + } + + return nil +} + // Developer desktop or target mobile app or website platform. const ( // PlatformOsx is a Platform enum value diff --git a/service/mobileanalytics/api.go b/service/mobileanalytics/api.go index 085e71d8a2d..8040cb1d146 100644 --- a/service/mobileanalytics/api.go +++ b/service/mobileanalytics/api.go @@ -200,6 +200,50 @@ func (s *Event) SetVersion(v string) *Event { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Event) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetMap(protocol.BodyTarget, "attributes", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.EventType != nil { + v := *s.EventType + + e.SetValue(protocol.BodyTarget, "eventType", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Metrics) > 0 { + v := s.Metrics + + e.SetMap(protocol.BodyTarget, "metrics", protocol.EncodeFloat64Map(v), protocol.Metadata{}) + } + if s.Session != nil { + v := s.Session + + e.SetFields(protocol.BodyTarget, "session", v, protocol.Metadata{}) + } + if s.Timestamp != nil { + v := *s.Timestamp + + e.SetValue(protocol.BodyTarget, "timestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeEventList(vs []*Event) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A container for the data needed for a PutEvent operation type PutEventsInput struct { _ struct{} `type:"structure"` @@ -273,6 +317,27 @@ func (s *PutEventsInput) SetEvents(v []*Event) *PutEventsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutEventsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ClientContext != nil { + v := *s.ClientContext + + e.SetValue(protocol.HeaderTarget, "x-amz-Client-Context", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ClientContextEncoding != nil { + v := *s.ClientContextEncoding + + e.SetValue(protocol.HeaderTarget, "x-amz-Client-Context-Encoding", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Events) > 0 { + v := s.Events + + e.SetList(protocol.BodyTarget, "events", encodeEventList(v), protocol.Metadata{}) + } + + return nil +} + type PutEventsOutput struct { _ struct{} `type:"structure"` } @@ -287,6 +352,12 @@ func (s PutEventsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutEventsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Describes the session. Session information is required on ALL events. type Session struct { _ struct{} `type:"structure"` @@ -352,3 +423,29 @@ func (s *Session) SetStopTimestamp(v string) *Session { s.StopTimestamp = &v return s } + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Session) MarshalFields(e protocol.FieldEncoder) error { + if s.Duration != nil { + v := *s.Duration + + e.SetValue(protocol.BodyTarget, "duration", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartTimestamp != nil { + v := *s.StartTimestamp + + e.SetValue(protocol.BodyTarget, "startTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StopTimestamp != nil { + v := *s.StopTimestamp + + e.SetValue(protocol.BodyTarget, "stopTimestamp", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} diff --git a/service/pinpoint/api.go b/service/pinpoint/api.go index 94dfd4b3913..10967caee4c 100644 --- a/service/pinpoint/api.go +++ b/service/pinpoint/api.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" ) const opCreateApp = "CreateApp" @@ -5331,6 +5332,27 @@ func (s *ADMChannelRequest) SetEnabled(v bool) *ADMChannelRequest { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ADMChannelRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.ClientId != nil { + v := *s.ClientId + + e.SetValue(protocol.BodyTarget, "ClientId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ClientSecret != nil { + v := *s.ClientSecret + + e.SetValue(protocol.BodyTarget, "ClientSecret", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // Amazon Device Messaging channel definition. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/ADMChannelResponse type ADMChannelResponse struct { @@ -5437,6 +5459,62 @@ func (s *ADMChannelResponse) SetVersion(v int64) *ADMChannelResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ADMChannelResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HasCredential != nil { + v := *s.HasCredential + + e.SetValue(protocol.BodyTarget, "HasCredential", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsArchived != nil { + v := *s.IsArchived + + e.SetValue(protocol.BodyTarget, "IsArchived", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.LastModifiedBy != nil { + v := *s.LastModifiedBy + + e.SetValue(protocol.BodyTarget, "LastModifiedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Platform != nil { + v := *s.Platform + + e.SetValue(protocol.BodyTarget, "Platform", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // ADM Message. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/ADMMessage type ADMMessage struct { @@ -5613,6 +5691,97 @@ func (s *ADMMessage) SetUrl(v string) *ADMMessage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ADMMessage) MarshalFields(e protocol.FieldEncoder) error { + if s.Action != nil { + v := *s.Action + + e.SetValue(protocol.BodyTarget, "Action", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Body != nil { + v := *s.Body + + e.SetValue(protocol.BodyTarget, "Body", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ConsolidationKey != nil { + v := *s.ConsolidationKey + + e.SetValue(protocol.BodyTarget, "ConsolidationKey", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Data) > 0 { + v := s.Data + + e.SetMap(protocol.BodyTarget, "Data", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.ExpiresAfter != nil { + v := *s.ExpiresAfter + + e.SetValue(protocol.BodyTarget, "ExpiresAfter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IconReference != nil { + v := *s.IconReference + + e.SetValue(protocol.BodyTarget, "IconReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ImageIconUrl != nil { + v := *s.ImageIconUrl + + e.SetValue(protocol.BodyTarget, "ImageIconUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ImageUrl != nil { + v := *s.ImageUrl + + e.SetValue(protocol.BodyTarget, "ImageUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MD5 != nil { + v := *s.MD5 + + e.SetValue(protocol.BodyTarget, "MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RawContent != nil { + v := *s.RawContent + + e.SetValue(protocol.BodyTarget, "RawContent", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SilentPush != nil { + v := *s.SilentPush + + e.SetValue(protocol.BodyTarget, "SilentPush", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.SmallImageIconUrl != nil { + v := *s.SmallImageIconUrl + + e.SetValue(protocol.BodyTarget, "SmallImageIconUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Sound != nil { + v := *s.Sound + + e.SetValue(protocol.BodyTarget, "Sound", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Substitutions) > 0 { + v := s.Substitutions + + e.SetMap(protocol.BodyTarget, "Substitutions", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + if s.Title != nil { + v := *s.Title + + e.SetValue(protocol.BodyTarget, "Title", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "Url", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Apple Push Notification Service channel definition. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/APNSChannelRequest type APNSChannelRequest struct { @@ -5701,6 +5870,52 @@ func (s *APNSChannelRequest) SetTokenKeyId(v string) *APNSChannelRequest { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *APNSChannelRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.BundleId != nil { + v := *s.BundleId + + e.SetValue(protocol.BodyTarget, "BundleId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Certificate != nil { + v := *s.Certificate + + e.SetValue(protocol.BodyTarget, "Certificate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DefaultAuthenticationMethod != nil { + v := *s.DefaultAuthenticationMethod + + e.SetValue(protocol.BodyTarget, "DefaultAuthenticationMethod", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.PrivateKey != nil { + v := *s.PrivateKey + + e.SetValue(protocol.BodyTarget, "PrivateKey", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TeamId != nil { + v := *s.TeamId + + e.SetValue(protocol.BodyTarget, "TeamId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TokenKey != nil { + v := *s.TokenKey + + e.SetValue(protocol.BodyTarget, "TokenKey", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TokenKeyId != nil { + v := *s.TokenKeyId + + e.SetValue(protocol.BodyTarget, "TokenKeyId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Apple Distribution Push Notification Service channel definition. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/APNSChannelResponse type APNSChannelResponse struct { @@ -5825,6 +6040,72 @@ func (s *APNSChannelResponse) SetVersion(v int64) *APNSChannelResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *APNSChannelResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DefaultAuthenticationMethod != nil { + v := *s.DefaultAuthenticationMethod + + e.SetValue(protocol.BodyTarget, "DefaultAuthenticationMethod", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HasCredential != nil { + v := *s.HasCredential + + e.SetValue(protocol.BodyTarget, "HasCredential", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HasTokenKey != nil { + v := *s.HasTokenKey + + e.SetValue(protocol.BodyTarget, "HasTokenKey", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsArchived != nil { + v := *s.IsArchived + + e.SetValue(protocol.BodyTarget, "IsArchived", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.LastModifiedBy != nil { + v := *s.LastModifiedBy + + e.SetValue(protocol.BodyTarget, "LastModifiedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Platform != nil { + v := *s.Platform + + e.SetValue(protocol.BodyTarget, "Platform", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // APNS Message. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/APNSMessage type APNSMessage struct { @@ -6016,6 +6297,102 @@ func (s *APNSMessage) SetUrl(v string) *APNSMessage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *APNSMessage) MarshalFields(e protocol.FieldEncoder) error { + if s.Action != nil { + v := *s.Action + + e.SetValue(protocol.BodyTarget, "Action", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Badge != nil { + v := *s.Badge + + e.SetValue(protocol.BodyTarget, "Badge", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Body != nil { + v := *s.Body + + e.SetValue(protocol.BodyTarget, "Body", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Category != nil { + v := *s.Category + + e.SetValue(protocol.BodyTarget, "Category", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CollapseId != nil { + v := *s.CollapseId + + e.SetValue(protocol.BodyTarget, "CollapseId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Data) > 0 { + v := s.Data + + e.SetMap(protocol.BodyTarget, "Data", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.MediaUrl != nil { + v := *s.MediaUrl + + e.SetValue(protocol.BodyTarget, "MediaUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PreferredAuthenticationMethod != nil { + v := *s.PreferredAuthenticationMethod + + e.SetValue(protocol.BodyTarget, "PreferredAuthenticationMethod", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Priority != nil { + v := *s.Priority + + e.SetValue(protocol.BodyTarget, "Priority", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RawContent != nil { + v := *s.RawContent + + e.SetValue(protocol.BodyTarget, "RawContent", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SilentPush != nil { + v := *s.SilentPush + + e.SetValue(protocol.BodyTarget, "SilentPush", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Sound != nil { + v := *s.Sound + + e.SetValue(protocol.BodyTarget, "Sound", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Substitutions) > 0 { + v := s.Substitutions + + e.SetMap(protocol.BodyTarget, "Substitutions", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + if s.ThreadId != nil { + v := *s.ThreadId + + e.SetValue(protocol.BodyTarget, "ThreadId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimeToLive != nil { + v := *s.TimeToLive + + e.SetValue(protocol.BodyTarget, "TimeToLive", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Title != nil { + v := *s.Title + + e.SetValue(protocol.BodyTarget, "Title", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "Url", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Apple Development Push Notification Service channel definition. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/APNSSandboxChannelRequest type APNSSandboxChannelRequest struct { @@ -6104,6 +6481,52 @@ func (s *APNSSandboxChannelRequest) SetTokenKeyId(v string) *APNSSandboxChannelR return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *APNSSandboxChannelRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.BundleId != nil { + v := *s.BundleId + + e.SetValue(protocol.BodyTarget, "BundleId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Certificate != nil { + v := *s.Certificate + + e.SetValue(protocol.BodyTarget, "Certificate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DefaultAuthenticationMethod != nil { + v := *s.DefaultAuthenticationMethod + + e.SetValue(protocol.BodyTarget, "DefaultAuthenticationMethod", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.PrivateKey != nil { + v := *s.PrivateKey + + e.SetValue(protocol.BodyTarget, "PrivateKey", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TeamId != nil { + v := *s.TeamId + + e.SetValue(protocol.BodyTarget, "TeamId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TokenKey != nil { + v := *s.TokenKey + + e.SetValue(protocol.BodyTarget, "TokenKey", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TokenKeyId != nil { + v := *s.TokenKeyId + + e.SetValue(protocol.BodyTarget, "TokenKeyId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Apple Development Push Notification Service channel definition. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/APNSSandboxChannelResponse type APNSSandboxChannelResponse struct { @@ -6228,6 +6651,72 @@ func (s *APNSSandboxChannelResponse) SetVersion(v int64) *APNSSandboxChannelResp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *APNSSandboxChannelResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DefaultAuthenticationMethod != nil { + v := *s.DefaultAuthenticationMethod + + e.SetValue(protocol.BodyTarget, "DefaultAuthenticationMethod", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HasCredential != nil { + v := *s.HasCredential + + e.SetValue(protocol.BodyTarget, "HasCredential", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HasTokenKey != nil { + v := *s.HasTokenKey + + e.SetValue(protocol.BodyTarget, "HasTokenKey", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsArchived != nil { + v := *s.IsArchived + + e.SetValue(protocol.BodyTarget, "IsArchived", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.LastModifiedBy != nil { + v := *s.LastModifiedBy + + e.SetValue(protocol.BodyTarget, "LastModifiedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Platform != nil { + v := *s.Platform + + e.SetValue(protocol.BodyTarget, "Platform", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Apple VOIP Push Notification Service channel definition. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/APNSVoipChannelRequest type APNSVoipChannelRequest struct { @@ -6316,6 +6805,52 @@ func (s *APNSVoipChannelRequest) SetTokenKeyId(v string) *APNSVoipChannelRequest return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *APNSVoipChannelRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.BundleId != nil { + v := *s.BundleId + + e.SetValue(protocol.BodyTarget, "BundleId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Certificate != nil { + v := *s.Certificate + + e.SetValue(protocol.BodyTarget, "Certificate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DefaultAuthenticationMethod != nil { + v := *s.DefaultAuthenticationMethod + + e.SetValue(protocol.BodyTarget, "DefaultAuthenticationMethod", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.PrivateKey != nil { + v := *s.PrivateKey + + e.SetValue(protocol.BodyTarget, "PrivateKey", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TeamId != nil { + v := *s.TeamId + + e.SetValue(protocol.BodyTarget, "TeamId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TokenKey != nil { + v := *s.TokenKey + + e.SetValue(protocol.BodyTarget, "TokenKey", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TokenKeyId != nil { + v := *s.TokenKeyId + + e.SetValue(protocol.BodyTarget, "TokenKeyId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Apple VOIP Push Notification Service channel definition. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/APNSVoipChannelResponse type APNSVoipChannelResponse struct { @@ -6440,6 +6975,72 @@ func (s *APNSVoipChannelResponse) SetVersion(v int64) *APNSVoipChannelResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *APNSVoipChannelResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DefaultAuthenticationMethod != nil { + v := *s.DefaultAuthenticationMethod + + e.SetValue(protocol.BodyTarget, "DefaultAuthenticationMethod", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HasCredential != nil { + v := *s.HasCredential + + e.SetValue(protocol.BodyTarget, "HasCredential", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HasTokenKey != nil { + v := *s.HasTokenKey + + e.SetValue(protocol.BodyTarget, "HasTokenKey", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsArchived != nil { + v := *s.IsArchived + + e.SetValue(protocol.BodyTarget, "IsArchived", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.LastModifiedBy != nil { + v := *s.LastModifiedBy + + e.SetValue(protocol.BodyTarget, "LastModifiedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Platform != nil { + v := *s.Platform + + e.SetValue(protocol.BodyTarget, "Platform", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Apple VOIP Developer Push Notification Service channel definition. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/APNSVoipSandboxChannelRequest type APNSVoipSandboxChannelRequest struct { @@ -6528,10 +7129,56 @@ func (s *APNSVoipSandboxChannelRequest) SetTokenKeyId(v string) *APNSVoipSandbox return s } -// Apple VOIP Developer Push Notification Service channel definition. -// Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/APNSVoipSandboxChannelResponse -type APNSVoipSandboxChannelResponse struct { - _ struct{} `type:"structure"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *APNSVoipSandboxChannelRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.BundleId != nil { + v := *s.BundleId + + e.SetValue(protocol.BodyTarget, "BundleId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Certificate != nil { + v := *s.Certificate + + e.SetValue(protocol.BodyTarget, "Certificate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DefaultAuthenticationMethod != nil { + v := *s.DefaultAuthenticationMethod + + e.SetValue(protocol.BodyTarget, "DefaultAuthenticationMethod", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.PrivateKey != nil { + v := *s.PrivateKey + + e.SetValue(protocol.BodyTarget, "PrivateKey", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TeamId != nil { + v := *s.TeamId + + e.SetValue(protocol.BodyTarget, "TeamId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TokenKey != nil { + v := *s.TokenKey + + e.SetValue(protocol.BodyTarget, "TokenKey", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TokenKeyId != nil { + v := *s.TokenKeyId + + e.SetValue(protocol.BodyTarget, "TokenKeyId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +// Apple VOIP Developer Push Notification Service channel definition. +// Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/APNSVoipSandboxChannelResponse +type APNSVoipSandboxChannelResponse struct { + _ struct{} `type:"structure"` // Application id ApplicationId *string `type:"string"` @@ -6652,6 +7299,72 @@ func (s *APNSVoipSandboxChannelResponse) SetVersion(v int64) *APNSVoipSandboxCha return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *APNSVoipSandboxChannelResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DefaultAuthenticationMethod != nil { + v := *s.DefaultAuthenticationMethod + + e.SetValue(protocol.BodyTarget, "DefaultAuthenticationMethod", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HasCredential != nil { + v := *s.HasCredential + + e.SetValue(protocol.BodyTarget, "HasCredential", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HasTokenKey != nil { + v := *s.HasTokenKey + + e.SetValue(protocol.BodyTarget, "HasTokenKey", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsArchived != nil { + v := *s.IsArchived + + e.SetValue(protocol.BodyTarget, "IsArchived", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.LastModifiedBy != nil { + v := *s.LastModifiedBy + + e.SetValue(protocol.BodyTarget, "LastModifiedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Platform != nil { + v := *s.Platform + + e.SetValue(protocol.BodyTarget, "Platform", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Activities for campaign. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/ActivitiesResponse type ActivitiesResponse struct { @@ -6677,6 +7390,17 @@ func (s *ActivitiesResponse) SetItem(v []*ActivityResponse) *ActivitiesResponse return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ActivitiesResponse) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Item) > 0 { + v := s.Item + + e.SetList(protocol.BodyTarget, "Item", encodeActivityResponseList(v), protocol.Metadata{}) + } + + return nil +} + // Activity definition // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/ActivityResponse type ActivityResponse struct { @@ -6813,6 +7537,85 @@ func (s *ActivityResponse) SetTreatmentId(v string) *ActivityResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ActivityResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CampaignId != nil { + v := *s.CampaignId + + e.SetValue(protocol.BodyTarget, "CampaignId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.End != nil { + v := *s.End + + e.SetValue(protocol.BodyTarget, "End", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Result != nil { + v := *s.Result + + e.SetValue(protocol.BodyTarget, "Result", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ScheduledStart != nil { + v := *s.ScheduledStart + + e.SetValue(protocol.BodyTarget, "ScheduledStart", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Start != nil { + v := *s.Start + + e.SetValue(protocol.BodyTarget, "Start", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "State", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SuccessfulEndpointCount != nil { + v := *s.SuccessfulEndpointCount + + e.SetValue(protocol.BodyTarget, "SuccessfulEndpointCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TimezonesCompletedCount != nil { + v := *s.TimezonesCompletedCount + + e.SetValue(protocol.BodyTarget, "TimezonesCompletedCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TimezonesTotalCount != nil { + v := *s.TimezonesTotalCount + + e.SetValue(protocol.BodyTarget, "TimezonesTotalCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TotalEndpointCount != nil { + v := *s.TotalEndpointCount + + e.SetValue(protocol.BodyTarget, "TotalEndpointCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TreatmentId != nil { + v := *s.TreatmentId + + e.SetValue(protocol.BodyTarget, "TreatmentId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeActivityResponseList(vs []*ActivityResponse) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Address configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/AddressConfiguration type AddressConfiguration struct { @@ -6882,6 +7685,55 @@ func (s *AddressConfiguration) SetTitleOverride(v string) *AddressConfiguration return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AddressConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.BodyOverride != nil { + v := *s.BodyOverride + + e.SetValue(protocol.BodyTarget, "BodyOverride", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ChannelType != nil { + v := *s.ChannelType + + e.SetValue(protocol.BodyTarget, "ChannelType", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Context) > 0 { + v := s.Context + + e.SetMap(protocol.BodyTarget, "Context", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.RawContent != nil { + v := *s.RawContent + + e.SetValue(protocol.BodyTarget, "RawContent", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Substitutions) > 0 { + v := s.Substitutions + + e.SetMap(protocol.BodyTarget, "Substitutions", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + if s.TitleOverride != nil { + v := *s.TitleOverride + + e.SetValue(protocol.BodyTarget, "TitleOverride", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeAddressConfigurationMap(vs map[string]*AddressConfiguration) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // Application Response. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/ApplicationResponse type ApplicationResponse struct { @@ -6916,6 +7768,30 @@ func (s *ApplicationResponse) SetName(v string) *ApplicationResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ApplicationResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeApplicationResponseList(vs []*ApplicationResponse) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Application settings. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/ApplicationSettingsResource type ApplicationSettingsResource struct { @@ -6972,6 +7848,32 @@ func (s *ApplicationSettingsResource) SetQuietTime(v *QuietTime) *ApplicationSet return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ApplicationSettingsResource) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limits != nil { + v := s.Limits + + e.SetFields(protocol.BodyTarget, "Limits", v, protocol.Metadata{}) + } + if s.QuietTime != nil { + v := s.QuietTime + + e.SetFields(protocol.BodyTarget, "QuietTime", v, protocol.Metadata{}) + } + + return nil +} + // Get Applications Result. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/ApplicationsResponse type ApplicationsResponse struct { @@ -7007,6 +7909,22 @@ func (s *ApplicationsResponse) SetNextToken(v string) *ApplicationsResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ApplicationsResponse) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Item) > 0 { + v := s.Item + + e.SetList(protocol.BodyTarget, "Item", encodeApplicationResponseList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Custom attibute dimension // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/AttributeDimension type AttributeDimension struct { @@ -7042,6 +7960,30 @@ func (s *AttributeDimension) SetValues(v []*string) *AttributeDimension { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AttributeDimension) MarshalFields(e protocol.FieldEncoder) error { + if s.AttributeType != nil { + v := *s.AttributeType + + e.SetValue(protocol.BodyTarget, "AttributeType", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Values) > 0 { + v := s.Values + + e.SetList(protocol.BodyTarget, "Values", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeAttributeDimensionMap(vs map[string]*AttributeDimension) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // Baidu Cloud Push credentials // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/BaiduChannelRequest type BaiduChannelRequest struct { @@ -7085,6 +8027,27 @@ func (s *BaiduChannelRequest) SetSecretKey(v string) *BaiduChannelRequest { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BaiduChannelRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.ApiKey != nil { + v := *s.ApiKey + + e.SetValue(protocol.BodyTarget, "ApiKey", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.SecretKey != nil { + v := *s.SecretKey + + e.SetValue(protocol.BodyTarget, "SecretKey", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Baidu Cloud Messaging channel definition // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/BaiduChannelResponse type BaiduChannelResponse struct { @@ -7200,6 +8163,67 @@ func (s *BaiduChannelResponse) SetVersion(v int64) *BaiduChannelResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BaiduChannelResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Credential != nil { + v := *s.Credential + + e.SetValue(protocol.BodyTarget, "Credential", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HasCredential != nil { + v := *s.HasCredential + + e.SetValue(protocol.BodyTarget, "HasCredential", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsArchived != nil { + v := *s.IsArchived + + e.SetValue(protocol.BodyTarget, "IsArchived", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.LastModifiedBy != nil { + v := *s.LastModifiedBy + + e.SetValue(protocol.BodyTarget, "LastModifiedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Platform != nil { + v := *s.Platform + + e.SetValue(protocol.BodyTarget, "Platform", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Baidu Message. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/BaiduMessage type BaiduMessage struct { @@ -7345,6 +8369,82 @@ func (s *BaiduMessage) SetUrl(v string) *BaiduMessage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BaiduMessage) MarshalFields(e protocol.FieldEncoder) error { + if s.Action != nil { + v := *s.Action + + e.SetValue(protocol.BodyTarget, "Action", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Body != nil { + v := *s.Body + + e.SetValue(protocol.BodyTarget, "Body", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Data) > 0 { + v := s.Data + + e.SetMap(protocol.BodyTarget, "Data", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.IconReference != nil { + v := *s.IconReference + + e.SetValue(protocol.BodyTarget, "IconReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ImageIconUrl != nil { + v := *s.ImageIconUrl + + e.SetValue(protocol.BodyTarget, "ImageIconUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ImageUrl != nil { + v := *s.ImageUrl + + e.SetValue(protocol.BodyTarget, "ImageUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RawContent != nil { + v := *s.RawContent + + e.SetValue(protocol.BodyTarget, "RawContent", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SilentPush != nil { + v := *s.SilentPush + + e.SetValue(protocol.BodyTarget, "SilentPush", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.SmallImageIconUrl != nil { + v := *s.SmallImageIconUrl + + e.SetValue(protocol.BodyTarget, "SmallImageIconUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Sound != nil { + v := *s.Sound + + e.SetValue(protocol.BodyTarget, "Sound", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Substitutions) > 0 { + v := s.Substitutions + + e.SetMap(protocol.BodyTarget, "Substitutions", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + if s.Title != nil { + v := *s.Title + + e.SetValue(protocol.BodyTarget, "Title", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "Url", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The email message configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CampaignEmailMessage type CampaignEmailMessage struct { @@ -7398,6 +8498,32 @@ func (s *CampaignEmailMessage) SetTitle(v string) *CampaignEmailMessage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CampaignEmailMessage) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := *s.Body + + e.SetValue(protocol.BodyTarget, "Body", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FromAddress != nil { + v := *s.FromAddress + + e.SetValue(protocol.BodyTarget, "FromAddress", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HtmlBody != nil { + v := *s.HtmlBody + + e.SetValue(protocol.BodyTarget, "HtmlBody", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Title != nil { + v := *s.Title + + e.SetValue(protocol.BodyTarget, "Title", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Campaign Limits are used to limit the number of messages that can be sent // to a user. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CampaignLimits @@ -7453,6 +8579,32 @@ func (s *CampaignLimits) SetTotal(v int64) *CampaignLimits { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CampaignLimits) MarshalFields(e protocol.FieldEncoder) error { + if s.Daily != nil { + v := *s.Daily + + e.SetValue(protocol.BodyTarget, "Daily", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MaximumDuration != nil { + v := *s.MaximumDuration + + e.SetValue(protocol.BodyTarget, "MaximumDuration", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MessagesPerSecond != nil { + v := *s.MessagesPerSecond + + e.SetValue(protocol.BodyTarget, "MessagesPerSecond", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Total != nil { + v := *s.Total + + e.SetValue(protocol.BodyTarget, "Total", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Campaign definition // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CampaignResponse type CampaignResponse struct { @@ -7644,6 +8796,115 @@ func (s *CampaignResponse) SetVersion(v int64) *CampaignResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CampaignResponse) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AdditionalTreatments) > 0 { + v := s.AdditionalTreatments + + e.SetList(protocol.BodyTarget, "AdditionalTreatments", encodeTreatmentResourceList(v), protocol.Metadata{}) + } + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DefaultState != nil { + v := s.DefaultState + + e.SetFields(protocol.BodyTarget, "DefaultState", v, protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HoldoutPercent != nil { + v := *s.HoldoutPercent + + e.SetValue(protocol.BodyTarget, "HoldoutPercent", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsPaused != nil { + v := *s.IsPaused + + e.SetValue(protocol.BodyTarget, "IsPaused", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limits != nil { + v := s.Limits + + e.SetFields(protocol.BodyTarget, "Limits", v, protocol.Metadata{}) + } + if s.MessageConfiguration != nil { + v := s.MessageConfiguration + + e.SetFields(protocol.BodyTarget, "MessageConfiguration", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Schedule != nil { + v := s.Schedule + + e.SetFields(protocol.BodyTarget, "Schedule", v, protocol.Metadata{}) + } + if s.SegmentId != nil { + v := *s.SegmentId + + e.SetValue(protocol.BodyTarget, "SegmentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentVersion != nil { + v := *s.SegmentVersion + + e.SetValue(protocol.BodyTarget, "SegmentVersion", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.State != nil { + v := s.State + + e.SetFields(protocol.BodyTarget, "State", v, protocol.Metadata{}) + } + if s.TreatmentDescription != nil { + v := *s.TreatmentDescription + + e.SetValue(protocol.BodyTarget, "TreatmentDescription", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TreatmentName != nil { + v := *s.TreatmentName + + e.SetValue(protocol.BodyTarget, "TreatmentName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCampaignResponseList(vs []*CampaignResponse) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // SMS message configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CampaignSmsMessage type CampaignSmsMessage struct { @@ -7687,6 +8948,27 @@ func (s *CampaignSmsMessage) SetSenderId(v string) *CampaignSmsMessage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CampaignSmsMessage) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := *s.Body + + e.SetValue(protocol.BodyTarget, "Body", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MessageType != nil { + v := *s.MessageType + + e.SetValue(protocol.BodyTarget, "MessageType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SenderId != nil { + v := *s.SenderId + + e.SetValue(protocol.BodyTarget, "SenderId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // State of the Campaign // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CampaignState type CampaignState struct { @@ -7714,6 +8996,17 @@ func (s *CampaignState) SetCampaignStatus(v string) *CampaignState { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CampaignState) MarshalFields(e protocol.FieldEncoder) error { + if s.CampaignStatus != nil { + v := *s.CampaignStatus + + e.SetValue(protocol.BodyTarget, "CampaignStatus", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // List of available campaigns. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CampaignsResponse type CampaignsResponse struct { @@ -7749,6 +9042,22 @@ func (s *CampaignsResponse) SetNextToken(v string) *CampaignsResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CampaignsResponse) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Item) > 0 { + v := s.Item + + e.SetList(protocol.BodyTarget, "Item", encodeCampaignResponseList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateAppRequest type CreateAppInput struct { _ struct{} `type:"structure" payload:"CreateApplicationRequest"` @@ -7788,6 +9097,17 @@ func (s *CreateAppInput) SetCreateApplicationRequest(v *CreateApplicationRequest return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateAppInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CreateApplicationRequest != nil { + v := s.CreateApplicationRequest + + e.SetFields(protocol.PayloadTarget, "CreateApplicationRequest", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateAppResponse type CreateAppOutput struct { _ struct{} `type:"structure" payload:"ApplicationResponse"` @@ -7814,6 +9134,17 @@ func (s *CreateAppOutput) SetApplicationResponse(v *ApplicationResponse) *Create return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateAppOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationResponse != nil { + v := s.ApplicationResponse + + e.SetFields(protocol.PayloadTarget, "ApplicationResponse", v, protocol.Metadata{}) + } + + return nil +} + // Application Request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateApplicationRequest type CreateApplicationRequest struct { @@ -7839,6 +9170,17 @@ func (s *CreateApplicationRequest) SetName(v string) *CreateApplicationRequest { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateApplicationRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateCampaignRequest type CreateCampaignInput struct { _ struct{} `type:"structure" payload:"WriteCampaignRequest"` @@ -7890,6 +9232,22 @@ func (s *CreateCampaignInput) SetWriteCampaignRequest(v *WriteCampaignRequest) * return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateCampaignInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.WriteCampaignRequest != nil { + v := s.WriteCampaignRequest + + e.SetFields(protocol.PayloadTarget, "WriteCampaignRequest", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateCampaignResponse type CreateCampaignOutput struct { _ struct{} `type:"structure" payload:"CampaignResponse"` @@ -7916,6 +9274,17 @@ func (s *CreateCampaignOutput) SetCampaignResponse(v *CampaignResponse) *CreateC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateCampaignOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CampaignResponse != nil { + v := s.CampaignResponse + + e.SetFields(protocol.PayloadTarget, "CampaignResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateImportJobRequest type CreateImportJobInput struct { _ struct{} `type:"structure" payload:"ImportJobRequest"` @@ -7965,6 +9334,22 @@ func (s *CreateImportJobInput) SetImportJobRequest(v *ImportJobRequest) *CreateI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateImportJobInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ImportJobRequest != nil { + v := s.ImportJobRequest + + e.SetFields(protocol.PayloadTarget, "ImportJobRequest", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateImportJobResponse type CreateImportJobOutput struct { _ struct{} `type:"structure" payload:"ImportJobResponse"` @@ -7989,6 +9374,17 @@ func (s *CreateImportJobOutput) SetImportJobResponse(v *ImportJobResponse) *Crea return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateImportJobOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ImportJobResponse != nil { + v := s.ImportJobResponse + + e.SetFields(protocol.PayloadTarget, "ImportJobResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateSegmentRequest type CreateSegmentInput struct { _ struct{} `type:"structure" payload:"WriteSegmentRequest"` @@ -8040,6 +9436,22 @@ func (s *CreateSegmentInput) SetWriteSegmentRequest(v *WriteSegmentRequest) *Cre return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateSegmentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.WriteSegmentRequest != nil { + v := s.WriteSegmentRequest + + e.SetFields(protocol.PayloadTarget, "WriteSegmentRequest", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateSegmentResponse type CreateSegmentOutput struct { _ struct{} `type:"structure" payload:"SegmentResponse"` @@ -8066,6 +9478,17 @@ func (s *CreateSegmentOutput) SetSegmentResponse(v *SegmentResponse) *CreateSegm return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateSegmentOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.SegmentResponse != nil { + v := s.SegmentResponse + + e.SetFields(protocol.PayloadTarget, "SegmentResponse", v, protocol.Metadata{}) + } + + return nil +} + // Default Message across push notification, email, and sms. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DefaultMessage type DefaultMessage struct { @@ -8099,6 +9522,27 @@ func (s *DefaultMessage) SetSubstitutions(v map[string][]*string) *DefaultMessag return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DefaultMessage) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := *s.Body + + e.SetValue(protocol.BodyTarget, "Body", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Substitutions) > 0 { + v := s.Substitutions + + e.SetMap(protocol.BodyTarget, "Substitutions", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + + return nil +} + // Default Push Notification Message. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DefaultPushNotificationMessage type DefaultPushNotificationMessage struct { @@ -8184,6 +9628,52 @@ func (s *DefaultPushNotificationMessage) SetUrl(v string) *DefaultPushNotificati return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DefaultPushNotificationMessage) MarshalFields(e protocol.FieldEncoder) error { + if s.Action != nil { + v := *s.Action + + e.SetValue(protocol.BodyTarget, "Action", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Body != nil { + v := *s.Body + + e.SetValue(protocol.BodyTarget, "Body", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Data) > 0 { + v := s.Data + + e.SetMap(protocol.BodyTarget, "Data", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.SilentPush != nil { + v := *s.SilentPush + + e.SetValue(protocol.BodyTarget, "SilentPush", protocol.BoolValue(v), protocol.Metadata{}) + } + if len(s.Substitutions) > 0 { + v := s.Substitutions + + e.SetMap(protocol.BodyTarget, "Substitutions", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + if s.Title != nil { + v := *s.Title + + e.SetValue(protocol.BodyTarget, "Title", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "Url", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteAdmChannelRequest type DeleteAdmChannelInput struct { _ struct{} `type:"structure"` @@ -8221,6 +9711,17 @@ func (s *DeleteAdmChannelInput) SetApplicationId(v string) *DeleteAdmChannelInpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteAdmChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteAdmChannelResponse type DeleteAdmChannelOutput struct { _ struct{} `type:"structure" payload:"ADMChannelResponse"` @@ -8247,6 +9748,17 @@ func (s *DeleteAdmChannelOutput) SetADMChannelResponse(v *ADMChannelResponse) *D return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteAdmChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ADMChannelResponse != nil { + v := s.ADMChannelResponse + + e.SetFields(protocol.PayloadTarget, "ADMChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsChannelRequest type DeleteApnsChannelInput struct { _ struct{} `type:"structure"` @@ -8284,6 +9796,17 @@ func (s *DeleteApnsChannelInput) SetApplicationId(v string) *DeleteApnsChannelIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteApnsChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsChannelResponse type DeleteApnsChannelOutput struct { _ struct{} `type:"structure" payload:"APNSChannelResponse"` @@ -8310,6 +9833,17 @@ func (s *DeleteApnsChannelOutput) SetAPNSChannelResponse(v *APNSChannelResponse) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteApnsChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSChannelResponse != nil { + v := s.APNSChannelResponse + + e.SetFields(protocol.PayloadTarget, "APNSChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsSandboxChannelRequest type DeleteApnsSandboxChannelInput struct { _ struct{} `type:"structure"` @@ -8347,6 +9881,17 @@ func (s *DeleteApnsSandboxChannelInput) SetApplicationId(v string) *DeleteApnsSa return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteApnsSandboxChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsSandboxChannelResponse type DeleteApnsSandboxChannelOutput struct { _ struct{} `type:"structure" payload:"APNSSandboxChannelResponse"` @@ -8373,6 +9918,17 @@ func (s *DeleteApnsSandboxChannelOutput) SetAPNSSandboxChannelResponse(v *APNSSa return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteApnsSandboxChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSSandboxChannelResponse != nil { + v := s.APNSSandboxChannelResponse + + e.SetFields(protocol.PayloadTarget, "APNSSandboxChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipChannelRequest type DeleteApnsVoipChannelInput struct { _ struct{} `type:"structure"` @@ -8410,6 +9966,17 @@ func (s *DeleteApnsVoipChannelInput) SetApplicationId(v string) *DeleteApnsVoipC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteApnsVoipChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipChannelResponse type DeleteApnsVoipChannelOutput struct { _ struct{} `type:"structure" payload:"APNSVoipChannelResponse"` @@ -8436,6 +10003,17 @@ func (s *DeleteApnsVoipChannelOutput) SetAPNSVoipChannelResponse(v *APNSVoipChan return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteApnsVoipChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSVoipChannelResponse != nil { + v := s.APNSVoipChannelResponse + + e.SetFields(protocol.PayloadTarget, "APNSVoipChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipSandboxChannelRequest type DeleteApnsVoipSandboxChannelInput struct { _ struct{} `type:"structure"` @@ -8473,6 +10051,17 @@ func (s *DeleteApnsVoipSandboxChannelInput) SetApplicationId(v string) *DeleteAp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteApnsVoipSandboxChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipSandboxChannelResponse type DeleteApnsVoipSandboxChannelOutput struct { _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelResponse"` @@ -8499,6 +10088,17 @@ func (s *DeleteApnsVoipSandboxChannelOutput) SetAPNSVoipSandboxChannelResponse(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteApnsVoipSandboxChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSVoipSandboxChannelResponse != nil { + v := s.APNSVoipSandboxChannelResponse + + e.SetFields(protocol.PayloadTarget, "APNSVoipSandboxChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteAppRequest type DeleteAppInput struct { _ struct{} `type:"structure"` @@ -8536,6 +10136,17 @@ func (s *DeleteAppInput) SetApplicationId(v string) *DeleteAppInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteAppInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteAppResponse type DeleteAppOutput struct { _ struct{} `type:"structure" payload:"ApplicationResponse"` @@ -8562,6 +10173,17 @@ func (s *DeleteAppOutput) SetApplicationResponse(v *ApplicationResponse) *Delete return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteAppOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationResponse != nil { + v := s.ApplicationResponse + + e.SetFields(protocol.PayloadTarget, "ApplicationResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteBaiduChannelRequest type DeleteBaiduChannelInput struct { _ struct{} `type:"structure"` @@ -8599,6 +10221,17 @@ func (s *DeleteBaiduChannelInput) SetApplicationId(v string) *DeleteBaiduChannel return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBaiduChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteBaiduChannelResponse type DeleteBaiduChannelOutput struct { _ struct{} `type:"structure" payload:"BaiduChannelResponse"` @@ -8625,6 +10258,17 @@ func (s *DeleteBaiduChannelOutput) SetBaiduChannelResponse(v *BaiduChannelRespon return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBaiduChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.BaiduChannelResponse != nil { + v := s.BaiduChannelResponse + + e.SetFields(protocol.PayloadTarget, "BaiduChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteCampaignRequest type DeleteCampaignInput struct { _ struct{} `type:"structure"` @@ -8674,6 +10318,22 @@ func (s *DeleteCampaignInput) SetCampaignId(v string) *DeleteCampaignInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteCampaignInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CampaignId != nil { + v := *s.CampaignId + + e.SetValue(protocol.PathTarget, "campaign-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteCampaignResponse type DeleteCampaignOutput struct { _ struct{} `type:"structure" payload:"CampaignResponse"` @@ -8700,6 +10360,17 @@ func (s *DeleteCampaignOutput) SetCampaignResponse(v *CampaignResponse) *DeleteC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteCampaignOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CampaignResponse != nil { + v := s.CampaignResponse + + e.SetFields(protocol.PayloadTarget, "CampaignResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEmailChannelRequest type DeleteEmailChannelInput struct { _ struct{} `type:"structure"` @@ -8737,6 +10408,17 @@ func (s *DeleteEmailChannelInput) SetApplicationId(v string) *DeleteEmailChannel return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteEmailChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEmailChannelResponse type DeleteEmailChannelOutput struct { _ struct{} `type:"structure" payload:"EmailChannelResponse"` @@ -8763,6 +10445,17 @@ func (s *DeleteEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelRespon return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteEmailChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.EmailChannelResponse != nil { + v := s.EmailChannelResponse + + e.SetFields(protocol.PayloadTarget, "EmailChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEventStreamRequest type DeleteEventStreamInput struct { _ struct{} `type:"structure"` @@ -8802,6 +10495,17 @@ func (s *DeleteEventStreamInput) SetApplicationId(v string) *DeleteEventStreamIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteEventStreamInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEventStreamResponse type DeleteEventStreamOutput struct { _ struct{} `type:"structure" payload:"EventStream"` @@ -8828,6 +10532,17 @@ func (s *DeleteEventStreamOutput) SetEventStream(v *EventStream) *DeleteEventStr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteEventStreamOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.EventStream != nil { + v := s.EventStream + + e.SetFields(protocol.PayloadTarget, "EventStream", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteGcmChannelRequest type DeleteGcmChannelInput struct { _ struct{} `type:"structure"` @@ -8865,6 +10580,17 @@ func (s *DeleteGcmChannelInput) SetApplicationId(v string) *DeleteGcmChannelInpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteGcmChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteGcmChannelResponse type DeleteGcmChannelOutput struct { _ struct{} `type:"structure" payload:"GCMChannelResponse"` @@ -8891,6 +10617,17 @@ func (s *DeleteGcmChannelOutput) SetGCMChannelResponse(v *GCMChannelResponse) *D return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteGcmChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.GCMChannelResponse != nil { + v := s.GCMChannelResponse + + e.SetFields(protocol.PayloadTarget, "GCMChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSegmentRequest type DeleteSegmentInput struct { _ struct{} `type:"structure"` @@ -8940,6 +10677,22 @@ func (s *DeleteSegmentInput) SetSegmentId(v string) *DeleteSegmentInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteSegmentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentId != nil { + v := *s.SegmentId + + e.SetValue(protocol.PathTarget, "segment-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSegmentResponse type DeleteSegmentOutput struct { _ struct{} `type:"structure" payload:"SegmentResponse"` @@ -8966,6 +10719,17 @@ func (s *DeleteSegmentOutput) SetSegmentResponse(v *SegmentResponse) *DeleteSegm return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteSegmentOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.SegmentResponse != nil { + v := s.SegmentResponse + + e.SetFields(protocol.PayloadTarget, "SegmentResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSmsChannelRequest type DeleteSmsChannelInput struct { _ struct{} `type:"structure"` @@ -9003,6 +10767,17 @@ func (s *DeleteSmsChannelInput) SetApplicationId(v string) *DeleteSmsChannelInpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteSmsChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSmsChannelResponse type DeleteSmsChannelOutput struct { _ struct{} `type:"structure" payload:"SMSChannelResponse"` @@ -9029,6 +10804,17 @@ func (s *DeleteSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *D return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteSmsChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.SMSChannelResponse != nil { + v := s.SMSChannelResponse + + e.SetFields(protocol.PayloadTarget, "SMSChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // The message configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DirectMessageConfiguration type DirectMessageConfiguration struct { @@ -9109,6 +10895,47 @@ func (s *DirectMessageConfiguration) SetSMSMessage(v *SMSMessage) *DirectMessage return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DirectMessageConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.ADMMessage != nil { + v := s.ADMMessage + + e.SetFields(protocol.BodyTarget, "ADMMessage", v, protocol.Metadata{}) + } + if s.APNSMessage != nil { + v := s.APNSMessage + + e.SetFields(protocol.BodyTarget, "APNSMessage", v, protocol.Metadata{}) + } + if s.BaiduMessage != nil { + v := s.BaiduMessage + + e.SetFields(protocol.BodyTarget, "BaiduMessage", v, protocol.Metadata{}) + } + if s.DefaultMessage != nil { + v := s.DefaultMessage + + e.SetFields(protocol.BodyTarget, "DefaultMessage", v, protocol.Metadata{}) + } + if s.DefaultPushNotificationMessage != nil { + v := s.DefaultPushNotificationMessage + + e.SetFields(protocol.BodyTarget, "DefaultPushNotificationMessage", v, protocol.Metadata{}) + } + if s.GCMMessage != nil { + v := s.GCMMessage + + e.SetFields(protocol.BodyTarget, "GCMMessage", v, protocol.Metadata{}) + } + if s.SMSMessage != nil { + v := s.SMSMessage + + e.SetFields(protocol.BodyTarget, "SMSMessage", v, protocol.Metadata{}) + } + + return nil +} + // Email Channel Request // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/EmailChannelRequest type EmailChannelRequest struct { @@ -9162,6 +10989,32 @@ func (s *EmailChannelRequest) SetRoleArn(v string) *EmailChannelRequest { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EmailChannelRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.FromAddress != nil { + v := *s.FromAddress + + e.SetValue(protocol.BodyTarget, "FromAddress", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Identity != nil { + v := *s.Identity + + e.SetValue(protocol.BodyTarget, "Identity", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "RoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Email Channel Response. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/EmailChannelResponse type EmailChannelResponse struct { @@ -9296,6 +11149,77 @@ func (s *EmailChannelResponse) SetVersion(v int64) *EmailChannelResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EmailChannelResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.FromAddress != nil { + v := *s.FromAddress + + e.SetValue(protocol.BodyTarget, "FromAddress", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HasCredential != nil { + v := *s.HasCredential + + e.SetValue(protocol.BodyTarget, "HasCredential", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Identity != nil { + v := *s.Identity + + e.SetValue(protocol.BodyTarget, "Identity", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsArchived != nil { + v := *s.IsArchived + + e.SetValue(protocol.BodyTarget, "IsArchived", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.LastModifiedBy != nil { + v := *s.LastModifiedBy + + e.SetValue(protocol.BodyTarget, "LastModifiedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Platform != nil { + v := *s.Platform + + e.SetValue(protocol.BodyTarget, "Platform", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "RoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Endpoint update request // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/EndpointBatchItem type EndpointBatchItem struct { @@ -9422,6 +11346,85 @@ func (s *EndpointBatchItem) SetUser(v *EndpointUser) *EndpointBatchItem { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EndpointBatchItem) MarshalFields(e protocol.FieldEncoder) error { + if s.Address != nil { + v := *s.Address + + e.SetValue(protocol.BodyTarget, "Address", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetMap(protocol.BodyTarget, "Attributes", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + if s.ChannelType != nil { + v := *s.ChannelType + + e.SetValue(protocol.BodyTarget, "ChannelType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Demographic != nil { + v := s.Demographic + + e.SetFields(protocol.BodyTarget, "Demographic", v, protocol.Metadata{}) + } + if s.EffectiveDate != nil { + v := *s.EffectiveDate + + e.SetValue(protocol.BodyTarget, "EffectiveDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EndpointStatus != nil { + v := *s.EndpointStatus + + e.SetValue(protocol.BodyTarget, "EndpointStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Location != nil { + v := s.Location + + e.SetFields(protocol.BodyTarget, "Location", v, protocol.Metadata{}) + } + if len(s.Metrics) > 0 { + v := s.Metrics + + e.SetMap(protocol.BodyTarget, "Metrics", protocol.EncodeFloat64Map(v), protocol.Metadata{}) + } + if s.OptOut != nil { + v := *s.OptOut + + e.SetValue(protocol.BodyTarget, "OptOut", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestId != nil { + v := *s.RequestId + + e.SetValue(protocol.BodyTarget, "RequestId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.User != nil { + v := s.User + + e.SetFields(protocol.BodyTarget, "User", v, protocol.Metadata{}) + } + + return nil +} + +func encodeEndpointBatchItemList(vs []*EndpointBatchItem) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Endpoint batch update request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/EndpointBatchRequest type EndpointBatchRequest struct { @@ -9447,6 +11450,17 @@ func (s *EndpointBatchRequest) SetItem(v []*EndpointBatchItem) *EndpointBatchReq return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EndpointBatchRequest) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Item) > 0 { + v := s.Item + + e.SetList(protocol.BodyTarget, "Item", encodeEndpointBatchItemList(v), protocol.Metadata{}) + } + + return nil +} + // Endpoint demographic data // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/EndpointDemographic type EndpointDemographic struct { @@ -9536,6 +11550,52 @@ func (s *EndpointDemographic) SetTimezone(v string) *EndpointDemographic { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EndpointDemographic) MarshalFields(e protocol.FieldEncoder) error { + if s.AppVersion != nil { + v := *s.AppVersion + + e.SetValue(protocol.BodyTarget, "AppVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Locale != nil { + v := *s.Locale + + e.SetValue(protocol.BodyTarget, "Locale", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Make != nil { + v := *s.Make + + e.SetValue(protocol.BodyTarget, "Make", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Model != nil { + v := *s.Model + + e.SetValue(protocol.BodyTarget, "Model", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ModelVersion != nil { + v := *s.ModelVersion + + e.SetValue(protocol.BodyTarget, "ModelVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Platform != nil { + v := *s.Platform + + e.SetValue(protocol.BodyTarget, "Platform", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PlatformVersion != nil { + v := *s.PlatformVersion + + e.SetValue(protocol.BodyTarget, "PlatformVersion", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Timezone != nil { + v := *s.Timezone + + e.SetValue(protocol.BodyTarget, "Timezone", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Endpoint location data // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/EndpointLocation type EndpointLocation struct { @@ -9609,6 +11669,42 @@ func (s *EndpointLocation) SetRegion(v string) *EndpointLocation { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EndpointLocation) MarshalFields(e protocol.FieldEncoder) error { + if s.City != nil { + v := *s.City + + e.SetValue(protocol.BodyTarget, "City", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Country != nil { + v := *s.Country + + e.SetValue(protocol.BodyTarget, "Country", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Latitude != nil { + v := *s.Latitude + + e.SetValue(protocol.BodyTarget, "Latitude", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.Longitude != nil { + v := *s.Longitude + + e.SetValue(protocol.BodyTarget, "Longitude", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.PostalCode != nil { + v := *s.PostalCode + + e.SetValue(protocol.BodyTarget, "PostalCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Region != nil { + v := *s.Region + + e.SetValue(protocol.BodyTarget, "Region", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // The result from sending a message to an endpoint. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/EndpointMessageResult type EndpointMessageResult struct { @@ -9670,6 +11766,45 @@ func (s *EndpointMessageResult) SetUpdatedToken(v string) *EndpointMessageResult return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EndpointMessageResult) MarshalFields(e protocol.FieldEncoder) error { + if s.Address != nil { + v := *s.Address + + e.SetValue(protocol.BodyTarget, "Address", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeliveryStatus != nil { + v := *s.DeliveryStatus + + e.SetValue(protocol.BodyTarget, "DeliveryStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.BodyTarget, "StatusCode", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StatusMessage != nil { + v := *s.StatusMessage + + e.SetValue(protocol.BodyTarget, "StatusMessage", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UpdatedToken != nil { + v := *s.UpdatedToken + + e.SetValue(protocol.BodyTarget, "UpdatedToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeEndpointMessageResultMap(vs map[string]*EndpointMessageResult) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // Endpoint update request // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/EndpointRequest type EndpointRequest struct { @@ -9787,6 +11922,72 @@ func (s *EndpointRequest) SetUser(v *EndpointUser) *EndpointRequest { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EndpointRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.Address != nil { + v := *s.Address + + e.SetValue(protocol.BodyTarget, "Address", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetMap(protocol.BodyTarget, "Attributes", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + if s.ChannelType != nil { + v := *s.ChannelType + + e.SetValue(protocol.BodyTarget, "ChannelType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Demographic != nil { + v := s.Demographic + + e.SetFields(protocol.BodyTarget, "Demographic", v, protocol.Metadata{}) + } + if s.EffectiveDate != nil { + v := *s.EffectiveDate + + e.SetValue(protocol.BodyTarget, "EffectiveDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EndpointStatus != nil { + v := *s.EndpointStatus + + e.SetValue(protocol.BodyTarget, "EndpointStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Location != nil { + v := s.Location + + e.SetFields(protocol.BodyTarget, "Location", v, protocol.Metadata{}) + } + if len(s.Metrics) > 0 { + v := s.Metrics + + e.SetMap(protocol.BodyTarget, "Metrics", protocol.EncodeFloat64Map(v), protocol.Metadata{}) + } + if s.OptOut != nil { + v := *s.OptOut + + e.SetValue(protocol.BodyTarget, "OptOut", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestId != nil { + v := *s.RequestId + + e.SetValue(protocol.BodyTarget, "RequestId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.User != nil { + v := s.User + + e.SetFields(protocol.BodyTarget, "User", v, protocol.Metadata{}) + } + + return nil +} + // Endpoint response // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/EndpointResponse type EndpointResponse struct { @@ -9945,6 +12146,92 @@ func (s *EndpointResponse) SetUser(v *EndpointUser) *EndpointResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EndpointResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.Address != nil { + v := *s.Address + + e.SetValue(protocol.BodyTarget, "Address", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetMap(protocol.BodyTarget, "Attributes", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + if s.ChannelType != nil { + v := *s.ChannelType + + e.SetValue(protocol.BodyTarget, "ChannelType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CohortId != nil { + v := *s.CohortId + + e.SetValue(protocol.BodyTarget, "CohortId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Demographic != nil { + v := s.Demographic + + e.SetFields(protocol.BodyTarget, "Demographic", v, protocol.Metadata{}) + } + if s.EffectiveDate != nil { + v := *s.EffectiveDate + + e.SetValue(protocol.BodyTarget, "EffectiveDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EndpointStatus != nil { + v := *s.EndpointStatus + + e.SetValue(protocol.BodyTarget, "EndpointStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Location != nil { + v := s.Location + + e.SetFields(protocol.BodyTarget, "Location", v, protocol.Metadata{}) + } + if len(s.Metrics) > 0 { + v := s.Metrics + + e.SetMap(protocol.BodyTarget, "Metrics", protocol.EncodeFloat64Map(v), protocol.Metadata{}) + } + if s.OptOut != nil { + v := *s.OptOut + + e.SetValue(protocol.BodyTarget, "OptOut", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestId != nil { + v := *s.RequestId + + e.SetValue(protocol.BodyTarget, "RequestId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.User != nil { + v := s.User + + e.SetFields(protocol.BodyTarget, "User", v, protocol.Metadata{}) + } + + return nil +} + // Endpoint send configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/EndpointSendConfiguration type EndpointSendConfiguration struct { @@ -10005,6 +12292,50 @@ func (s *EndpointSendConfiguration) SetTitleOverride(v string) *EndpointSendConf return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EndpointSendConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.BodyOverride != nil { + v := *s.BodyOverride + + e.SetValue(protocol.BodyTarget, "BodyOverride", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Context) > 0 { + v := s.Context + + e.SetMap(protocol.BodyTarget, "Context", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.RawContent != nil { + v := *s.RawContent + + e.SetValue(protocol.BodyTarget, "RawContent", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Substitutions) > 0 { + v := s.Substitutions + + e.SetMap(protocol.BodyTarget, "Substitutions", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + if s.TitleOverride != nil { + v := *s.TitleOverride + + e.SetValue(protocol.BodyTarget, "TitleOverride", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeEndpointSendConfigurationMap(vs map[string]*EndpointSendConfiguration) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // Endpoint user specific custom userAttributes // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/EndpointUser type EndpointUser struct { @@ -10038,6 +12369,27 @@ func (s *EndpointUser) SetUserId(v string) *EndpointUser { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EndpointUser) MarshalFields(e protocol.FieldEncoder) error { + if len(s.UserAttributes) > 0 { + v := s.UserAttributes + + e.SetMap(protocol.BodyTarget, "UserAttributes", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + if s.UserId != nil { + v := *s.UserId + + e.SetValue(protocol.BodyTarget, "UserId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Model for an event publishing subscription export. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/EventStream type EventStream struct { @@ -10112,6 +12464,42 @@ func (s *EventStream) SetRoleArn(v string) *EventStream { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EventStream) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DestinationStreamArn != nil { + v := *s.DestinationStreamArn + + e.SetValue(protocol.BodyTarget, "DestinationStreamArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ExternalId != nil { + v := *s.ExternalId + + e.SetValue(protocol.BodyTarget, "ExternalId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastUpdatedBy != nil { + v := *s.LastUpdatedBy + + e.SetValue(protocol.BodyTarget, "LastUpdatedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "RoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Google Cloud Messaging credentials // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GCMChannelRequest type GCMChannelRequest struct { @@ -10146,6 +12534,22 @@ func (s *GCMChannelRequest) SetEnabled(v bool) *GCMChannelRequest { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GCMChannelRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.ApiKey != nil { + v := *s.ApiKey + + e.SetValue(protocol.BodyTarget, "ApiKey", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // Google Cloud Messaging channel definition // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GCMChannelResponse type GCMChannelResponse struct { @@ -10261,6 +12665,67 @@ func (s *GCMChannelResponse) SetVersion(v int64) *GCMChannelResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GCMChannelResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Credential != nil { + v := *s.Credential + + e.SetValue(protocol.BodyTarget, "Credential", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HasCredential != nil { + v := *s.HasCredential + + e.SetValue(protocol.BodyTarget, "HasCredential", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsArchived != nil { + v := *s.IsArchived + + e.SetValue(protocol.BodyTarget, "IsArchived", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.LastModifiedBy != nil { + v := *s.LastModifiedBy + + e.SetValue(protocol.BodyTarget, "LastModifiedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Platform != nil { + v := *s.Platform + + e.SetValue(protocol.BodyTarget, "Platform", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // GCM Message. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GCMMessage type GCMMessage struct { @@ -10448,6 +12913,102 @@ func (s *GCMMessage) SetUrl(v string) *GCMMessage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GCMMessage) MarshalFields(e protocol.FieldEncoder) error { + if s.Action != nil { + v := *s.Action + + e.SetValue(protocol.BodyTarget, "Action", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Body != nil { + v := *s.Body + + e.SetValue(protocol.BodyTarget, "Body", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CollapseKey != nil { + v := *s.CollapseKey + + e.SetValue(protocol.BodyTarget, "CollapseKey", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Data) > 0 { + v := s.Data + + e.SetMap(protocol.BodyTarget, "Data", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.IconReference != nil { + v := *s.IconReference + + e.SetValue(protocol.BodyTarget, "IconReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ImageIconUrl != nil { + v := *s.ImageIconUrl + + e.SetValue(protocol.BodyTarget, "ImageIconUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ImageUrl != nil { + v := *s.ImageUrl + + e.SetValue(protocol.BodyTarget, "ImageUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Priority != nil { + v := *s.Priority + + e.SetValue(protocol.BodyTarget, "Priority", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RawContent != nil { + v := *s.RawContent + + e.SetValue(protocol.BodyTarget, "RawContent", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestrictedPackageName != nil { + v := *s.RestrictedPackageName + + e.SetValue(protocol.BodyTarget, "RestrictedPackageName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SilentPush != nil { + v := *s.SilentPush + + e.SetValue(protocol.BodyTarget, "SilentPush", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.SmallImageIconUrl != nil { + v := *s.SmallImageIconUrl + + e.SetValue(protocol.BodyTarget, "SmallImageIconUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Sound != nil { + v := *s.Sound + + e.SetValue(protocol.BodyTarget, "Sound", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Substitutions) > 0 { + v := s.Substitutions + + e.SetMap(protocol.BodyTarget, "Substitutions", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + if s.TimeToLive != nil { + v := *s.TimeToLive + + e.SetValue(protocol.BodyTarget, "TimeToLive", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Title != nil { + v := *s.Title + + e.SetValue(protocol.BodyTarget, "Title", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "Url", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetAdmChannelRequest type GetAdmChannelInput struct { _ struct{} `type:"structure"` @@ -10485,6 +13046,17 @@ func (s *GetAdmChannelInput) SetApplicationId(v string) *GetAdmChannelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAdmChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetAdmChannelResponse type GetAdmChannelOutput struct { _ struct{} `type:"structure" payload:"ADMChannelResponse"` @@ -10511,6 +13083,17 @@ func (s *GetAdmChannelOutput) SetADMChannelResponse(v *ADMChannelResponse) *GetA return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAdmChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ADMChannelResponse != nil { + v := s.ADMChannelResponse + + e.SetFields(protocol.PayloadTarget, "ADMChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsChannelRequest type GetApnsChannelInput struct { _ struct{} `type:"structure"` @@ -10548,6 +13131,17 @@ func (s *GetApnsChannelInput) SetApplicationId(v string) *GetApnsChannelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetApnsChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsChannelResponse type GetApnsChannelOutput struct { _ struct{} `type:"structure" payload:"APNSChannelResponse"` @@ -10574,6 +13168,17 @@ func (s *GetApnsChannelOutput) SetAPNSChannelResponse(v *APNSChannelResponse) *G return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetApnsChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSChannelResponse != nil { + v := s.APNSChannelResponse + + e.SetFields(protocol.PayloadTarget, "APNSChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsSandboxChannelRequest type GetApnsSandboxChannelInput struct { _ struct{} `type:"structure"` @@ -10611,6 +13216,17 @@ func (s *GetApnsSandboxChannelInput) SetApplicationId(v string) *GetApnsSandboxC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetApnsSandboxChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsSandboxChannelResponse type GetApnsSandboxChannelOutput struct { _ struct{} `type:"structure" payload:"APNSSandboxChannelResponse"` @@ -10637,6 +13253,17 @@ func (s *GetApnsSandboxChannelOutput) SetAPNSSandboxChannelResponse(v *APNSSandb return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetApnsSandboxChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSSandboxChannelResponse != nil { + v := s.APNSSandboxChannelResponse + + e.SetFields(protocol.PayloadTarget, "APNSSandboxChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipChannelRequest type GetApnsVoipChannelInput struct { _ struct{} `type:"structure"` @@ -10674,6 +13301,17 @@ func (s *GetApnsVoipChannelInput) SetApplicationId(v string) *GetApnsVoipChannel return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetApnsVoipChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipChannelResponse type GetApnsVoipChannelOutput struct { _ struct{} `type:"structure" payload:"APNSVoipChannelResponse"` @@ -10700,6 +13338,17 @@ func (s *GetApnsVoipChannelOutput) SetAPNSVoipChannelResponse(v *APNSVoipChannel return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetApnsVoipChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSVoipChannelResponse != nil { + v := s.APNSVoipChannelResponse + + e.SetFields(protocol.PayloadTarget, "APNSVoipChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipSandboxChannelRequest type GetApnsVoipSandboxChannelInput struct { _ struct{} `type:"structure"` @@ -10737,6 +13386,17 @@ func (s *GetApnsVoipSandboxChannelInput) SetApplicationId(v string) *GetApnsVoip return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetApnsVoipSandboxChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipSandboxChannelResponse type GetApnsVoipSandboxChannelOutput struct { _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelResponse"` @@ -10763,6 +13423,17 @@ func (s *GetApnsVoipSandboxChannelOutput) SetAPNSVoipSandboxChannelResponse(v *A return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetApnsVoipSandboxChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSVoipSandboxChannelResponse != nil { + v := s.APNSVoipSandboxChannelResponse + + e.SetFields(protocol.PayloadTarget, "APNSVoipSandboxChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetAppRequest type GetAppInput struct { _ struct{} `type:"structure"` @@ -10800,6 +13471,17 @@ func (s *GetAppInput) SetApplicationId(v string) *GetAppInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAppInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetAppResponse type GetAppOutput struct { _ struct{} `type:"structure" payload:"ApplicationResponse"` @@ -10826,6 +13508,17 @@ func (s *GetAppOutput) SetApplicationResponse(v *ApplicationResponse) *GetAppOut return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAppOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationResponse != nil { + v := s.ApplicationResponse + + e.SetFields(protocol.PayloadTarget, "ApplicationResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApplicationSettingsRequest type GetApplicationSettingsInput struct { _ struct{} `type:"structure"` @@ -10863,6 +13556,17 @@ func (s *GetApplicationSettingsInput) SetApplicationId(v string) *GetApplication return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetApplicationSettingsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApplicationSettingsResponse type GetApplicationSettingsOutput struct { _ struct{} `type:"structure" payload:"ApplicationSettingsResource"` @@ -10889,6 +13593,17 @@ func (s *GetApplicationSettingsOutput) SetApplicationSettingsResource(v *Applica return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetApplicationSettingsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationSettingsResource != nil { + v := s.ApplicationSettingsResource + + e.SetFields(protocol.PayloadTarget, "ApplicationSettingsResource", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetAppsRequest type GetAppsInput struct { _ struct{} `type:"structure"` @@ -10920,6 +13635,22 @@ func (s *GetAppsInput) SetToken(v string) *GetAppsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAppsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.PageSize != nil { + v := *s.PageSize + + e.SetValue(protocol.QueryTarget, "page-size", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Token != nil { + v := *s.Token + + e.SetValue(protocol.QueryTarget, "token", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetAppsResponse type GetAppsOutput struct { _ struct{} `type:"structure" payload:"ApplicationsResponse"` @@ -10946,6 +13677,17 @@ func (s *GetAppsOutput) SetApplicationsResponse(v *ApplicationsResponse) *GetApp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAppsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationsResponse != nil { + v := s.ApplicationsResponse + + e.SetFields(protocol.PayloadTarget, "ApplicationsResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetBaiduChannelRequest type GetBaiduChannelInput struct { _ struct{} `type:"structure"` @@ -10983,6 +13725,17 @@ func (s *GetBaiduChannelInput) SetApplicationId(v string) *GetBaiduChannelInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBaiduChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetBaiduChannelResponse type GetBaiduChannelOutput struct { _ struct{} `type:"structure" payload:"BaiduChannelResponse"` @@ -11009,6 +13762,17 @@ func (s *GetBaiduChannelOutput) SetBaiduChannelResponse(v *BaiduChannelResponse) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBaiduChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.BaiduChannelResponse != nil { + v := s.BaiduChannelResponse + + e.SetFields(protocol.PayloadTarget, "BaiduChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignActivitiesRequest type GetCampaignActivitiesInput struct { _ struct{} `type:"structure"` @@ -11074,6 +13838,32 @@ func (s *GetCampaignActivitiesInput) SetToken(v string) *GetCampaignActivitiesIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCampaignActivitiesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CampaignId != nil { + v := *s.CampaignId + + e.SetValue(protocol.PathTarget, "campaign-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageSize != nil { + v := *s.PageSize + + e.SetValue(protocol.QueryTarget, "page-size", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Token != nil { + v := *s.Token + + e.SetValue(protocol.QueryTarget, "token", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignActivitiesResponse type GetCampaignActivitiesOutput struct { _ struct{} `type:"structure" payload:"ActivitiesResponse"` @@ -11100,6 +13890,17 @@ func (s *GetCampaignActivitiesOutput) SetActivitiesResponse(v *ActivitiesRespons return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCampaignActivitiesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ActivitiesResponse != nil { + v := s.ActivitiesResponse + + e.SetFields(protocol.PayloadTarget, "ActivitiesResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignRequest type GetCampaignInput struct { _ struct{} `type:"structure"` @@ -11149,6 +13950,22 @@ func (s *GetCampaignInput) SetCampaignId(v string) *GetCampaignInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCampaignInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CampaignId != nil { + v := *s.CampaignId + + e.SetValue(protocol.PathTarget, "campaign-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignResponse type GetCampaignOutput struct { _ struct{} `type:"structure" payload:"CampaignResponse"` @@ -11175,6 +13992,17 @@ func (s *GetCampaignOutput) SetCampaignResponse(v *CampaignResponse) *GetCampaig return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCampaignOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CampaignResponse != nil { + v := s.CampaignResponse + + e.SetFields(protocol.PayloadTarget, "CampaignResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersionRequest type GetCampaignVersionInput struct { _ struct{} `type:"structure"` @@ -11236,6 +14064,27 @@ func (s *GetCampaignVersionInput) SetVersion(v string) *GetCampaignVersionInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCampaignVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CampaignId != nil { + v := *s.CampaignId + + e.SetValue(protocol.PathTarget, "campaign-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.PathTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersionResponse type GetCampaignVersionOutput struct { _ struct{} `type:"structure" payload:"CampaignResponse"` @@ -11262,6 +14111,17 @@ func (s *GetCampaignVersionOutput) SetCampaignResponse(v *CampaignResponse) *Get return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCampaignVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CampaignResponse != nil { + v := s.CampaignResponse + + e.SetFields(protocol.PayloadTarget, "CampaignResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersionsRequest type GetCampaignVersionsInput struct { _ struct{} `type:"structure"` @@ -11327,6 +14187,32 @@ func (s *GetCampaignVersionsInput) SetToken(v string) *GetCampaignVersionsInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCampaignVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CampaignId != nil { + v := *s.CampaignId + + e.SetValue(protocol.PathTarget, "campaign-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageSize != nil { + v := *s.PageSize + + e.SetValue(protocol.QueryTarget, "page-size", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Token != nil { + v := *s.Token + + e.SetValue(protocol.QueryTarget, "token", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersionsResponse type GetCampaignVersionsOutput struct { _ struct{} `type:"structure" payload:"CampaignsResponse"` @@ -11353,6 +14239,17 @@ func (s *GetCampaignVersionsOutput) SetCampaignsResponse(v *CampaignsResponse) * return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCampaignVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CampaignsResponse != nil { + v := s.CampaignsResponse + + e.SetFields(protocol.PayloadTarget, "CampaignsResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignsRequest type GetCampaignsInput struct { _ struct{} `type:"structure"` @@ -11406,6 +14303,27 @@ func (s *GetCampaignsInput) SetToken(v string) *GetCampaignsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCampaignsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageSize != nil { + v := *s.PageSize + + e.SetValue(protocol.QueryTarget, "page-size", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Token != nil { + v := *s.Token + + e.SetValue(protocol.QueryTarget, "token", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignsResponse type GetCampaignsOutput struct { _ struct{} `type:"structure" payload:"CampaignsResponse"` @@ -11432,6 +14350,17 @@ func (s *GetCampaignsOutput) SetCampaignsResponse(v *CampaignsResponse) *GetCamp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCampaignsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CampaignsResponse != nil { + v := s.CampaignsResponse + + e.SetFields(protocol.PayloadTarget, "CampaignsResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEmailChannelRequest type GetEmailChannelInput struct { _ struct{} `type:"structure"` @@ -11469,6 +14398,17 @@ func (s *GetEmailChannelInput) SetApplicationId(v string) *GetEmailChannelInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetEmailChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEmailChannelResponse type GetEmailChannelOutput struct { _ struct{} `type:"structure" payload:"EmailChannelResponse"` @@ -11495,6 +14435,17 @@ func (s *GetEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelResponse) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetEmailChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.EmailChannelResponse != nil { + v := s.EmailChannelResponse + + e.SetFields(protocol.PayloadTarget, "EmailChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEndpointRequest type GetEndpointInput struct { _ struct{} `type:"structure"` @@ -11544,6 +14495,22 @@ func (s *GetEndpointInput) SetEndpointId(v string) *GetEndpointInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetEndpointInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EndpointId != nil { + v := *s.EndpointId + + e.SetValue(protocol.PathTarget, "endpoint-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEndpointResponse type GetEndpointOutput struct { _ struct{} `type:"structure" payload:"EndpointResponse"` @@ -11570,6 +14537,17 @@ func (s *GetEndpointOutput) SetEndpointResponse(v *EndpointResponse) *GetEndpoin return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetEndpointOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.EndpointResponse != nil { + v := s.EndpointResponse + + e.SetFields(protocol.PayloadTarget, "EndpointResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEventStreamRequest type GetEventStreamInput struct { _ struct{} `type:"structure"` @@ -11609,6 +14587,17 @@ func (s *GetEventStreamInput) SetApplicationId(v string) *GetEventStreamInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetEventStreamInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEventStreamResponse type GetEventStreamOutput struct { _ struct{} `type:"structure" payload:"EventStream"` @@ -11635,6 +14624,17 @@ func (s *GetEventStreamOutput) SetEventStream(v *EventStream) *GetEventStreamOut return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetEventStreamOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.EventStream != nil { + v := s.EventStream + + e.SetFields(protocol.PayloadTarget, "EventStream", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetGcmChannelRequest type GetGcmChannelInput struct { _ struct{} `type:"structure"` @@ -11672,6 +14672,17 @@ func (s *GetGcmChannelInput) SetApplicationId(v string) *GetGcmChannelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetGcmChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetGcmChannelResponse type GetGcmChannelOutput struct { _ struct{} `type:"structure" payload:"GCMChannelResponse"` @@ -11698,6 +14709,17 @@ func (s *GetGcmChannelOutput) SetGCMChannelResponse(v *GCMChannelResponse) *GetG return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetGcmChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.GCMChannelResponse != nil { + v := s.GCMChannelResponse + + e.SetFields(protocol.PayloadTarget, "GCMChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJobRequest type GetImportJobInput struct { _ struct{} `type:"structure"` @@ -11747,6 +14769,22 @@ func (s *GetImportJobInput) SetJobId(v string) *GetImportJobInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetImportJobInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobId != nil { + v := *s.JobId + + e.SetValue(protocol.PathTarget, "job-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJobResponse type GetImportJobOutput struct { _ struct{} `type:"structure" payload:"ImportJobResponse"` @@ -11771,6 +14809,17 @@ func (s *GetImportJobOutput) SetImportJobResponse(v *ImportJobResponse) *GetImpo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetImportJobOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ImportJobResponse != nil { + v := s.ImportJobResponse + + e.SetFields(protocol.PayloadTarget, "ImportJobResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJobsRequest type GetImportJobsInput struct { _ struct{} `type:"structure"` @@ -11824,6 +14873,27 @@ func (s *GetImportJobsInput) SetToken(v string) *GetImportJobsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetImportJobsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageSize != nil { + v := *s.PageSize + + e.SetValue(protocol.QueryTarget, "page-size", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Token != nil { + v := *s.Token + + e.SetValue(protocol.QueryTarget, "token", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJobsResponse type GetImportJobsOutput struct { _ struct{} `type:"structure" payload:"ImportJobsResponse"` @@ -11850,6 +14920,17 @@ func (s *GetImportJobsOutput) SetImportJobsResponse(v *ImportJobsResponse) *GetI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetImportJobsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ImportJobsResponse != nil { + v := s.ImportJobsResponse + + e.SetFields(protocol.PayloadTarget, "ImportJobsResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentImportJobsRequest type GetSegmentImportJobsInput struct { _ struct{} `type:"structure"` @@ -11915,6 +14996,32 @@ func (s *GetSegmentImportJobsInput) SetToken(v string) *GetSegmentImportJobsInpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSegmentImportJobsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageSize != nil { + v := *s.PageSize + + e.SetValue(protocol.QueryTarget, "page-size", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentId != nil { + v := *s.SegmentId + + e.SetValue(protocol.PathTarget, "segment-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Token != nil { + v := *s.Token + + e.SetValue(protocol.QueryTarget, "token", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentImportJobsResponse type GetSegmentImportJobsOutput struct { _ struct{} `type:"structure" payload:"ImportJobsResponse"` @@ -11941,6 +15048,17 @@ func (s *GetSegmentImportJobsOutput) SetImportJobsResponse(v *ImportJobsResponse return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSegmentImportJobsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ImportJobsResponse != nil { + v := s.ImportJobsResponse + + e.SetFields(protocol.PayloadTarget, "ImportJobsResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentRequest type GetSegmentInput struct { _ struct{} `type:"structure"` @@ -11990,6 +15108,22 @@ func (s *GetSegmentInput) SetSegmentId(v string) *GetSegmentInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSegmentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentId != nil { + v := *s.SegmentId + + e.SetValue(protocol.PathTarget, "segment-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentResponse type GetSegmentOutput struct { _ struct{} `type:"structure" payload:"SegmentResponse"` @@ -12016,6 +15150,17 @@ func (s *GetSegmentOutput) SetSegmentResponse(v *SegmentResponse) *GetSegmentOut return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSegmentOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.SegmentResponse != nil { + v := s.SegmentResponse + + e.SetFields(protocol.PayloadTarget, "SegmentResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersionRequest type GetSegmentVersionInput struct { _ struct{} `type:"structure"` @@ -12077,6 +15222,27 @@ func (s *GetSegmentVersionInput) SetVersion(v string) *GetSegmentVersionInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSegmentVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentId != nil { + v := *s.SegmentId + + e.SetValue(protocol.PathTarget, "segment-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.PathTarget, "version", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersionResponse type GetSegmentVersionOutput struct { _ struct{} `type:"structure" payload:"SegmentResponse"` @@ -12103,6 +15269,17 @@ func (s *GetSegmentVersionOutput) SetSegmentResponse(v *SegmentResponse) *GetSeg return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSegmentVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.SegmentResponse != nil { + v := s.SegmentResponse + + e.SetFields(protocol.PayloadTarget, "SegmentResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersionsRequest type GetSegmentVersionsInput struct { _ struct{} `type:"structure"` @@ -12156,16 +15333,42 @@ func (s *GetSegmentVersionsInput) SetPageSize(v string) *GetSegmentVersionsInput return s } -// SetSegmentId sets the SegmentId field's value. -func (s *GetSegmentVersionsInput) SetSegmentId(v string) *GetSegmentVersionsInput { - s.SegmentId = &v - return s -} +// SetSegmentId sets the SegmentId field's value. +func (s *GetSegmentVersionsInput) SetSegmentId(v string) *GetSegmentVersionsInput { + s.SegmentId = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetSegmentVersionsInput) SetToken(v string) *GetSegmentVersionsInput { + s.Token = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSegmentVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageSize != nil { + v := *s.PageSize + + e.SetValue(protocol.QueryTarget, "page-size", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentId != nil { + v := *s.SegmentId + + e.SetValue(protocol.PathTarget, "segment-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Token != nil { + v := *s.Token + + e.SetValue(protocol.QueryTarget, "token", protocol.StringValue(v), protocol.Metadata{}) + } -// SetToken sets the Token field's value. -func (s *GetSegmentVersionsInput) SetToken(v string) *GetSegmentVersionsInput { - s.Token = &v - return s + return nil } // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersionsResponse @@ -12194,6 +15397,17 @@ func (s *GetSegmentVersionsOutput) SetSegmentsResponse(v *SegmentsResponse) *Get return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSegmentVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.SegmentsResponse != nil { + v := s.SegmentsResponse + + e.SetFields(protocol.PayloadTarget, "SegmentsResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentsRequest type GetSegmentsInput struct { _ struct{} `type:"structure"` @@ -12247,6 +15461,27 @@ func (s *GetSegmentsInput) SetToken(v string) *GetSegmentsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSegmentsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PageSize != nil { + v := *s.PageSize + + e.SetValue(protocol.QueryTarget, "page-size", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Token != nil { + v := *s.Token + + e.SetValue(protocol.QueryTarget, "token", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentsResponse type GetSegmentsOutput struct { _ struct{} `type:"structure" payload:"SegmentsResponse"` @@ -12273,6 +15508,17 @@ func (s *GetSegmentsOutput) SetSegmentsResponse(v *SegmentsResponse) *GetSegment return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSegmentsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.SegmentsResponse != nil { + v := s.SegmentsResponse + + e.SetFields(protocol.PayloadTarget, "SegmentsResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSmsChannelRequest type GetSmsChannelInput struct { _ struct{} `type:"structure"` @@ -12310,6 +15556,17 @@ func (s *GetSmsChannelInput) SetApplicationId(v string) *GetSmsChannelInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSmsChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSmsChannelResponse type GetSmsChannelOutput struct { _ struct{} `type:"structure" payload:"SMSChannelResponse"` @@ -12336,6 +15593,17 @@ func (s *GetSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *GetS return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetSmsChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.SMSChannelResponse != nil { + v := s.SMSChannelResponse + + e.SetFields(protocol.PayloadTarget, "SMSChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/ImportJobRequest type ImportJobRequest struct { _ struct{} `type:"structure"` @@ -12432,6 +15700,52 @@ func (s *ImportJobRequest) SetSegmentName(v string) *ImportJobRequest { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ImportJobRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.DefineSegment != nil { + v := *s.DefineSegment + + e.SetValue(protocol.BodyTarget, "DefineSegment", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ExternalId != nil { + v := *s.ExternalId + + e.SetValue(protocol.BodyTarget, "ExternalId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Format != nil { + v := *s.Format + + e.SetValue(protocol.BodyTarget, "Format", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RegisterEndpoints != nil { + v := *s.RegisterEndpoints + + e.SetValue(protocol.BodyTarget, "RegisterEndpoints", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "RoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.S3Url != nil { + v := *s.S3Url + + e.SetValue(protocol.BodyTarget, "S3Url", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentId != nil { + v := *s.SegmentId + + e.SetValue(protocol.BodyTarget, "SegmentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentName != nil { + v := *s.SegmentName + + e.SetValue(protocol.BodyTarget, "SegmentName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/ImportJobResource type ImportJobResource struct { _ struct{} `type:"structure"` @@ -12528,6 +15842,52 @@ func (s *ImportJobResource) SetSegmentName(v string) *ImportJobResource { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ImportJobResource) MarshalFields(e protocol.FieldEncoder) error { + if s.DefineSegment != nil { + v := *s.DefineSegment + + e.SetValue(protocol.BodyTarget, "DefineSegment", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ExternalId != nil { + v := *s.ExternalId + + e.SetValue(protocol.BodyTarget, "ExternalId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Format != nil { + v := *s.Format + + e.SetValue(protocol.BodyTarget, "Format", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RegisterEndpoints != nil { + v := *s.RegisterEndpoints + + e.SetValue(protocol.BodyTarget, "RegisterEndpoints", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "RoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.S3Url != nil { + v := *s.S3Url + + e.SetValue(protocol.BodyTarget, "S3Url", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentId != nil { + v := *s.SegmentId + + e.SetValue(protocol.BodyTarget, "SegmentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentName != nil { + v := *s.SegmentName + + e.SetValue(protocol.BodyTarget, "SegmentName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/ImportJobResponse type ImportJobResponse struct { _ struct{} `type:"structure"` @@ -12664,6 +16024,85 @@ func (s *ImportJobResponse) SetType(v string) *ImportJobResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ImportJobResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CompletedPieces != nil { + v := *s.CompletedPieces + + e.SetValue(protocol.BodyTarget, "CompletedPieces", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.CompletionDate != nil { + v := *s.CompletionDate + + e.SetValue(protocol.BodyTarget, "CompletionDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Definition != nil { + v := s.Definition + + e.SetFields(protocol.BodyTarget, "Definition", v, protocol.Metadata{}) + } + if s.FailedPieces != nil { + v := *s.FailedPieces + + e.SetValue(protocol.BodyTarget, "FailedPieces", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Failures) > 0 { + v := s.Failures + + e.SetList(protocol.BodyTarget, "Failures", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JobStatus != nil { + v := *s.JobStatus + + e.SetValue(protocol.BodyTarget, "JobStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TotalFailures != nil { + v := *s.TotalFailures + + e.SetValue(protocol.BodyTarget, "TotalFailures", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TotalPieces != nil { + v := *s.TotalPieces + + e.SetValue(protocol.BodyTarget, "TotalPieces", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TotalProcessed != nil { + v := *s.TotalProcessed + + e.SetValue(protocol.BodyTarget, "TotalProcessed", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeImportJobResponseList(vs []*ImportJobResponse) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Import job list. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/ImportJobsResponse type ImportJobsResponse struct { @@ -12699,6 +16138,22 @@ func (s *ImportJobsResponse) SetNextToken(v string) *ImportJobsResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ImportJobsResponse) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Item) > 0 { + v := s.Item + + e.SetList(protocol.BodyTarget, "Item", encodeImportJobResponseList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/Message type Message struct { _ struct{} `type:"structure"` @@ -12823,6 +16278,67 @@ func (s *Message) SetUrl(v string) *Message { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Message) MarshalFields(e protocol.FieldEncoder) error { + if s.Action != nil { + v := *s.Action + + e.SetValue(protocol.BodyTarget, "Action", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Body != nil { + v := *s.Body + + e.SetValue(protocol.BodyTarget, "Body", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ImageIconUrl != nil { + v := *s.ImageIconUrl + + e.SetValue(protocol.BodyTarget, "ImageIconUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ImageSmallIconUrl != nil { + v := *s.ImageSmallIconUrl + + e.SetValue(protocol.BodyTarget, "ImageSmallIconUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ImageUrl != nil { + v := *s.ImageUrl + + e.SetValue(protocol.BodyTarget, "ImageUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.JsonBody != nil { + v := *s.JsonBody + + e.SetValue(protocol.BodyTarget, "JsonBody", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MediaUrl != nil { + v := *s.MediaUrl + + e.SetValue(protocol.BodyTarget, "MediaUrl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RawContent != nil { + v := *s.RawContent + + e.SetValue(protocol.BodyTarget, "RawContent", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SilentPush != nil { + v := *s.SilentPush + + e.SetValue(protocol.BodyTarget, "SilentPush", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Title != nil { + v := *s.Title + + e.SetValue(protocol.BodyTarget, "Title", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Url != nil { + v := *s.Url + + e.SetValue(protocol.BodyTarget, "Url", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Simple message object. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/MessageBody type MessageBody struct { @@ -12857,6 +16373,22 @@ func (s *MessageBody) SetRequestID(v string) *MessageBody { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MessageBody) MarshalFields(e protocol.FieldEncoder) error { + if s.Message != nil { + v := *s.Message + + e.SetValue(protocol.BodyTarget, "Message", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestID != nil { + v := *s.RequestID + + e.SetValue(protocol.BodyTarget, "RequestID", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Message configuration for a campaign. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/MessageConfiguration type MessageConfiguration struct { @@ -12940,6 +16472,47 @@ func (s *MessageConfiguration) SetSMSMessage(v *CampaignSmsMessage) *MessageConf return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MessageConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.ADMMessage != nil { + v := s.ADMMessage + + e.SetFields(protocol.BodyTarget, "ADMMessage", v, protocol.Metadata{}) + } + if s.APNSMessage != nil { + v := s.APNSMessage + + e.SetFields(protocol.BodyTarget, "APNSMessage", v, protocol.Metadata{}) + } + if s.BaiduMessage != nil { + v := s.BaiduMessage + + e.SetFields(protocol.BodyTarget, "BaiduMessage", v, protocol.Metadata{}) + } + if s.DefaultMessage != nil { + v := s.DefaultMessage + + e.SetFields(protocol.BodyTarget, "DefaultMessage", v, protocol.Metadata{}) + } + if s.EmailMessage != nil { + v := s.EmailMessage + + e.SetFields(protocol.BodyTarget, "EmailMessage", v, protocol.Metadata{}) + } + if s.GCMMessage != nil { + v := s.GCMMessage + + e.SetFields(protocol.BodyTarget, "GCMMessage", v, protocol.Metadata{}) + } + if s.SMSMessage != nil { + v := s.SMSMessage + + e.SetFields(protocol.BodyTarget, "SMSMessage", v, protocol.Metadata{}) + } + + return nil +} + // Send message request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/MessageRequest type MessageRequest struct { @@ -12993,6 +16566,32 @@ func (s *MessageRequest) SetMessageConfiguration(v *DirectMessageConfiguration) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MessageRequest) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Addresses) > 0 { + v := s.Addresses + + e.SetMap(protocol.BodyTarget, "Addresses", encodeAddressConfigurationMap(v), protocol.Metadata{}) + } + if len(s.Context) > 0 { + v := s.Context + + e.SetMap(protocol.BodyTarget, "Context", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if len(s.Endpoints) > 0 { + v := s.Endpoints + + e.SetMap(protocol.BodyTarget, "Endpoints", encodeEndpointSendConfigurationMap(v), protocol.Metadata{}) + } + if s.MessageConfiguration != nil { + v := s.MessageConfiguration + + e.SetFields(protocol.BodyTarget, "MessageConfiguration", v, protocol.Metadata{}) + } + + return nil +} + // Send message response. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/MessageResponse type MessageResponse struct { @@ -13048,6 +16647,32 @@ func (s *MessageResponse) SetResult(v map[string]*MessageResult) *MessageRespons return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MessageResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.EndpointResult) > 0 { + v := s.EndpointResult + + e.SetMap(protocol.BodyTarget, "EndpointResult", encodeEndpointMessageResultMap(v), protocol.Metadata{}) + } + if s.RequestId != nil { + v := *s.RequestId + + e.SetValue(protocol.BodyTarget, "RequestId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Result) > 0 { + v := s.Result + + e.SetMap(protocol.BodyTarget, "Result", encodeMessageResultMap(v), protocol.Metadata{}) + } + + return nil +} + // The result from sending a message to an address. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/MessageResult type MessageResult struct { @@ -13100,6 +16725,40 @@ func (s *MessageResult) SetUpdatedToken(v string) *MessageResult { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MessageResult) MarshalFields(e protocol.FieldEncoder) error { + if s.DeliveryStatus != nil { + v := *s.DeliveryStatus + + e.SetValue(protocol.BodyTarget, "DeliveryStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusCode != nil { + v := *s.StatusCode + + e.SetValue(protocol.BodyTarget, "StatusCode", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StatusMessage != nil { + v := *s.StatusMessage + + e.SetValue(protocol.BodyTarget, "StatusMessage", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UpdatedToken != nil { + v := *s.UpdatedToken + + e.SetValue(protocol.BodyTarget, "UpdatedToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeMessageResultMap(vs map[string]*MessageResult) func(protocol.MapEncoder) { + return func(me protocol.MapEncoder) { + for k, v := range vs { + me.MapSetFields(k, v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEventStreamRequest type PutEventStreamInput struct { _ struct{} `type:"structure" payload:"WriteEventStream"` @@ -13153,6 +16812,22 @@ func (s *PutEventStreamInput) SetWriteEventStream(v *WriteEventStream) *PutEvent return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutEventStreamInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.WriteEventStream != nil { + v := s.WriteEventStream + + e.SetFields(protocol.PayloadTarget, "WriteEventStream", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEventStreamResponse type PutEventStreamOutput struct { _ struct{} `type:"structure" payload:"EventStream"` @@ -13179,6 +16854,17 @@ func (s *PutEventStreamOutput) SetEventStream(v *EventStream) *PutEventStreamOut return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutEventStreamOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.EventStream != nil { + v := s.EventStream + + e.SetFields(protocol.PayloadTarget, "EventStream", v, protocol.Metadata{}) + } + + return nil +} + // Quiet Time // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/QuietTime type QuietTime struct { @@ -13213,6 +16899,22 @@ func (s *QuietTime) SetStart(v string) *QuietTime { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *QuietTime) MarshalFields(e protocol.FieldEncoder) error { + if s.End != nil { + v := *s.End + + e.SetValue(protocol.BodyTarget, "End", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Start != nil { + v := *s.Start + + e.SetValue(protocol.BodyTarget, "Start", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Define how a segment based on recency of use. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/RecencyDimension type RecencyDimension struct { @@ -13250,6 +16952,22 @@ func (s *RecencyDimension) SetRecencyType(v string) *RecencyDimension { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RecencyDimension) MarshalFields(e protocol.FieldEncoder) error { + if s.Duration != nil { + v := *s.Duration + + e.SetValue(protocol.BodyTarget, "Duration", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RecencyType != nil { + v := *s.RecencyType + + e.SetValue(protocol.BodyTarget, "RecencyType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // SMS Channel Request // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SMSChannelRequest type SMSChannelRequest struct { @@ -13287,10 +17005,31 @@ func (s *SMSChannelRequest) SetSenderId(v string) *SMSChannelRequest { return s } -// SetShortCode sets the ShortCode field's value. -func (s *SMSChannelRequest) SetShortCode(v string) *SMSChannelRequest { - s.ShortCode = &v - return s +// SetShortCode sets the ShortCode field's value. +func (s *SMSChannelRequest) SetShortCode(v string) *SMSChannelRequest { + s.ShortCode = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SMSChannelRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.SenderId != nil { + v := *s.SenderId + + e.SetValue(protocol.BodyTarget, "SenderId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ShortCode != nil { + v := *s.ShortCode + + e.SetValue(protocol.BodyTarget, "ShortCode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil } // SMS Channel Response. @@ -13417,6 +17156,72 @@ func (s *SMSChannelResponse) SetVersion(v int64) *SMSChannelResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SMSChannelResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Enabled != nil { + v := *s.Enabled + + e.SetValue(protocol.BodyTarget, "Enabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HasCredential != nil { + v := *s.HasCredential + + e.SetValue(protocol.BodyTarget, "HasCredential", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsArchived != nil { + v := *s.IsArchived + + e.SetValue(protocol.BodyTarget, "IsArchived", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.LastModifiedBy != nil { + v := *s.LastModifiedBy + + e.SetValue(protocol.BodyTarget, "LastModifiedBy", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Platform != nil { + v := *s.Platform + + e.SetValue(protocol.BodyTarget, "Platform", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SenderId != nil { + v := *s.SenderId + + e.SetValue(protocol.BodyTarget, "SenderId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ShortCode != nil { + v := *s.ShortCode + + e.SetValue(protocol.BodyTarget, "ShortCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // SMS Message. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SMSMessage type SMSMessage struct { @@ -13468,6 +17273,37 @@ func (s *SMSMessage) SetSubstitutions(v map[string][]*string) *SMSMessage { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SMSMessage) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := *s.Body + + e.SetValue(protocol.BodyTarget, "Body", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MessageType != nil { + v := *s.MessageType + + e.SetValue(protocol.BodyTarget, "MessageType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SenderId != nil { + v := *s.SenderId + + e.SetValue(protocol.BodyTarget, "SenderId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Substitutions) > 0 { + v := s.Substitutions + + e.SetMap(protocol.BodyTarget, "Substitutions", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, protocol.EncodeStringList(v)) + } + }, protocol.Metadata{}) + } + + return nil +} + // Shcedule that defines when a campaign is run. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/Schedule type Schedule struct { @@ -13541,6 +17377,42 @@ func (s *Schedule) SetTimezone(v string) *Schedule { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Schedule) MarshalFields(e protocol.FieldEncoder) error { + if s.EndTime != nil { + v := *s.EndTime + + e.SetValue(protocol.BodyTarget, "EndTime", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Frequency != nil { + v := *s.Frequency + + e.SetValue(protocol.BodyTarget, "Frequency", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsLocalTime != nil { + v := *s.IsLocalTime + + e.SetValue(protocol.BodyTarget, "IsLocalTime", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.QuietTime != nil { + v := s.QuietTime + + e.SetFields(protocol.BodyTarget, "QuietTime", v, protocol.Metadata{}) + } + if s.StartTime != nil { + v := *s.StartTime + + e.SetValue(protocol.BodyTarget, "StartTime", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Timezone != nil { + v := *s.Timezone + + e.SetValue(protocol.BodyTarget, "Timezone", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Segment behavior dimensions // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SegmentBehaviors type SegmentBehaviors struct { @@ -13566,6 +17438,17 @@ func (s *SegmentBehaviors) SetRecency(v *RecencyDimension) *SegmentBehaviors { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SegmentBehaviors) MarshalFields(e protocol.FieldEncoder) error { + if s.Recency != nil { + v := s.Recency + + e.SetFields(protocol.BodyTarget, "Recency", v, protocol.Metadata{}) + } + + return nil +} + // Segment demographic dimensions // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SegmentDemographics type SegmentDemographics struct { @@ -13636,6 +17519,42 @@ func (s *SegmentDemographics) SetPlatform(v *SetDimension) *SegmentDemographics return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SegmentDemographics) MarshalFields(e protocol.FieldEncoder) error { + if s.AppVersion != nil { + v := s.AppVersion + + e.SetFields(protocol.BodyTarget, "AppVersion", v, protocol.Metadata{}) + } + if s.Channel != nil { + v := s.Channel + + e.SetFields(protocol.BodyTarget, "Channel", v, protocol.Metadata{}) + } + if s.DeviceType != nil { + v := s.DeviceType + + e.SetFields(protocol.BodyTarget, "DeviceType", v, protocol.Metadata{}) + } + if s.Make != nil { + v := s.Make + + e.SetFields(protocol.BodyTarget, "Make", v, protocol.Metadata{}) + } + if s.Model != nil { + v := s.Model + + e.SetFields(protocol.BodyTarget, "Model", v, protocol.Metadata{}) + } + if s.Platform != nil { + v := s.Platform + + e.SetFields(protocol.BodyTarget, "Platform", v, protocol.Metadata{}) + } + + return nil +} + // Segment dimensions // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SegmentDimensions type SegmentDimensions struct { @@ -13697,6 +17616,37 @@ func (s *SegmentDimensions) SetUserAttributes(v map[string]*AttributeDimension) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SegmentDimensions) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Attributes) > 0 { + v := s.Attributes + + e.SetMap(protocol.BodyTarget, "Attributes", encodeAttributeDimensionMap(v), protocol.Metadata{}) + } + if s.Behavior != nil { + v := s.Behavior + + e.SetFields(protocol.BodyTarget, "Behavior", v, protocol.Metadata{}) + } + if s.Demographic != nil { + v := s.Demographic + + e.SetFields(protocol.BodyTarget, "Demographic", v, protocol.Metadata{}) + } + if s.Location != nil { + v := s.Location + + e.SetFields(protocol.BodyTarget, "Location", v, protocol.Metadata{}) + } + if len(s.UserAttributes) > 0 { + v := s.UserAttributes + + e.SetMap(protocol.BodyTarget, "UserAttributes", encodeAttributeDimensionMap(v), protocol.Metadata{}) + } + + return nil +} + // Segment import definition. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SegmentImportResource type SegmentImportResource struct { @@ -13770,6 +17720,42 @@ func (s *SegmentImportResource) SetSize(v int64) *SegmentImportResource { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SegmentImportResource) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ChannelCounts) > 0 { + v := s.ChannelCounts + + e.SetMap(protocol.BodyTarget, "ChannelCounts", protocol.EncodeInt64Map(v), protocol.Metadata{}) + } + if s.ExternalId != nil { + v := *s.ExternalId + + e.SetValue(protocol.BodyTarget, "ExternalId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Format != nil { + v := *s.Format + + e.SetValue(protocol.BodyTarget, "Format", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "RoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.S3Url != nil { + v := *s.S3Url + + e.SetValue(protocol.BodyTarget, "S3Url", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Size != nil { + v := *s.Size + + e.SetValue(protocol.BodyTarget, "Size", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Segment location dimensions // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SegmentLocation type SegmentLocation struct { @@ -13795,6 +17781,17 @@ func (s *SegmentLocation) SetCountry(v *SetDimension) *SegmentLocation { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SegmentLocation) MarshalFields(e protocol.FieldEncoder) error { + if s.Country != nil { + v := s.Country + + e.SetFields(protocol.BodyTarget, "Country", v, protocol.Metadata{}) + } + + return nil +} + // Segment definition. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SegmentResponse type SegmentResponse struct { @@ -13898,6 +17895,65 @@ func (s *SegmentResponse) SetVersion(v int64) *SegmentResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SegmentResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Dimensions != nil { + v := s.Dimensions + + e.SetFields(protocol.BodyTarget, "Dimensions", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ImportDefinition != nil { + v := s.ImportDefinition + + e.SetFields(protocol.BodyTarget, "ImportDefinition", v, protocol.Metadata{}) + } + if s.LastModifiedDate != nil { + v := *s.LastModifiedDate + + e.SetValue(protocol.BodyTarget, "LastModifiedDate", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentType != nil { + v := *s.SegmentType + + e.SetValue(protocol.BodyTarget, "SegmentType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeSegmentResponseList(vs []*SegmentResponse) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Segments in your account. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SegmentsResponse type SegmentsResponse struct { @@ -13933,6 +17989,22 @@ func (s *SegmentsResponse) SetNextToken(v string) *SegmentsResponse { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SegmentsResponse) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Item) > 0 { + v := s.Item + + e.SetList(protocol.BodyTarget, "Item", encodeSegmentResponseList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendMessagesRequest type SendMessagesInput struct { _ struct{} `type:"structure" payload:"MessageRequest"` @@ -13984,6 +18056,22 @@ func (s *SendMessagesInput) SetMessageRequest(v *MessageRequest) *SendMessagesIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SendMessagesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MessageRequest != nil { + v := s.MessageRequest + + e.SetFields(protocol.PayloadTarget, "MessageRequest", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendMessagesResponse type SendMessagesOutput struct { _ struct{} `type:"structure" payload:"MessageResponse"` @@ -14010,6 +18098,17 @@ func (s *SendMessagesOutput) SetMessageResponse(v *MessageResponse) *SendMessage return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SendMessagesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.MessageResponse != nil { + v := s.MessageResponse + + e.SetFields(protocol.PayloadTarget, "MessageResponse", v, protocol.Metadata{}) + } + + return nil +} + // Send message request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendUsersMessageRequest type SendUsersMessageRequest struct { @@ -14053,6 +18152,27 @@ func (s *SendUsersMessageRequest) SetUsers(v map[string]*EndpointSendConfigurati return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SendUsersMessageRequest) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Context) > 0 { + v := s.Context + + e.SetMap(protocol.BodyTarget, "Context", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.MessageConfiguration != nil { + v := s.MessageConfiguration + + e.SetFields(protocol.BodyTarget, "MessageConfiguration", v, protocol.Metadata{}) + } + if len(s.Users) > 0 { + v := s.Users + + e.SetMap(protocol.BodyTarget, "Users", encodeEndpointSendConfigurationMap(v), protocol.Metadata{}) + } + + return nil +} + // User send message response. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendUsersMessageResponse type SendUsersMessageResponse struct { @@ -14096,6 +18216,32 @@ func (s *SendUsersMessageResponse) SetResult(v map[string]map[string]*EndpointMe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SendUsersMessageResponse) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.BodyTarget, "ApplicationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestId != nil { + v := *s.RequestId + + e.SetValue(protocol.BodyTarget, "RequestId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Result) > 0 { + v := s.Result + + e.SetMap(protocol.BodyTarget, "Result", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetMap(k, encodeEndpointMessageResultMap(v)) + } + }, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendUsersMessagesRequest type SendUsersMessagesInput struct { _ struct{} `type:"structure" payload:"SendUsersMessageRequest"` @@ -14147,6 +18293,22 @@ func (s *SendUsersMessagesInput) SetSendUsersMessageRequest(v *SendUsersMessageR return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SendUsersMessagesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SendUsersMessageRequest != nil { + v := s.SendUsersMessageRequest + + e.SetFields(protocol.PayloadTarget, "SendUsersMessageRequest", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendUsersMessagesResponse type SendUsersMessagesOutput struct { _ struct{} `type:"structure" payload:"SendUsersMessageResponse"` @@ -14173,6 +18335,17 @@ func (s *SendUsersMessagesOutput) SetSendUsersMessageResponse(v *SendUsersMessag return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SendUsersMessagesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.SendUsersMessageResponse != nil { + v := s.SendUsersMessageResponse + + e.SetFields(protocol.PayloadTarget, "SendUsersMessageResponse", v, protocol.Metadata{}) + } + + return nil +} + // Dimension specification of a segment. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SetDimension type SetDimension struct { @@ -14208,6 +18381,22 @@ func (s *SetDimension) SetValues(v []*string) *SetDimension { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SetDimension) MarshalFields(e protocol.FieldEncoder) error { + if s.DimensionType != nil { + v := *s.DimensionType + + e.SetValue(protocol.BodyTarget, "DimensionType", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Values) > 0 { + v := s.Values + + e.SetList(protocol.BodyTarget, "Values", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Treatment resource // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/TreatmentResource type TreatmentResource struct { @@ -14287,6 +18476,55 @@ func (s *TreatmentResource) SetTreatmentName(v string) *TreatmentResource { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TreatmentResource) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MessageConfiguration != nil { + v := s.MessageConfiguration + + e.SetFields(protocol.BodyTarget, "MessageConfiguration", v, protocol.Metadata{}) + } + if s.Schedule != nil { + v := s.Schedule + + e.SetFields(protocol.BodyTarget, "Schedule", v, protocol.Metadata{}) + } + if s.SizePercent != nil { + v := *s.SizePercent + + e.SetValue(protocol.BodyTarget, "SizePercent", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.State != nil { + v := s.State + + e.SetFields(protocol.BodyTarget, "State", v, protocol.Metadata{}) + } + if s.TreatmentDescription != nil { + v := *s.TreatmentDescription + + e.SetValue(protocol.BodyTarget, "TreatmentDescription", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TreatmentName != nil { + v := *s.TreatmentName + + e.SetValue(protocol.BodyTarget, "TreatmentName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTreatmentResourceList(vs []*TreatmentResource) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateAdmChannelRequest type UpdateAdmChannelInput struct { _ struct{} `type:"structure" payload:"ADMChannelRequest"` @@ -14338,6 +18576,22 @@ func (s *UpdateAdmChannelInput) SetApplicationId(v string) *UpdateAdmChannelInpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateAdmChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ADMChannelRequest != nil { + v := s.ADMChannelRequest + + e.SetFields(protocol.PayloadTarget, "ADMChannelRequest", v, protocol.Metadata{}) + } + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateAdmChannelResponse type UpdateAdmChannelOutput struct { _ struct{} `type:"structure" payload:"ADMChannelResponse"` @@ -14364,6 +18618,17 @@ func (s *UpdateAdmChannelOutput) SetADMChannelResponse(v *ADMChannelResponse) *U return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateAdmChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ADMChannelResponse != nil { + v := s.ADMChannelResponse + + e.SetFields(protocol.PayloadTarget, "ADMChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsChannelRequest type UpdateApnsChannelInput struct { _ struct{} `type:"structure" payload:"APNSChannelRequest"` @@ -14409,10 +18674,26 @@ func (s *UpdateApnsChannelInput) SetAPNSChannelRequest(v *APNSChannelRequest) *U return s } -// SetApplicationId sets the ApplicationId field's value. -func (s *UpdateApnsChannelInput) SetApplicationId(v string) *UpdateApnsChannelInput { - s.ApplicationId = &v - return s +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateApnsChannelInput) SetApplicationId(v string) *UpdateApnsChannelInput { + s.ApplicationId = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateApnsChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSChannelRequest != nil { + v := s.APNSChannelRequest + + e.SetFields(protocol.PayloadTarget, "APNSChannelRequest", v, protocol.Metadata{}) + } + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil } // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsChannelResponse @@ -14441,6 +18722,17 @@ func (s *UpdateApnsChannelOutput) SetAPNSChannelResponse(v *APNSChannelResponse) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateApnsChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSChannelResponse != nil { + v := s.APNSChannelResponse + + e.SetFields(protocol.PayloadTarget, "APNSChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsSandboxChannelRequest type UpdateApnsSandboxChannelInput struct { _ struct{} `type:"structure" payload:"APNSSandboxChannelRequest"` @@ -14492,6 +18784,22 @@ func (s *UpdateApnsSandboxChannelInput) SetApplicationId(v string) *UpdateApnsSa return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateApnsSandboxChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSSandboxChannelRequest != nil { + v := s.APNSSandboxChannelRequest + + e.SetFields(protocol.PayloadTarget, "APNSSandboxChannelRequest", v, protocol.Metadata{}) + } + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsSandboxChannelResponse type UpdateApnsSandboxChannelOutput struct { _ struct{} `type:"structure" payload:"APNSSandboxChannelResponse"` @@ -14518,6 +18826,17 @@ func (s *UpdateApnsSandboxChannelOutput) SetAPNSSandboxChannelResponse(v *APNSSa return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateApnsSandboxChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSSandboxChannelResponse != nil { + v := s.APNSSandboxChannelResponse + + e.SetFields(protocol.PayloadTarget, "APNSSandboxChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipChannelRequest type UpdateApnsVoipChannelInput struct { _ struct{} `type:"structure" payload:"APNSVoipChannelRequest"` @@ -14569,6 +18888,22 @@ func (s *UpdateApnsVoipChannelInput) SetApplicationId(v string) *UpdateApnsVoipC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateApnsVoipChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSVoipChannelRequest != nil { + v := s.APNSVoipChannelRequest + + e.SetFields(protocol.PayloadTarget, "APNSVoipChannelRequest", v, protocol.Metadata{}) + } + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipChannelResponse type UpdateApnsVoipChannelOutput struct { _ struct{} `type:"structure" payload:"APNSVoipChannelResponse"` @@ -14595,6 +18930,17 @@ func (s *UpdateApnsVoipChannelOutput) SetAPNSVoipChannelResponse(v *APNSVoipChan return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateApnsVoipChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSVoipChannelResponse != nil { + v := s.APNSVoipChannelResponse + + e.SetFields(protocol.PayloadTarget, "APNSVoipChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipSandboxChannelRequest type UpdateApnsVoipSandboxChannelInput struct { _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelRequest"` @@ -14646,6 +18992,22 @@ func (s *UpdateApnsVoipSandboxChannelInput) SetApplicationId(v string) *UpdateAp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateApnsVoipSandboxChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSVoipSandboxChannelRequest != nil { + v := s.APNSVoipSandboxChannelRequest + + e.SetFields(protocol.PayloadTarget, "APNSVoipSandboxChannelRequest", v, protocol.Metadata{}) + } + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipSandboxChannelResponse type UpdateApnsVoipSandboxChannelOutput struct { _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelResponse"` @@ -14672,6 +19034,17 @@ func (s *UpdateApnsVoipSandboxChannelOutput) SetAPNSVoipSandboxChannelResponse(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateApnsVoipSandboxChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.APNSVoipSandboxChannelResponse != nil { + v := s.APNSVoipSandboxChannelResponse + + e.SetFields(protocol.PayloadTarget, "APNSVoipSandboxChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApplicationSettingsRequest type UpdateApplicationSettingsInput struct { _ struct{} `type:"structure" payload:"WriteApplicationSettingsRequest"` @@ -14723,6 +19096,22 @@ func (s *UpdateApplicationSettingsInput) SetWriteApplicationSettingsRequest(v *W return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateApplicationSettingsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.WriteApplicationSettingsRequest != nil { + v := s.WriteApplicationSettingsRequest + + e.SetFields(protocol.PayloadTarget, "WriteApplicationSettingsRequest", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApplicationSettingsResponse type UpdateApplicationSettingsOutput struct { _ struct{} `type:"structure" payload:"ApplicationSettingsResource"` @@ -14749,6 +19138,17 @@ func (s *UpdateApplicationSettingsOutput) SetApplicationSettingsResource(v *Appl return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateApplicationSettingsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationSettingsResource != nil { + v := s.ApplicationSettingsResource + + e.SetFields(protocol.PayloadTarget, "ApplicationSettingsResource", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateBaiduChannelRequest type UpdateBaiduChannelInput struct { _ struct{} `type:"structure" payload:"BaiduChannelRequest"` @@ -14800,6 +19200,22 @@ func (s *UpdateBaiduChannelInput) SetBaiduChannelRequest(v *BaiduChannelRequest) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateBaiduChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BaiduChannelRequest != nil { + v := s.BaiduChannelRequest + + e.SetFields(protocol.PayloadTarget, "BaiduChannelRequest", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateBaiduChannelResponse type UpdateBaiduChannelOutput struct { _ struct{} `type:"structure" payload:"BaiduChannelResponse"` @@ -14826,6 +19242,17 @@ func (s *UpdateBaiduChannelOutput) SetBaiduChannelResponse(v *BaiduChannelRespon return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateBaiduChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.BaiduChannelResponse != nil { + v := s.BaiduChannelResponse + + e.SetFields(protocol.PayloadTarget, "BaiduChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateCampaignRequest type UpdateCampaignInput struct { _ struct{} `type:"structure" payload:"WriteCampaignRequest"` @@ -14889,6 +19316,27 @@ func (s *UpdateCampaignInput) SetWriteCampaignRequest(v *WriteCampaignRequest) * return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateCampaignInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CampaignId != nil { + v := *s.CampaignId + + e.SetValue(protocol.PathTarget, "campaign-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.WriteCampaignRequest != nil { + v := s.WriteCampaignRequest + + e.SetFields(protocol.PayloadTarget, "WriteCampaignRequest", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateCampaignResponse type UpdateCampaignOutput struct { _ struct{} `type:"structure" payload:"CampaignResponse"` @@ -14915,6 +19363,17 @@ func (s *UpdateCampaignOutput) SetCampaignResponse(v *CampaignResponse) *UpdateC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateCampaignOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CampaignResponse != nil { + v := s.CampaignResponse + + e.SetFields(protocol.PayloadTarget, "CampaignResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEmailChannelRequest type UpdateEmailChannelInput struct { _ struct{} `type:"structure" payload:"EmailChannelRequest"` @@ -14966,6 +19425,22 @@ func (s *UpdateEmailChannelInput) SetEmailChannelRequest(v *EmailChannelRequest) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateEmailChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EmailChannelRequest != nil { + v := s.EmailChannelRequest + + e.SetFields(protocol.PayloadTarget, "EmailChannelRequest", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEmailChannelResponse type UpdateEmailChannelOutput struct { _ struct{} `type:"structure" payload:"EmailChannelResponse"` @@ -14992,6 +19467,17 @@ func (s *UpdateEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelRespon return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateEmailChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.EmailChannelResponse != nil { + v := s.EmailChannelResponse + + e.SetFields(protocol.PayloadTarget, "EmailChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpointRequest type UpdateEndpointInput struct { _ struct{} `type:"structure" payload:"EndpointRequest"` @@ -15055,6 +19541,27 @@ func (s *UpdateEndpointInput) SetEndpointRequest(v *EndpointRequest) *UpdateEndp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateEndpointInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EndpointId != nil { + v := *s.EndpointId + + e.SetValue(protocol.PathTarget, "endpoint-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EndpointRequest != nil { + v := s.EndpointRequest + + e.SetFields(protocol.PayloadTarget, "EndpointRequest", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpointResponse type UpdateEndpointOutput struct { _ struct{} `type:"structure" payload:"MessageBody"` @@ -15081,6 +19588,17 @@ func (s *UpdateEndpointOutput) SetMessageBody(v *MessageBody) *UpdateEndpointOut return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateEndpointOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.MessageBody != nil { + v := s.MessageBody + + e.SetFields(protocol.PayloadTarget, "MessageBody", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpointsBatchRequest type UpdateEndpointsBatchInput struct { _ struct{} `type:"structure" payload:"EndpointBatchRequest"` @@ -15132,6 +19650,22 @@ func (s *UpdateEndpointsBatchInput) SetEndpointBatchRequest(v *EndpointBatchRequ return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateEndpointsBatchInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EndpointBatchRequest != nil { + v := s.EndpointBatchRequest + + e.SetFields(protocol.PayloadTarget, "EndpointBatchRequest", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpointsBatchResponse type UpdateEndpointsBatchOutput struct { _ struct{} `type:"structure" payload:"MessageBody"` @@ -15158,6 +19692,17 @@ func (s *UpdateEndpointsBatchOutput) SetMessageBody(v *MessageBody) *UpdateEndpo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateEndpointsBatchOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.MessageBody != nil { + v := s.MessageBody + + e.SetFields(protocol.PayloadTarget, "MessageBody", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateGcmChannelRequest type UpdateGcmChannelInput struct { _ struct{} `type:"structure" payload:"GCMChannelRequest"` @@ -15209,6 +19754,22 @@ func (s *UpdateGcmChannelInput) SetGCMChannelRequest(v *GCMChannelRequest) *Upda return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateGcmChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GCMChannelRequest != nil { + v := s.GCMChannelRequest + + e.SetFields(protocol.PayloadTarget, "GCMChannelRequest", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateGcmChannelResponse type UpdateGcmChannelOutput struct { _ struct{} `type:"structure" payload:"GCMChannelResponse"` @@ -15235,6 +19796,17 @@ func (s *UpdateGcmChannelOutput) SetGCMChannelResponse(v *GCMChannelResponse) *U return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateGcmChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.GCMChannelResponse != nil { + v := s.GCMChannelResponse + + e.SetFields(protocol.PayloadTarget, "GCMChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSegmentRequest type UpdateSegmentInput struct { _ struct{} `type:"structure" payload:"WriteSegmentRequest"` @@ -15298,6 +19870,27 @@ func (s *UpdateSegmentInput) SetWriteSegmentRequest(v *WriteSegmentRequest) *Upd return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateSegmentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentId != nil { + v := *s.SegmentId + + e.SetValue(protocol.PathTarget, "segment-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.WriteSegmentRequest != nil { + v := s.WriteSegmentRequest + + e.SetFields(protocol.PayloadTarget, "WriteSegmentRequest", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSegmentResponse type UpdateSegmentOutput struct { _ struct{} `type:"structure" payload:"SegmentResponse"` @@ -15324,6 +19917,17 @@ func (s *UpdateSegmentOutput) SetSegmentResponse(v *SegmentResponse) *UpdateSegm return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateSegmentOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.SegmentResponse != nil { + v := s.SegmentResponse + + e.SetFields(protocol.PayloadTarget, "SegmentResponse", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSmsChannelRequest type UpdateSmsChannelInput struct { _ struct{} `type:"structure" payload:"SMSChannelRequest"` @@ -15375,6 +19979,22 @@ func (s *UpdateSmsChannelInput) SetSMSChannelRequest(v *SMSChannelRequest) *Upda return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateSmsChannelInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplicationId != nil { + v := *s.ApplicationId + + e.SetValue(protocol.PathTarget, "application-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SMSChannelRequest != nil { + v := s.SMSChannelRequest + + e.SetFields(protocol.PayloadTarget, "SMSChannelRequest", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSmsChannelResponse type UpdateSmsChannelOutput struct { _ struct{} `type:"structure" payload:"SMSChannelResponse"` @@ -15401,6 +20021,17 @@ func (s *UpdateSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *U return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateSmsChannelOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.SMSChannelResponse != nil { + v := s.SMSChannelResponse + + e.SetFields(protocol.PayloadTarget, "SMSChannelResponse", v, protocol.Metadata{}) + } + + return nil +} + // Creating application setting request // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/WriteApplicationSettingsRequest type WriteApplicationSettingsRequest struct { @@ -15439,6 +20070,22 @@ func (s *WriteApplicationSettingsRequest) SetQuietTime(v *QuietTime) *WriteAppli return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *WriteApplicationSettingsRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.Limits != nil { + v := s.Limits + + e.SetFields(protocol.BodyTarget, "Limits", v, protocol.Metadata{}) + } + if s.QuietTime != nil { + v := s.QuietTime + + e.SetFields(protocol.BodyTarget, "QuietTime", v, protocol.Metadata{}) + } + + return nil +} + // Used to create a campaign. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/WriteCampaignRequest type WriteCampaignRequest struct { @@ -15565,6 +20212,72 @@ func (s *WriteCampaignRequest) SetTreatmentName(v string) *WriteCampaignRequest return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *WriteCampaignRequest) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AdditionalTreatments) > 0 { + v := s.AdditionalTreatments + + e.SetList(protocol.BodyTarget, "AdditionalTreatments", encodeWriteTreatmentResourceList(v), protocol.Metadata{}) + } + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HoldoutPercent != nil { + v := *s.HoldoutPercent + + e.SetValue(protocol.BodyTarget, "HoldoutPercent", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.IsPaused != nil { + v := *s.IsPaused + + e.SetValue(protocol.BodyTarget, "IsPaused", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Limits != nil { + v := s.Limits + + e.SetFields(protocol.BodyTarget, "Limits", v, protocol.Metadata{}) + } + if s.MessageConfiguration != nil { + v := s.MessageConfiguration + + e.SetFields(protocol.BodyTarget, "MessageConfiguration", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Schedule != nil { + v := s.Schedule + + e.SetFields(protocol.BodyTarget, "Schedule", v, protocol.Metadata{}) + } + if s.SegmentId != nil { + v := *s.SegmentId + + e.SetValue(protocol.BodyTarget, "SegmentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SegmentVersion != nil { + v := *s.SegmentVersion + + e.SetValue(protocol.BodyTarget, "SegmentVersion", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TreatmentDescription != nil { + v := *s.TreatmentDescription + + e.SetValue(protocol.BodyTarget, "TreatmentDescription", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TreatmentName != nil { + v := *s.TreatmentName + + e.SetValue(protocol.BodyTarget, "TreatmentName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Request to save an EventStream. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/WriteEventStream type WriteEventStream struct { @@ -15602,6 +20315,22 @@ func (s *WriteEventStream) SetRoleArn(v string) *WriteEventStream { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *WriteEventStream) MarshalFields(e protocol.FieldEncoder) error { + if s.DestinationStreamArn != nil { + v := *s.DestinationStreamArn + + e.SetValue(protocol.BodyTarget, "DestinationStreamArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RoleArn != nil { + v := *s.RoleArn + + e.SetValue(protocol.BodyTarget, "RoleArn", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Segment definition. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/WriteSegmentRequest type WriteSegmentRequest struct { @@ -15636,6 +20365,22 @@ func (s *WriteSegmentRequest) SetName(v string) *WriteSegmentRequest { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *WriteSegmentRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.Dimensions != nil { + v := s.Dimensions + + e.SetFields(protocol.BodyTarget, "Dimensions", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Used to create a campaign treatment. // Please also see https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/WriteTreatmentResource type WriteTreatmentResource struct { @@ -15697,6 +20442,45 @@ func (s *WriteTreatmentResource) SetTreatmentName(v string) *WriteTreatmentResou return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *WriteTreatmentResource) MarshalFields(e protocol.FieldEncoder) error { + if s.MessageConfiguration != nil { + v := s.MessageConfiguration + + e.SetFields(protocol.BodyTarget, "MessageConfiguration", v, protocol.Metadata{}) + } + if s.Schedule != nil { + v := s.Schedule + + e.SetFields(protocol.BodyTarget, "Schedule", v, protocol.Metadata{}) + } + if s.SizePercent != nil { + v := *s.SizePercent + + e.SetValue(protocol.BodyTarget, "SizePercent", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TreatmentDescription != nil { + v := *s.TreatmentDescription + + e.SetValue(protocol.BodyTarget, "TreatmentDescription", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TreatmentName != nil { + v := *s.TreatmentName + + e.SetValue(protocol.BodyTarget, "TreatmentName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeWriteTreatmentResourceList(vs []*WriteTreatmentResource) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + const ( // ActionOpenApp is a Action enum value ActionOpenApp = "OPEN_APP" diff --git a/service/polly/api.go b/service/polly/api.go index a0aaba9bdc5..a7668c263f2 100644 --- a/service/polly/api.go +++ b/service/polly/api.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" ) const opDeleteLexicon = "DeleteLexicon" @@ -627,6 +628,17 @@ func (s *DeleteLexiconInput) SetName(v string) *DeleteLexiconInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteLexiconInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "LexiconName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/DeleteLexiconOutput type DeleteLexiconOutput struct { _ struct{} `type:"structure"` @@ -642,6 +654,12 @@ func (s DeleteLexiconOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteLexiconOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/DescribeVoicesInput type DescribeVoicesInput struct { _ struct{} `type:"structure"` @@ -678,6 +696,22 @@ func (s *DescribeVoicesInput) SetNextToken(v string) *DescribeVoicesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeVoicesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.LanguageCode != nil { + v := *s.LanguageCode + + e.SetValue(protocol.QueryTarget, "LanguageCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/DescribeVoicesOutput type DescribeVoicesOutput struct { _ struct{} `type:"structure"` @@ -712,6 +746,22 @@ func (s *DescribeVoicesOutput) SetVoices(v []*Voice) *DescribeVoicesOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeVoicesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Voices) > 0 { + v := s.Voices + + e.SetList(protocol.BodyTarget, "Voices", encodeVoiceList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/GetLexiconInput type GetLexiconInput struct { _ struct{} `type:"structure"` @@ -751,6 +801,17 @@ func (s *GetLexiconInput) SetName(v string) *GetLexiconInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetLexiconInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "LexiconName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/GetLexiconOutput type GetLexiconOutput struct { _ struct{} `type:"structure"` @@ -786,6 +847,22 @@ func (s *GetLexiconOutput) SetLexiconAttributes(v *LexiconAttributes) *GetLexico return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetLexiconOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Lexicon != nil { + v := s.Lexicon + + e.SetFields(protocol.BodyTarget, "Lexicon", v, protocol.Metadata{}) + } + if s.LexiconAttributes != nil { + v := s.LexiconAttributes + + e.SetFields(protocol.BodyTarget, "LexiconAttributes", v, protocol.Metadata{}) + } + + return nil +} + // Provides lexicon name and lexicon content in string format. For more information, // see Pronunciation Lexicon Specification (PLS) Version 1.0 (https://www.w3.org/TR/pronunciation-lexicon/). // Please also see https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/Lexicon @@ -822,6 +899,22 @@ func (s *Lexicon) SetName(v string) *Lexicon { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Lexicon) MarshalFields(e protocol.FieldEncoder) error { + if s.Content != nil { + v := *s.Content + + e.SetValue(protocol.BodyTarget, "Content", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Contains metadata describing the lexicon such as the number of lexemes, language // code, and so on. For more information, see Managing Lexicons (http://docs.aws.amazon.com/polly/latest/dg/managing-lexicons.html). // Please also see https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/LexiconAttributes @@ -895,6 +988,42 @@ func (s *LexiconAttributes) SetSize(v int64) *LexiconAttributes { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LexiconAttributes) MarshalFields(e protocol.FieldEncoder) error { + if s.Alphabet != nil { + v := *s.Alphabet + + e.SetValue(protocol.BodyTarget, "Alphabet", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LanguageCode != nil { + v := *s.LanguageCode + + e.SetValue(protocol.BodyTarget, "LanguageCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModified != nil { + v := *s.LastModified + + e.SetValue(protocol.BodyTarget, "LastModified", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.LexemesCount != nil { + v := *s.LexemesCount + + e.SetValue(protocol.BodyTarget, "LexemesCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.LexiconArn != nil { + v := *s.LexiconArn + + e.SetValue(protocol.BodyTarget, "LexiconArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Size != nil { + v := *s.Size + + e.SetValue(protocol.BodyTarget, "Size", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Describes the content of the lexicon. // Please also see https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/LexiconDescription type LexiconDescription struct { @@ -929,6 +1058,30 @@ func (s *LexiconDescription) SetName(v string) *LexiconDescription { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LexiconDescription) MarshalFields(e protocol.FieldEncoder) error { + if s.Attributes != nil { + v := s.Attributes + + e.SetFields(protocol.BodyTarget, "Attributes", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeLexiconDescriptionList(vs []*LexiconDescription) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/ListLexiconsInput type ListLexiconsInput struct { _ struct{} `type:"structure"` @@ -954,6 +1107,17 @@ func (s *ListLexiconsInput) SetNextToken(v string) *ListLexiconsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListLexiconsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/ListLexiconsOutput type ListLexiconsOutput struct { _ struct{} `type:"structure"` @@ -988,6 +1152,22 @@ func (s *ListLexiconsOutput) SetNextToken(v string) *ListLexiconsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListLexiconsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Lexicons) > 0 { + v := s.Lexicons + + e.SetList(protocol.BodyTarget, "Lexicons", encodeLexiconDescriptionList(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/PutLexiconInput type PutLexiconInput struct { _ struct{} `type:"structure"` @@ -1043,6 +1223,22 @@ func (s *PutLexiconInput) SetName(v string) *PutLexiconInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutLexiconInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Content != nil { + v := *s.Content + + e.SetValue(protocol.BodyTarget, "Content", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.PathTarget, "LexiconName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/PutLexiconOutput type PutLexiconOutput struct { _ struct{} `type:"structure"` @@ -1058,6 +1254,12 @@ func (s PutLexiconOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutLexiconOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/SynthesizeSpeechInput type SynthesizeSpeechInput struct { _ struct{} `type:"structure"` @@ -1174,6 +1376,47 @@ func (s *SynthesizeSpeechInput) SetVoiceId(v string) *SynthesizeSpeechInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SynthesizeSpeechInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.LexiconNames) > 0 { + v := s.LexiconNames + + e.SetList(protocol.BodyTarget, "LexiconNames", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.OutputFormat != nil { + v := *s.OutputFormat + + e.SetValue(protocol.BodyTarget, "OutputFormat", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SampleRate != nil { + v := *s.SampleRate + + e.SetValue(protocol.BodyTarget, "SampleRate", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.SpeechMarkTypes) > 0 { + v := s.SpeechMarkTypes + + e.SetList(protocol.BodyTarget, "SpeechMarkTypes", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Text != nil { + v := *s.Text + + e.SetValue(protocol.BodyTarget, "Text", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TextType != nil { + v := *s.TextType + + e.SetValue(protocol.BodyTarget, "TextType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VoiceId != nil { + v := *s.VoiceId + + e.SetValue(protocol.BodyTarget, "VoiceId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/SynthesizeSpeechOutput type SynthesizeSpeechOutput struct { _ struct{} `type:"structure" payload:"AudioStream"` @@ -1230,6 +1473,23 @@ func (s *SynthesizeSpeechOutput) SetRequestCharacters(v int64) *SynthesizeSpeech return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SynthesizeSpeechOutput) MarshalFields(e protocol.FieldEncoder) error { + // Skipping AudioStream Output type's body not valid. + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestCharacters != nil { + v := *s.RequestCharacters + + e.SetValue(protocol.HeaderTarget, "x-amzn-RequestCharacters", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Description of the voice. // Please also see https://docs.aws.amazon.com/goto/WebAPI/polly-2016-06-10/Voice type Voice struct { @@ -1293,6 +1553,45 @@ func (s *Voice) SetName(v string) *Voice { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Voice) MarshalFields(e protocol.FieldEncoder) error { + if s.Gender != nil { + v := *s.Gender + + e.SetValue(protocol.BodyTarget, "Gender", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LanguageCode != nil { + v := *s.LanguageCode + + e.SetValue(protocol.BodyTarget, "LanguageCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LanguageName != nil { + v := *s.LanguageName + + e.SetValue(protocol.BodyTarget, "LanguageName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeVoiceList(vs []*Voice) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + const ( // GenderFemale is a Gender enum value GenderFemale = "Female" diff --git a/service/route53/api.go b/service/route53/api.go index 49c09cc29e1..718afe17953 100644 --- a/service/route53/api.go +++ b/service/route53/api.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" ) const opAssociateVPCWithHostedZone = "AssociateVPCWithHostedZone" @@ -5779,6 +5780,22 @@ func (s *AccountLimit) SetValue(v int64) *AccountLimit { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AccountLimit) MarshalFields(e protocol.FieldEncoder) error { + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that identifies the CloudWatch alarm that you want Amazon // Route 53 health checkers to use to determine whether this health check is // healthy. @@ -5848,6 +5865,22 @@ func (s *AlarmIdentifier) SetRegion(v string) *AlarmIdentifier { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AlarmIdentifier) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Region != nil { + v := *s.Region + + e.SetValue(protocol.BodyTarget, "Region", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Alias resource record sets only: Information about the CloudFront distribution, // Elastic Beanstalk environment, ELB load balancer, Amazon S3 bucket, or Amazon // Route 53 resource record set that you're redirecting queries to. An Elastic @@ -6093,6 +6126,27 @@ func (s *AliasTarget) SetHostedZoneId(v string) *AliasTarget { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AliasTarget) MarshalFields(e protocol.FieldEncoder) error { + if s.DNSName != nil { + v := *s.DNSName + + e.SetValue(protocol.BodyTarget, "DNSName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EvaluateTargetHealth != nil { + v := *s.EvaluateTargetHealth + + e.SetValue(protocol.BodyTarget, "EvaluateTargetHealth", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.BodyTarget, "HostedZoneId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the request to associate a // VPC with a private hosted zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/AssociateVPCWithHostedZoneRequest @@ -6167,6 +6221,27 @@ func (s *AssociateVPCWithHostedZoneInput) SetVPC(v *VPC) *AssociateVPCWithHosted return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AssociateVPCWithHostedZoneInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VPC != nil { + v := s.VPC + + e.SetFields(protocol.BodyTarget, "VPC", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information for the AssociateVPCWithHostedZone // request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/AssociateVPCWithHostedZoneResponse @@ -6195,6 +6270,17 @@ func (s *AssociateVPCWithHostedZoneOutput) SetChangeInfo(v *ChangeInfo) *Associa return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AssociateVPCWithHostedZoneOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ChangeInfo != nil { + v := s.ChangeInfo + + e.SetFields(protocol.BodyTarget, "ChangeInfo", v, protocol.Metadata{}) + } + + return nil +} + // The information for each resource record set that you want to change. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/Change type Change struct { @@ -6269,6 +6355,30 @@ func (s *Change) SetResourceRecordSet(v *ResourceRecordSet) *Change { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Change) MarshalFields(e protocol.FieldEncoder) error { + if s.Action != nil { + v := *s.Action + + e.SetValue(protocol.BodyTarget, "Action", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceRecordSet != nil { + v := s.ResourceRecordSet + + e.SetFields(protocol.BodyTarget, "ResourceRecordSet", v, protocol.Metadata{}) + } + + return nil +} + +func encodeChangeList(vs []*Change) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // The information for a change request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ChangeBatch type ChangeBatch struct { @@ -6331,6 +6441,22 @@ func (s *ChangeBatch) SetComment(v string) *ChangeBatch { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ChangeBatch) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Changes) > 0 { + v := s.Changes + + e.SetList(protocol.BodyTarget, "Changes", encodeChangeList(v), protocol.Metadata{ListLocationName: "Change"}) + } + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that describes change information about changes made to your // hosted zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ChangeInfo @@ -6398,6 +6524,32 @@ func (s *ChangeInfo) SetSubmittedAt(v time.Time) *ChangeInfo { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ChangeInfo) MarshalFields(e protocol.FieldEncoder) error { + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubmittedAt != nil { + v := *s.SubmittedAt + + e.SetValue(protocol.BodyTarget, "SubmittedAt", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains change information for the resource record set. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ChangeResourceRecordSetsRequest type ChangeResourceRecordSetsInput struct { @@ -6458,6 +6610,22 @@ func (s *ChangeResourceRecordSetsInput) SetHostedZoneId(v string) *ChangeResourc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ChangeResourceRecordSetsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ChangeBatch != nil { + v := s.ChangeBatch + + e.SetFields(protocol.BodyTarget, "ChangeBatch", v, protocol.Metadata{}) + } + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type containing the response for the request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ChangeResourceRecordSetsResponse type ChangeResourceRecordSetsOutput struct { @@ -6489,6 +6657,17 @@ func (s *ChangeResourceRecordSetsOutput) SetChangeInfo(v *ChangeInfo) *ChangeRes return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ChangeResourceRecordSetsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ChangeInfo != nil { + v := s.ChangeInfo + + e.SetFields(protocol.BodyTarget, "ChangeInfo", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the tags that you want to // add, edit, or delete. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ChangeTagsForResourceRequest @@ -6577,6 +6756,32 @@ func (s *ChangeTagsForResourceInput) SetResourceType(v string) *ChangeTagsForRes return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ChangeTagsForResourceInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AddTags) > 0 { + v := s.AddTags + + e.SetList(protocol.BodyTarget, "AddTags", encodeTagList(v), protocol.Metadata{ListLocationName: "Tag"}) + } + if len(s.RemoveTagKeys) > 0 { + v := s.RemoveTagKeys + + e.SetList(protocol.BodyTarget, "RemoveTagKeys", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "Key"}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "ResourceId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceType != nil { + v := *s.ResourceType + + e.SetValue(protocol.PathTarget, "ResourceType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Empty response for the request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ChangeTagsForResourceResponse type ChangeTagsForResourceOutput struct { @@ -6593,6 +6798,12 @@ func (s ChangeTagsForResourceOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ChangeTagsForResourceOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A complex type that contains information about the CloudWatch alarm that // Amazon Route 53 is monitoring for this health check. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CloudWatchAlarmConfiguration @@ -6706,6 +6917,52 @@ func (s *CloudWatchAlarmConfiguration) SetThreshold(v float64) *CloudWatchAlarmC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CloudWatchAlarmConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.ComparisonOperator != nil { + v := *s.ComparisonOperator + + e.SetValue(protocol.BodyTarget, "ComparisonOperator", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Dimensions) > 0 { + v := s.Dimensions + + e.SetList(protocol.BodyTarget, "Dimensions", encodeDimensionList(v), protocol.Metadata{ListLocationName: "Dimension"}) + } + if s.EvaluationPeriods != nil { + v := *s.EvaluationPeriods + + e.SetValue(protocol.BodyTarget, "EvaluationPeriods", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MetricName != nil { + v := *s.MetricName + + e.SetValue(protocol.BodyTarget, "MetricName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Namespace != nil { + v := *s.Namespace + + e.SetValue(protocol.BodyTarget, "Namespace", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Period != nil { + v := *s.Period + + e.SetValue(protocol.BodyTarget, "Period", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Statistic != nil { + v := *s.Statistic + + e.SetValue(protocol.BodyTarget, "Statistic", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Threshold != nil { + v := *s.Threshold + + e.SetValue(protocol.BodyTarget, "Threshold", protocol.Float64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the health check request information. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateHealthCheckRequest type CreateHealthCheckInput struct { @@ -6787,6 +7044,22 @@ func (s *CreateHealthCheckInput) SetHealthCheckConfig(v *HealthCheckConfig) *Cre return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateHealthCheckInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CallerReference != nil { + v := *s.CallerReference + + e.SetValue(protocol.BodyTarget, "CallerReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HealthCheckConfig != nil { + v := s.HealthCheckConfig + + e.SetFields(protocol.BodyTarget, "HealthCheckConfig", v, protocol.Metadata{}) + } + + return nil +} + // A complex type containing the response information for the new health check. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateHealthCheckResponse type CreateHealthCheckOutput struct { @@ -6825,6 +7098,22 @@ func (s *CreateHealthCheckOutput) SetLocation(v string) *CreateHealthCheckOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateHealthCheckOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.HealthCheck != nil { + v := s.HealthCheck + + e.SetFields(protocol.BodyTarget, "HealthCheck", v, protocol.Metadata{}) + } + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the request to create a hosted // zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateHostedZoneRequest @@ -6943,6 +7232,37 @@ func (s *CreateHostedZoneInput) SetVPC(v *VPC) *CreateHostedZoneInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateHostedZoneInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CallerReference != nil { + v := *s.CallerReference + + e.SetValue(protocol.BodyTarget, "CallerReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DelegationSetId != nil { + v := *s.DelegationSetId + + e.SetValue(protocol.BodyTarget, "DelegationSetId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HostedZoneConfig != nil { + v := s.HostedZoneConfig + + e.SetFields(protocol.BodyTarget, "HostedZoneConfig", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VPC != nil { + v := s.VPC + + e.SetFields(protocol.BodyTarget, "VPC", v, protocol.Metadata{}) + } + + return nil +} + // A complex type containing the response information for the hosted zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateHostedZoneResponse type CreateHostedZoneOutput struct { @@ -7013,6 +7333,37 @@ func (s *CreateHostedZoneOutput) SetVPC(v *VPC) *CreateHostedZoneOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateHostedZoneOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ChangeInfo != nil { + v := s.ChangeInfo + + e.SetFields(protocol.BodyTarget, "ChangeInfo", v, protocol.Metadata{}) + } + if s.DelegationSet != nil { + v := s.DelegationSet + + e.SetFields(protocol.BodyTarget, "DelegationSet", v, protocol.Metadata{}) + } + if s.HostedZone != nil { + v := s.HostedZone + + e.SetFields(protocol.BodyTarget, "HostedZone", v, protocol.Metadata{}) + } + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VPC != nil { + v := s.VPC + + e.SetFields(protocol.BodyTarget, "VPC", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateQueryLoggingConfigRequest type CreateQueryLoggingConfigInput struct { _ struct{} `locationName:"CreateQueryLoggingConfigRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` @@ -7075,6 +7426,22 @@ func (s *CreateQueryLoggingConfigInput) SetHostedZoneId(v string) *CreateQueryLo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateQueryLoggingConfigInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CloudWatchLogsLogGroupArn != nil { + v := *s.CloudWatchLogsLogGroupArn + + e.SetValue(protocol.BodyTarget, "CloudWatchLogsLogGroupArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.BodyTarget, "HostedZoneId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateQueryLoggingConfigResponse type CreateQueryLoggingConfigOutput struct { _ struct{} `type:"structure"` @@ -7114,6 +7481,22 @@ func (s *CreateQueryLoggingConfigOutput) SetQueryLoggingConfig(v *QueryLoggingCo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateQueryLoggingConfigOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + if s.QueryLoggingConfig != nil { + v := s.QueryLoggingConfig + + e.SetFields(protocol.BodyTarget, "QueryLoggingConfig", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateReusableDelegationSetRequest type CreateReusableDelegationSetInput struct { _ struct{} `locationName:"CreateReusableDelegationSetRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` @@ -7170,6 +7553,22 @@ func (s *CreateReusableDelegationSetInput) SetHostedZoneId(v string) *CreateReus return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateReusableDelegationSetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.CallerReference != nil { + v := *s.CallerReference + + e.SetValue(protocol.BodyTarget, "CallerReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.BodyTarget, "HostedZoneId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateReusableDelegationSetResponse type CreateReusableDelegationSetOutput struct { _ struct{} `type:"structure"` @@ -7207,6 +7606,22 @@ func (s *CreateReusableDelegationSetOutput) SetLocation(v string) *CreateReusabl return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateReusableDelegationSetOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DelegationSet != nil { + v := s.DelegationSet + + e.SetFields(protocol.BodyTarget, "DelegationSet", v, protocol.Metadata{}) + } + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the traffic policy that you // want to create. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateTrafficPolicyRequest @@ -7272,6 +7687,27 @@ func (s *CreateTrafficPolicyInput) SetName(v string) *CreateTrafficPolicyInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateTrafficPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Document != nil { + v := *s.Document + + e.SetValue(protocol.BodyTarget, "Document", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the resource record sets that // you want to create based on a specified traffic policy. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateTrafficPolicyInstanceRequest @@ -7381,6 +7817,37 @@ func (s *CreateTrafficPolicyInstanceInput) SetTrafficPolicyVersion(v int64) *Cre return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateTrafficPolicyInstanceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.BodyTarget, "HostedZoneId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TTL != nil { + v := *s.TTL + + e.SetValue(protocol.BodyTarget, "TTL", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TrafficPolicyId != nil { + v := *s.TrafficPolicyId + + e.SetValue(protocol.BodyTarget, "TrafficPolicyId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyVersion != nil { + v := *s.TrafficPolicyVersion + + e.SetValue(protocol.BodyTarget, "TrafficPolicyVersion", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information for the CreateTrafficPolicyInstance // request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateTrafficPolicyInstanceResponse @@ -7420,6 +7887,22 @@ func (s *CreateTrafficPolicyInstanceOutput) SetTrafficPolicyInstance(v *TrafficP return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateTrafficPolicyInstanceOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyInstance != nil { + v := s.TrafficPolicyInstance + + e.SetFields(protocol.BodyTarget, "TrafficPolicyInstance", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information for the CreateTrafficPolicy // request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateTrafficPolicyResponse @@ -7459,6 +7942,22 @@ func (s *CreateTrafficPolicyOutput) SetTrafficPolicy(v *TrafficPolicy) *CreateTr return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateTrafficPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicy != nil { + v := s.TrafficPolicy + + e.SetFields(protocol.BodyTarget, "TrafficPolicy", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the traffic policy that you // want to create a new version for. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateTrafficPolicyVersionRequest @@ -7529,6 +8028,27 @@ func (s *CreateTrafficPolicyVersionInput) SetId(v string) *CreateTrafficPolicyVe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateTrafficPolicyVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Document != nil { + v := *s.Document + + e.SetValue(protocol.BodyTarget, "Document", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information for the CreateTrafficPolicyVersion // request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateTrafficPolicyVersionResponse @@ -7569,6 +8089,22 @@ func (s *CreateTrafficPolicyVersionOutput) SetTrafficPolicy(v *TrafficPolicy) *C return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateTrafficPolicyVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicy != nil { + v := s.TrafficPolicy + + e.SetFields(protocol.BodyTarget, "TrafficPolicy", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the request to authorize associating // a VPC with your private hosted zone. Authorization is only required when // a private hosted zone and a VPC were created by using different accounts. @@ -7632,6 +8168,22 @@ func (s *CreateVPCAssociationAuthorizationInput) SetVPC(v *VPC) *CreateVPCAssoci return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateVPCAssociationAuthorizationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VPC != nil { + v := s.VPC + + e.SetFields(protocol.BodyTarget, "VPC", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information from a CreateVPCAssociationAuthorization // request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/CreateVPCAssociationAuthorizationResponse @@ -7671,6 +8223,22 @@ func (s *CreateVPCAssociationAuthorizationOutput) SetVPC(v *VPC) *CreateVPCAssoc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateVPCAssociationAuthorizationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.BodyTarget, "HostedZoneId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VPC != nil { + v := s.VPC + + e.SetFields(protocol.BodyTarget, "VPC", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that lists the name servers in a delegation set, as well as // the CallerReference and the ID for the delegation set. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DelegationSet @@ -7719,6 +8287,35 @@ func (s *DelegationSet) SetNameServers(v []*string) *DelegationSet { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DelegationSet) MarshalFields(e protocol.FieldEncoder) error { + if s.CallerReference != nil { + v := *s.CallerReference + + e.SetValue(protocol.BodyTarget, "CallerReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.NameServers) > 0 { + v := s.NameServers + + e.SetList(protocol.BodyTarget, "NameServers", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "NameServer"}) + } + + return nil +} + +func encodeDelegationSetList(vs []*DelegationSet) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // This action deletes a health check. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteHealthCheckRequest type DeleteHealthCheckInput struct { @@ -7759,6 +8356,17 @@ func (s *DeleteHealthCheckInput) SetHealthCheckId(v string) *DeleteHealthCheckIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteHealthCheckInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HealthCheckId != nil { + v := *s.HealthCheckId + + e.SetValue(protocol.PathTarget, "HealthCheckId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // An empty element. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteHealthCheckResponse type DeleteHealthCheckOutput struct { @@ -7775,6 +8383,12 @@ func (s DeleteHealthCheckOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteHealthCheckOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A request to delete a hosted zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteHostedZoneRequest type DeleteHostedZoneInput struct { @@ -7815,6 +8429,17 @@ func (s *DeleteHostedZoneInput) SetId(v string) *DeleteHostedZoneInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteHostedZoneInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response to a DeleteHostedZone request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteHostedZoneResponse type DeleteHostedZoneOutput struct { @@ -7843,6 +8468,17 @@ func (s *DeleteHostedZoneOutput) SetChangeInfo(v *ChangeInfo) *DeleteHostedZoneO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteHostedZoneOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ChangeInfo != nil { + v := s.ChangeInfo + + e.SetFields(protocol.BodyTarget, "ChangeInfo", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteQueryLoggingConfigRequest type DeleteQueryLoggingConfigInput struct { _ struct{} `type:"structure"` @@ -7885,6 +8521,17 @@ func (s *DeleteQueryLoggingConfigInput) SetId(v string) *DeleteQueryLoggingConfi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteQueryLoggingConfigInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteQueryLoggingConfigResponse type DeleteQueryLoggingConfigOutput struct { _ struct{} `type:"structure"` @@ -7900,6 +8547,12 @@ func (s DeleteQueryLoggingConfigOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteQueryLoggingConfigOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A request to delete a reusable delegation set. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteReusableDelegationSetRequest type DeleteReusableDelegationSetInput struct { @@ -7940,6 +8593,17 @@ func (s *DeleteReusableDelegationSetInput) SetId(v string) *DeleteReusableDelega return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteReusableDelegationSetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // An empty element. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteReusableDelegationSetResponse type DeleteReusableDelegationSetOutput struct { @@ -7956,6 +8620,12 @@ func (s DeleteReusableDelegationSetOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteReusableDelegationSetOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A request to delete a specified traffic policy version. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteTrafficPolicyRequest type DeleteTrafficPolicyInput struct { @@ -8016,6 +8686,22 @@ func (s *DeleteTrafficPolicyInput) SetVersion(v int64) *DeleteTrafficPolicyInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteTrafficPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.PathTarget, "Version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A request to delete a specified traffic policy instance. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteTrafficPolicyInstanceRequest type DeleteTrafficPolicyInstanceInput struct { @@ -8063,6 +8749,17 @@ func (s *DeleteTrafficPolicyInstanceInput) SetId(v string) *DeleteTrafficPolicyI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteTrafficPolicyInstanceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // An empty element. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteTrafficPolicyInstanceResponse type DeleteTrafficPolicyInstanceOutput struct { @@ -8079,6 +8776,12 @@ func (s DeleteTrafficPolicyInstanceOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteTrafficPolicyInstanceOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // An empty element. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteTrafficPolicyResponse type DeleteTrafficPolicyOutput struct { @@ -8095,6 +8798,12 @@ func (s DeleteTrafficPolicyOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteTrafficPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A complex type that contains information about the request to remove authorization // to associate a VPC that was created by one AWS account with a hosted zone // that was created with a different AWS account. @@ -8160,6 +8869,22 @@ func (s *DeleteVPCAssociationAuthorizationInput) SetVPC(v *VPC) *DeleteVPCAssoci return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteVPCAssociationAuthorizationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VPC != nil { + v := s.VPC + + e.SetFields(protocol.BodyTarget, "VPC", v, protocol.Metadata{}) + } + + return nil +} + // Empty response for the request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteVPCAssociationAuthorizationResponse type DeleteVPCAssociationAuthorizationOutput struct { @@ -8176,6 +8901,12 @@ func (s DeleteVPCAssociationAuthorizationOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteVPCAssociationAuthorizationOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // For the metric that the CloudWatch alarm is associated with, a complex type // that contains information about one dimension. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/Dimension @@ -8217,6 +8948,30 @@ func (s *Dimension) SetValue(v string) *Dimension { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Dimension) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDimensionList(vs []*Dimension) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that contains information about the VPC that you want to disassociate // from a specified private hosted zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DisassociateVPCFromHostedZoneRequest @@ -8287,6 +9042,27 @@ func (s *DisassociateVPCFromHostedZoneInput) SetVPC(v *VPC) *DisassociateVPCFrom return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DisassociateVPCFromHostedZoneInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VPC != nil { + v := s.VPC + + e.SetFields(protocol.BodyTarget, "VPC", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information for the disassociate // request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DisassociateVPCFromHostedZoneResponse @@ -8316,6 +9092,17 @@ func (s *DisassociateVPCFromHostedZoneOutput) SetChangeInfo(v *ChangeInfo) *Disa return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DisassociateVPCFromHostedZoneOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ChangeInfo != nil { + v := s.ChangeInfo + + e.SetFields(protocol.BodyTarget, "ChangeInfo", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about a geo location. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GeoLocation type GeoLocation struct { @@ -8384,6 +9171,27 @@ func (s *GeoLocation) SetSubdivisionCode(v string) *GeoLocation { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GeoLocation) MarshalFields(e protocol.FieldEncoder) error { + if s.ContinentCode != nil { + v := *s.ContinentCode + + e.SetValue(protocol.BodyTarget, "ContinentCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CountryCode != nil { + v := *s.CountryCode + + e.SetValue(protocol.BodyTarget, "CountryCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubdivisionCode != nil { + v := *s.SubdivisionCode + + e.SetValue(protocol.BodyTarget, "SubdivisionCode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the codes and full continent, country, and subdivision // names for the specified geolocation code. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GeoLocationDetails @@ -8457,6 +9265,50 @@ func (s *GeoLocationDetails) SetSubdivisionName(v string) *GeoLocationDetails { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GeoLocationDetails) MarshalFields(e protocol.FieldEncoder) error { + if s.ContinentCode != nil { + v := *s.ContinentCode + + e.SetValue(protocol.BodyTarget, "ContinentCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContinentName != nil { + v := *s.ContinentName + + e.SetValue(protocol.BodyTarget, "ContinentName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CountryCode != nil { + v := *s.CountryCode + + e.SetValue(protocol.BodyTarget, "CountryCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CountryName != nil { + v := *s.CountryName + + e.SetValue(protocol.BodyTarget, "CountryName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubdivisionCode != nil { + v := *s.SubdivisionCode + + e.SetValue(protocol.BodyTarget, "SubdivisionCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubdivisionName != nil { + v := *s.SubdivisionName + + e.SetValue(protocol.BodyTarget, "SubdivisionName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeGeoLocationDetailsList(vs []*GeoLocationDetails) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that contains information about the request to create a hosted // zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetAccountLimitRequest @@ -8515,6 +9367,17 @@ func (s *GetAccountLimitInput) SetType(v string) *GetAccountLimitInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAccountLimitInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.PathTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the requested limit. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetAccountLimitResponse type GetAccountLimitOutput struct { @@ -8559,6 +9422,22 @@ func (s *GetAccountLimitOutput) SetLimit(v *AccountLimit) *GetAccountLimitOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetAccountLimitOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Count != nil { + v := *s.Count + + e.SetValue(protocol.BodyTarget, "Count", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := s.Limit + + e.SetFields(protocol.BodyTarget, "Limit", v, protocol.Metadata{}) + } + + return nil +} + // The input for a GetChange request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetChangeRequest type GetChangeInput struct { @@ -8601,6 +9480,17 @@ func (s *GetChangeInput) SetId(v string) *GetChangeInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetChangeInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the ChangeInfo element. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetChangeResponse type GetChangeOutput struct { @@ -8628,6 +9518,17 @@ func (s *GetChangeOutput) SetChangeInfo(v *ChangeInfo) *GetChangeOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetChangeOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ChangeInfo != nil { + v := s.ChangeInfo + + e.SetFields(protocol.BodyTarget, "ChangeInfo", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetCheckerIpRangesRequest type GetCheckerIpRangesInput struct { _ struct{} `type:"structure"` @@ -8643,6 +9544,12 @@ func (s GetCheckerIpRangesInput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCheckerIpRangesInput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetCheckerIpRangesResponse type GetCheckerIpRangesOutput struct { _ struct{} `type:"structure"` @@ -8667,6 +9574,17 @@ func (s *GetCheckerIpRangesOutput) SetCheckerIpRanges(v []*string) *GetCheckerIp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCheckerIpRangesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.CheckerIpRanges) > 0 { + v := s.CheckerIpRanges + + e.SetList(protocol.BodyTarget, "CheckerIpRanges", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // A request for information about whether a specified geographic location is // supported for Amazon Route 53 geolocation resource record sets. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetGeoLocationRequest @@ -8748,6 +9666,27 @@ func (s *GetGeoLocationInput) SetSubdivisionCode(v string) *GetGeoLocationInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetGeoLocationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ContinentCode != nil { + v := *s.ContinentCode + + e.SetValue(protocol.QueryTarget, "continentcode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CountryCode != nil { + v := *s.CountryCode + + e.SetValue(protocol.QueryTarget, "countrycode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubdivisionCode != nil { + v := *s.SubdivisionCode + + e.SetValue(protocol.QueryTarget, "subdivisioncode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information for the specified geolocation // code. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetGeoLocationResponse @@ -8777,6 +9716,17 @@ func (s *GetGeoLocationOutput) SetGeoLocationDetails(v *GeoLocationDetails) *Get return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetGeoLocationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.GeoLocationDetails != nil { + v := s.GeoLocationDetails + + e.SetFields(protocol.BodyTarget, "GeoLocationDetails", v, protocol.Metadata{}) + } + + return nil +} + // A request for the number of health checks that are associated with the current // AWS account. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheckCountRequest @@ -8794,6 +9744,12 @@ func (s GetHealthCheckCountInput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetHealthCheckCountInput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A complex type that contains the response to a GetHealthCheckCount request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheckCountResponse type GetHealthCheckCountOutput struct { @@ -8821,6 +9777,17 @@ func (s *GetHealthCheckCountOutput) SetHealthCheckCount(v int64) *GetHealthCheck return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetHealthCheckCountOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.HealthCheckCount != nil { + v := *s.HealthCheckCount + + e.SetValue(protocol.BodyTarget, "HealthCheckCount", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A request to get information about a specified health check. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheckRequest type GetHealthCheckInput struct { @@ -8864,6 +9831,17 @@ func (s *GetHealthCheckInput) SetHealthCheckId(v string) *GetHealthCheckInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetHealthCheckInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HealthCheckId != nil { + v := *s.HealthCheckId + + e.SetValue(protocol.PathTarget, "HealthCheckId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request for the reason that a health check failed most recently. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheckLastFailureReasonRequest type GetHealthCheckLastFailureReasonInput struct { @@ -8906,6 +9884,17 @@ func (s *GetHealthCheckLastFailureReasonInput) SetHealthCheckId(v string) *GetHe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetHealthCheckLastFailureReasonInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HealthCheckId != nil { + v := *s.HealthCheckId + + e.SetValue(protocol.PathTarget, "HealthCheckId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response to a GetHealthCheckLastFailureReason // request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheckLastFailureReasonResponse @@ -8935,6 +9924,17 @@ func (s *GetHealthCheckLastFailureReasonOutput) SetHealthCheckObservations(v []* return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetHealthCheckLastFailureReasonOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.HealthCheckObservations) > 0 { + v := s.HealthCheckObservations + + e.SetList(protocol.BodyTarget, "HealthCheckObservations", encodeHealthCheckObservationList(v), protocol.Metadata{ListLocationName: "HealthCheckObservation"}) + } + + return nil +} + // A complex type that contains the response to a GetHealthCheck request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheckResponse type GetHealthCheckOutput struct { @@ -8963,6 +9963,17 @@ func (s *GetHealthCheckOutput) SetHealthCheck(v *HealthCheck) *GetHealthCheckOut return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetHealthCheckOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.HealthCheck != nil { + v := s.HealthCheck + + e.SetFields(protocol.BodyTarget, "HealthCheck", v, protocol.Metadata{}) + } + + return nil +} + // A request to get the status for a health check. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheckStatusRequest type GetHealthCheckStatusInput struct { @@ -9009,6 +10020,17 @@ func (s *GetHealthCheckStatusInput) SetHealthCheckId(v string) *GetHealthCheckSt return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetHealthCheckStatusInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HealthCheckId != nil { + v := *s.HealthCheckId + + e.SetValue(protocol.PathTarget, "HealthCheckId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response to a GetHealthCheck request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHealthCheckStatusResponse type GetHealthCheckStatusOutput struct { @@ -9037,6 +10059,17 @@ func (s *GetHealthCheckStatusOutput) SetHealthCheckObservations(v []*HealthCheck return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetHealthCheckStatusOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.HealthCheckObservations) > 0 { + v := s.HealthCheckObservations + + e.SetList(protocol.BodyTarget, "HealthCheckObservations", encodeHealthCheckObservationList(v), protocol.Metadata{ListLocationName: "HealthCheckObservation"}) + } + + return nil +} + // A request to retrieve a count of all the hosted zones that are associated // with the current AWS account. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHostedZoneCountRequest @@ -9054,6 +10087,12 @@ func (s GetHostedZoneCountInput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetHostedZoneCountInput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A complex type that contains the response to a GetHostedZoneCount request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHostedZoneCountResponse type GetHostedZoneCountOutput struct { @@ -9082,6 +10121,17 @@ func (s *GetHostedZoneCountOutput) SetHostedZoneCount(v int64) *GetHostedZoneCou return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetHostedZoneCountOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneCount != nil { + v := *s.HostedZoneCount + + e.SetValue(protocol.BodyTarget, "HostedZoneCount", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A request to get information about a specified hosted zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHostedZoneRequest type GetHostedZoneInput struct { @@ -9122,6 +10172,17 @@ func (s *GetHostedZoneInput) SetId(v string) *GetHostedZoneInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetHostedZoneInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the request to create a hosted // zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHostedZoneLimitRequest @@ -9183,6 +10244,22 @@ func (s *GetHostedZoneLimitInput) SetType(v string) *GetHostedZoneLimitInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetHostedZoneLimitInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.PathTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the requested limit. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHostedZoneLimitResponse type GetHostedZoneLimitOutput struct { @@ -9227,6 +10304,22 @@ func (s *GetHostedZoneLimitOutput) SetLimit(v *HostedZoneLimit) *GetHostedZoneLi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetHostedZoneLimitOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Count != nil { + v := *s.Count + + e.SetValue(protocol.BodyTarget, "Count", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := s.Limit + + e.SetFields(protocol.BodyTarget, "Limit", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contain the response to a GetHostedZone request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetHostedZoneResponse type GetHostedZoneOutput struct { @@ -9275,6 +10368,27 @@ func (s *GetHostedZoneOutput) SetVPCs(v []*VPC) *GetHostedZoneOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetHostedZoneOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DelegationSet != nil { + v := s.DelegationSet + + e.SetFields(protocol.BodyTarget, "DelegationSet", v, protocol.Metadata{}) + } + if s.HostedZone != nil { + v := s.HostedZone + + e.SetFields(protocol.BodyTarget, "HostedZone", v, protocol.Metadata{}) + } + if len(s.VPCs) > 0 { + v := s.VPCs + + e.SetList(protocol.BodyTarget, "VPCs", encodeVPCList(v), protocol.Metadata{ListLocationName: "VPC"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetQueryLoggingConfigRequest type GetQueryLoggingConfigInput struct { _ struct{} `type:"structure"` @@ -9318,6 +10432,17 @@ func (s *GetQueryLoggingConfigInput) SetId(v string) *GetQueryLoggingConfigInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetQueryLoggingConfigInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetQueryLoggingConfigResponse type GetQueryLoggingConfigOutput struct { _ struct{} `type:"structure"` @@ -9345,6 +10470,17 @@ func (s *GetQueryLoggingConfigOutput) SetQueryLoggingConfig(v *QueryLoggingConfi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetQueryLoggingConfigOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.QueryLoggingConfig != nil { + v := s.QueryLoggingConfig + + e.SetFields(protocol.BodyTarget, "QueryLoggingConfig", v, protocol.Metadata{}) + } + + return nil +} + // A request to get information about a specified reusable delegation set. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetReusableDelegationSetRequest type GetReusableDelegationSetInput struct { @@ -9386,6 +10522,17 @@ func (s *GetReusableDelegationSetInput) SetId(v string) *GetReusableDelegationSe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetReusableDelegationSetInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the request to create a hosted // zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetReusableDelegationSetLimitRequest @@ -9443,6 +10590,22 @@ func (s *GetReusableDelegationSetLimitInput) SetType(v string) *GetReusableDeleg return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetReusableDelegationSetLimitInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DelegationSetId != nil { + v := *s.DelegationSetId + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.PathTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the requested limit. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetReusableDelegationSetLimitResponse type GetReusableDelegationSetLimitOutput struct { @@ -9483,6 +10646,22 @@ func (s *GetReusableDelegationSetLimitOutput) SetLimit(v *ReusableDelegationSetL return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetReusableDelegationSetLimitOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Count != nil { + v := *s.Count + + e.SetValue(protocol.BodyTarget, "Count", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := s.Limit + + e.SetFields(protocol.BodyTarget, "Limit", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response to the GetReusableDelegationSet // request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetReusableDelegationSetResponse @@ -9511,6 +10690,17 @@ func (s *GetReusableDelegationSetOutput) SetDelegationSet(v *DelegationSet) *Get return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetReusableDelegationSetOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DelegationSet != nil { + v := s.DelegationSet + + e.SetFields(protocol.BodyTarget, "DelegationSet", v, protocol.Metadata{}) + } + + return nil +} + // Gets information about a specific traffic policy version. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetTrafficPolicyRequest type GetTrafficPolicyInput struct { @@ -9572,6 +10762,22 @@ func (s *GetTrafficPolicyInput) SetVersion(v int64) *GetTrafficPolicyInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetTrafficPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.PathTarget, "Version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Request to get the number of traffic policy instances that are associated // with the current AWS account. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetTrafficPolicyInstanceCountRequest @@ -9589,6 +10795,12 @@ func (s GetTrafficPolicyInstanceCountInput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetTrafficPolicyInstanceCountInput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // A complex type that contains information about the resource record sets that // Amazon Route 53 created based on a specified traffic policy. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetTrafficPolicyInstanceCountResponse @@ -9618,6 +10830,17 @@ func (s *GetTrafficPolicyInstanceCountOutput) SetTrafficPolicyInstanceCount(v in return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetTrafficPolicyInstanceCountOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.TrafficPolicyInstanceCount != nil { + v := *s.TrafficPolicyInstanceCount + + e.SetValue(protocol.BodyTarget, "TrafficPolicyInstanceCount", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Gets information about a specified traffic policy instance. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetTrafficPolicyInstanceRequest type GetTrafficPolicyInstanceInput struct { @@ -9661,6 +10884,17 @@ func (s *GetTrafficPolicyInstanceInput) SetId(v string) *GetTrafficPolicyInstanc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetTrafficPolicyInstanceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the resource record sets that // Amazon Route 53 created based on a specified traffic policy. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetTrafficPolicyInstanceResponse @@ -9689,6 +10923,17 @@ func (s *GetTrafficPolicyInstanceOutput) SetTrafficPolicyInstance(v *TrafficPoli return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetTrafficPolicyInstanceOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.TrafficPolicyInstance != nil { + v := s.TrafficPolicyInstance + + e.SetFields(protocol.BodyTarget, "TrafficPolicyInstance", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information for the request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/GetTrafficPolicyResponse type GetTrafficPolicyOutput struct { @@ -9716,6 +10961,17 @@ func (s *GetTrafficPolicyOutput) SetTrafficPolicy(v *TrafficPolicy) *GetTrafficP return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetTrafficPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.TrafficPolicy != nil { + v := s.TrafficPolicy + + e.SetFields(protocol.BodyTarget, "TrafficPolicy", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about one health check that is associated // with the current AWS account. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/HealthCheck @@ -9803,6 +11059,50 @@ func (s *HealthCheck) SetLinkedService(v *LinkedService) *HealthCheck { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HealthCheck) MarshalFields(e protocol.FieldEncoder) error { + if s.CallerReference != nil { + v := *s.CallerReference + + e.SetValue(protocol.BodyTarget, "CallerReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CloudWatchAlarmConfiguration != nil { + v := s.CloudWatchAlarmConfiguration + + e.SetFields(protocol.BodyTarget, "CloudWatchAlarmConfiguration", v, protocol.Metadata{}) + } + if s.HealthCheckConfig != nil { + v := s.HealthCheckConfig + + e.SetFields(protocol.BodyTarget, "HealthCheckConfig", v, protocol.Metadata{}) + } + if s.HealthCheckVersion != nil { + v := *s.HealthCheckVersion + + e.SetValue(protocol.BodyTarget, "HealthCheckVersion", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LinkedService != nil { + v := s.LinkedService + + e.SetFields(protocol.BodyTarget, "LinkedService", v, protocol.Metadata{}) + } + + return nil +} + +func encodeHealthCheckList(vs []*HealthCheck) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that contains information about the health check. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/HealthCheckConfig type HealthCheckConfig struct { @@ -10214,6 +11514,92 @@ func (s *HealthCheckConfig) SetType(v string) *HealthCheckConfig { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HealthCheckConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.AlarmIdentifier != nil { + v := s.AlarmIdentifier + + e.SetFields(protocol.BodyTarget, "AlarmIdentifier", v, protocol.Metadata{}) + } + if len(s.ChildHealthChecks) > 0 { + v := s.ChildHealthChecks + + e.SetList(protocol.BodyTarget, "ChildHealthChecks", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "ChildHealthCheck"}) + } + if s.EnableSNI != nil { + v := *s.EnableSNI + + e.SetValue(protocol.BodyTarget, "EnableSNI", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.FailureThreshold != nil { + v := *s.FailureThreshold + + e.SetValue(protocol.BodyTarget, "FailureThreshold", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FullyQualifiedDomainName != nil { + v := *s.FullyQualifiedDomainName + + e.SetValue(protocol.BodyTarget, "FullyQualifiedDomainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HealthThreshold != nil { + v := *s.HealthThreshold + + e.SetValue(protocol.BodyTarget, "HealthThreshold", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.IPAddress != nil { + v := *s.IPAddress + + e.SetValue(protocol.BodyTarget, "IPAddress", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InsufficientDataHealthStatus != nil { + v := *s.InsufficientDataHealthStatus + + e.SetValue(protocol.BodyTarget, "InsufficientDataHealthStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Inverted != nil { + v := *s.Inverted + + e.SetValue(protocol.BodyTarget, "Inverted", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.MeasureLatency != nil { + v := *s.MeasureLatency + + e.SetValue(protocol.BodyTarget, "MeasureLatency", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Port != nil { + v := *s.Port + + e.SetValue(protocol.BodyTarget, "Port", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Regions) > 0 { + v := s.Regions + + e.SetList(protocol.BodyTarget, "Regions", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "Region"}) + } + if s.RequestInterval != nil { + v := *s.RequestInterval + + e.SetValue(protocol.BodyTarget, "RequestInterval", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ResourcePath != nil { + v := *s.ResourcePath + + e.SetValue(protocol.BodyTarget, "ResourcePath", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SearchString != nil { + v := *s.SearchString + + e.SetValue(protocol.BodyTarget, "SearchString", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the last failure reason as reported by one Amazon // Route 53 health checker. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/HealthCheckObservation @@ -10261,6 +11647,35 @@ func (s *HealthCheckObservation) SetStatusReport(v *StatusReport) *HealthCheckOb return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HealthCheckObservation) MarshalFields(e protocol.FieldEncoder) error { + if s.IPAddress != nil { + v := *s.IPAddress + + e.SetValue(protocol.BodyTarget, "IPAddress", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Region != nil { + v := *s.Region + + e.SetValue(protocol.BodyTarget, "Region", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusReport != nil { + v := s.StatusReport + + e.SetFields(protocol.BodyTarget, "StatusReport", v, protocol.Metadata{}) + } + + return nil +} + +func encodeHealthCheckObservationList(vs []*HealthCheckObservation) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that contains general information about the hosted zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/HostedZone type HostedZone struct { @@ -10347,6 +11762,50 @@ func (s *HostedZone) SetResourceRecordSetCount(v int64) *HostedZone { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HostedZone) MarshalFields(e protocol.FieldEncoder) error { + if s.CallerReference != nil { + v := *s.CallerReference + + e.SetValue(protocol.BodyTarget, "CallerReference", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Config != nil { + v := s.Config + + e.SetFields(protocol.BodyTarget, "Config", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LinkedService != nil { + v := s.LinkedService + + e.SetFields(protocol.BodyTarget, "LinkedService", v, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceRecordSetCount != nil { + v := *s.ResourceRecordSetCount + + e.SetValue(protocol.BodyTarget, "ResourceRecordSetCount", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeHostedZoneList(vs []*HostedZone) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that contains an optional comment about your hosted zone. // If you don't want to specify a comment, omit both the HostedZoneConfig and // Comment elements. @@ -10383,6 +11842,22 @@ func (s *HostedZoneConfig) SetPrivateZone(v bool) *HostedZoneConfig { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HostedZoneConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PrivateZone != nil { + v := *s.PrivateZone + + e.SetValue(protocol.BodyTarget, "PrivateZone", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the type of limit that you specified in the // request and the current value for that limit. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/HostedZoneLimit @@ -10428,6 +11903,22 @@ func (s *HostedZoneLimit) SetValue(v int64) *HostedZoneLimit { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HostedZoneLimit) MarshalFields(e protocol.FieldEncoder) error { + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // If a health check or hosted zone was created by another service, LinkedService // is a complex type that describes the service that created the resource. When // a resource is created by another service, you can't edit or delete it using @@ -10470,6 +11961,22 @@ func (s *LinkedService) SetServicePrincipal(v string) *LinkedService { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LinkedService) MarshalFields(e protocol.FieldEncoder) error { + if s.Description != nil { + v := *s.Description + + e.SetValue(protocol.BodyTarget, "Description", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServicePrincipal != nil { + v := *s.ServicePrincipal + + e.SetValue(protocol.BodyTarget, "ServicePrincipal", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request to get a list of geographic locations that Amazon Route 53 supports // for geolocation resource record sets. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListGeoLocationsRequest @@ -10566,6 +12073,32 @@ func (s *ListGeoLocationsInput) SetStartSubdivisionCode(v string) *ListGeoLocati return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListGeoLocationsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "maxitems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartContinentCode != nil { + v := *s.StartContinentCode + + e.SetValue(protocol.QueryTarget, "startcontinentcode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartCountryCode != nil { + v := *s.StartCountryCode + + e.SetValue(protocol.QueryTarget, "startcountrycode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartSubdivisionCode != nil { + v := *s.StartSubdivisionCode + + e.SetValue(protocol.QueryTarget, "startsubdivisioncode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type containing the response information for the request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListGeoLocationsResponse type ListGeoLocationsOutput struct { @@ -10653,6 +12186,42 @@ func (s *ListGeoLocationsOutput) SetNextSubdivisionCode(v string) *ListGeoLocati return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListGeoLocationsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.GeoLocationDetailsList) > 0 { + v := s.GeoLocationDetailsList + + e.SetList(protocol.BodyTarget, "GeoLocationDetailsList", encodeGeoLocationDetailsList(v), protocol.Metadata{ListLocationName: "GeoLocationDetails"}) + } + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.BodyTarget, "MaxItems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextContinentCode != nil { + v := *s.NextContinentCode + + e.SetValue(protocol.BodyTarget, "NextContinentCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextCountryCode != nil { + v := *s.NextCountryCode + + e.SetValue(protocol.BodyTarget, "NextCountryCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextSubdivisionCode != nil { + v := *s.NextSubdivisionCode + + e.SetValue(protocol.BodyTarget, "NextSubdivisionCode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request to retrieve a list of the health checks that are associated with // the current AWS account. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListHealthChecksRequest @@ -10699,6 +12268,22 @@ func (s *ListHealthChecksInput) SetMaxItems(v string) *ListHealthChecksInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListHealthChecksInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "maxitems", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response to a ListHealthChecks request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListHealthChecksResponse type ListHealthChecksOutput struct { @@ -10776,6 +12361,37 @@ func (s *ListHealthChecksOutput) SetNextMarker(v string) *ListHealthChecksOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListHealthChecksOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.HealthChecks) > 0 { + v := s.HealthChecks + + e.SetList(protocol.BodyTarget, "HealthChecks", encodeHealthCheckList(v), protocol.Metadata{ListLocationName: "HealthCheck"}) + } + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.BodyTarget, "MaxItems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "NextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Retrieves a list of the public and private hosted zones that are associated // with the current AWS account in ASCII order by domain name. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListHostedZonesByNameRequest @@ -10837,6 +12453,27 @@ func (s *ListHostedZonesByNameInput) SetMaxItems(v string) *ListHostedZonesByNam return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListHostedZonesByNameInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DNSName != nil { + v := *s.DNSName + + e.SetValue(protocol.QueryTarget, "dnsname", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.QueryTarget, "hostedzoneid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "maxitems", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information for the request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListHostedZonesByNameResponse type ListHostedZonesByNameOutput struct { @@ -10940,6 +12577,47 @@ func (s *ListHostedZonesByNameOutput) SetNextHostedZoneId(v string) *ListHostedZ return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListHostedZonesByNameOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DNSName != nil { + v := *s.DNSName + + e.SetValue(protocol.BodyTarget, "DNSName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.BodyTarget, "HostedZoneId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.HostedZones) > 0 { + v := s.HostedZones + + e.SetList(protocol.BodyTarget, "HostedZones", encodeHostedZoneList(v), protocol.Metadata{ListLocationName: "HostedZone"}) + } + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.BodyTarget, "MaxItems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextDNSName != nil { + v := *s.NextDNSName + + e.SetValue(protocol.BodyTarget, "NextDNSName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextHostedZoneId != nil { + v := *s.NextHostedZoneId + + e.SetValue(protocol.BodyTarget, "NextHostedZoneId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A request to retrieve a list of the public and private hosted zones that // are associated with the current AWS account. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListHostedZonesRequest @@ -10998,6 +12676,27 @@ func (s *ListHostedZonesInput) SetMaxItems(v string) *ListHostedZonesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListHostedZonesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.DelegationSetId != nil { + v := *s.DelegationSetId + + e.SetValue(protocol.QueryTarget, "delegationsetid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "maxitems", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListHostedZonesResponse type ListHostedZonesOutput struct { _ struct{} `type:"structure"` @@ -11076,6 +12775,37 @@ func (s *ListHostedZonesOutput) SetNextMarker(v string) *ListHostedZonesOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListHostedZonesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.HostedZones) > 0 { + v := s.HostedZones + + e.SetList(protocol.BodyTarget, "HostedZones", encodeHostedZoneList(v), protocol.Metadata{ListLocationName: "HostedZone"}) + } + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.BodyTarget, "MaxItems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "NextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListQueryLoggingConfigsRequest type ListQueryLoggingConfigsInput struct { _ struct{} `type:"structure"` @@ -11134,6 +12864,27 @@ func (s *ListQueryLoggingConfigsInput) SetNextToken(v string) *ListQueryLoggingC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListQueryLoggingConfigsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.QueryTarget, "hostedzoneid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxresults", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nexttoken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListQueryLoggingConfigsResponse type ListQueryLoggingConfigsOutput struct { _ struct{} `type:"structure"` @@ -11177,6 +12928,22 @@ func (s *ListQueryLoggingConfigsOutput) SetQueryLoggingConfigs(v []*QueryLogging return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListQueryLoggingConfigsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.QueryLoggingConfigs) > 0 { + v := s.QueryLoggingConfigs + + e.SetList(protocol.BodyTarget, "QueryLoggingConfigs", encodeQueryLoggingConfigList(v), protocol.Metadata{ListLocationName: "QueryLoggingConfig"}) + } + + return nil +} + // A request for the resource record sets that are associated with a specified // hosted zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListResourceRecordSetsRequest @@ -11289,6 +13056,37 @@ func (s *ListResourceRecordSetsInput) SetStartRecordType(v string) *ListResource return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListResourceRecordSetsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "maxitems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartRecordIdentifier != nil { + v := *s.StartRecordIdentifier + + e.SetValue(protocol.QueryTarget, "identifier", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartRecordName != nil { + v := *s.StartRecordName + + e.SetValue(protocol.QueryTarget, "name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartRecordType != nil { + v := *s.StartRecordType + + e.SetValue(protocol.QueryTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains list information for the resource record set. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListResourceRecordSetsResponse type ListResourceRecordSetsOutput struct { @@ -11373,6 +13171,42 @@ func (s *ListResourceRecordSetsOutput) SetResourceRecordSets(v []*ResourceRecord return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListResourceRecordSetsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.BodyTarget, "MaxItems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextRecordIdentifier != nil { + v := *s.NextRecordIdentifier + + e.SetValue(protocol.BodyTarget, "NextRecordIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextRecordName != nil { + v := *s.NextRecordName + + e.SetValue(protocol.BodyTarget, "NextRecordName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextRecordType != nil { + v := *s.NextRecordType + + e.SetValue(protocol.BodyTarget, "NextRecordType", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.ResourceRecordSets) > 0 { + v := s.ResourceRecordSets + + e.SetList(protocol.BodyTarget, "ResourceRecordSets", encodeResourceRecordSetList(v), protocol.Metadata{ListLocationName: "ResourceRecordSet"}) + } + + return nil +} + // A request to get a list of the reusable delegation sets that are associated // with the current AWS account. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListReusableDelegationSetsRequest @@ -11413,10 +13247,26 @@ func (s *ListReusableDelegationSetsInput) SetMarker(v string) *ListReusableDeleg return s } -// SetMaxItems sets the MaxItems field's value. -func (s *ListReusableDelegationSetsInput) SetMaxItems(v string) *ListReusableDelegationSetsInput { - s.MaxItems = &v - return s +// SetMaxItems sets the MaxItems field's value. +func (s *ListReusableDelegationSetsInput) SetMaxItems(v string) *ListReusableDelegationSetsInput { + s.MaxItems = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListReusableDelegationSetsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "maxitems", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil } // A complex type that contains information about the reusable delegation sets @@ -11496,6 +13346,37 @@ func (s *ListReusableDelegationSetsOutput) SetNextMarker(v string) *ListReusable return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListReusableDelegationSetsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.DelegationSets) > 0 { + v := s.DelegationSets + + e.SetList(protocol.BodyTarget, "DelegationSets", encodeDelegationSetList(v), protocol.Metadata{ListLocationName: "DelegationSet"}) + } + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.BodyTarget, "MaxItems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "NextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type containing information about a request for a list of the tags // that are associated with an individual resource. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTagsForResourceRequest @@ -11555,6 +13436,22 @@ func (s *ListTagsForResourceInput) SetResourceType(v string) *ListTagsForResourc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTagsForResourceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "ResourceId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceType != nil { + v := *s.ResourceType + + e.SetValue(protocol.PathTarget, "ResourceType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the health checks or hosted // zones for which you want to list tags. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTagsForResourceResponse @@ -11583,6 +13480,17 @@ func (s *ListTagsForResourceOutput) SetResourceTagSet(v *ResourceTagSet) *ListTa return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTagsForResourceOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ResourceTagSet != nil { + v := s.ResourceTagSet + + e.SetFields(protocol.BodyTarget, "ResourceTagSet", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the health checks or hosted // zones for which you want to list tags. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTagsForResourcesRequest @@ -11646,6 +13554,22 @@ func (s *ListTagsForResourcesInput) SetResourceType(v string) *ListTagsForResour return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTagsForResourcesInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ResourceIds) > 0 { + v := s.ResourceIds + + e.SetList(protocol.BodyTarget, "ResourceIds", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "ResourceId"}) + } + if s.ResourceType != nil { + v := *s.ResourceType + + e.SetValue(protocol.PathTarget, "ResourceType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type containing tags for the specified resources. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTagsForResourcesResponse type ListTagsForResourcesOutput struct { @@ -11673,6 +13597,17 @@ func (s *ListTagsForResourcesOutput) SetResourceTagSets(v []*ResourceTagSet) *Li return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTagsForResourcesOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ResourceTagSets) > 0 { + v := s.ResourceTagSets + + e.SetList(protocol.BodyTarget, "ResourceTagSets", encodeResourceTagSetList(v), protocol.Metadata{ListLocationName: "ResourceTagSet"}) + } + + return nil +} + // A complex type that contains the information about the request to list the // traffic policies that are associated with the current AWS account. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPoliciesRequest @@ -11732,6 +13667,22 @@ func (s *ListTrafficPoliciesInput) SetTrafficPolicyIdMarker(v string) *ListTraff return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTrafficPoliciesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "maxitems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyIdMarker != nil { + v := *s.TrafficPolicyIdMarker + + e.SetValue(protocol.QueryTarget, "trafficpolicyid", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information for the request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPoliciesResponse type ListTrafficPoliciesOutput struct { @@ -11798,6 +13749,32 @@ func (s *ListTrafficPoliciesOutput) SetTrafficPolicySummaries(v []*TrafficPolicy return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTrafficPoliciesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.BodyTarget, "MaxItems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyIdMarker != nil { + v := *s.TrafficPolicyIdMarker + + e.SetValue(protocol.BodyTarget, "TrafficPolicyIdMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TrafficPolicySummaries) > 0 { + v := s.TrafficPolicySummaries + + e.SetList(protocol.BodyTarget, "TrafficPolicySummaries", encodeTrafficPolicySummaryList(v), protocol.Metadata{ListLocationName: "TrafficPolicySummary"}) + } + + return nil +} + // A request for the traffic policy instances that you created in a specified // hosted zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyInstancesByHostedZoneRequest @@ -11888,6 +13865,32 @@ func (s *ListTrafficPolicyInstancesByHostedZoneInput) SetTrafficPolicyInstanceTy return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTrafficPolicyInstancesByHostedZoneInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.QueryTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "maxitems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyInstanceNameMarker != nil { + v := *s.TrafficPolicyInstanceNameMarker + + e.SetValue(protocol.QueryTarget, "trafficpolicyinstancename", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyInstanceTypeMarker != nil { + v := *s.TrafficPolicyInstanceTypeMarker + + e.SetValue(protocol.QueryTarget, "trafficpolicyinstancetype", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information for the request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyInstancesByHostedZoneResponse type ListTrafficPolicyInstancesByHostedZoneOutput struct { @@ -11964,6 +13967,37 @@ func (s *ListTrafficPolicyInstancesByHostedZoneOutput) SetTrafficPolicyInstances return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTrafficPolicyInstancesByHostedZoneOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.BodyTarget, "MaxItems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyInstanceNameMarker != nil { + v := *s.TrafficPolicyInstanceNameMarker + + e.SetValue(protocol.BodyTarget, "TrafficPolicyInstanceNameMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyInstanceTypeMarker != nil { + v := *s.TrafficPolicyInstanceTypeMarker + + e.SetValue(protocol.BodyTarget, "TrafficPolicyInstanceTypeMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TrafficPolicyInstances) > 0 { + v := s.TrafficPolicyInstances + + e.SetList(protocol.BodyTarget, "TrafficPolicyInstances", encodeTrafficPolicyInstanceList(v), protocol.Metadata{ListLocationName: "TrafficPolicyInstance"}) + } + + return nil +} + // A complex type that contains the information about the request to list your // traffic policy instances. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyInstancesByPolicyRequest @@ -12095,6 +14129,42 @@ func (s *ListTrafficPolicyInstancesByPolicyInput) SetTrafficPolicyVersion(v int6 return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTrafficPolicyInstancesByPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneIdMarker != nil { + v := *s.HostedZoneIdMarker + + e.SetValue(protocol.QueryTarget, "hostedzoneid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "maxitems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyId != nil { + v := *s.TrafficPolicyId + + e.SetValue(protocol.QueryTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyInstanceNameMarker != nil { + v := *s.TrafficPolicyInstanceNameMarker + + e.SetValue(protocol.QueryTarget, "trafficpolicyinstancename", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyInstanceTypeMarker != nil { + v := *s.TrafficPolicyInstanceTypeMarker + + e.SetValue(protocol.QueryTarget, "trafficpolicyinstancetype", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyVersion != nil { + v := *s.TrafficPolicyVersion + + e.SetValue(protocol.QueryTarget, "version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information for the request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyInstancesByPolicyResponse type ListTrafficPolicyInstancesByPolicyOutput struct { @@ -12183,6 +14253,42 @@ func (s *ListTrafficPolicyInstancesByPolicyOutput) SetTrafficPolicyInstances(v [ return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTrafficPolicyInstancesByPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneIdMarker != nil { + v := *s.HostedZoneIdMarker + + e.SetValue(protocol.BodyTarget, "HostedZoneIdMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.BodyTarget, "MaxItems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyInstanceNameMarker != nil { + v := *s.TrafficPolicyInstanceNameMarker + + e.SetValue(protocol.BodyTarget, "TrafficPolicyInstanceNameMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyInstanceTypeMarker != nil { + v := *s.TrafficPolicyInstanceTypeMarker + + e.SetValue(protocol.BodyTarget, "TrafficPolicyInstanceTypeMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TrafficPolicyInstances) > 0 { + v := s.TrafficPolicyInstances + + e.SetList(protocol.BodyTarget, "TrafficPolicyInstances", encodeTrafficPolicyInstanceList(v), protocol.Metadata{ListLocationName: "TrafficPolicyInstance"}) + } + + return nil +} + // A request to get information about the traffic policy instances that you // created by using the current AWS account. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyInstancesRequest @@ -12265,6 +14371,32 @@ func (s *ListTrafficPolicyInstancesInput) SetTrafficPolicyInstanceTypeMarker(v s return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTrafficPolicyInstancesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneIdMarker != nil { + v := *s.HostedZoneIdMarker + + e.SetValue(protocol.QueryTarget, "hostedzoneid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "maxitems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyInstanceNameMarker != nil { + v := *s.TrafficPolicyInstanceNameMarker + + e.SetValue(protocol.QueryTarget, "trafficpolicyinstancename", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyInstanceTypeMarker != nil { + v := *s.TrafficPolicyInstanceTypeMarker + + e.SetValue(protocol.QueryTarget, "trafficpolicyinstancetype", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information for the request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyInstancesResponse type ListTrafficPolicyInstancesOutput struct { @@ -12354,6 +14486,42 @@ func (s *ListTrafficPolicyInstancesOutput) SetTrafficPolicyInstances(v []*Traffi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTrafficPolicyInstancesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneIdMarker != nil { + v := *s.HostedZoneIdMarker + + e.SetValue(protocol.BodyTarget, "HostedZoneIdMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.BodyTarget, "MaxItems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyInstanceNameMarker != nil { + v := *s.TrafficPolicyInstanceNameMarker + + e.SetValue(protocol.BodyTarget, "TrafficPolicyInstanceNameMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyInstanceTypeMarker != nil { + v := *s.TrafficPolicyInstanceTypeMarker + + e.SetValue(protocol.BodyTarget, "TrafficPolicyInstanceTypeMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TrafficPolicyInstances) > 0 { + v := s.TrafficPolicyInstances + + e.SetList(protocol.BodyTarget, "TrafficPolicyInstances", encodeTrafficPolicyInstanceList(v), protocol.Metadata{ListLocationName: "TrafficPolicyInstance"}) + } + + return nil +} + // A complex type that contains the information about the request to list your // traffic policies. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyVersionsRequest @@ -12429,6 +14597,27 @@ func (s *ListTrafficPolicyVersionsInput) SetTrafficPolicyVersionMarker(v string) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTrafficPolicyVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.QueryTarget, "maxitems", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyVersionMarker != nil { + v := *s.TrafficPolicyVersionMarker + + e.SetValue(protocol.QueryTarget, "trafficpolicyversion", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information for the request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListTrafficPolicyVersionsResponse type ListTrafficPolicyVersionsOutput struct { @@ -12499,6 +14688,32 @@ func (s *ListTrafficPolicyVersionsOutput) SetTrafficPolicyVersionMarker(v string return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListTrafficPolicyVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.MaxItems != nil { + v := *s.MaxItems + + e.SetValue(protocol.BodyTarget, "MaxItems", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TrafficPolicies) > 0 { + v := s.TrafficPolicies + + e.SetList(protocol.BodyTarget, "TrafficPolicies", encodeTrafficPolicyList(v), protocol.Metadata{ListLocationName: "TrafficPolicy"}) + } + if s.TrafficPolicyVersionMarker != nil { + v := *s.TrafficPolicyVersionMarker + + e.SetValue(protocol.BodyTarget, "TrafficPolicyVersionMarker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about that can be associated with // your hosted zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListVPCAssociationAuthorizationsRequest @@ -12565,6 +14780,27 @@ func (s *ListVPCAssociationAuthorizationsInput) SetNextToken(v string) *ListVPCA return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListVPCAssociationAuthorizationsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxResults != nil { + v := *s.MaxResults + + e.SetValue(protocol.QueryTarget, "maxresults", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.QueryTarget, "nexttoken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information for the request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ListVPCAssociationAuthorizationsResponse type ListVPCAssociationAuthorizationsOutput struct { @@ -12617,6 +14853,27 @@ func (s *ListVPCAssociationAuthorizationsOutput) SetVPCs(v []*VPC) *ListVPCAssoc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListVPCAssociationAuthorizationsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.BodyTarget, "HostedZoneId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.VPCs) > 0 { + v := s.VPCs + + e.SetList(protocol.BodyTarget, "VPCs", encodeVPCList(v), protocol.Metadata{ListLocationName: "VPC"}) + } + + return nil +} + // A complex type that contains information about a configuration for DNS query // logging. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/QueryLoggingConfig @@ -12668,6 +14925,35 @@ func (s *QueryLoggingConfig) SetId(v string) *QueryLoggingConfig { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *QueryLoggingConfig) MarshalFields(e protocol.FieldEncoder) error { + if s.CloudWatchLogsLogGroupArn != nil { + v := *s.CloudWatchLogsLogGroupArn + + e.SetValue(protocol.BodyTarget, "CloudWatchLogsLogGroupArn", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.BodyTarget, "HostedZoneId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeQueryLoggingConfigList(vs []*QueryLoggingConfig) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information specific to the resource record. // // If you're creating an alias resource record set, omit ResourceRecord. @@ -12719,6 +15005,25 @@ func (s *ResourceRecord) SetValue(v string) *ResourceRecord { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ResourceRecord) MarshalFields(e protocol.FieldEncoder) error { + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeResourceRecordList(vs []*ResourceRecord) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information about the resource record set to create or delete. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ResourceRecordSet type ResourceRecordSet struct { @@ -13239,16 +15544,95 @@ func (s *ResourceRecordSet) SetTrafficPolicyInstanceId(v string) *ResourceRecord return s } -// SetType sets the Type field's value. -func (s *ResourceRecordSet) SetType(v string) *ResourceRecordSet { - s.Type = &v - return s +// SetType sets the Type field's value. +func (s *ResourceRecordSet) SetType(v string) *ResourceRecordSet { + s.Type = &v + return s +} + +// SetWeight sets the Weight field's value. +func (s *ResourceRecordSet) SetWeight(v int64) *ResourceRecordSet { + s.Weight = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ResourceRecordSet) MarshalFields(e protocol.FieldEncoder) error { + if s.AliasTarget != nil { + v := s.AliasTarget + + e.SetFields(protocol.BodyTarget, "AliasTarget", v, protocol.Metadata{}) + } + if s.Failover != nil { + v := *s.Failover + + e.SetValue(protocol.BodyTarget, "Failover", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GeoLocation != nil { + v := s.GeoLocation + + e.SetFields(protocol.BodyTarget, "GeoLocation", v, protocol.Metadata{}) + } + if s.HealthCheckId != nil { + v := *s.HealthCheckId + + e.SetValue(protocol.BodyTarget, "HealthCheckId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MultiValueAnswer != nil { + v := *s.MultiValueAnswer + + e.SetValue(protocol.BodyTarget, "MultiValueAnswer", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Region != nil { + v := *s.Region + + e.SetValue(protocol.BodyTarget, "Region", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.ResourceRecords) > 0 { + v := s.ResourceRecords + + e.SetList(protocol.BodyTarget, "ResourceRecords", encodeResourceRecordList(v), protocol.Metadata{ListLocationName: "ResourceRecord"}) + } + if s.SetIdentifier != nil { + v := *s.SetIdentifier + + e.SetValue(protocol.BodyTarget, "SetIdentifier", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TTL != nil { + v := *s.TTL + + e.SetValue(protocol.BodyTarget, "TTL", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TrafficPolicyInstanceId != nil { + v := *s.TrafficPolicyInstanceId + + e.SetValue(protocol.BodyTarget, "TrafficPolicyInstanceId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Weight != nil { + v := *s.Weight + + e.SetValue(protocol.BodyTarget, "Weight", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil } -// SetWeight sets the Weight field's value. -func (s *ResourceRecordSet) SetWeight(v int64) *ResourceRecordSet { - s.Weight = &v - return s +func encodeResourceRecordSetList(vs []*ResourceRecordSet) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } } // A complex type containing a resource and its associated tags. @@ -13298,6 +15682,35 @@ func (s *ResourceTagSet) SetTags(v []*Tag) *ResourceTagSet { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ResourceTagSet) MarshalFields(e protocol.FieldEncoder) error { + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.BodyTarget, "ResourceId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceType != nil { + v := *s.ResourceType + + e.SetValue(protocol.BodyTarget, "ResourceType", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Tags) > 0 { + v := s.Tags + + e.SetList(protocol.BodyTarget, "Tags", encodeTagList(v), protocol.Metadata{ListLocationName: "Tag"}) + } + + return nil +} + +func encodeResourceTagSetList(vs []*ResourceTagSet) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that contains the type of limit that you specified in the // request and the current value for that limit. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ReusableDelegationSetLimit @@ -13339,6 +15752,22 @@ func (s *ReusableDelegationSetLimit) SetValue(v int64) *ReusableDelegationSetLim return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ReusableDelegationSetLimit) MarshalFields(e protocol.FieldEncoder) error { + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the status that one Amazon Route 53 health checker // reports and the time of the health check. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/StatusReport @@ -13378,6 +15807,22 @@ func (s *StatusReport) SetStatus(v string) *StatusReport { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StatusReport) MarshalFields(e protocol.FieldEncoder) error { + if s.CheckedTime != nil { + v := *s.CheckedTime + + e.SetValue(protocol.BodyTarget, "CheckedTime", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about a tag that you want to add // or edit for the specified health check or hosted zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/Tag @@ -13430,6 +15875,30 @@ func (s *Tag) SetValue(v string) *Tag { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Tag) MarshalFields(e protocol.FieldEncoder) error { + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTagList(vs []*Tag) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Gets the value that Amazon Route 53 returns in response to a DNS request // for a specified record name and type. You can optionally specify the IP address // of a DNS resolver, an EDNS0 client subnet IP address, and a subnet mask. @@ -13539,6 +16008,42 @@ func (s *TestDNSAnswerInput) SetResolverIP(v string) *TestDNSAnswerInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TestDNSAnswerInput) MarshalFields(e protocol.FieldEncoder) error { + if s.EDNS0ClientSubnetIP != nil { + v := *s.EDNS0ClientSubnetIP + + e.SetValue(protocol.QueryTarget, "edns0clientsubnetip", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EDNS0ClientSubnetMask != nil { + v := *s.EDNS0ClientSubnetMask + + e.SetValue(protocol.QueryTarget, "edns0clientsubnetmask", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.QueryTarget, "hostedzoneid", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RecordName != nil { + v := *s.RecordName + + e.SetValue(protocol.QueryTarget, "recordname", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RecordType != nil { + v := *s.RecordType + + e.SetValue(protocol.QueryTarget, "recordtype", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResolverIP != nil { + v := *s.ResolverIP + + e.SetValue(protocol.QueryTarget, "resolverip", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response to a TestDNSAnswer request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/TestDNSAnswerResponse type TestDNSAnswerOutput struct { @@ -13627,6 +16132,42 @@ func (s *TestDNSAnswerOutput) SetResponseCode(v string) *TestDNSAnswerOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TestDNSAnswerOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Nameserver != nil { + v := *s.Nameserver + + e.SetValue(protocol.BodyTarget, "Nameserver", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Protocol != nil { + v := *s.Protocol + + e.SetValue(protocol.BodyTarget, "Protocol", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.RecordData) > 0 { + v := s.RecordData + + e.SetList(protocol.BodyTarget, "RecordData", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "RecordDataEntry"}) + } + if s.RecordName != nil { + v := *s.RecordName + + e.SetValue(protocol.BodyTarget, "RecordName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RecordType != nil { + v := *s.RecordType + + e.SetValue(protocol.BodyTarget, "RecordType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResponseCode != nil { + v := *s.ResponseCode + + e.SetValue(protocol.BodyTarget, "ResponseCode", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains settings for a traffic policy. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/TrafficPolicy type TrafficPolicy struct { @@ -13712,6 +16253,50 @@ func (s *TrafficPolicy) SetVersion(v int64) *TrafficPolicy { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TrafficPolicy) MarshalFields(e protocol.FieldEncoder) error { + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Document != nil { + v := *s.Document + + e.SetValue(protocol.BodyTarget, "Document", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.BodyTarget, "Version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTrafficPolicyList(vs []*TrafficPolicy) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that contains settings for the new traffic policy instance. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/TrafficPolicyInstance type TrafficPolicyInstance struct { @@ -13845,6 +16430,65 @@ func (s *TrafficPolicyInstance) SetTrafficPolicyVersion(v int64) *TrafficPolicyI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TrafficPolicyInstance) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZoneId != nil { + v := *s.HostedZoneId + + e.SetValue(protocol.BodyTarget, "HostedZoneId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Message != nil { + v := *s.Message + + e.SetValue(protocol.BodyTarget, "Message", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "State", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TTL != nil { + v := *s.TTL + + e.SetValue(protocol.BodyTarget, "TTL", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TrafficPolicyId != nil { + v := *s.TrafficPolicyId + + e.SetValue(protocol.BodyTarget, "TrafficPolicyId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyType != nil { + v := *s.TrafficPolicyType + + e.SetValue(protocol.BodyTarget, "TrafficPolicyType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyVersion != nil { + v := *s.TrafficPolicyVersion + + e.SetValue(protocol.BodyTarget, "TrafficPolicyVersion", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTrafficPolicyInstanceList(vs []*TrafficPolicyInstance) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that contains information about the latest version of one // traffic policy that is associated with the current AWS account. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/TrafficPolicySummary @@ -13919,6 +16563,45 @@ func (s *TrafficPolicySummary) SetType(v string) *TrafficPolicySummary { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TrafficPolicySummary) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LatestVersion != nil { + v := *s.LatestVersion + + e.SetValue(protocol.BodyTarget, "LatestVersion", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyCount != nil { + v := *s.TrafficPolicyCount + + e.SetValue(protocol.BodyTarget, "TrafficPolicyCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTrafficPolicySummaryList(vs []*TrafficPolicySummary) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A complex type that contains information about a request to update a health // check. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateHealthCheckRequest @@ -14310,6 +16993,92 @@ func (s *UpdateHealthCheckInput) SetSearchString(v string) *UpdateHealthCheckInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateHealthCheckInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AlarmIdentifier != nil { + v := s.AlarmIdentifier + + e.SetFields(protocol.BodyTarget, "AlarmIdentifier", v, protocol.Metadata{}) + } + if len(s.ChildHealthChecks) > 0 { + v := s.ChildHealthChecks + + e.SetList(protocol.BodyTarget, "ChildHealthChecks", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "ChildHealthCheck"}) + } + if s.EnableSNI != nil { + v := *s.EnableSNI + + e.SetValue(protocol.BodyTarget, "EnableSNI", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.FailureThreshold != nil { + v := *s.FailureThreshold + + e.SetValue(protocol.BodyTarget, "FailureThreshold", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.FullyQualifiedDomainName != nil { + v := *s.FullyQualifiedDomainName + + e.SetValue(protocol.BodyTarget, "FullyQualifiedDomainName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HealthCheckId != nil { + v := *s.HealthCheckId + + e.SetValue(protocol.PathTarget, "HealthCheckId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HealthCheckVersion != nil { + v := *s.HealthCheckVersion + + e.SetValue(protocol.BodyTarget, "HealthCheckVersion", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.HealthThreshold != nil { + v := *s.HealthThreshold + + e.SetValue(protocol.BodyTarget, "HealthThreshold", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.IPAddress != nil { + v := *s.IPAddress + + e.SetValue(protocol.BodyTarget, "IPAddress", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InsufficientDataHealthStatus != nil { + v := *s.InsufficientDataHealthStatus + + e.SetValue(protocol.BodyTarget, "InsufficientDataHealthStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Inverted != nil { + v := *s.Inverted + + e.SetValue(protocol.BodyTarget, "Inverted", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Port != nil { + v := *s.Port + + e.SetValue(protocol.BodyTarget, "Port", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Regions) > 0 { + v := s.Regions + + e.SetList(protocol.BodyTarget, "Regions", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "Region"}) + } + if len(s.ResetElements) > 0 { + v := s.ResetElements + + e.SetList(protocol.BodyTarget, "ResetElements", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "ResettableElementName"}) + } + if s.ResourcePath != nil { + v := *s.ResourcePath + + e.SetValue(protocol.BodyTarget, "ResourcePath", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SearchString != nil { + v := *s.SearchString + + e.SetValue(protocol.BodyTarget, "SearchString", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateHealthCheckResponse type UpdateHealthCheckOutput struct { _ struct{} `type:"structure"` @@ -14337,6 +17106,17 @@ func (s *UpdateHealthCheckOutput) SetHealthCheck(v *HealthCheck) *UpdateHealthCh return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateHealthCheckOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.HealthCheck != nil { + v := s.HealthCheck + + e.SetFields(protocol.BodyTarget, "HealthCheck", v, protocol.Metadata{}) + } + + return nil +} + // A request to update the comment for a hosted zone. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateHostedZoneCommentRequest type UpdateHostedZoneCommentInput struct { @@ -14387,6 +17167,22 @@ func (s *UpdateHostedZoneCommentInput) SetId(v string) *UpdateHostedZoneCommentI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateHostedZoneCommentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response to the UpdateHostedZoneComment // request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateHostedZoneCommentResponse @@ -14415,6 +17211,17 @@ func (s *UpdateHostedZoneCommentOutput) SetHostedZone(v *HostedZone) *UpdateHost return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateHostedZoneCommentOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.HostedZone != nil { + v := s.HostedZone + + e.SetFields(protocol.BodyTarget, "HostedZone", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the traffic policy that you // want to update the comment for. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateTrafficPolicyCommentRequest @@ -14492,6 +17299,27 @@ func (s *UpdateTrafficPolicyCommentInput) SetVersion(v int64) *UpdateTrafficPoli return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateTrafficPolicyCommentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Comment != nil { + v := *s.Comment + + e.SetValue(protocol.BodyTarget, "Comment", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Version != nil { + v := *s.Version + + e.SetValue(protocol.PathTarget, "Version", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains the response information for the traffic policy. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateTrafficPolicyCommentResponse type UpdateTrafficPolicyCommentOutput struct { @@ -14519,6 +17347,17 @@ func (s *UpdateTrafficPolicyCommentOutput) SetTrafficPolicy(v *TrafficPolicy) *U return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateTrafficPolicyCommentOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.TrafficPolicy != nil { + v := s.TrafficPolicy + + e.SetFields(protocol.BodyTarget, "TrafficPolicy", v, protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the resource record sets that // you want to update based on a specified traffic policy instance. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateTrafficPolicyInstanceRequest @@ -14614,6 +17453,32 @@ func (s *UpdateTrafficPolicyInstanceInput) SetTrafficPolicyVersion(v int64) *Upd return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateTrafficPolicyInstanceInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.PathTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TTL != nil { + v := *s.TTL + + e.SetValue(protocol.BodyTarget, "TTL", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TrafficPolicyId != nil { + v := *s.TrafficPolicyId + + e.SetValue(protocol.BodyTarget, "TrafficPolicyId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TrafficPolicyVersion != nil { + v := *s.TrafficPolicyVersion + + e.SetValue(protocol.BodyTarget, "TrafficPolicyVersion", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // A complex type that contains information about the resource record sets that // Amazon Route 53 created based on a specified traffic policy. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/UpdateTrafficPolicyInstanceResponse @@ -14642,6 +17507,17 @@ func (s *UpdateTrafficPolicyInstanceOutput) SetTrafficPolicyInstance(v *TrafficP return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateTrafficPolicyInstanceOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.TrafficPolicyInstance != nil { + v := s.TrafficPolicyInstance + + e.SetFields(protocol.BodyTarget, "TrafficPolicyInstance", v, protocol.Metadata{}) + } + + return nil +} + // (Private hosted zones only) A complex type that contains information about // an Amazon VPC. // Please also see https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/VPC @@ -14690,6 +17566,30 @@ func (s *VPC) SetVPCRegion(v string) *VPC { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VPC) MarshalFields(e protocol.FieldEncoder) error { + if s.VPCId != nil { + v := *s.VPCId + + e.SetValue(protocol.BodyTarget, "VPCId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VPCRegion != nil { + v := *s.VPCRegion + + e.SetValue(protocol.BodyTarget, "VPCRegion", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeVPCList(vs []*VPC) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + const ( // AccountLimitTypeMaxHealthChecksByOwner is a AccountLimitType enum value AccountLimitTypeMaxHealthChecksByOwner = "MAX_HEALTH_CHECKS_BY_OWNER" diff --git a/service/s3/api.go b/service/s3/api.go index 608d841e1b4..60c05e4ca6d 100644 --- a/service/s3/api.go +++ b/service/s3/api.go @@ -6198,6 +6198,17 @@ func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AbortIncompleteMultipartUpload) MarshalFields(e protocol.FieldEncoder) error { + if s.DaysAfterInitiation != nil { + v := *s.DaysAfterInitiation + + e.SetValue(protocol.BodyTarget, "DaysAfterInitiation", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUploadRequest type AbortMultipartUploadInput struct { _ struct{} `type:"structure"` @@ -6281,6 +6292,32 @@ func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AbortMultipartUploadInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UploadId != nil { + v := *s.UploadId + + e.SetValue(protocol.QueryTarget, "uploadId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUploadOutput type AbortMultipartUploadOutput struct { _ struct{} `type:"structure"` @@ -6306,6 +6343,17 @@ func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipart return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AbortMultipartUploadOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AccelerateConfiguration type AccelerateConfiguration struct { _ struct{} `type:"structure"` @@ -6330,6 +6378,17 @@ func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AccelerateConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AccessControlPolicy type AccessControlPolicy struct { _ struct{} `type:"structure"` @@ -6382,6 +6441,22 @@ func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AccessControlPolicy) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Grants) > 0 { + v := s.Grants + + e.SetList(protocol.BodyTarget, "AccessControlList", encodeGrantList(v), protocol.Metadata{ListLocationName: "Grant"}) + } + if s.Owner != nil { + v := s.Owner + + e.SetFields(protocol.BodyTarget, "Owner", v, protocol.Metadata{}) + } + + return nil +} + // Container for information regarding the access control for replicas. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AccessControlTranslation type AccessControlTranslation struct { @@ -6422,6 +6497,17 @@ func (s *AccessControlTranslation) SetOwner(v string) *AccessControlTranslation return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AccessControlTranslation) MarshalFields(e protocol.FieldEncoder) error { + if s.Owner != nil { + v := *s.Owner + + e.SetValue(protocol.BodyTarget, "Owner", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsAndOperator type AnalyticsAndOperator struct { _ struct{} `type:"structure"` @@ -6475,6 +6561,22 @@ func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AnalyticsAndOperator) MarshalFields(e protocol.FieldEncoder) error { + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Tags) > 0 { + v := s.Tags + + e.SetList(protocol.BodyTarget, "Tag", encodeTagList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsConfiguration type AnalyticsConfiguration struct { _ struct{} `type:"structure"` @@ -6550,6 +6652,35 @@ func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AnalyticsConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.Filter != nil { + v := s.Filter + + e.SetFields(protocol.BodyTarget, "Filter", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StorageClassAnalysis != nil { + v := s.StorageClassAnalysis + + e.SetFields(protocol.BodyTarget, "StorageClassAnalysis", v, protocol.Metadata{}) + } + + return nil +} + +func encodeAnalyticsConfigurationList(vs []*AnalyticsConfiguration) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsExportDestination type AnalyticsExportDestination struct { _ struct{} `type:"structure"` @@ -6594,6 +6725,17 @@ func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3Bucket return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AnalyticsExportDestination) MarshalFields(e protocol.FieldEncoder) error { + if s.S3BucketDestination != nil { + v := s.S3BucketDestination + + e.SetFields(protocol.BodyTarget, "S3BucketDestination", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsFilter type AnalyticsFilter struct { _ struct{} `type:"structure"` @@ -6657,6 +6799,27 @@ func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AnalyticsFilter) MarshalFields(e protocol.FieldEncoder) error { + if s.And != nil { + v := s.And + + e.SetFields(protocol.BodyTarget, "And", v, protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Tag != nil { + v := s.Tag + + e.SetFields(protocol.BodyTarget, "Tag", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsS3BucketDestination type AnalyticsS3BucketDestination struct { _ struct{} `type:"structure"` @@ -6737,6 +6900,32 @@ func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDes return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AnalyticsS3BucketDestination) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.BodyTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BucketAccountId != nil { + v := *s.BucketAccountId + + e.SetValue(protocol.BodyTarget, "BucketAccountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Format != nil { + v := *s.Format + + e.SetValue(protocol.BodyTarget, "Format", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Bucket type Bucket struct { _ struct{} `type:"structure"` @@ -6770,6 +6959,30 @@ func (s *Bucket) SetName(v string) *Bucket { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Bucket) MarshalFields(e protocol.FieldEncoder) error { + if s.CreationDate != nil { + v := *s.CreationDate + + e.SetValue(protocol.BodyTarget, "CreationDate", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeBucketList(vs []*Bucket) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/BucketLifecycleConfiguration type BucketLifecycleConfiguration struct { _ struct{} `type:"structure"` @@ -6817,6 +7030,17 @@ func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifec return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BucketLifecycleConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Rules) > 0 { + v := s.Rules + + e.SetList(protocol.BodyTarget, "Rule", encodeLifecycleRuleList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/BucketLoggingStatus type BucketLoggingStatus struct { _ struct{} `type:"structure"` @@ -6855,6 +7079,17 @@ func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggin return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BucketLoggingStatus) MarshalFields(e protocol.FieldEncoder) error { + if s.LoggingEnabled != nil { + v := s.LoggingEnabled + + e.SetFields(protocol.BodyTarget, "LoggingEnabled", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CORSConfiguration type CORSConfiguration struct { _ struct{} `type:"structure"` @@ -6902,6 +7137,17 @@ func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CORSConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if len(s.CORSRules) > 0 { + v := s.CORSRules + + e.SetList(protocol.BodyTarget, "CORSRule", encodeCORSRuleList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CORSRule type CORSRule struct { _ struct{} `type:"structure"` @@ -6986,6 +7232,45 @@ func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CORSRule) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AllowedHeaders) > 0 { + v := s.AllowedHeaders + + e.SetList(protocol.BodyTarget, "AllowedHeader", protocol.EncodeStringList(v), protocol.Metadata{Flatten: true}) + } + if len(s.AllowedMethods) > 0 { + v := s.AllowedMethods + + e.SetList(protocol.BodyTarget, "AllowedMethod", protocol.EncodeStringList(v), protocol.Metadata{Flatten: true}) + } + if len(s.AllowedOrigins) > 0 { + v := s.AllowedOrigins + + e.SetList(protocol.BodyTarget, "AllowedOrigin", protocol.EncodeStringList(v), protocol.Metadata{Flatten: true}) + } + if len(s.ExposeHeaders) > 0 { + v := s.ExposeHeaders + + e.SetList(protocol.BodyTarget, "ExposeHeader", protocol.EncodeStringList(v), protocol.Metadata{Flatten: true}) + } + if s.MaxAgeSeconds != nil { + v := *s.MaxAgeSeconds + + e.SetValue(protocol.BodyTarget, "MaxAgeSeconds", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCORSRuleList(vs []*CORSRule) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CloudFunctionConfiguration type CloudFunctionConfiguration struct { _ struct{} `type:"structure"` @@ -7044,6 +7329,37 @@ func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CloudFunctionConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.CloudFunction != nil { + v := *s.CloudFunction + + e.SetValue(protocol.BodyTarget, "CloudFunction", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Event != nil { + v := *s.Event + + e.SetValue(protocol.BodyTarget, "Event", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Events) > 0 { + v := s.Events + + e.SetList(protocol.BodyTarget, "Event", protocol.EncodeStringList(v), protocol.Metadata{Flatten: true}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InvocationRole != nil { + v := *s.InvocationRole + + e.SetValue(protocol.BodyTarget, "InvocationRole", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CommonPrefix type CommonPrefix struct { _ struct{} `type:"structure"` @@ -7067,6 +7383,25 @@ func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CommonPrefix) MarshalFields(e protocol.FieldEncoder) error { + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCommonPrefixList(vs []*CommonPrefix) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUploadRequest type CompleteMultipartUploadInput struct { _ struct{} `type:"structure" payload:"MultipartUpload"` @@ -7158,6 +7493,37 @@ func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartU return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CompleteMultipartUploadInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MultipartUpload != nil { + v := s.MultipartUpload + + e.SetFields(protocol.PayloadTarget, "CompleteMultipartUpload", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UploadId != nil { + v := *s.UploadId + + e.SetValue(protocol.QueryTarget, "uploadId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUploadOutput type CompleteMultipartUploadOutput struct { _ struct{} `type:"structure"` @@ -7262,6 +7628,57 @@ func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipar return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CompleteMultipartUploadOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.BodyTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.BodyTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Expiration != nil { + v := *s.Expiration + + e.SetValue(protocol.HeaderTarget, "x-amz-expiration", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.BodyTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSEKMSKeyId != nil { + v := *s.SSEKMSKeyId + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-aws-kms-key-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServerSideEncryption != nil { + v := *s.ServerSideEncryption + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.HeaderTarget, "x-amz-version-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompletedMultipartUpload type CompletedMultipartUpload struct { _ struct{} `type:"structure"` @@ -7285,6 +7702,17 @@ func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultip return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CompletedMultipartUpload) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Parts) > 0 { + v := s.Parts + + e.SetList(protocol.BodyTarget, "Part", encodeCompletedPartList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompletedPart type CompletedPart struct { _ struct{} `type:"structure"` @@ -7319,6 +7747,30 @@ func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CompletedPart) MarshalFields(e protocol.FieldEncoder) error { + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.BodyTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PartNumber != nil { + v := *s.PartNumber + + e.SetValue(protocol.BodyTarget, "PartNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCompletedPartList(vs []*CompletedPart) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Condition type Condition struct { _ struct{} `type:"structure"` @@ -7362,6 +7814,22 @@ func (s *Condition) SetKeyPrefixEquals(v string) *Condition { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Condition) MarshalFields(e protocol.FieldEncoder) error { + if s.HttpErrorCodeReturnedEquals != nil { + v := *s.HttpErrorCodeReturnedEquals + + e.SetValue(protocol.BodyTarget, "HttpErrorCodeReturnedEquals", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyPrefixEquals != nil { + v := *s.KeyPrefixEquals + + e.SetValue(protocol.BodyTarget, "KeyPrefixEquals", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectRequest type CopyObjectInput struct { _ struct{} `type:"structure"` @@ -7746,29 +8214,200 @@ func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectOutput -type CopyObjectOutput struct { - _ struct{} `type:"structure" payload:"CopyObjectResult"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CopyObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ACL != nil { + v := *s.ACL - CopyObjectResult *CopyObjectResult `type:"structure"` + e.SetValue(protocol.HeaderTarget, "x-amz-acl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Bucket != nil { + v := *s.Bucket - CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"` + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CacheControl != nil { + v := *s.CacheControl - // If the object expiration is configured, the response includes this header. - Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"` + e.SetValue(protocol.HeaderTarget, "Cache-Control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentDisposition != nil { + v := *s.ContentDisposition - // If present, indicates that the requester was successfully charged for the - // request. - RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` + e.SetValue(protocol.HeaderTarget, "Content-Disposition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentEncoding != nil { + v := *s.ContentEncoding - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header confirming the encryption algorithm - // used. - SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` + e.SetValue(protocol.HeaderTarget, "Content-Encoding", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentLanguage != nil { + v := *s.ContentLanguage - // If server-side encryption with a customer-provided encryption key was requested, - // the response will include this header to provide round trip message integrity - // verification of the customer-provided encryption key. + e.SetValue(protocol.HeaderTarget, "Content-Language", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CopySource != nil { + v := *s.CopySource + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CopySourceIfMatch != nil { + v := *s.CopySourceIfMatch + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-if-match", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CopySourceIfModifiedSince != nil { + v := *s.CopySourceIfModifiedSince + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-if-modified-since", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if s.CopySourceIfNoneMatch != nil { + v := *s.CopySourceIfNoneMatch + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-if-none-match", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CopySourceIfUnmodifiedSince != nil { + v := *s.CopySourceIfUnmodifiedSince + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-if-unmodified-since", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if s.CopySourceSSECustomerAlgorithm != nil { + v := *s.CopySourceSSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CopySourceSSECustomerKey != nil { + v := *s.CopySourceSSECustomerKey + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-server-side-encryption-customer-key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CopySourceSSECustomerKeyMD5 != nil { + v := *s.CopySourceSSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Expires != nil { + v := *s.Expires + + e.SetValue(protocol.HeaderTarget, "Expires", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if s.GrantFullControl != nil { + v := *s.GrantFullControl + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-full-control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantRead != nil { + v := *s.GrantRead + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-read", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantReadACP != nil { + v := *s.GrantReadACP + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-read-acp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantWriteACP != nil { + v := *s.GrantWriteACP + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-write-acp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Metadata) > 0 { + v := s.Metadata + + e.SetMap(protocol.HeadersTarget, "x-amz-meta-", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.MetadataDirective != nil { + v := *s.MetadataDirective + + e.SetValue(protocol.HeaderTarget, "x-amz-metadata-directive", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerAlgorithm != nil { + v := *s.SSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKey != nil { + v := *s.SSECustomerKey + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKeyMD5 != nil { + v := *s.SSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSEKMSKeyId != nil { + v := *s.SSEKMSKeyId + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-aws-kms-key-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServerSideEncryption != nil { + v := *s.ServerSideEncryption + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StorageClass != nil { + v := *s.StorageClass + + e.SetValue(protocol.HeaderTarget, "x-amz-storage-class", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Tagging != nil { + v := *s.Tagging + + e.SetValue(protocol.HeaderTarget, "x-amz-tagging", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TaggingDirective != nil { + v := *s.TaggingDirective + + e.SetValue(protocol.HeaderTarget, "x-amz-tagging-directive", protocol.StringValue(v), protocol.Metadata{}) + } + if s.WebsiteRedirectLocation != nil { + v := *s.WebsiteRedirectLocation + + e.SetValue(protocol.HeaderTarget, "x-amz-website-redirect-location", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectOutput +type CopyObjectOutput struct { + _ struct{} `type:"structure" payload:"CopyObjectResult"` + + CopyObjectResult *CopyObjectResult `type:"structure"` + + CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"` + + // If the object expiration is configured, the response includes this header. + Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"` + + // If present, indicates that the requester was successfully charged for the + // request. + RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` + + // If server-side encryption with a customer-provided encryption key was requested, + // the response will include this header confirming the encryption algorithm + // used. + SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` + + // If server-side encryption with a customer-provided encryption key was requested, + // the response will include this header to provide round trip message integrity + // verification of the customer-provided encryption key. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` // If present, specifies the ID of the AWS Key Management Service (KMS) master @@ -7847,6 +8486,57 @@ func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CopyObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CopyObjectResult != nil { + v := s.CopyObjectResult + + e.SetFields(protocol.PayloadTarget, "CopyObjectResult", v, protocol.Metadata{}) + } + if s.CopySourceVersionId != nil { + v := *s.CopySourceVersionId + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-version-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Expiration != nil { + v := *s.Expiration + + e.SetValue(protocol.HeaderTarget, "x-amz-expiration", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerAlgorithm != nil { + v := *s.SSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKeyMD5 != nil { + v := *s.SSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSEKMSKeyId != nil { + v := *s.SSEKMSKeyId + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-aws-kms-key-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServerSideEncryption != nil { + v := *s.ServerSideEncryption + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.HeaderTarget, "x-amz-version-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectResult type CopyObjectResult struct { _ struct{} `type:"structure"` @@ -7878,6 +8568,22 @@ func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CopyObjectResult) MarshalFields(e protocol.FieldEncoder) error { + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.BodyTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModified != nil { + v := *s.LastModified + + e.SetValue(protocol.BodyTarget, "LastModified", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyPartResult type CopyPartResult struct { _ struct{} `type:"structure"` @@ -7911,6 +8617,22 @@ func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CopyPartResult) MarshalFields(e protocol.FieldEncoder) error { + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.BodyTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModified != nil { + v := *s.LastModified + + e.SetValue(protocol.BodyTarget, "LastModified", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketConfiguration type CreateBucketConfiguration struct { _ struct{} `type:"structure"` @@ -7936,6 +8658,17 @@ func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucke return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateBucketConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.LocationConstraint != nil { + v := *s.LocationConstraint + + e.SetValue(protocol.BodyTarget, "LocationConstraint", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketRequest type CreateBucketInput struct { _ struct{} `type:"structure" payload:"CreateBucketConfiguration"` @@ -8043,6 +8776,52 @@ func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateBucketInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ACL != nil { + v := *s.ACL + + e.SetValue(protocol.HeaderTarget, "x-amz-acl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreateBucketConfiguration != nil { + v := s.CreateBucketConfiguration + + e.SetFields(protocol.PayloadTarget, "CreateBucketConfiguration", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + if s.GrantFullControl != nil { + v := *s.GrantFullControl + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-full-control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantRead != nil { + v := *s.GrantRead + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-read", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantReadACP != nil { + v := *s.GrantReadACP + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-read-acp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantWrite != nil { + v := *s.GrantWrite + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-write", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantWriteACP != nil { + v := *s.GrantWriteACP + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-write-acp", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketOutput type CreateBucketOutput struct { _ struct{} `type:"structure"` @@ -8066,6 +8845,17 @@ func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateBucketOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Location != nil { + v := *s.Location + + e.SetValue(protocol.HeaderTarget, "Location", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUploadRequest type CreateMultipartUploadInput struct { _ struct{} `type:"structure"` @@ -8338,6 +9128,127 @@ func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *Creat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateMultipartUploadInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ACL != nil { + v := *s.ACL + + e.SetValue(protocol.HeaderTarget, "x-amz-acl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CacheControl != nil { + v := *s.CacheControl + + e.SetValue(protocol.HeaderTarget, "Cache-Control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentDisposition != nil { + v := *s.ContentDisposition + + e.SetValue(protocol.HeaderTarget, "Content-Disposition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentEncoding != nil { + v := *s.ContentEncoding + + e.SetValue(protocol.HeaderTarget, "Content-Encoding", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentLanguage != nil { + v := *s.ContentLanguage + + e.SetValue(protocol.HeaderTarget, "Content-Language", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Expires != nil { + v := *s.Expires + + e.SetValue(protocol.HeaderTarget, "Expires", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if s.GrantFullControl != nil { + v := *s.GrantFullControl + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-full-control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantRead != nil { + v := *s.GrantRead + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-read", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantReadACP != nil { + v := *s.GrantReadACP + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-read-acp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantWriteACP != nil { + v := *s.GrantWriteACP + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-write-acp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Metadata) > 0 { + v := s.Metadata + + e.SetMap(protocol.HeadersTarget, "x-amz-meta-", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerAlgorithm != nil { + v := *s.SSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKey != nil { + v := *s.SSECustomerKey + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKeyMD5 != nil { + v := *s.SSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSEKMSKeyId != nil { + v := *s.SSEKMSKeyId + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-aws-kms-key-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServerSideEncryption != nil { + v := *s.ServerSideEncryption + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StorageClass != nil { + v := *s.StorageClass + + e.SetValue(protocol.HeaderTarget, "x-amz-storage-class", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Tagging != nil { + v := *s.Tagging + + e.SetValue(protocol.HeaderTarget, "x-amz-tagging", protocol.StringValue(v), protocol.Metadata{}) + } + if s.WebsiteRedirectLocation != nil { + v := *s.WebsiteRedirectLocation + + e.SetValue(protocol.HeaderTarget, "x-amz-website-redirect-location", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUploadOutput type CreateMultipartUploadOutput struct { _ struct{} `type:"structure"` @@ -8458,6 +9369,62 @@ func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUplo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateMultipartUploadOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AbortDate != nil { + v := *s.AbortDate + + e.SetValue(protocol.HeaderTarget, "x-amz-abort-date", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if s.AbortRuleId != nil { + v := *s.AbortRuleId + + e.SetValue(protocol.HeaderTarget, "x-amz-abort-rule-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.BodyTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerAlgorithm != nil { + v := *s.SSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKeyMD5 != nil { + v := *s.SSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSEKMSKeyId != nil { + v := *s.SSEKMSKeyId + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-aws-kms-key-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServerSideEncryption != nil { + v := *s.ServerSideEncryption + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UploadId != nil { + v := *s.UploadId + + e.SetValue(protocol.BodyTarget, "UploadId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Delete type Delete struct { _ struct{} `type:"structure"` @@ -8515,6 +9482,22 @@ func (s *Delete) SetQuiet(v bool) *Delete { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Delete) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Objects) > 0 { + v := s.Objects + + e.SetList(protocol.BodyTarget, "Object", encodeObjectIdentifierList(v), protocol.Metadata{Flatten: true}) + } + if s.Quiet != nil { + v := *s.Quiet + + e.SetValue(protocol.BodyTarget, "Quiet", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfigurationRequest type DeleteBucketAnalyticsConfigurationInput struct { _ struct{} `type:"structure"` @@ -8575,6 +9558,22 @@ func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketA return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketAnalyticsConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.QueryTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfigurationOutput type DeleteBucketAnalyticsConfigurationOutput struct { _ struct{} `type:"structure"` @@ -8590,6 +9589,12 @@ func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketAnalyticsConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCorsRequest type DeleteBucketCorsInput struct { _ struct{} `type:"structure"` @@ -8634,6 +9639,17 @@ func (s *DeleteBucketCorsInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketCorsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCorsOutput type DeleteBucketCorsOutput struct { _ struct{} `type:"structure"` @@ -8649,6 +9665,12 @@ func (s DeleteBucketCorsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketCorsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryptionRequest type DeleteBucketEncryptionInput struct { _ struct{} `type:"structure"` @@ -8696,6 +9718,17 @@ func (s *DeleteBucketEncryptionInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketEncryptionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryptionOutput type DeleteBucketEncryptionOutput struct { _ struct{} `type:"structure"` @@ -8711,6 +9744,12 @@ func (s DeleteBucketEncryptionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketEncryptionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketRequest type DeleteBucketInput struct { _ struct{} `type:"structure"` @@ -8755,6 +9794,17 @@ func (s *DeleteBucketInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfigurationRequest type DeleteBucketInventoryConfigurationInput struct { _ struct{} `type:"structure"` @@ -8815,6 +9865,22 @@ func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketInventoryConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.QueryTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfigurationOutput type DeleteBucketInventoryConfigurationOutput struct { _ struct{} `type:"structure"` @@ -8830,6 +9896,12 @@ func (s DeleteBucketInventoryConfigurationOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketInventoryConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycleRequest type DeleteBucketLifecycleInput struct { _ struct{} `type:"structure"` @@ -8874,6 +9946,17 @@ func (s *DeleteBucketLifecycleInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketLifecycleInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycleOutput type DeleteBucketLifecycleOutput struct { _ struct{} `type:"structure"` @@ -8889,6 +9972,12 @@ func (s DeleteBucketLifecycleOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketLifecycleOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfigurationRequest type DeleteBucketMetricsConfigurationInput struct { _ struct{} `type:"structure"` @@ -8949,6 +10038,22 @@ func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMet return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketMetricsConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.QueryTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfigurationOutput type DeleteBucketMetricsConfigurationOutput struct { _ struct{} `type:"structure"` @@ -8964,6 +10069,12 @@ func (s DeleteBucketMetricsConfigurationOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketMetricsConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketOutput type DeleteBucketOutput struct { _ struct{} `type:"structure"` @@ -8979,6 +10090,12 @@ func (s DeleteBucketOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicyRequest type DeleteBucketPolicyInput struct { _ struct{} `type:"structure"` @@ -9023,6 +10140,17 @@ func (s *DeleteBucketPolicyInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicyOutput type DeleteBucketPolicyOutput struct { _ struct{} `type:"structure"` @@ -9038,6 +10166,12 @@ func (s DeleteBucketPolicyOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplicationRequest type DeleteBucketReplicationInput struct { _ struct{} `type:"structure"` @@ -9082,6 +10216,17 @@ func (s *DeleteBucketReplicationInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketReplicationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplicationOutput type DeleteBucketReplicationOutput struct { _ struct{} `type:"structure"` @@ -9097,6 +10242,12 @@ func (s DeleteBucketReplicationOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketReplicationOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTaggingRequest type DeleteBucketTaggingInput struct { _ struct{} `type:"structure"` @@ -9141,6 +10292,17 @@ func (s *DeleteBucketTaggingInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketTaggingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTaggingOutput type DeleteBucketTaggingOutput struct { _ struct{} `type:"structure"` @@ -9156,6 +10318,12 @@ func (s DeleteBucketTaggingOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketTaggingOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsiteRequest type DeleteBucketWebsiteInput struct { _ struct{} `type:"structure"` @@ -9200,6 +10368,17 @@ func (s *DeleteBucketWebsiteInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketWebsiteInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsiteOutput type DeleteBucketWebsiteOutput struct { _ struct{} `type:"structure"` @@ -9215,6 +10394,12 @@ func (s DeleteBucketWebsiteOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteBucketWebsiteOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteMarkerEntry type DeleteMarkerEntry struct { _ struct{} `type:"structure"` @@ -9275,6 +10460,45 @@ func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteMarkerEntry) MarshalFields(e protocol.FieldEncoder) error { + if s.IsLatest != nil { + v := *s.IsLatest + + e.SetValue(protocol.BodyTarget, "IsLatest", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModified != nil { + v := *s.LastModified + + e.SetValue(protocol.BodyTarget, "LastModified", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.Owner != nil { + v := s.Owner + + e.SetFields(protocol.BodyTarget, "Owner", v, protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.BodyTarget, "VersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDeleteMarkerEntryList(vs []*DeleteMarkerEntry) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectRequest type DeleteObjectInput struct { _ struct{} `type:"structure"` @@ -9365,6 +10589,37 @@ func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MFA != nil { + v := *s.MFA + + e.SetValue(protocol.HeaderTarget, "x-amz-mfa", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.QueryTarget, "versionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectOutput type DeleteObjectOutput struct { _ struct{} `type:"structure"` @@ -9410,6 +10665,27 @@ func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.DeleteMarker != nil { + v := *s.DeleteMarker + + e.SetValue(protocol.HeaderTarget, "x-amz-delete-marker", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.HeaderTarget, "x-amz-version-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTaggingRequest type DeleteObjectTaggingInput struct { _ struct{} `type:"structure"` @@ -9478,6 +10754,27 @@ func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteObjectTaggingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.QueryTarget, "versionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTaggingOutput type DeleteObjectTaggingOutput struct { _ struct{} `type:"structure"` @@ -9502,6 +10799,17 @@ func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingO return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteObjectTaggingOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.HeaderTarget, "x-amz-version-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectsRequest type DeleteObjectsInput struct { _ struct{} `type:"structure" payload:"Delete"` @@ -9585,6 +10893,32 @@ func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteObjectsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Delete != nil { + v := s.Delete + + e.SetFields(protocol.PayloadTarget, "Delete", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + if s.MFA != nil { + v := *s.MFA + + e.SetValue(protocol.HeaderTarget, "x-amz-mfa", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectsOutput type DeleteObjectsOutput struct { _ struct{} `type:"structure"` @@ -9626,6 +10960,27 @@ func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteObjectsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Deleted) > 0 { + v := s.Deleted + + e.SetList(protocol.BodyTarget, "Deleted", encodeDeletedObjectList(v), protocol.Metadata{Flatten: true}) + } + if len(s.Errors) > 0 { + v := s.Errors + + e.SetList(protocol.BodyTarget, "Error", encodeErrorList(v), protocol.Metadata{Flatten: true}) + } + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletedObject type DeletedObject struct { _ struct{} `type:"structure"` @@ -9673,6 +11028,40 @@ func (s *DeletedObject) SetVersionId(v string) *DeletedObject { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeletedObject) MarshalFields(e protocol.FieldEncoder) error { + if s.DeleteMarker != nil { + v := *s.DeleteMarker + + e.SetValue(protocol.BodyTarget, "DeleteMarker", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.DeleteMarkerVersionId != nil { + v := *s.DeleteMarkerVersionId + + e.SetValue(protocol.BodyTarget, "DeleteMarkerVersionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.BodyTarget, "VersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDeletedObjectList(vs []*DeletedObject) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Container for replication destination information. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Destination type Destination struct { @@ -9763,6 +11152,37 @@ func (s *Destination) SetStorageClass(v string) *Destination { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Destination) MarshalFields(e protocol.FieldEncoder) error { + if s.AccessControlTranslation != nil { + v := s.AccessControlTranslation + + e.SetFields(protocol.BodyTarget, "AccessControlTranslation", v, protocol.Metadata{}) + } + if s.Account != nil { + v := *s.Account + + e.SetValue(protocol.BodyTarget, "Account", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.BodyTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EncryptionConfiguration != nil { + v := s.EncryptionConfiguration + + e.SetFields(protocol.BodyTarget, "EncryptionConfiguration", v, protocol.Metadata{}) + } + if s.StorageClass != nil { + v := *s.StorageClass + + e.SetValue(protocol.BodyTarget, "StorageClass", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Container for information regarding encryption based configuration for replicas. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/EncryptionConfiguration type EncryptionConfiguration struct { @@ -9788,6 +11208,17 @@ func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfig return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EncryptionConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.ReplicaKmsKeyID != nil { + v := *s.ReplicaKmsKeyID + + e.SetValue(protocol.BodyTarget, "ReplicaKmsKeyID", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Error type Error struct { _ struct{} `type:"structure"` @@ -9835,6 +11266,40 @@ func (s *Error) SetVersionId(v string) *Error { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Error) MarshalFields(e protocol.FieldEncoder) error { + if s.Code != nil { + v := *s.Code + + e.SetValue(protocol.BodyTarget, "Code", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Message != nil { + v := *s.Message + + e.SetValue(protocol.BodyTarget, "Message", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.BodyTarget, "VersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeErrorList(vs []*Error) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ErrorDocument type ErrorDocument struct { _ struct{} `type:"structure"` @@ -9877,6 +11342,17 @@ func (s *ErrorDocument) SetKey(v string) *ErrorDocument { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ErrorDocument) MarshalFields(e protocol.FieldEncoder) error { + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Container for key value pair that defines the criteria for the filter rule. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/FilterRule type FilterRule struct { @@ -9913,6 +11389,30 @@ func (s *FilterRule) SetValue(v string) *FilterRule { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FilterRule) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeFilterRuleList(vs []*FilterRule) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfigurationRequest type GetBucketAccelerateConfigurationInput struct { _ struct{} `type:"structure"` @@ -9959,6 +11459,17 @@ func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketAccelerateConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfigurationOutput type GetBucketAccelerateConfigurationOutput struct { _ struct{} `type:"structure"` @@ -9983,6 +11494,17 @@ func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketA return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketAccelerateConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAclRequest type GetBucketAclInput struct { _ struct{} `type:"structure"` @@ -10027,6 +11549,17 @@ func (s *GetBucketAclInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketAclInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAclOutput type GetBucketAclOutput struct { _ struct{} `type:"structure"` @@ -10059,6 +11592,22 @@ func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketAclOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Grants) > 0 { + v := s.Grants + + e.SetList(protocol.BodyTarget, "AccessControlList", encodeGrantList(v), protocol.Metadata{ListLocationName: "Grant"}) + } + if s.Owner != nil { + v := s.Owner + + e.SetFields(protocol.BodyTarget, "Owner", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfigurationRequest type GetBucketAnalyticsConfigurationInput struct { _ struct{} `type:"structure"` @@ -10119,6 +11668,22 @@ func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketAnalyticsConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.QueryTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfigurationOutput type GetBucketAnalyticsConfigurationOutput struct { _ struct{} `type:"structure" payload:"AnalyticsConfiguration"` @@ -10143,6 +11708,17 @@ func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *Ana return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketAnalyticsConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AnalyticsConfiguration != nil { + v := s.AnalyticsConfiguration + + e.SetFields(protocol.PayloadTarget, "AnalyticsConfiguration", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCorsRequest type GetBucketCorsInput struct { _ struct{} `type:"structure"` @@ -10187,6 +11763,17 @@ func (s *GetBucketCorsInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketCorsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCorsOutput type GetBucketCorsOutput struct { _ struct{} `type:"structure"` @@ -10210,6 +11797,17 @@ func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketCorsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.CORSRules) > 0 { + v := s.CORSRules + + e.SetList(protocol.BodyTarget, "CORSRule", encodeCORSRuleList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryptionRequest type GetBucketEncryptionInput struct { _ struct{} `type:"structure"` @@ -10257,6 +11855,17 @@ func (s *GetBucketEncryptionInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketEncryptionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryptionOutput type GetBucketEncryptionOutput struct { _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"` @@ -10282,6 +11891,17 @@ func (s *GetBucketEncryptionOutput) SetServerSideEncryptionConfiguration(v *Serv return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketEncryptionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ServerSideEncryptionConfiguration != nil { + v := s.ServerSideEncryptionConfiguration + + e.SetFields(protocol.PayloadTarget, "ServerSideEncryptionConfiguration", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfigurationRequest type GetBucketInventoryConfigurationInput struct { _ struct{} `type:"structure"` @@ -10342,6 +11962,22 @@ func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInvento return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketInventoryConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.QueryTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfigurationOutput type GetBucketInventoryConfigurationOutput struct { _ struct{} `type:"structure" payload:"InventoryConfiguration"` @@ -10366,6 +12002,17 @@ func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *Inv return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketInventoryConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.InventoryConfiguration != nil { + v := s.InventoryConfiguration + + e.SetFields(protocol.PayloadTarget, "InventoryConfiguration", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfigurationRequest type GetBucketLifecycleConfigurationInput struct { _ struct{} `type:"structure"` @@ -10410,6 +12057,17 @@ func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketLifecycleConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfigurationOutput type GetBucketLifecycleConfigurationOutput struct { _ struct{} `type:"structure"` @@ -10433,6 +12091,17 @@ func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *Ge return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketLifecycleConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Rules) > 0 { + v := s.Rules + + e.SetList(protocol.BodyTarget, "Rule", encodeLifecycleRuleList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleRequest type GetBucketLifecycleInput struct { _ struct{} `type:"structure"` @@ -10477,6 +12146,17 @@ func (s *GetBucketLifecycleInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketLifecycleInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleOutput type GetBucketLifecycleOutput struct { _ struct{} `type:"structure"` @@ -10500,6 +12180,17 @@ func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketLifecycleOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Rules) > 0 { + v := s.Rules + + e.SetList(protocol.BodyTarget, "Rule", encodeRuleList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocationRequest type GetBucketLocationInput struct { _ struct{} `type:"structure"` @@ -10544,6 +12235,17 @@ func (s *GetBucketLocationInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketLocationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocationOutput type GetBucketLocationOutput struct { _ struct{} `type:"structure"` @@ -10567,6 +12269,17 @@ func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLoca return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketLocationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.LocationConstraint != nil { + v := *s.LocationConstraint + + e.SetValue(protocol.BodyTarget, "LocationConstraint", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLoggingRequest type GetBucketLoggingInput struct { _ struct{} `type:"structure"` @@ -10611,6 +12324,17 @@ func (s *GetBucketLoggingInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketLoggingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLoggingOutput type GetBucketLoggingOutput struct { _ struct{} `type:"structure"` @@ -10634,6 +12358,17 @@ func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucket return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketLoggingOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.LoggingEnabled != nil { + v := s.LoggingEnabled + + e.SetFields(protocol.BodyTarget, "LoggingEnabled", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfigurationRequest type GetBucketMetricsConfigurationInput struct { _ struct{} `type:"structure"` @@ -10694,6 +12429,22 @@ func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsCo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketMetricsConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.QueryTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfigurationOutput type GetBucketMetricsConfigurationOutput struct { _ struct{} `type:"structure" payload:"MetricsConfiguration"` @@ -10718,6 +12469,17 @@ func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *Metrics return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketMetricsConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.MetricsConfiguration != nil { + v := s.MetricsConfiguration + + e.SetFields(protocol.PayloadTarget, "MetricsConfiguration", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfigurationRequest type GetBucketNotificationConfigurationRequest struct { _ struct{} `type:"structure"` @@ -10764,6 +12526,17 @@ func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketNotificationConfigurationRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyRequest type GetBucketPolicyInput struct { _ struct{} `type:"structure"` @@ -10808,6 +12581,17 @@ func (s *GetBucketPolicyInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyOutput type GetBucketPolicyOutput struct { _ struct{} `type:"structure" payload:"Policy"` @@ -10832,6 +12616,17 @@ func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Policy != nil { + v := *s.Policy + + e.SetStream(protocol.PayloadTarget, "Policy", protocol.StringStream(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplicationRequest type GetBucketReplicationInput struct { _ struct{} `type:"structure"` @@ -10876,6 +12671,17 @@ func (s *GetBucketReplicationInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketReplicationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplicationOutput type GetBucketReplicationOutput struct { _ struct{} `type:"structure" payload:"ReplicationConfiguration"` @@ -10901,6 +12707,17 @@ func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketReplicationOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ReplicationConfiguration != nil { + v := s.ReplicationConfiguration + + e.SetFields(protocol.PayloadTarget, "ReplicationConfiguration", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPaymentRequest type GetBucketRequestPaymentInput struct { _ struct{} `type:"structure"` @@ -10945,6 +12762,17 @@ func (s *GetBucketRequestPaymentInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketRequestPaymentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPaymentOutput type GetBucketRequestPaymentOutput struct { _ struct{} `type:"structure"` @@ -10969,6 +12797,17 @@ func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaym return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketRequestPaymentOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Payer != nil { + v := *s.Payer + + e.SetValue(protocol.BodyTarget, "Payer", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTaggingRequest type GetBucketTaggingInput struct { _ struct{} `type:"structure"` @@ -11013,6 +12852,17 @@ func (s *GetBucketTaggingInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketTaggingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTaggingOutput type GetBucketTaggingOutput struct { _ struct{} `type:"structure"` @@ -11037,6 +12887,17 @@ func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketTaggingOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.TagSet) > 0 { + v := s.TagSet + + e.SetList(protocol.BodyTarget, "TagSet", encodeTagList(v), protocol.Metadata{ListLocationName: "Tag"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioningRequest type GetBucketVersioningInput struct { _ struct{} `type:"structure"` @@ -11081,6 +12942,17 @@ func (s *GetBucketVersioningInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketVersioningInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioningOutput type GetBucketVersioningOutput struct { _ struct{} `type:"structure"` @@ -11116,6 +12988,22 @@ func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketVersioningOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.MFADelete != nil { + v := *s.MFADelete + + e.SetValue(protocol.BodyTarget, "MfaDelete", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsiteRequest type GetBucketWebsiteInput struct { _ struct{} `type:"structure"` @@ -11160,6 +13048,17 @@ func (s *GetBucketWebsiteInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketWebsiteInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsiteOutput type GetBucketWebsiteOutput struct { _ struct{} `type:"structure"` @@ -11207,6 +13106,32 @@ func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWeb return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetBucketWebsiteOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ErrorDocument != nil { + v := s.ErrorDocument + + e.SetFields(protocol.BodyTarget, "ErrorDocument", v, protocol.Metadata{}) + } + if s.IndexDocument != nil { + v := s.IndexDocument + + e.SetFields(protocol.BodyTarget, "IndexDocument", v, protocol.Metadata{}) + } + if s.RedirectAllRequestsTo != nil { + v := s.RedirectAllRequestsTo + + e.SetFields(protocol.BodyTarget, "RedirectAllRequestsTo", v, protocol.Metadata{}) + } + if len(s.RoutingRules) > 0 { + v := s.RoutingRules + + e.SetList(protocol.BodyTarget, "RoutingRules", encodeRoutingRuleList(v), protocol.Metadata{ListLocationName: "RoutingRule"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAclRequest type GetObjectAclInput struct { _ struct{} `type:"structure"` @@ -11287,6 +13212,32 @@ func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetObjectAclInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.QueryTarget, "versionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAclOutput type GetObjectAclOutput struct { _ struct{} `type:"structure"` @@ -11329,6 +13280,27 @@ func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetObjectAclOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Grants) > 0 { + v := s.Grants + + e.SetList(protocol.BodyTarget, "AccessControlList", encodeGrantList(v), protocol.Metadata{ListLocationName: "Grant"}) + } + if s.Owner != nil { + v := s.Owner + + e.SetFields(protocol.BodyTarget, "Owner", v, protocol.Metadata{}) + } + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRequest type GetObjectInput struct { _ struct{} `type:"structure"` @@ -11564,6 +13536,107 @@ func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IfMatch != nil { + v := *s.IfMatch + + e.SetValue(protocol.HeaderTarget, "If-Match", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IfModifiedSince != nil { + v := *s.IfModifiedSince + + e.SetValue(protocol.HeaderTarget, "If-Modified-Since", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if s.IfNoneMatch != nil { + v := *s.IfNoneMatch + + e.SetValue(protocol.HeaderTarget, "If-None-Match", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IfUnmodifiedSince != nil { + v := *s.IfUnmodifiedSince + + e.SetValue(protocol.HeaderTarget, "If-Unmodified-Since", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PartNumber != nil { + v := *s.PartNumber + + e.SetValue(protocol.QueryTarget, "partNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Range != nil { + v := *s.Range + + e.SetValue(protocol.HeaderTarget, "Range", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResponseCacheControl != nil { + v := *s.ResponseCacheControl + + e.SetValue(protocol.QueryTarget, "response-cache-control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResponseContentDisposition != nil { + v := *s.ResponseContentDisposition + + e.SetValue(protocol.QueryTarget, "response-content-disposition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResponseContentEncoding != nil { + v := *s.ResponseContentEncoding + + e.SetValue(protocol.QueryTarget, "response-content-encoding", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResponseContentLanguage != nil { + v := *s.ResponseContentLanguage + + e.SetValue(protocol.QueryTarget, "response-content-language", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResponseContentType != nil { + v := *s.ResponseContentType + + e.SetValue(protocol.QueryTarget, "response-content-type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResponseExpires != nil { + v := *s.ResponseExpires + + e.SetValue(protocol.QueryTarget, "response-expires", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.SSECustomerAlgorithm != nil { + v := *s.SSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKey != nil { + v := *s.SSECustomerKey + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKeyMD5 != nil { + v := *s.SSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.QueryTarget, "versionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectOutput type GetObjectOutput struct { _ struct{} `type:"structure" payload:"Body"` @@ -11848,6 +13921,148 @@ func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AcceptRanges != nil { + v := *s.AcceptRanges + + e.SetValue(protocol.HeaderTarget, "accept-ranges", protocol.StringValue(v), protocol.Metadata{}) + } + // Skipping Body Output type's body not valid. + if s.CacheControl != nil { + v := *s.CacheControl + + e.SetValue(protocol.HeaderTarget, "Cache-Control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentDisposition != nil { + v := *s.ContentDisposition + + e.SetValue(protocol.HeaderTarget, "Content-Disposition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentEncoding != nil { + v := *s.ContentEncoding + + e.SetValue(protocol.HeaderTarget, "Content-Encoding", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentLanguage != nil { + v := *s.ContentLanguage + + e.SetValue(protocol.HeaderTarget, "Content-Language", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentLength != nil { + v := *s.ContentLength + + e.SetValue(protocol.HeaderTarget, "Content-Length", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ContentRange != nil { + v := *s.ContentRange + + e.SetValue(protocol.HeaderTarget, "Content-Range", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeleteMarker != nil { + v := *s.DeleteMarker + + e.SetValue(protocol.HeaderTarget, "x-amz-delete-marker", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Expiration != nil { + v := *s.Expiration + + e.SetValue(protocol.HeaderTarget, "x-amz-expiration", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Expires != nil { + v := *s.Expires + + e.SetValue(protocol.HeaderTarget, "Expires", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModified != nil { + v := *s.LastModified + + e.SetValue(protocol.HeaderTarget, "Last-Modified", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if len(s.Metadata) > 0 { + v := s.Metadata + + e.SetMap(protocol.HeadersTarget, "x-amz-meta-", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.MissingMeta != nil { + v := *s.MissingMeta + + e.SetValue(protocol.HeaderTarget, "x-amz-missing-meta", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PartsCount != nil { + v := *s.PartsCount + + e.SetValue(protocol.HeaderTarget, "x-amz-mp-parts-count", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ReplicationStatus != nil { + v := *s.ReplicationStatus + + e.SetValue(protocol.HeaderTarget, "x-amz-replication-status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Restore != nil { + v := *s.Restore + + e.SetValue(protocol.HeaderTarget, "x-amz-restore", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerAlgorithm != nil { + v := *s.SSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKeyMD5 != nil { + v := *s.SSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSEKMSKeyId != nil { + v := *s.SSEKMSKeyId + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-aws-kms-key-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServerSideEncryption != nil { + v := *s.ServerSideEncryption + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StorageClass != nil { + v := *s.StorageClass + + e.SetValue(protocol.HeaderTarget, "x-amz-storage-class", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TagCount != nil { + v := *s.TagCount + + e.SetValue(protocol.HeaderTarget, "x-amz-tagging-count", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.HeaderTarget, "x-amz-version-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.WebsiteRedirectLocation != nil { + v := *s.WebsiteRedirectLocation + + e.SetValue(protocol.HeaderTarget, "x-amz-website-redirect-location", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTaggingRequest type GetObjectTaggingInput struct { _ struct{} `type:"structure"` @@ -11915,6 +14130,27 @@ func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetObjectTaggingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.QueryTarget, "versionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTaggingOutput type GetObjectTaggingOutput struct { _ struct{} `type:"structure"` @@ -11947,6 +14183,22 @@ func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetObjectTaggingOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.TagSet) > 0 { + v := s.TagSet + + e.SetList(protocol.BodyTarget, "TagSet", encodeTagList(v), protocol.Metadata{ListLocationName: "Tag"}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.HeaderTarget, "x-amz-version-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrentRequest type GetObjectTorrentInput struct { _ struct{} `type:"structure"` @@ -12018,6 +14270,27 @@ func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetObjectTorrentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrentOutput type GetObjectTorrentOutput struct { _ struct{} `type:"structure" payload:"Body"` @@ -12051,6 +14324,18 @@ func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetObjectTorrentOutput) MarshalFields(e protocol.FieldEncoder) error { + // Skipping Body Output type's body not valid. + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GlacierJobParameters type GlacierJobParameters struct { _ struct{} `type:"structure"` @@ -12090,6 +14375,17 @@ func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GlacierJobParameters) MarshalFields(e protocol.FieldEncoder) error { + if s.Tier != nil { + v := *s.Tier + + e.SetValue(protocol.BodyTarget, "Tier", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Grant type Grant struct { _ struct{} `type:"structure"` @@ -12137,6 +14433,35 @@ func (s *Grant) SetPermission(v string) *Grant { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Grant) MarshalFields(e protocol.FieldEncoder) error { + if s.Grantee != nil { + v := s.Grantee + attrs := make([]protocol.Attribute, 0, 1) + + if s.Grantee.Type != nil { + v := *s.Grantee.Type + attrs = append(attrs, protocol.Attribute{Name: "xsi:type", Value: protocol.StringValue(v), Meta: protocol.Metadata{}}) + } + e.SetFields(protocol.BodyTarget, "Grantee", v, protocol.Metadata{Attributes: attrs, XMLNamespacePrefix: "xsi", XMLNamespaceURI: "http://www.w3.org/2001/XMLSchema-instance"}) + } + if s.Permission != nil { + v := *s.Permission + + e.SetValue(protocol.BodyTarget, "Permission", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeGrantList(vs []*Grant) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Grantee type Grantee struct { _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"` @@ -12212,6 +14537,33 @@ func (s *Grantee) SetURI(v string) *Grantee { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Grantee) MarshalFields(e protocol.FieldEncoder) error { + if s.DisplayName != nil { + v := *s.DisplayName + + e.SetValue(protocol.BodyTarget, "DisplayName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EmailAddress != nil { + v := *s.EmailAddress + + e.SetValue(protocol.BodyTarget, "EmailAddress", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ID != nil { + v := *s.ID + + e.SetValue(protocol.BodyTarget, "ID", protocol.StringValue(v), protocol.Metadata{}) + } + // Skipping Type XML Attribute. + if s.URI != nil { + v := *s.URI + + e.SetValue(protocol.BodyTarget, "URI", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucketRequest type HeadBucketInput struct { _ struct{} `type:"structure"` @@ -12256,6 +14608,17 @@ func (s *HeadBucketInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HeadBucketInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucketOutput type HeadBucketOutput struct { _ struct{} `type:"structure"` @@ -12271,6 +14634,12 @@ func (s HeadBucketOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HeadBucketOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObjectRequest type HeadObjectInput struct { _ struct{} `type:"structure"` @@ -12441,16 +14810,87 @@ func (s *HeadObjectInput) getSSECustomerKey() (v string) { return *s.SSECustomerKey } -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput { - s.SSECustomerKeyMD5 = &v - return s -} +// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. +func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput { + s.SSECustomerKeyMD5 = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput { + s.VersionId = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HeadObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IfMatch != nil { + v := *s.IfMatch + + e.SetValue(protocol.HeaderTarget, "If-Match", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IfModifiedSince != nil { + v := *s.IfModifiedSince + + e.SetValue(protocol.HeaderTarget, "If-Modified-Since", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if s.IfNoneMatch != nil { + v := *s.IfNoneMatch + + e.SetValue(protocol.HeaderTarget, "If-None-Match", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IfUnmodifiedSince != nil { + v := *s.IfUnmodifiedSince + + e.SetValue(protocol.HeaderTarget, "If-Unmodified-Since", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PartNumber != nil { + v := *s.PartNumber + + e.SetValue(protocol.QueryTarget, "partNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Range != nil { + v := *s.Range + + e.SetValue(protocol.HeaderTarget, "Range", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerAlgorithm != nil { + v := *s.SSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKey != nil { + v := *s.SSECustomerKey + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKeyMD5 != nil { + v := *s.SSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.QueryTarget, "versionId", protocol.StringValue(v), protocol.Metadata{}) + } -// SetVersionId sets the VersionId field's value. -func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput { - s.VersionId = &v - return s + return nil } // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObjectOutput @@ -12710,6 +15150,137 @@ func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HeadObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AcceptRanges != nil { + v := *s.AcceptRanges + + e.SetValue(protocol.HeaderTarget, "accept-ranges", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CacheControl != nil { + v := *s.CacheControl + + e.SetValue(protocol.HeaderTarget, "Cache-Control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentDisposition != nil { + v := *s.ContentDisposition + + e.SetValue(protocol.HeaderTarget, "Content-Disposition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentEncoding != nil { + v := *s.ContentEncoding + + e.SetValue(protocol.HeaderTarget, "Content-Encoding", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentLanguage != nil { + v := *s.ContentLanguage + + e.SetValue(protocol.HeaderTarget, "Content-Language", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentLength != nil { + v := *s.ContentLength + + e.SetValue(protocol.HeaderTarget, "Content-Length", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeleteMarker != nil { + v := *s.DeleteMarker + + e.SetValue(protocol.HeaderTarget, "x-amz-delete-marker", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Expiration != nil { + v := *s.Expiration + + e.SetValue(protocol.HeaderTarget, "x-amz-expiration", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Expires != nil { + v := *s.Expires + + e.SetValue(protocol.HeaderTarget, "Expires", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModified != nil { + v := *s.LastModified + + e.SetValue(protocol.HeaderTarget, "Last-Modified", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if len(s.Metadata) > 0 { + v := s.Metadata + + e.SetMap(protocol.HeadersTarget, "x-amz-meta-", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.MissingMeta != nil { + v := *s.MissingMeta + + e.SetValue(protocol.HeaderTarget, "x-amz-missing-meta", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PartsCount != nil { + v := *s.PartsCount + + e.SetValue(protocol.HeaderTarget, "x-amz-mp-parts-count", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ReplicationStatus != nil { + v := *s.ReplicationStatus + + e.SetValue(protocol.HeaderTarget, "x-amz-replication-status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Restore != nil { + v := *s.Restore + + e.SetValue(protocol.HeaderTarget, "x-amz-restore", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerAlgorithm != nil { + v := *s.SSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKeyMD5 != nil { + v := *s.SSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSEKMSKeyId != nil { + v := *s.SSEKMSKeyId + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-aws-kms-key-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServerSideEncryption != nil { + v := *s.ServerSideEncryption + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StorageClass != nil { + v := *s.StorageClass + + e.SetValue(protocol.HeaderTarget, "x-amz-storage-class", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.HeaderTarget, "x-amz-version-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.WebsiteRedirectLocation != nil { + v := *s.WebsiteRedirectLocation + + e.SetValue(protocol.HeaderTarget, "x-amz-website-redirect-location", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/IndexDocument type IndexDocument struct { _ struct{} `type:"structure"` @@ -12752,6 +15323,17 @@ func (s *IndexDocument) SetSuffix(v string) *IndexDocument { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *IndexDocument) MarshalFields(e protocol.FieldEncoder) error { + if s.Suffix != nil { + v := *s.Suffix + + e.SetValue(protocol.BodyTarget, "Suffix", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Initiator type Initiator struct { _ struct{} `type:"structure"` @@ -12786,6 +15368,22 @@ func (s *Initiator) SetID(v string) *Initiator { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Initiator) MarshalFields(e protocol.FieldEncoder) error { + if s.DisplayName != nil { + v := *s.DisplayName + + e.SetValue(protocol.BodyTarget, "DisplayName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ID != nil { + v := *s.ID + + e.SetValue(protocol.BodyTarget, "ID", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryConfiguration type InventoryConfiguration struct { _ struct{} `type:"structure"` @@ -12915,6 +15513,55 @@ func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryCon return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InventoryConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.Destination != nil { + v := s.Destination + + e.SetFields(protocol.BodyTarget, "Destination", v, protocol.Metadata{}) + } + if s.Filter != nil { + v := s.Filter + + e.SetFields(protocol.BodyTarget, "Filter", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IncludedObjectVersions != nil { + v := *s.IncludedObjectVersions + + e.SetValue(protocol.BodyTarget, "IncludedObjectVersions", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsEnabled != nil { + v := *s.IsEnabled + + e.SetValue(protocol.BodyTarget, "IsEnabled", protocol.BoolValue(v), protocol.Metadata{}) + } + if len(s.OptionalFields) > 0 { + v := s.OptionalFields + + e.SetList(protocol.BodyTarget, "OptionalFields", protocol.EncodeStringList(v), protocol.Metadata{ListLocationName: "Field"}) + } + if s.Schedule != nil { + v := s.Schedule + + e.SetFields(protocol.BodyTarget, "Schedule", v, protocol.Metadata{}) + } + + return nil +} + +func encodeInventoryConfigurationList(vs []*InventoryConfiguration) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryDestination type InventoryDestination struct { _ struct{} `type:"structure"` @@ -12960,6 +15607,17 @@ func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestin return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InventoryDestination) MarshalFields(e protocol.FieldEncoder) error { + if s.S3BucketDestination != nil { + v := s.S3BucketDestination + + e.SetFields(protocol.BodyTarget, "S3BucketDestination", v, protocol.Metadata{}) + } + + return nil +} + // Contains the type of server-side encryption used to encrypt the inventory // results. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryEncryption @@ -13010,6 +15668,22 @@ func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InventoryEncryption) MarshalFields(e protocol.FieldEncoder) error { + if s.SSEKMS != nil { + v := s.SSEKMS + + e.SetFields(protocol.BodyTarget, "SSE-KMS", v, protocol.Metadata{}) + } + if s.SSES3 != nil { + v := s.SSES3 + + e.SetFields(protocol.BodyTarget, "SSE-S3", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryFilter type InventoryFilter struct { _ struct{} `type:"structure"` @@ -13049,6 +15723,17 @@ func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InventoryFilter) MarshalFields(e protocol.FieldEncoder) error { + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryS3BucketDestination type InventoryS3BucketDestination struct { _ struct{} `type:"structure"` @@ -13143,6 +15828,37 @@ func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDes return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InventoryS3BucketDestination) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.BodyTarget, "AccountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.BodyTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Encryption != nil { + v := s.Encryption + + e.SetFields(protocol.BodyTarget, "Encryption", v, protocol.Metadata{}) + } + if s.Format != nil { + v := *s.Format + + e.SetValue(protocol.BodyTarget, "Format", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventorySchedule type InventorySchedule struct { _ struct{} `type:"structure"` @@ -13182,6 +15898,17 @@ func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InventorySchedule) MarshalFields(e protocol.FieldEncoder) error { + if s.Frequency != nil { + v := *s.Frequency + + e.SetValue(protocol.BodyTarget, "Frequency", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Container for object key name prefix and suffix filtering rules. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/S3KeyFilter type KeyFilter struct { @@ -13208,6 +15935,17 @@ func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *KeyFilter) MarshalFields(e protocol.FieldEncoder) error { + if len(s.FilterRules) > 0 { + v := s.FilterRules + + e.SetList(protocol.BodyTarget, "FilterRule", encodeFilterRuleList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // Container for specifying the AWS Lambda notification configuration. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LambdaFunctionConfiguration type LambdaFunctionConfiguration struct { @@ -13281,6 +16019,40 @@ func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LambdaFunctionConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Events) > 0 { + v := s.Events + + e.SetList(protocol.BodyTarget, "Event", protocol.EncodeStringList(v), protocol.Metadata{Flatten: true}) + } + if s.Filter != nil { + v := s.Filter + + e.SetFields(protocol.BodyTarget, "Filter", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LambdaFunctionArn != nil { + v := *s.LambdaFunctionArn + + e.SetValue(protocol.BodyTarget, "CloudFunction", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeLambdaFunctionConfigurationList(vs []*LambdaFunctionConfiguration) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleConfiguration type LifecycleConfiguration struct { _ struct{} `type:"structure"` @@ -13328,6 +16100,17 @@ func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LifecycleConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Rules) > 0 { + v := s.Rules + + e.SetList(protocol.BodyTarget, "Rule", encodeRuleList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleExpiration type LifecycleExpiration struct { _ struct{} `type:"structure"` @@ -13375,6 +16158,27 @@ func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LifecycleExpiration) MarshalFields(e protocol.FieldEncoder) error { + if s.Date != nil { + v := *s.Date + + e.SetValue(protocol.BodyTarget, "Date", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.Days != nil { + v := *s.Days + + e.SetValue(protocol.BodyTarget, "Days", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ExpiredObjectDeleteMarker != nil { + v := *s.ExpiredObjectDeleteMarker + + e.SetValue(protocol.BodyTarget, "ExpiredObjectDeleteMarker", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRule type LifecycleRule struct { _ struct{} `type:"structure"` @@ -13496,6 +16300,65 @@ func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LifecycleRule) MarshalFields(e protocol.FieldEncoder) error { + if s.AbortIncompleteMultipartUpload != nil { + v := s.AbortIncompleteMultipartUpload + + e.SetFields(protocol.BodyTarget, "AbortIncompleteMultipartUpload", v, protocol.Metadata{}) + } + if s.Expiration != nil { + v := s.Expiration + + e.SetFields(protocol.BodyTarget, "Expiration", v, protocol.Metadata{}) + } + if s.Filter != nil { + v := s.Filter + + e.SetFields(protocol.BodyTarget, "Filter", v, protocol.Metadata{}) + } + if s.ID != nil { + v := *s.ID + + e.SetValue(protocol.BodyTarget, "ID", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NoncurrentVersionExpiration != nil { + v := s.NoncurrentVersionExpiration + + e.SetFields(protocol.BodyTarget, "NoncurrentVersionExpiration", v, protocol.Metadata{}) + } + if len(s.NoncurrentVersionTransitions) > 0 { + v := s.NoncurrentVersionTransitions + + e.SetList(protocol.BodyTarget, "NoncurrentVersionTransition", encodeNoncurrentVersionTransitionList(v), protocol.Metadata{Flatten: true}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Transitions) > 0 { + v := s.Transitions + + e.SetList(protocol.BodyTarget, "Transition", encodeTransitionList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + +func encodeLifecycleRuleList(vs []*LifecycleRule) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // This is used in a Lifecycle Rule Filter to apply a logical AND to two or // more predicates. The Lifecycle Rule will apply to any object matching all // of the predicates configured inside the And operator. @@ -13552,6 +16415,22 @@ func (s *LifecycleRuleAndOperator) SetTags(v []*Tag) *LifecycleRuleAndOperator { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LifecycleRuleAndOperator) MarshalFields(e protocol.FieldEncoder) error { + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Tags) > 0 { + v := s.Tags + + e.SetList(protocol.BodyTarget, "Tag", encodeTagList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // The Filter is used to identify objects that a Lifecycle Rule applies to. // A Filter must have exactly one of Prefix, Tag, or And specified. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRuleFilter @@ -13618,6 +16497,27 @@ func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LifecycleRuleFilter) MarshalFields(e protocol.FieldEncoder) error { + if s.And != nil { + v := s.And + + e.SetFields(protocol.BodyTarget, "And", v, protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Tag != nil { + v := s.Tag + + e.SetFields(protocol.BodyTarget, "Tag", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurationsRequest type ListBucketAnalyticsConfigurationsInput struct { _ struct{} `type:"structure"` @@ -13674,6 +16574,22 @@ func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListBucketAnalyticsConfigurationsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContinuationToken != nil { + v := *s.ContinuationToken + + e.SetValue(protocol.QueryTarget, "continuation-token", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurationsOutput type ListBucketAnalyticsConfigurationsOutput struct { _ struct{} `type:"structure"` @@ -13723,10 +16639,36 @@ func (s *ListBucketAnalyticsConfigurationsOutput) SetIsTruncated(v bool) *ListBu return s } -// SetNextContinuationToken sets the NextContinuationToken field's value. -func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput { - s.NextContinuationToken = &v - return s +// SetNextContinuationToken sets the NextContinuationToken field's value. +func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput { + s.NextContinuationToken = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListBucketAnalyticsConfigurationsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.AnalyticsConfigurationList) > 0 { + v := s.AnalyticsConfigurationList + + e.SetList(protocol.BodyTarget, "AnalyticsConfiguration", encodeAnalyticsConfigurationList(v), protocol.Metadata{Flatten: true}) + } + if s.ContinuationToken != nil { + v := *s.ContinuationToken + + e.SetValue(protocol.BodyTarget, "ContinuationToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.NextContinuationToken != nil { + v := *s.NextContinuationToken + + e.SetValue(protocol.BodyTarget, "NextContinuationToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil } // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurationsRequest @@ -13787,6 +16729,22 @@ func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListBucketInventoryConfigurationsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContinuationToken != nil { + v := *s.ContinuationToken + + e.SetValue(protocol.QueryTarget, "continuation-token", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurationsOutput type ListBucketInventoryConfigurationsOutput struct { _ struct{} `type:"structure"` @@ -13842,6 +16800,32 @@ func (s *ListBucketInventoryConfigurationsOutput) SetNextContinuationToken(v str return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListBucketInventoryConfigurationsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ContinuationToken != nil { + v := *s.ContinuationToken + + e.SetValue(protocol.BodyTarget, "ContinuationToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.InventoryConfigurationList) > 0 { + v := s.InventoryConfigurationList + + e.SetList(protocol.BodyTarget, "InventoryConfiguration", encodeInventoryConfigurationList(v), protocol.Metadata{Flatten: true}) + } + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.NextContinuationToken != nil { + v := *s.NextContinuationToken + + e.SetValue(protocol.BodyTarget, "NextContinuationToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurationsRequest type ListBucketMetricsConfigurationsInput struct { _ struct{} `type:"structure"` @@ -13900,6 +16884,22 @@ func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *L return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListBucketMetricsConfigurationsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContinuationToken != nil { + v := *s.ContinuationToken + + e.SetValue(protocol.QueryTarget, "continuation-token", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurationsOutput type ListBucketMetricsConfigurationsOutput struct { _ struct{} `type:"structure"` @@ -13957,6 +16957,32 @@ func (s *ListBucketMetricsConfigurationsOutput) SetNextContinuationToken(v strin return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListBucketMetricsConfigurationsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ContinuationToken != nil { + v := *s.ContinuationToken + + e.SetValue(protocol.BodyTarget, "ContinuationToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if len(s.MetricsConfigurationList) > 0 { + v := s.MetricsConfigurationList + + e.SetList(protocol.BodyTarget, "MetricsConfiguration", encodeMetricsConfigurationList(v), protocol.Metadata{Flatten: true}) + } + if s.NextContinuationToken != nil { + v := *s.NextContinuationToken + + e.SetValue(protocol.BodyTarget, "NextContinuationToken", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketsInput type ListBucketsInput struct { _ struct{} `type:"structure"` @@ -13972,6 +16998,12 @@ func (s ListBucketsInput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListBucketsInput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketsOutput type ListBucketsOutput struct { _ struct{} `type:"structure"` @@ -14003,6 +17035,22 @@ func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListBucketsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Buckets) > 0 { + v := s.Buckets + + e.SetList(protocol.BodyTarget, "Buckets", encodeBucketList(v), protocol.Metadata{ListLocationName: "Bucket"}) + } + if s.Owner != nil { + v := s.Owner + + e.SetFields(protocol.BodyTarget, "Owner", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploadsRequest type ListMultipartUploadsInput struct { _ struct{} `type:"structure"` @@ -14112,6 +17160,47 @@ func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListMultipartUploadsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Delimiter != nil { + v := *s.Delimiter + + e.SetValue(protocol.QueryTarget, "delimiter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EncodingType != nil { + v := *s.EncodingType + + e.SetValue(protocol.QueryTarget, "encoding-type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyMarker != nil { + v := *s.KeyMarker + + e.SetValue(protocol.QueryTarget, "key-marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxUploads != nil { + v := *s.MaxUploads + + e.SetValue(protocol.QueryTarget, "max-uploads", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.QueryTarget, "prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UploadIdMarker != nil { + v := *s.UploadIdMarker + + e.SetValue(protocol.QueryTarget, "upload-id-marker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploadsOutput type ListMultipartUploadsOutput struct { _ struct{} `type:"structure"` @@ -14246,6 +17335,72 @@ func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMulti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListMultipartUploadsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.BodyTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.CommonPrefixes) > 0 { + v := s.CommonPrefixes + + e.SetList(protocol.BodyTarget, "CommonPrefixes", encodeCommonPrefixList(v), protocol.Metadata{Flatten: true}) + } + if s.Delimiter != nil { + v := *s.Delimiter + + e.SetValue(protocol.BodyTarget, "Delimiter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EncodingType != nil { + v := *s.EncodingType + + e.SetValue(protocol.BodyTarget, "EncodingType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.KeyMarker != nil { + v := *s.KeyMarker + + e.SetValue(protocol.BodyTarget, "KeyMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxUploads != nil { + v := *s.MaxUploads + + e.SetValue(protocol.BodyTarget, "MaxUploads", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextKeyMarker != nil { + v := *s.NextKeyMarker + + e.SetValue(protocol.BodyTarget, "NextKeyMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextUploadIdMarker != nil { + v := *s.NextUploadIdMarker + + e.SetValue(protocol.BodyTarget, "NextUploadIdMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UploadIdMarker != nil { + v := *s.UploadIdMarker + + e.SetValue(protocol.BodyTarget, "UploadIdMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Uploads) > 0 { + v := s.Uploads + + e.SetList(protocol.BodyTarget, "Upload", encodeMultipartUploadList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersionsRequest type ListObjectVersionsInput struct { _ struct{} `type:"structure"` @@ -14350,6 +17505,47 @@ func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Delimiter != nil { + v := *s.Delimiter + + e.SetValue(protocol.QueryTarget, "delimiter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EncodingType != nil { + v := *s.EncodingType + + e.SetValue(protocol.QueryTarget, "encoding-type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.KeyMarker != nil { + v := *s.KeyMarker + + e.SetValue(protocol.QueryTarget, "key-marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxKeys != nil { + v := *s.MaxKeys + + e.SetValue(protocol.QueryTarget, "max-keys", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.QueryTarget, "prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionIdMarker != nil { + v := *s.VersionIdMarker + + e.SetValue(protocol.QueryTarget, "version-id-marker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersionsOutput type ListObjectVersionsOutput struct { _ struct{} `type:"structure"` @@ -14478,6 +17674,77 @@ func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.CommonPrefixes) > 0 { + v := s.CommonPrefixes + + e.SetList(protocol.BodyTarget, "CommonPrefixes", encodeCommonPrefixList(v), protocol.Metadata{Flatten: true}) + } + if len(s.DeleteMarkers) > 0 { + v := s.DeleteMarkers + + e.SetList(protocol.BodyTarget, "DeleteMarker", encodeDeleteMarkerEntryList(v), protocol.Metadata{Flatten: true}) + } + if s.Delimiter != nil { + v := *s.Delimiter + + e.SetValue(protocol.BodyTarget, "Delimiter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EncodingType != nil { + v := *s.EncodingType + + e.SetValue(protocol.BodyTarget, "EncodingType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.KeyMarker != nil { + v := *s.KeyMarker + + e.SetValue(protocol.BodyTarget, "KeyMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxKeys != nil { + v := *s.MaxKeys + + e.SetValue(protocol.BodyTarget, "MaxKeys", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextKeyMarker != nil { + v := *s.NextKeyMarker + + e.SetValue(protocol.BodyTarget, "NextKeyMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextVersionIdMarker != nil { + v := *s.NextVersionIdMarker + + e.SetValue(protocol.BodyTarget, "NextVersionIdMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionIdMarker != nil { + v := *s.VersionIdMarker + + e.SetValue(protocol.BodyTarget, "VersionIdMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Versions) > 0 { + v := s.Versions + + e.SetList(protocol.BodyTarget, "Version", encodeObjectVersionList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsRequest type ListObjectsInput struct { _ struct{} `type:"structure"` @@ -14584,6 +17851,47 @@ func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Delimiter != nil { + v := *s.Delimiter + + e.SetValue(protocol.QueryTarget, "delimiter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EncodingType != nil { + v := *s.EncodingType + + e.SetValue(protocol.QueryTarget, "encoding-type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxKeys != nil { + v := *s.MaxKeys + + e.SetValue(protocol.QueryTarget, "max-keys", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.QueryTarget, "prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsOutput type ListObjectsOutput struct { _ struct{} `type:"structure"` @@ -14689,6 +17997,62 @@ func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.CommonPrefixes) > 0 { + v := s.CommonPrefixes + + e.SetList(protocol.BodyTarget, "CommonPrefixes", encodeCommonPrefixList(v), protocol.Metadata{Flatten: true}) + } + if len(s.Contents) > 0 { + v := s.Contents + + e.SetList(protocol.BodyTarget, "Contents", encodeObjectList(v), protocol.Metadata{Flatten: true}) + } + if s.Delimiter != nil { + v := *s.Delimiter + + e.SetValue(protocol.BodyTarget, "Delimiter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EncodingType != nil { + v := *s.EncodingType + + e.SetValue(protocol.BodyTarget, "EncodingType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxKeys != nil { + v := *s.MaxKeys + + e.SetValue(protocol.BodyTarget, "MaxKeys", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextMarker != nil { + v := *s.NextMarker + + e.SetValue(protocol.BodyTarget, "NextMarker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2Request type ListObjectsV2Input struct { _ struct{} `type:"structure"` @@ -14815,6 +18179,57 @@ func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectsV2Input) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContinuationToken != nil { + v := *s.ContinuationToken + + e.SetValue(protocol.QueryTarget, "continuation-token", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Delimiter != nil { + v := *s.Delimiter + + e.SetValue(protocol.QueryTarget, "delimiter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EncodingType != nil { + v := *s.EncodingType + + e.SetValue(protocol.QueryTarget, "encoding-type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FetchOwner != nil { + v := *s.FetchOwner + + e.SetValue(protocol.QueryTarget, "fetch-owner", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.MaxKeys != nil { + v := *s.MaxKeys + + e.SetValue(protocol.QueryTarget, "max-keys", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.QueryTarget, "prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartAfter != nil { + v := *s.StartAfter + + e.SetValue(protocol.QueryTarget, "start-after", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2Output type ListObjectsV2Output struct { _ struct{} `type:"structure"` @@ -14949,6 +18364,72 @@ func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListObjectsV2Output) MarshalFields(e protocol.FieldEncoder) error { + if len(s.CommonPrefixes) > 0 { + v := s.CommonPrefixes + + e.SetList(protocol.BodyTarget, "CommonPrefixes", encodeCommonPrefixList(v), protocol.Metadata{Flatten: true}) + } + if len(s.Contents) > 0 { + v := s.Contents + + e.SetList(protocol.BodyTarget, "Contents", encodeObjectList(v), protocol.Metadata{Flatten: true}) + } + if s.ContinuationToken != nil { + v := *s.ContinuationToken + + e.SetValue(protocol.BodyTarget, "ContinuationToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Delimiter != nil { + v := *s.Delimiter + + e.SetValue(protocol.BodyTarget, "Delimiter", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EncodingType != nil { + v := *s.EncodingType + + e.SetValue(protocol.BodyTarget, "EncodingType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.KeyCount != nil { + v := *s.KeyCount + + e.SetValue(protocol.BodyTarget, "KeyCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.MaxKeys != nil { + v := *s.MaxKeys + + e.SetValue(protocol.BodyTarget, "MaxKeys", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextContinuationToken != nil { + v := *s.NextContinuationToken + + e.SetValue(protocol.BodyTarget, "NextContinuationToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartAfter != nil { + v := *s.StartAfter + + e.SetValue(protocol.BodyTarget, "StartAfter", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListPartsRequest type ListPartsInput struct { _ struct{} `type:"structure"` @@ -15053,6 +18534,42 @@ func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPartsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxParts != nil { + v := *s.MaxParts + + e.SetValue(protocol.QueryTarget, "max-parts", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.PartNumberMarker != nil { + v := *s.PartNumberMarker + + e.SetValue(protocol.QueryTarget, "part-number-marker", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UploadId != nil { + v := *s.UploadId + + e.SetValue(protocol.QueryTarget, "uploadId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListPartsOutput type ListPartsOutput struct { _ struct{} `type:"structure"` @@ -15203,6 +18720,82 @@ func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ListPartsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.AbortDate != nil { + v := *s.AbortDate + + e.SetValue(protocol.HeaderTarget, "x-amz-abort-date", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if s.AbortRuleId != nil { + v := *s.AbortRuleId + + e.SetValue(protocol.HeaderTarget, "x-amz-abort-rule-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.BodyTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Initiator != nil { + v := s.Initiator + + e.SetFields(protocol.BodyTarget, "Initiator", v, protocol.Metadata{}) + } + if s.IsTruncated != nil { + v := *s.IsTruncated + + e.SetValue(protocol.BodyTarget, "IsTruncated", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MaxParts != nil { + v := *s.MaxParts + + e.SetValue(protocol.BodyTarget, "MaxParts", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.NextPartNumberMarker != nil { + v := *s.NextPartNumberMarker + + e.SetValue(protocol.BodyTarget, "NextPartNumberMarker", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Owner != nil { + v := s.Owner + + e.SetFields(protocol.BodyTarget, "Owner", v, protocol.Metadata{}) + } + if s.PartNumberMarker != nil { + v := *s.PartNumberMarker + + e.SetValue(protocol.BodyTarget, "PartNumberMarker", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Parts) > 0 { + v := s.Parts + + e.SetList(protocol.BodyTarget, "Part", encodePartList(v), protocol.Metadata{Flatten: true}) + } + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StorageClass != nil { + v := *s.StorageClass + + e.SetValue(protocol.BodyTarget, "StorageClass", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UploadId != nil { + v := *s.UploadId + + e.SetValue(protocol.BodyTarget, "UploadId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LoggingEnabled type LoggingEnabled struct { _ struct{} `type:"structure"` @@ -15270,6 +18863,27 @@ func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *LoggingEnabled) MarshalFields(e protocol.FieldEncoder) error { + if s.TargetBucket != nil { + v := *s.TargetBucket + + e.SetValue(protocol.BodyTarget, "TargetBucket", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TargetGrants) > 0 { + v := s.TargetGrants + + e.SetList(protocol.BodyTarget, "TargetGrants", encodeTargetGrantList(v), protocol.Metadata{ListLocationName: "Grant"}) + } + if s.TargetPrefix != nil { + v := *s.TargetPrefix + + e.SetValue(protocol.BodyTarget, "TargetPrefix", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsAndOperator type MetricsAndOperator struct { _ struct{} `type:"structure"` @@ -15323,6 +18937,22 @@ func (s *MetricsAndOperator) SetTags(v []*Tag) *MetricsAndOperator { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MetricsAndOperator) MarshalFields(e protocol.FieldEncoder) error { + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Tags) > 0 { + v := s.Tags + + e.SetList(protocol.BodyTarget, "Tag", encodeTagList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsConfiguration type MetricsConfiguration struct { _ struct{} `type:"structure"` @@ -15378,6 +19008,30 @@ func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MetricsConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.Filter != nil { + v := s.Filter + + e.SetFields(protocol.BodyTarget, "Filter", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeMetricsConfigurationList(vs []*MetricsConfiguration) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsFilter type MetricsFilter struct { _ struct{} `type:"structure"` @@ -15442,6 +19096,27 @@ func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MetricsFilter) MarshalFields(e protocol.FieldEncoder) error { + if s.And != nil { + v := s.And + + e.SetFields(protocol.BodyTarget, "And", v, protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Tag != nil { + v := s.Tag + + e.SetFields(protocol.BodyTarget, "Tag", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MultipartUpload type MultipartUpload struct { _ struct{} `type:"structure"` @@ -15510,6 +19185,50 @@ func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *MultipartUpload) MarshalFields(e protocol.FieldEncoder) error { + if s.Initiated != nil { + v := *s.Initiated + + e.SetValue(protocol.BodyTarget, "Initiated", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.Initiator != nil { + v := s.Initiator + + e.SetFields(protocol.BodyTarget, "Initiator", v, protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Owner != nil { + v := s.Owner + + e.SetFields(protocol.BodyTarget, "Owner", v, protocol.Metadata{}) + } + if s.StorageClass != nil { + v := *s.StorageClass + + e.SetValue(protocol.BodyTarget, "StorageClass", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UploadId != nil { + v := *s.UploadId + + e.SetValue(protocol.BodyTarget, "UploadId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeMultipartUploadList(vs []*MultipartUpload) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Specifies when noncurrent object versions expire. Upon expiration, Amazon // S3 permanently deletes the noncurrent object versions. You set this lifecycle // configuration action on a bucket that has versioning enabled (or suspended) @@ -15542,6 +19261,17 @@ func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVers return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *NoncurrentVersionExpiration) MarshalFields(e protocol.FieldEncoder) error { + if s.NoncurrentDays != nil { + v := *s.NoncurrentDays + + e.SetValue(protocol.BodyTarget, "NoncurrentDays", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Container for the transition rule that describes when noncurrent objects // transition to the STANDARD_IA or GLACIER storage class. If your bucket is // versioning-enabled (or versioning is suspended), you can set this action @@ -15583,6 +19313,30 @@ func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *NoncurrentVersionTransition) MarshalFields(e protocol.FieldEncoder) error { + if s.NoncurrentDays != nil { + v := *s.NoncurrentDays + + e.SetValue(protocol.BodyTarget, "NoncurrentDays", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StorageClass != nil { + v := *s.StorageClass + + e.SetValue(protocol.BodyTarget, "StorageClass", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeNoncurrentVersionTransitionList(vs []*NoncurrentVersionTransition) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Container for specifying the notification configuration of the bucket. If // this element is empty, notifications are turned off on the bucket. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfiguration @@ -15664,6 +19418,27 @@ func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfigurati return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *NotificationConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if len(s.LambdaFunctionConfigurations) > 0 { + v := s.LambdaFunctionConfigurations + + e.SetList(protocol.BodyTarget, "CloudFunctionConfiguration", encodeLambdaFunctionConfigurationList(v), protocol.Metadata{Flatten: true}) + } + if len(s.QueueConfigurations) > 0 { + v := s.QueueConfigurations + + e.SetList(protocol.BodyTarget, "QueueConfiguration", encodeQueueConfigurationList(v), protocol.Metadata{Flatten: true}) + } + if len(s.TopicConfigurations) > 0 { + v := s.TopicConfigurations + + e.SetList(protocol.BodyTarget, "TopicConfiguration", encodeTopicConfigurationList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfigurationDeprecated type NotificationConfigurationDeprecated struct { _ struct{} `type:"structure"` @@ -15703,6 +19478,27 @@ func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConf return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *NotificationConfigurationDeprecated) MarshalFields(e protocol.FieldEncoder) error { + if s.CloudFunctionConfiguration != nil { + v := s.CloudFunctionConfiguration + + e.SetFields(protocol.BodyTarget, "CloudFunctionConfiguration", v, protocol.Metadata{}) + } + if s.QueueConfiguration != nil { + v := s.QueueConfiguration + + e.SetFields(protocol.BodyTarget, "QueueConfiguration", v, protocol.Metadata{}) + } + if s.TopicConfiguration != nil { + v := s.TopicConfiguration + + e.SetFields(protocol.BodyTarget, "TopicConfiguration", v, protocol.Metadata{}) + } + + return nil +} + // Container for object key name filtering rules. For information about key // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfigurationFilter @@ -15729,6 +19525,17 @@ func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConf return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *NotificationConfigurationFilter) MarshalFields(e protocol.FieldEncoder) error { + if s.Key != nil { + v := s.Key + + e.SetFields(protocol.BodyTarget, "S3Key", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Object type Object struct { _ struct{} `type:"structure"` @@ -15793,6 +19600,50 @@ func (s *Object) SetStorageClass(v string) *Object { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Object) MarshalFields(e protocol.FieldEncoder) error { + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.BodyTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModified != nil { + v := *s.LastModified + + e.SetValue(protocol.BodyTarget, "LastModified", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.Owner != nil { + v := s.Owner + + e.SetFields(protocol.BodyTarget, "Owner", v, protocol.Metadata{}) + } + if s.Size != nil { + v := *s.Size + + e.SetValue(protocol.BodyTarget, "Size", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StorageClass != nil { + v := *s.StorageClass + + e.SetValue(protocol.BodyTarget, "StorageClass", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeObjectList(vs []*Object) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ObjectIdentifier type ObjectIdentifier struct { _ struct{} `type:"structure"` @@ -15844,6 +19695,30 @@ func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ObjectIdentifier) MarshalFields(e protocol.FieldEncoder) error { + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.BodyTarget, "VersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeObjectIdentifierList(vs []*ObjectIdentifier) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ObjectVersion type ObjectVersion struct { _ struct{} `type:"structure"` @@ -15930,6 +19805,60 @@ func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ObjectVersion) MarshalFields(e protocol.FieldEncoder) error { + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.BodyTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsLatest != nil { + v := *s.IsLatest + + e.SetValue(protocol.BodyTarget, "IsLatest", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModified != nil { + v := *s.LastModified + + e.SetValue(protocol.BodyTarget, "LastModified", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.Owner != nil { + v := s.Owner + + e.SetFields(protocol.BodyTarget, "Owner", v, protocol.Metadata{}) + } + if s.Size != nil { + v := *s.Size + + e.SetValue(protocol.BodyTarget, "Size", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StorageClass != nil { + v := *s.StorageClass + + e.SetValue(protocol.BodyTarget, "StorageClass", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.BodyTarget, "VersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeObjectVersionList(vs []*ObjectVersion) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Owner type Owner struct { _ struct{} `type:"structure"` @@ -15961,6 +19890,22 @@ func (s *Owner) SetID(v string) *Owner { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Owner) MarshalFields(e protocol.FieldEncoder) error { + if s.DisplayName != nil { + v := *s.DisplayName + + e.SetValue(protocol.BodyTarget, "DisplayName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ID != nil { + v := *s.ID + + e.SetValue(protocol.BodyTarget, "ID", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Part type Part struct { _ struct{} `type:"structure"` @@ -16013,6 +19958,40 @@ func (s *Part) SetSize(v int64) *Part { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Part) MarshalFields(e protocol.FieldEncoder) error { + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.BodyTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LastModified != nil { + v := *s.LastModified + + e.SetValue(protocol.BodyTarget, "LastModified", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.PartNumber != nil { + v := *s.PartNumber + + e.SetValue(protocol.BodyTarget, "PartNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Size != nil { + v := *s.Size + + e.SetValue(protocol.BodyTarget, "Size", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodePartList(vs []*Part) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfigurationRequest type PutBucketAccelerateConfigurationInput struct { _ struct{} `type:"structure" payload:"AccelerateConfiguration"` @@ -16073,6 +20052,22 @@ func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) { return *s.Bucket } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketAccelerateConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AccelerateConfiguration != nil { + v := s.AccelerateConfiguration + + e.SetFields(protocol.PayloadTarget, "AccelerateConfiguration", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfigurationOutput type PutBucketAccelerateConfigurationOutput struct { _ struct{} `type:"structure"` @@ -16088,6 +20083,12 @@ func (s PutBucketAccelerateConfigurationOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketAccelerateConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAclRequest type PutBucketAclInput struct { _ struct{} `type:"structure" payload:"AccessControlPolicy"` @@ -16200,6 +20201,52 @@ func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketAclInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ACL != nil { + v := *s.ACL + + e.SetValue(protocol.HeaderTarget, "x-amz-acl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AccessControlPolicy != nil { + v := s.AccessControlPolicy + + e.SetFields(protocol.PayloadTarget, "AccessControlPolicy", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantFullControl != nil { + v := *s.GrantFullControl + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-full-control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantRead != nil { + v := *s.GrantRead + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-read", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantReadACP != nil { + v := *s.GrantReadACP + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-read-acp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantWrite != nil { + v := *s.GrantWrite + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-write", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantWriteACP != nil { + v := *s.GrantWriteACP + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-write-acp", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAclOutput type PutBucketAclOutput struct { _ struct{} `type:"structure"` @@ -16215,6 +20262,12 @@ func (s PutBucketAclOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketAclOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfigurationRequest type PutBucketAnalyticsConfigurationInput struct { _ struct{} `type:"structure" payload:"AnalyticsConfiguration"` @@ -16294,6 +20347,27 @@ func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyti return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketAnalyticsConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AnalyticsConfiguration != nil { + v := s.AnalyticsConfiguration + + e.SetFields(protocol.PayloadTarget, "AnalyticsConfiguration", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.QueryTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfigurationOutput type PutBucketAnalyticsConfigurationOutput struct { _ struct{} `type:"structure"` @@ -16309,6 +20383,12 @@ func (s PutBucketAnalyticsConfigurationOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketAnalyticsConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCorsRequest type PutBucketCorsInput struct { _ struct{} `type:"structure" payload:"CORSConfiguration"` @@ -16370,6 +20450,22 @@ func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBuck return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketCorsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CORSConfiguration != nil { + v := s.CORSConfiguration + + e.SetFields(protocol.PayloadTarget, "CORSConfiguration", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCorsOutput type PutBucketCorsOutput struct { _ struct{} `type:"structure"` @@ -16385,6 +20481,12 @@ func (s PutBucketCorsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketCorsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryptionRequest type PutBucketEncryptionInput struct { _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"` @@ -16452,6 +20554,22 @@ func (s *PutBucketEncryptionInput) SetServerSideEncryptionConfiguration(v *Serve return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketEncryptionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServerSideEncryptionConfiguration != nil { + v := s.ServerSideEncryptionConfiguration + + e.SetFields(protocol.PayloadTarget, "ServerSideEncryptionConfiguration", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryptionOutput type PutBucketEncryptionOutput struct { _ struct{} `type:"structure"` @@ -16467,6 +20585,12 @@ func (s PutBucketEncryptionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketEncryptionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfigurationRequest type PutBucketInventoryConfigurationInput struct { _ struct{} `type:"structure" payload:"InventoryConfiguration"` @@ -16546,6 +20670,27 @@ func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *Inve return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketInventoryConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.QueryTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.InventoryConfiguration != nil { + v := s.InventoryConfiguration + + e.SetFields(protocol.PayloadTarget, "InventoryConfiguration", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfigurationOutput type PutBucketInventoryConfigurationOutput struct { _ struct{} `type:"structure"` @@ -16561,6 +20706,12 @@ func (s PutBucketInventoryConfigurationOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketInventoryConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfigurationRequest type PutBucketLifecycleConfigurationInput struct { _ struct{} `type:"structure" payload:"LifecycleConfiguration"` @@ -16618,6 +20769,22 @@ func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *Buck return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketLifecycleConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LifecycleConfiguration != nil { + v := s.LifecycleConfiguration + + e.SetFields(protocol.PayloadTarget, "LifecycleConfiguration", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfigurationOutput type PutBucketLifecycleConfigurationOutput struct { _ struct{} `type:"structure"` @@ -16633,6 +20800,12 @@ func (s PutBucketLifecycleConfigurationOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketLifecycleConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleRequest type PutBucketLifecycleInput struct { _ struct{} `type:"structure" payload:"LifecycleConfiguration"` @@ -16690,6 +20863,22 @@ func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfigur return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketLifecycleInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.LifecycleConfiguration != nil { + v := s.LifecycleConfiguration + + e.SetFields(protocol.PayloadTarget, "LifecycleConfiguration", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleOutput type PutBucketLifecycleOutput struct { _ struct{} `type:"structure"` @@ -16705,6 +20894,12 @@ func (s PutBucketLifecycleOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketLifecycleOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLoggingRequest type PutBucketLoggingInput struct { _ struct{} `type:"structure" payload:"BucketLoggingStatus"` @@ -16766,6 +20961,22 @@ func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) * return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketLoggingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.BucketLoggingStatus != nil { + v := s.BucketLoggingStatus + + e.SetFields(protocol.PayloadTarget, "BucketLoggingStatus", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLoggingOutput type PutBucketLoggingOutput struct { _ struct{} `type:"structure"` @@ -16781,6 +20992,12 @@ func (s PutBucketLoggingOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketLoggingOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfigurationRequest type PutBucketMetricsConfigurationInput struct { _ struct{} `type:"structure" payload:"MetricsConfiguration"` @@ -16860,6 +21077,27 @@ func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsC return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketMetricsConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.QueryTarget, "id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MetricsConfiguration != nil { + v := s.MetricsConfiguration + + e.SetFields(protocol.PayloadTarget, "MetricsConfiguration", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfigurationOutput type PutBucketMetricsConfigurationOutput struct { _ struct{} `type:"structure"` @@ -16875,6 +21113,12 @@ func (s PutBucketMetricsConfigurationOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketMetricsConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfigurationRequest type PutBucketNotificationConfigurationInput struct { _ struct{} `type:"structure" payload:"NotificationConfiguration"` @@ -16939,6 +21183,22 @@ func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketNotificationConfigurationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NotificationConfiguration != nil { + v := s.NotificationConfiguration + + e.SetFields(protocol.PayloadTarget, "NotificationConfiguration", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfigurationOutput type PutBucketNotificationConfigurationOutput struct { _ struct{} `type:"structure"` @@ -16954,6 +21214,12 @@ func (s PutBucketNotificationConfigurationOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketNotificationConfigurationOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationRequest type PutBucketNotificationInput struct { _ struct{} `type:"structure" payload:"NotificationConfiguration"` @@ -17010,6 +21276,22 @@ func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *Notificatio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketNotificationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NotificationConfiguration != nil { + v := s.NotificationConfiguration + + e.SetFields(protocol.PayloadTarget, "NotificationConfiguration", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationOutput type PutBucketNotificationOutput struct { _ struct{} `type:"structure"` @@ -17025,6 +21307,12 @@ func (s PutBucketNotificationOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketNotificationOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicyRequest type PutBucketPolicyInput struct { _ struct{} `type:"structure" payload:"Policy"` @@ -17093,6 +21381,27 @@ func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketPolicyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ConfirmRemoveSelfBucketAccess != nil { + v := *s.ConfirmRemoveSelfBucketAccess + + e.SetValue(protocol.HeaderTarget, "x-amz-confirm-remove-self-bucket-access", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Policy != nil { + v := *s.Policy + + e.SetStream(protocol.PayloadTarget, "Policy", protocol.StringStream(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicyOutput type PutBucketPolicyOutput struct { _ struct{} `type:"structure"` @@ -17108,6 +21417,12 @@ func (s PutBucketPolicyOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketPolicyOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplicationRequest type PutBucketReplicationInput struct { _ struct{} `type:"structure" payload:"ReplicationConfiguration"` @@ -17172,6 +21487,22 @@ func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationCo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketReplicationInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ReplicationConfiguration != nil { + v := s.ReplicationConfiguration + + e.SetFields(protocol.PayloadTarget, "ReplicationConfiguration", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplicationOutput type PutBucketReplicationOutput struct { _ struct{} `type:"structure"` @@ -17187,6 +21518,12 @@ func (s PutBucketReplicationOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketReplicationOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPaymentRequest type PutBucketRequestPaymentInput struct { _ struct{} `type:"structure" payload:"RequestPaymentConfiguration"` @@ -17248,6 +21585,22 @@ func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *Request return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketRequestPaymentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestPaymentConfiguration != nil { + v := s.RequestPaymentConfiguration + + e.SetFields(protocol.PayloadTarget, "RequestPaymentConfiguration", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPaymentOutput type PutBucketRequestPaymentOutput struct { _ struct{} `type:"structure"` @@ -17263,6 +21616,12 @@ func (s PutBucketRequestPaymentOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketRequestPaymentOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTaggingRequest type PutBucketTaggingInput struct { _ struct{} `type:"structure" payload:"Tagging"` @@ -17324,6 +21683,22 @@ func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketTaggingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Tagging != nil { + v := s.Tagging + + e.SetFields(protocol.PayloadTarget, "Tagging", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTaggingOutput type PutBucketTaggingOutput struct { _ struct{} `type:"structure"` @@ -17339,6 +21714,12 @@ func (s PutBucketTaggingOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketTaggingOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioningRequest type PutBucketVersioningInput struct { _ struct{} `type:"structure" payload:"VersioningConfiguration"` @@ -17405,6 +21786,27 @@ func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfi return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketVersioningInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.MFA != nil { + v := *s.MFA + + e.SetValue(protocol.HeaderTarget, "x-amz-mfa", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersioningConfiguration != nil { + v := s.VersioningConfiguration + + e.SetFields(protocol.PayloadTarget, "VersioningConfiguration", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioningOutput type PutBucketVersioningOutput struct { _ struct{} `type:"structure"` @@ -17420,6 +21822,12 @@ func (s PutBucketVersioningOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketVersioningOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsiteRequest type PutBucketWebsiteInput struct { _ struct{} `type:"structure" payload:"WebsiteConfiguration"` @@ -17481,6 +21889,22 @@ func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketWebsiteInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.WebsiteConfiguration != nil { + v := s.WebsiteConfiguration + + e.SetFields(protocol.PayloadTarget, "WebsiteConfiguration", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsiteOutput type PutBucketWebsiteOutput struct { _ struct{} `type:"structure"` @@ -17496,6 +21920,12 @@ func (s PutBucketWebsiteOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutBucketWebsiteOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAclRequest type PutObjectAclInput struct { _ struct{} `type:"structure" payload:"AccessControlPolicy"` @@ -17644,6 +22074,67 @@ func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutObjectAclInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ACL != nil { + v := *s.ACL + + e.SetValue(protocol.HeaderTarget, "x-amz-acl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.AccessControlPolicy != nil { + v := s.AccessControlPolicy + + e.SetFields(protocol.PayloadTarget, "AccessControlPolicy", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantFullControl != nil { + v := *s.GrantFullControl + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-full-control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantRead != nil { + v := *s.GrantRead + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-read", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantReadACP != nil { + v := *s.GrantReadACP + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-read-acp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantWrite != nil { + v := *s.GrantWrite + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-write", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantWriteACP != nil { + v := *s.GrantWriteACP + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-write-acp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.QueryTarget, "versionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAclOutput type PutObjectAclOutput struct { _ struct{} `type:"structure"` @@ -17663,10 +22154,21 @@ func (s PutObjectAclOutput) GoString() string { return s.String() } -// SetRequestCharged sets the RequestCharged field's value. -func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput { - s.RequestCharged = &v - return s +// SetRequestCharged sets the RequestCharged field's value. +func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput { + s.RequestCharged = &v + return s +} + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutObjectAclOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil } // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRequest @@ -17973,6 +22475,142 @@ func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.ACL != nil { + v := *s.ACL + + e.SetValue(protocol.HeaderTarget, "x-amz-acl", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Body != nil { + v := s.Body + + e.SetStream(protocol.PayloadTarget, "Body", protocol.ReadSeekerStream{V: v}, protocol.Metadata{}) + } + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CacheControl != nil { + v := *s.CacheControl + + e.SetValue(protocol.HeaderTarget, "Cache-Control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentDisposition != nil { + v := *s.ContentDisposition + + e.SetValue(protocol.HeaderTarget, "Content-Disposition", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentEncoding != nil { + v := *s.ContentEncoding + + e.SetValue(protocol.HeaderTarget, "Content-Encoding", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentLanguage != nil { + v := *s.ContentLanguage + + e.SetValue(protocol.HeaderTarget, "Content-Language", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentLength != nil { + v := *s.ContentLength + + e.SetValue(protocol.HeaderTarget, "Content-Length", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ContentMD5 != nil { + v := *s.ContentMD5 + + e.SetValue(protocol.HeaderTarget, "Content-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Expires != nil { + v := *s.Expires + + e.SetValue(protocol.HeaderTarget, "Expires", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if s.GrantFullControl != nil { + v := *s.GrantFullControl + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-full-control", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantRead != nil { + v := *s.GrantRead + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-read", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantReadACP != nil { + v := *s.GrantReadACP + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-read-acp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantWriteACP != nil { + v := *s.GrantWriteACP + + e.SetValue(protocol.HeaderTarget, "x-amz-grant-write-acp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Metadata) > 0 { + v := s.Metadata + + e.SetMap(protocol.HeadersTarget, "x-amz-meta-", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerAlgorithm != nil { + v := *s.SSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKey != nil { + v := *s.SSECustomerKey + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKeyMD5 != nil { + v := *s.SSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSEKMSKeyId != nil { + v := *s.SSEKMSKeyId + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-aws-kms-key-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServerSideEncryption != nil { + v := *s.ServerSideEncryption + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StorageClass != nil { + v := *s.StorageClass + + e.SetValue(protocol.HeaderTarget, "x-amz-storage-class", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Tagging != nil { + v := *s.Tagging + + e.SetValue(protocol.HeaderTarget, "x-amz-tagging", protocol.StringValue(v), protocol.Metadata{}) + } + if s.WebsiteRedirectLocation != nil { + v := *s.WebsiteRedirectLocation + + e.SetValue(protocol.HeaderTarget, "x-amz-website-redirect-location", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectOutput type PutObjectOutput struct { _ struct{} `type:"structure"` @@ -18068,6 +22706,52 @@ func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Expiration != nil { + v := *s.Expiration + + e.SetValue(protocol.HeaderTarget, "x-amz-expiration", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerAlgorithm != nil { + v := *s.SSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKeyMD5 != nil { + v := *s.SSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSEKMSKeyId != nil { + v := *s.SSEKMSKeyId + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-aws-kms-key-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServerSideEncryption != nil { + v := *s.ServerSideEncryption + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.HeaderTarget, "x-amz-version-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTaggingRequest type PutObjectTaggingInput struct { _ struct{} `type:"structure" payload:"Tagging"` @@ -18152,6 +22836,32 @@ func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutObjectTaggingInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Tagging != nil { + v := s.Tagging + + e.SetFields(protocol.PayloadTarget, "Tagging", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.QueryTarget, "versionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTaggingOutput type PutObjectTaggingOutput struct { _ struct{} `type:"structure"` @@ -18175,6 +22885,17 @@ func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutObjectTaggingOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.HeaderTarget, "x-amz-version-id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Container for specifying an configuration when you want Amazon S3 to publish // events to an Amazon Simple Queue Service (Amazon SQS) queue. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/QueueConfiguration @@ -18249,6 +22970,40 @@ func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *QueueConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Events) > 0 { + v := s.Events + + e.SetList(protocol.BodyTarget, "Event", protocol.EncodeStringList(v), protocol.Metadata{Flatten: true}) + } + if s.Filter != nil { + v := s.Filter + + e.SetFields(protocol.BodyTarget, "Filter", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.QueueArn != nil { + v := *s.QueueArn + + e.SetValue(protocol.BodyTarget, "Queue", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeQueueConfigurationList(vs []*QueueConfiguration) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/QueueConfigurationDeprecated type QueueConfigurationDeprecated struct { _ struct{} `type:"structure"` @@ -18299,6 +23054,32 @@ func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDep return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *QueueConfigurationDeprecated) MarshalFields(e protocol.FieldEncoder) error { + if s.Event != nil { + v := *s.Event + + e.SetValue(protocol.BodyTarget, "Event", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Events) > 0 { + v := s.Events + + e.SetList(protocol.BodyTarget, "Event", protocol.EncodeStringList(v), protocol.Metadata{Flatten: true}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Queue != nil { + v := *s.Queue + + e.SetValue(protocol.BodyTarget, "Queue", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Redirect type Redirect struct { _ struct{} `type:"structure"` @@ -18368,6 +23149,37 @@ func (s *Redirect) SetReplaceKeyWith(v string) *Redirect { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Redirect) MarshalFields(e protocol.FieldEncoder) error { + if s.HostName != nil { + v := *s.HostName + + e.SetValue(protocol.BodyTarget, "HostName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HttpRedirectCode != nil { + v := *s.HttpRedirectCode + + e.SetValue(protocol.BodyTarget, "HttpRedirectCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Protocol != nil { + v := *s.Protocol + + e.SetValue(protocol.BodyTarget, "Protocol", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ReplaceKeyPrefixWith != nil { + v := *s.ReplaceKeyPrefixWith + + e.SetValue(protocol.BodyTarget, "ReplaceKeyPrefixWith", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ReplaceKeyWith != nil { + v := *s.ReplaceKeyWith + + e.SetValue(protocol.BodyTarget, "ReplaceKeyWith", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RedirectAllRequestsTo type RedirectAllRequestsTo struct { _ struct{} `type:"structure"` @@ -18417,6 +23229,22 @@ func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RedirectAllRequestsTo) MarshalFields(e protocol.FieldEncoder) error { + if s.HostName != nil { + v := *s.HostName + + e.SetValue(protocol.BodyTarget, "HostName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Protocol != nil { + v := *s.Protocol + + e.SetValue(protocol.BodyTarget, "Protocol", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Container for replication rules. You can add as many as 1,000 rules. Total // replication configuration size can be up to 2 MB. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationConfiguration @@ -18484,6 +23312,22 @@ func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationCo return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ReplicationConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.Role != nil { + v := *s.Role + + e.SetValue(protocol.BodyTarget, "Role", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Rules) > 0 { + v := s.Rules + + e.SetList(protocol.BodyTarget, "Rule", encodeReplicationRuleList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // Container for information about a particular replication rule. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationRule type ReplicationRule struct { @@ -18582,6 +23426,45 @@ func (s *ReplicationRule) SetStatus(v string) *ReplicationRule { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ReplicationRule) MarshalFields(e protocol.FieldEncoder) error { + if s.Destination != nil { + v := s.Destination + + e.SetFields(protocol.BodyTarget, "Destination", v, protocol.Metadata{}) + } + if s.ID != nil { + v := *s.ID + + e.SetValue(protocol.BodyTarget, "ID", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SourceSelectionCriteria != nil { + v := s.SourceSelectionCriteria + + e.SetFields(protocol.BodyTarget, "SourceSelectionCriteria", v, protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeReplicationRuleList(vs []*ReplicationRule) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RequestPaymentConfiguration type RequestPaymentConfiguration struct { _ struct{} `type:"structure"` @@ -18621,6 +23504,17 @@ func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfigur return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RequestPaymentConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.Payer != nil { + v := *s.Payer + + e.SetValue(protocol.BodyTarget, "Payer", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObjectRequest type RestoreObjectInput struct { _ struct{} `type:"structure" payload:"RestoreRequest"` @@ -18713,6 +23607,37 @@ func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RestoreObjectInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RestoreRequest != nil { + v := s.RestoreRequest + + e.SetFields(protocol.PayloadTarget, "RestoreRequest", v, protocol.Metadata{XMLNamespaceURI: "http://s3.amazonaws.com/doc/2006-03-01/"}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.QueryTarget, "versionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObjectOutput type RestoreObjectOutput struct { _ struct{} `type:"structure"` @@ -18738,6 +23663,17 @@ func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RestoreObjectOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreRequest type RestoreRequest struct { _ struct{} `type:"structure"` @@ -18791,6 +23727,22 @@ func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *Resto return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RestoreRequest) MarshalFields(e protocol.FieldEncoder) error { + if s.Days != nil { + v := *s.Days + + e.SetValue(protocol.BodyTarget, "Days", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.GlacierJobParameters != nil { + v := s.GlacierJobParameters + + e.SetFields(protocol.BodyTarget, "GlacierJobParameters", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RoutingRule type RoutingRule struct { _ struct{} `type:"structure"` @@ -18844,6 +23796,30 @@ func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RoutingRule) MarshalFields(e protocol.FieldEncoder) error { + if s.Condition != nil { + v := s.Condition + + e.SetFields(protocol.BodyTarget, "Condition", v, protocol.Metadata{}) + } + if s.Redirect != nil { + v := s.Redirect + + e.SetFields(protocol.BodyTarget, "Redirect", v, protocol.Metadata{}) + } + + return nil +} + +func encodeRoutingRuleList(vs []*RoutingRule) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Rule type Rule struct { _ struct{} `type:"structure"` @@ -18959,6 +23935,60 @@ func (s *Rule) SetTransition(v *Transition) *Rule { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Rule) MarshalFields(e protocol.FieldEncoder) error { + if s.AbortIncompleteMultipartUpload != nil { + v := s.AbortIncompleteMultipartUpload + + e.SetFields(protocol.BodyTarget, "AbortIncompleteMultipartUpload", v, protocol.Metadata{}) + } + if s.Expiration != nil { + v := s.Expiration + + e.SetFields(protocol.BodyTarget, "Expiration", v, protocol.Metadata{}) + } + if s.ID != nil { + v := *s.ID + + e.SetValue(protocol.BodyTarget, "ID", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NoncurrentVersionExpiration != nil { + v := s.NoncurrentVersionExpiration + + e.SetFields(protocol.BodyTarget, "NoncurrentVersionExpiration", v, protocol.Metadata{}) + } + if s.NoncurrentVersionTransition != nil { + v := s.NoncurrentVersionTransition + + e.SetFields(protocol.BodyTarget, "NoncurrentVersionTransition", v, protocol.Metadata{}) + } + if s.Prefix != nil { + v := *s.Prefix + + e.SetValue(protocol.BodyTarget, "Prefix", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Transition != nil { + v := s.Transition + + e.SetFields(protocol.BodyTarget, "Transition", v, protocol.Metadata{}) + } + + return nil +} + +func encodeRuleList(vs []*Rule) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Specifies the use of SSE-KMS to encrypt delievered Inventory reports. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SSEKMS type SSEKMS struct { @@ -19000,6 +24030,17 @@ func (s *SSEKMS) SetKeyId(v string) *SSEKMS { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SSEKMS) MarshalFields(e protocol.FieldEncoder) error { + if s.KeyId != nil { + v := *s.KeyId + + e.SetValue(protocol.BodyTarget, "KeyId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Specifies the use of SSE-S3 to encrypt delievered Inventory reports. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SSES3 type SSES3 struct { @@ -19016,6 +24057,12 @@ func (s SSES3) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SSES3) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Describes the default server-side encryption to apply to new objects in the // bucket. If Put Object request does not specify any server-side encryption, // this default encryption will be applied. @@ -19068,6 +24115,22 @@ func (s *ServerSideEncryptionByDefault) SetSSEAlgorithm(v string) *ServerSideEnc return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ServerSideEncryptionByDefault) MarshalFields(e protocol.FieldEncoder) error { + if s.KMSMasterKeyID != nil { + v := *s.KMSMasterKeyID + + e.SetValue(protocol.BodyTarget, "KMSMasterKeyID", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSEAlgorithm != nil { + v := *s.SSEAlgorithm + + e.SetValue(protocol.BodyTarget, "SSEAlgorithm", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Container for server-side encryption configuration rules. Currently S3 supports // one rule only. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ServerSideEncryptionConfiguration @@ -19120,6 +24183,17 @@ func (s *ServerSideEncryptionConfiguration) SetRules(v []*ServerSideEncryptionRu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ServerSideEncryptionConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Rules) > 0 { + v := s.Rules + + e.SetList(protocol.BodyTarget, "Rule", encodeServerSideEncryptionRuleList(v), protocol.Metadata{Flatten: true}) + } + + return nil +} + // Container for information about a particular server-side encryption configuration // rule. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ServerSideEncryptionRule @@ -19163,6 +24237,25 @@ func (s *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *Serv return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ServerSideEncryptionRule) MarshalFields(e protocol.FieldEncoder) error { + if s.ApplyServerSideEncryptionByDefault != nil { + v := s.ApplyServerSideEncryptionByDefault + + e.SetFields(protocol.BodyTarget, "ApplyServerSideEncryptionByDefault", v, protocol.Metadata{}) + } + + return nil +} + +func encodeServerSideEncryptionRuleList(vs []*ServerSideEncryptionRule) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Container for filters that define which source objects should be replicated. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SourceSelectionCriteria type SourceSelectionCriteria struct { @@ -19203,6 +24296,17 @@ func (s *SourceSelectionCriteria) SetSseKmsEncryptedObjects(v *SseKmsEncryptedOb return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SourceSelectionCriteria) MarshalFields(e protocol.FieldEncoder) error { + if s.SseKmsEncryptedObjects != nil { + v := s.SseKmsEncryptedObjects + + e.SetFields(protocol.BodyTarget, "SseKmsEncryptedObjects", v, protocol.Metadata{}) + } + + return nil +} + // Container for filter information of selection of KMS Encrypted S3 objects. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SseKmsEncryptedObjects type SseKmsEncryptedObjects struct { @@ -19244,6 +24348,17 @@ func (s *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SseKmsEncryptedObjects) MarshalFields(e protocol.FieldEncoder) error { + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/StorageClassAnalysis type StorageClassAnalysis struct { _ struct{} `type:"structure"` @@ -19284,6 +24399,17 @@ func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StorageClassAnalysis) MarshalFields(e protocol.FieldEncoder) error { + if s.DataExport != nil { + v := s.DataExport + + e.SetFields(protocol.BodyTarget, "DataExport", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/StorageClassAnalysisDataExport type StorageClassAnalysisDataExport struct { _ struct{} `type:"structure"` @@ -19342,6 +24468,22 @@ func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *Stora return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StorageClassAnalysisDataExport) MarshalFields(e protocol.FieldEncoder) error { + if s.Destination != nil { + v := s.Destination + + e.SetFields(protocol.BodyTarget, "Destination", v, protocol.Metadata{}) + } + if s.OutputSchemaVersion != nil { + v := *s.OutputSchemaVersion + + e.SetValue(protocol.BodyTarget, "OutputSchemaVersion", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Tag type Tag struct { _ struct{} `type:"structure"` @@ -19398,6 +24540,30 @@ func (s *Tag) SetValue(v string) *Tag { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Tag) MarshalFields(e protocol.FieldEncoder) error { + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.BodyTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTagList(vs []*Tag) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Tagging type Tagging struct { _ struct{} `type:"structure"` @@ -19445,6 +24611,17 @@ func (s *Tagging) SetTagSet(v []*Tag) *Tagging { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Tagging) MarshalFields(e protocol.FieldEncoder) error { + if len(s.TagSet) > 0 { + v := s.TagSet + + e.SetList(protocol.BodyTarget, "TagSet", encodeTagList(v), protocol.Metadata{ListLocationName: "Tag"}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TargetGrant type TargetGrant struct { _ struct{} `type:"structure"` @@ -19492,6 +24669,35 @@ func (s *TargetGrant) SetPermission(v string) *TargetGrant { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TargetGrant) MarshalFields(e protocol.FieldEncoder) error { + if s.Grantee != nil { + v := s.Grantee + attrs := make([]protocol.Attribute, 0, 1) + + if s.Grantee.Type != nil { + v := *s.Grantee.Type + attrs = append(attrs, protocol.Attribute{Name: "xsi:type", Value: protocol.StringValue(v), Meta: protocol.Metadata{}}) + } + e.SetFields(protocol.BodyTarget, "Grantee", v, protocol.Metadata{Attributes: attrs, XMLNamespacePrefix: "xsi", XMLNamespaceURI: "http://www.w3.org/2001/XMLSchema-instance"}) + } + if s.Permission != nil { + v := *s.Permission + + e.SetValue(protocol.BodyTarget, "Permission", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTargetGrantList(vs []*TargetGrant) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Container for specifying the configuration when you want Amazon S3 to publish // events to an Amazon Simple Notification Service (Amazon SNS) topic. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TopicConfiguration @@ -19566,6 +24772,40 @@ func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TopicConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Events) > 0 { + v := s.Events + + e.SetList(protocol.BodyTarget, "Event", protocol.EncodeStringList(v), protocol.Metadata{Flatten: true}) + } + if s.Filter != nil { + v := s.Filter + + e.SetFields(protocol.BodyTarget, "Filter", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TopicArn != nil { + v := *s.TopicArn + + e.SetValue(protocol.BodyTarget, "Topic", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTopicConfigurationList(vs []*TopicConfiguration) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TopicConfigurationDeprecated type TopicConfigurationDeprecated struct { _ struct{} `type:"structure"` @@ -19618,6 +24858,32 @@ func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDep return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TopicConfigurationDeprecated) MarshalFields(e protocol.FieldEncoder) error { + if s.Event != nil { + v := *s.Event + + e.SetValue(protocol.BodyTarget, "Event", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Events) > 0 { + v := s.Events + + e.SetList(protocol.BodyTarget, "Event", protocol.EncodeStringList(v), protocol.Metadata{Flatten: true}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Topic != nil { + v := *s.Topic + + e.SetValue(protocol.BodyTarget, "Topic", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Transition type Transition struct { _ struct{} `type:"structure"` @@ -19662,6 +24928,35 @@ func (s *Transition) SetStorageClass(v string) *Transition { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Transition) MarshalFields(e protocol.FieldEncoder) error { + if s.Date != nil { + v := *s.Date + + e.SetValue(protocol.BodyTarget, "Date", protocol.TimeValue{V: v, Format: protocol.ISO8601TimeFormat}, protocol.Metadata{}) + } + if s.Days != nil { + v := *s.Days + + e.SetValue(protocol.BodyTarget, "Days", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StorageClass != nil { + v := *s.StorageClass + + e.SetValue(protocol.BodyTarget, "StorageClass", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTransitionList(vs []*Transition) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopyRequest type UploadPartCopyInput struct { _ struct{} `type:"structure"` @@ -19906,6 +25201,97 @@ func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UploadPartCopyInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CopySource != nil { + v := *s.CopySource + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CopySourceIfMatch != nil { + v := *s.CopySourceIfMatch + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-if-match", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CopySourceIfModifiedSince != nil { + v := *s.CopySourceIfModifiedSince + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-if-modified-since", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if s.CopySourceIfNoneMatch != nil { + v := *s.CopySourceIfNoneMatch + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-if-none-match", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CopySourceIfUnmodifiedSince != nil { + v := *s.CopySourceIfUnmodifiedSince + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-if-unmodified-since", protocol.TimeValue{V: v, Format: protocol.RFC822TimeFromat}, protocol.Metadata{}) + } + if s.CopySourceRange != nil { + v := *s.CopySourceRange + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-range", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CopySourceSSECustomerAlgorithm != nil { + v := *s.CopySourceSSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CopySourceSSECustomerKey != nil { + v := *s.CopySourceSSECustomerKey + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-server-side-encryption-customer-key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CopySourceSSECustomerKeyMD5 != nil { + v := *s.CopySourceSSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PartNumber != nil { + v := *s.PartNumber + + e.SetValue(protocol.QueryTarget, "partNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerAlgorithm != nil { + v := *s.SSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKey != nil { + v := *s.SSECustomerKey + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKeyMD5 != nil { + v := *s.SSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UploadId != nil { + v := *s.UploadId + + e.SetValue(protocol.QueryTarget, "uploadId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopyOutput type UploadPartCopyOutput struct { _ struct{} `type:"structure" payload:"CopyPartResult"` @@ -19991,6 +25377,47 @@ func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopy return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UploadPartCopyOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.CopyPartResult != nil { + v := s.CopyPartResult + + e.SetFields(protocol.PayloadTarget, "CopyPartResult", v, protocol.Metadata{}) + } + if s.CopySourceVersionId != nil { + v := *s.CopySourceVersionId + + e.SetValue(protocol.HeaderTarget, "x-amz-copy-source-version-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerAlgorithm != nil { + v := *s.SSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKeyMD5 != nil { + v := *s.SSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSEKMSKeyId != nil { + v := *s.SSEKMSKeyId + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-aws-kms-key-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServerSideEncryption != nil { + v := *s.ServerSideEncryption + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartRequest type UploadPartInput struct { _ struct{} `type:"structure" payload:"Body"` @@ -20164,6 +25591,67 @@ func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UploadPartInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Body != nil { + v := s.Body + + e.SetStream(protocol.PayloadTarget, "Body", protocol.ReadSeekerStream{V: v}, protocol.Metadata{}) + } + if s.Bucket != nil { + v := *s.Bucket + + e.SetValue(protocol.PathTarget, "Bucket", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentLength != nil { + v := *s.ContentLength + + e.SetValue(protocol.HeaderTarget, "Content-Length", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ContentMD5 != nil { + v := *s.ContentMD5 + + e.SetValue(protocol.HeaderTarget, "Content-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Key != nil { + v := *s.Key + + e.SetValue(protocol.PathTarget, "Key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PartNumber != nil { + v := *s.PartNumber + + e.SetValue(protocol.QueryTarget, "partNumber", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.RequestPayer != nil { + v := *s.RequestPayer + + e.SetValue(protocol.HeaderTarget, "x-amz-request-payer", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerAlgorithm != nil { + v := *s.SSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKey != nil { + v := *s.SSECustomerKey + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKeyMD5 != nil { + v := *s.SSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UploadId != nil { + v := *s.UploadId + + e.SetValue(protocol.QueryTarget, "uploadId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartOutput type UploadPartOutput struct { _ struct{} `type:"structure"` @@ -20240,6 +25728,42 @@ func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UploadPartOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ETag != nil { + v := *s.ETag + + e.SetValue(protocol.HeaderTarget, "ETag", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RequestCharged != nil { + v := *s.RequestCharged + + e.SetValue(protocol.HeaderTarget, "x-amz-request-charged", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerAlgorithm != nil { + v := *s.SSECustomerAlgorithm + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-algorithm", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSECustomerKeyMD5 != nil { + v := *s.SSECustomerKeyMD5 + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-customer-key-MD5", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SSEKMSKeyId != nil { + v := *s.SSEKMSKeyId + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption-aws-kms-key-id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ServerSideEncryption != nil { + v := *s.ServerSideEncryption + + e.SetValue(protocol.HeaderTarget, "x-amz-server-side-encryption", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/VersioningConfiguration type VersioningConfiguration struct { _ struct{} `type:"structure"` @@ -20275,6 +25799,22 @@ func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *VersioningConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.MFADelete != nil { + v := *s.MFADelete + + e.SetValue(protocol.BodyTarget, "MfaDelete", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WebsiteConfiguration type WebsiteConfiguration struct { _ struct{} `type:"structure"` @@ -20357,6 +25897,32 @@ func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfigu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *WebsiteConfiguration) MarshalFields(e protocol.FieldEncoder) error { + if s.ErrorDocument != nil { + v := s.ErrorDocument + + e.SetFields(protocol.BodyTarget, "ErrorDocument", v, protocol.Metadata{}) + } + if s.IndexDocument != nil { + v := s.IndexDocument + + e.SetFields(protocol.BodyTarget, "IndexDocument", v, protocol.Metadata{}) + } + if s.RedirectAllRequestsTo != nil { + v := s.RedirectAllRequestsTo + + e.SetFields(protocol.BodyTarget, "RedirectAllRequestsTo", v, protocol.Metadata{}) + } + if len(s.RoutingRules) > 0 { + v := s.RoutingRules + + e.SetList(protocol.BodyTarget, "RoutingRules", encodeRoutingRuleList(v), protocol.Metadata{ListLocationName: "RoutingRule"}) + } + + return nil +} + const ( // AnalyticsS3ExportFileFormatCsv is a AnalyticsS3ExportFileFormat enum value AnalyticsS3ExportFileFormatCsv = "CSV" diff --git a/service/workdocs/api.go b/service/workdocs/api.go index 4cec8b7d8b9..cdbf34e8f27 100644 --- a/service/workdocs/api.go +++ b/service/workdocs/api.go @@ -4159,6 +4159,27 @@ func (s *AbortDocumentVersionUploadInput) SetVersionId(v string) *AbortDocumentV return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AbortDocumentVersionUploadInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DocumentId != nil { + v := *s.DocumentId + + e.SetValue(protocol.PathTarget, "DocumentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.PathTarget, "VersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AbortDocumentVersionUploadOutput type AbortDocumentVersionUploadOutput struct { _ struct{} `type:"structure"` @@ -4174,6 +4195,12 @@ func (s AbortDocumentVersionUploadOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AbortDocumentVersionUploadOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/ActivateUserRequest type ActivateUserInput struct { _ struct{} `type:"structure"` @@ -4229,6 +4256,22 @@ func (s *ActivateUserInput) SetUserId(v string) *ActivateUserInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ActivateUserInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UserId != nil { + v := *s.UserId + + e.SetValue(protocol.PathTarget, "UserId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/ActivateUserResponse type ActivateUserOutput struct { _ struct{} `type:"structure"` @@ -4253,6 +4296,17 @@ func (s *ActivateUserOutput) SetUser(v *User) *ActivateUserOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ActivateUserOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.User != nil { + v := s.User + + e.SetFields(protocol.BodyTarget, "User", v, protocol.Metadata{}) + } + + return nil +} + // Describes the activity information. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/Activity type Activity struct { @@ -4345,6 +4399,60 @@ func (s *Activity) SetType(v string) *Activity { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Activity) MarshalFields(e protocol.FieldEncoder) error { + if s.CommentMetadata != nil { + v := s.CommentMetadata + + e.SetFields(protocol.BodyTarget, "CommentMetadata", v, protocol.Metadata{}) + } + if s.Initiator != nil { + v := s.Initiator + + e.SetFields(protocol.BodyTarget, "Initiator", v, protocol.Metadata{}) + } + if s.OrganizationId != nil { + v := *s.OrganizationId + + e.SetValue(protocol.BodyTarget, "OrganizationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OriginalParent != nil { + v := s.OriginalParent + + e.SetFields(protocol.BodyTarget, "OriginalParent", v, protocol.Metadata{}) + } + if s.Participants != nil { + v := s.Participants + + e.SetFields(protocol.BodyTarget, "Participants", v, protocol.Metadata{}) + } + if s.ResourceMetadata != nil { + v := s.ResourceMetadata + + e.SetFields(protocol.BodyTarget, "ResourceMetadata", v, protocol.Metadata{}) + } + if s.TimeStamp != nil { + v := *s.TimeStamp + + e.SetValue(protocol.BodyTarget, "TimeStamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeActivityList(vs []*Activity) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AddResourcePermissionsRequest type AddResourcePermissionsInput struct { _ struct{} `type:"structure"` @@ -4433,6 +4541,32 @@ func (s *AddResourcePermissionsInput) SetResourceId(v string) *AddResourcePermis return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AddResourcePermissionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NotificationOptions != nil { + v := s.NotificationOptions + + e.SetFields(protocol.BodyTarget, "NotificationOptions", v, protocol.Metadata{}) + } + if len(s.Principals) > 0 { + v := s.Principals + + e.SetList(protocol.BodyTarget, "Principals", encodeSharePrincipalList(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "ResourceId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AddResourcePermissionsResponse type AddResourcePermissionsOutput struct { _ struct{} `type:"structure"` @@ -4457,6 +4591,17 @@ func (s *AddResourcePermissionsOutput) SetShareResults(v []*ShareResult) *AddRes return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AddResourcePermissionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ShareResults) > 0 { + v := s.ShareResults + + e.SetList(protocol.BodyTarget, "ShareResults", encodeShareResultList(v), protocol.Metadata{}) + } + + return nil +} + // Describes a comment. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/Comment type Comment struct { @@ -4559,6 +4704,65 @@ func (s *Comment) SetVisibility(v string) *Comment { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Comment) MarshalFields(e protocol.FieldEncoder) error { + if s.CommentId != nil { + v := *s.CommentId + + e.SetValue(protocol.BodyTarget, "CommentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Contributor != nil { + v := s.Contributor + + e.SetFields(protocol.BodyTarget, "Contributor", v, protocol.Metadata{}) + } + if s.CreatedTimestamp != nil { + v := *s.CreatedTimestamp + + e.SetValue(protocol.BodyTarget, "CreatedTimestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.ParentId != nil { + v := *s.ParentId + + e.SetValue(protocol.BodyTarget, "ParentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RecipientId != nil { + v := *s.RecipientId + + e.SetValue(protocol.BodyTarget, "RecipientId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Text != nil { + v := *s.Text + + e.SetValue(protocol.BodyTarget, "Text", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThreadId != nil { + v := *s.ThreadId + + e.SetValue(protocol.BodyTarget, "ThreadId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Visibility != nil { + v := *s.Visibility + + e.SetValue(protocol.BodyTarget, "Visibility", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeCommentList(vs []*Comment) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Describes the metadata of a comment. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CommentMetadata type CommentMetadata struct { @@ -4620,6 +4824,37 @@ func (s *CommentMetadata) SetRecipientId(v string) *CommentMetadata { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CommentMetadata) MarshalFields(e protocol.FieldEncoder) error { + if s.CommentId != nil { + v := *s.CommentId + + e.SetValue(protocol.BodyTarget, "CommentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CommentStatus != nil { + v := *s.CommentStatus + + e.SetValue(protocol.BodyTarget, "CommentStatus", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Contributor != nil { + v := s.Contributor + + e.SetFields(protocol.BodyTarget, "Contributor", v, protocol.Metadata{}) + } + if s.CreatedTimestamp != nil { + v := *s.CreatedTimestamp + + e.SetValue(protocol.BodyTarget, "CreatedTimestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.RecipientId != nil { + v := *s.RecipientId + + e.SetValue(protocol.BodyTarget, "RecipientId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateCommentRequest type CreateCommentInput struct { _ struct{} `type:"structure"` @@ -4754,6 +4989,52 @@ func (s *CreateCommentInput) SetVisibility(v string) *CreateCommentInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateCommentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DocumentId != nil { + v := *s.DocumentId + + e.SetValue(protocol.PathTarget, "DocumentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NotifyCollaborators != nil { + v := *s.NotifyCollaborators + + e.SetValue(protocol.BodyTarget, "NotifyCollaborators", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ParentId != nil { + v := *s.ParentId + + e.SetValue(protocol.BodyTarget, "ParentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Text != nil { + v := *s.Text + + e.SetValue(protocol.BodyTarget, "Text", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ThreadId != nil { + v := *s.ThreadId + + e.SetValue(protocol.BodyTarget, "ThreadId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.PathTarget, "VersionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Visibility != nil { + v := *s.Visibility + + e.SetValue(protocol.BodyTarget, "Visibility", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateCommentResponse type CreateCommentOutput struct { _ struct{} `type:"structure"` @@ -4778,6 +5059,17 @@ func (s *CreateCommentOutput) SetComment(v *Comment) *CreateCommentOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateCommentOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Comment != nil { + v := s.Comment + + e.SetFields(protocol.BodyTarget, "Comment", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateCustomMetadataRequest type CreateCustomMetadataInput struct { _ struct{} `type:"structure"` @@ -4863,6 +5155,32 @@ func (s *CreateCustomMetadataInput) SetVersionId(v string) *CreateCustomMetadata return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateCustomMetadataInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.CustomMetadata) > 0 { + v := s.CustomMetadata + + e.SetMap(protocol.BodyTarget, "CustomMetadata", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "ResourceId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.QueryTarget, "versionid", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateCustomMetadataResponse type CreateCustomMetadataOutput struct { _ struct{} `type:"structure"` @@ -4878,6 +5196,12 @@ func (s CreateCustomMetadataOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateCustomMetadataOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateFolderRequest type CreateFolderInput struct { _ struct{} `type:"structure"` @@ -4945,6 +5269,27 @@ func (s *CreateFolderInput) SetParentFolderId(v string) *CreateFolderInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateFolderInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParentFolderId != nil { + v := *s.ParentFolderId + + e.SetValue(protocol.BodyTarget, "ParentFolderId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateFolderResponse type CreateFolderOutput struct { _ struct{} `type:"structure"` @@ -4969,6 +5314,17 @@ func (s *CreateFolderOutput) SetMetadata(v *FolderMetadata) *CreateFolderOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateFolderOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Metadata != nil { + v := s.Metadata + + e.SetFields(protocol.BodyTarget, "Metadata", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateLabelsRequest type CreateLabelsInput struct { _ struct{} `type:"structure"` @@ -5038,6 +5394,27 @@ func (s *CreateLabelsInput) SetResourceId(v string) *CreateLabelsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateLabelsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Labels) > 0 { + v := s.Labels + + e.SetList(protocol.BodyTarget, "Labels", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "ResourceId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateLabelsResponse type CreateLabelsOutput struct { _ struct{} `type:"structure"` @@ -5053,6 +5430,12 @@ func (s CreateLabelsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateLabelsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateNotificationSubscriptionRequest type CreateNotificationSubscriptionInput struct { _ struct{} `type:"structure"` @@ -5142,6 +5525,32 @@ func (s *CreateNotificationSubscriptionInput) SetSubscriptionType(v string) *Cre return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateNotificationSubscriptionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Endpoint != nil { + v := *s.Endpoint + + e.SetValue(protocol.BodyTarget, "Endpoint", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OrganizationId != nil { + v := *s.OrganizationId + + e.SetValue(protocol.PathTarget, "OrganizationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Protocol != nil { + v := *s.Protocol + + e.SetValue(protocol.BodyTarget, "Protocol", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubscriptionType != nil { + v := *s.SubscriptionType + + e.SetValue(protocol.BodyTarget, "SubscriptionType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateNotificationSubscriptionResponse type CreateNotificationSubscriptionOutput struct { _ struct{} `type:"structure"` @@ -5166,6 +5575,17 @@ func (s *CreateNotificationSubscriptionOutput) SetSubscription(v *Subscription) return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateNotificationSubscriptionOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Subscription != nil { + v := s.Subscription + + e.SetFields(protocol.BodyTarget, "Subscription", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateUserRequest type CreateUserInput struct { _ struct{} `type:"structure"` @@ -5317,6 +5737,57 @@ func (s *CreateUserInput) SetUsername(v string) *CreateUserInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateUserInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EmailAddress != nil { + v := *s.EmailAddress + + e.SetValue(protocol.BodyTarget, "EmailAddress", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GivenName != nil { + v := *s.GivenName + + e.SetValue(protocol.BodyTarget, "GivenName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OrganizationId != nil { + v := *s.OrganizationId + + e.SetValue(protocol.BodyTarget, "OrganizationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Password != nil { + v := *s.Password + + e.SetValue(protocol.BodyTarget, "Password", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StorageRule != nil { + v := s.StorageRule + + e.SetFields(protocol.BodyTarget, "StorageRule", v, protocol.Metadata{}) + } + if s.Surname != nil { + v := *s.Surname + + e.SetValue(protocol.BodyTarget, "Surname", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimeZoneId != nil { + v := *s.TimeZoneId + + e.SetValue(protocol.BodyTarget, "TimeZoneId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Username != nil { + v := *s.Username + + e.SetValue(protocol.BodyTarget, "Username", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateUserResponse type CreateUserOutput struct { _ struct{} `type:"structure"` @@ -5341,6 +5812,17 @@ func (s *CreateUserOutput) SetUser(v *User) *CreateUserOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *CreateUserOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.User != nil { + v := s.User + + e.SetFields(protocol.BodyTarget, "User", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeactivateUserRequest type DeactivateUserInput struct { _ struct{} `type:"structure"` @@ -5396,6 +5878,22 @@ func (s *DeactivateUserInput) SetUserId(v string) *DeactivateUserInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeactivateUserInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UserId != nil { + v := *s.UserId + + e.SetValue(protocol.PathTarget, "UserId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeactivateUserOutput type DeactivateUserOutput struct { _ struct{} `type:"structure"` @@ -5411,6 +5909,12 @@ func (s DeactivateUserOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeactivateUserOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteCommentRequest type DeleteCommentInput struct { _ struct{} `type:"structure"` @@ -5500,6 +6004,32 @@ func (s *DeleteCommentInput) SetVersionId(v string) *DeleteCommentInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteCommentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CommentId != nil { + v := *s.CommentId + + e.SetValue(protocol.PathTarget, "CommentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DocumentId != nil { + v := *s.DocumentId + + e.SetValue(protocol.PathTarget, "DocumentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.PathTarget, "VersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteCommentOutput type DeleteCommentOutput struct { _ struct{} `type:"structure"` @@ -5515,6 +6045,12 @@ func (s DeleteCommentOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteCommentOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteCustomMetadataRequest type DeleteCustomMetadataInput struct { _ struct{} `type:"structure"` @@ -5602,6 +6138,37 @@ func (s *DeleteCustomMetadataInput) SetVersionId(v string) *DeleteCustomMetadata return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteCustomMetadataInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeleteAll != nil { + v := *s.DeleteAll + + e.SetValue(protocol.QueryTarget, "deleteAll", protocol.BoolValue(v), protocol.Metadata{}) + } + if len(s.Keys) > 0 { + v := s.Keys + + e.SetList(protocol.QueryTarget, "keys", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "ResourceId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.QueryTarget, "versionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteCustomMetadataResponse type DeleteCustomMetadataOutput struct { _ struct{} `type:"structure"` @@ -5617,6 +6184,12 @@ func (s DeleteCustomMetadataOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteCustomMetadataOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteDocumentRequest type DeleteDocumentInput struct { _ struct{} `type:"structure"` @@ -5672,6 +6245,22 @@ func (s *DeleteDocumentInput) SetDocumentId(v string) *DeleteDocumentInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDocumentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DocumentId != nil { + v := *s.DocumentId + + e.SetValue(protocol.PathTarget, "DocumentId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteDocumentOutput type DeleteDocumentOutput struct { _ struct{} `type:"structure"` @@ -5687,6 +6276,12 @@ func (s DeleteDocumentOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteDocumentOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolderContentsRequest type DeleteFolderContentsInput struct { _ struct{} `type:"structure"` @@ -5742,6 +6337,22 @@ func (s *DeleteFolderContentsInput) SetFolderId(v string) *DeleteFolderContentsI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteFolderContentsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FolderId != nil { + v := *s.FolderId + + e.SetValue(protocol.PathTarget, "FolderId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolderContentsOutput type DeleteFolderContentsOutput struct { _ struct{} `type:"structure"` @@ -5757,6 +6368,12 @@ func (s DeleteFolderContentsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteFolderContentsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolderRequest type DeleteFolderInput struct { _ struct{} `type:"structure"` @@ -5812,6 +6429,22 @@ func (s *DeleteFolderInput) SetFolderId(v string) *DeleteFolderInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteFolderInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FolderId != nil { + v := *s.FolderId + + e.SetValue(protocol.PathTarget, "FolderId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolderOutput type DeleteFolderOutput struct { _ struct{} `type:"structure"` @@ -5827,6 +6460,12 @@ func (s DeleteFolderOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteFolderOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteLabelsRequest type DeleteLabelsInput struct { _ struct{} `type:"structure"` @@ -5900,6 +6539,32 @@ func (s *DeleteLabelsInput) SetResourceId(v string) *DeleteLabelsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteLabelsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DeleteAll != nil { + v := *s.DeleteAll + + e.SetValue(protocol.QueryTarget, "deleteAll", protocol.BoolValue(v), protocol.Metadata{}) + } + if len(s.Labels) > 0 { + v := s.Labels + + e.SetList(protocol.QueryTarget, "labels", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "ResourceId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteLabelsResponse type DeleteLabelsOutput struct { _ struct{} `type:"structure"` @@ -5915,6 +6580,12 @@ func (s DeleteLabelsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteLabelsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteNotificationSubscriptionRequest type DeleteNotificationSubscriptionInput struct { _ struct{} `type:"structure"` @@ -5974,6 +6645,22 @@ func (s *DeleteNotificationSubscriptionInput) SetSubscriptionId(v string) *Delet return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteNotificationSubscriptionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.OrganizationId != nil { + v := *s.OrganizationId + + e.SetValue(protocol.PathTarget, "OrganizationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubscriptionId != nil { + v := *s.SubscriptionId + + e.SetValue(protocol.PathTarget, "SubscriptionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteNotificationSubscriptionOutput type DeleteNotificationSubscriptionOutput struct { _ struct{} `type:"structure"` @@ -5989,6 +6676,12 @@ func (s DeleteNotificationSubscriptionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteNotificationSubscriptionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteUserRequest type DeleteUserInput struct { _ struct{} `type:"structure"` @@ -6044,6 +6737,22 @@ func (s *DeleteUserInput) SetUserId(v string) *DeleteUserInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteUserInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UserId != nil { + v := *s.UserId + + e.SetValue(protocol.PathTarget, "UserId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteUserOutput type DeleteUserOutput struct { _ struct{} `type:"structure"` @@ -6059,6 +6768,12 @@ func (s DeleteUserOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DeleteUserOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeActivitiesRequest type DescribeActivitiesInput struct { _ struct{} `type:"structure"` @@ -6168,6 +6883,47 @@ func (s *DescribeActivitiesInput) SetUserId(v string) *DescribeActivitiesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeActivitiesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.EndTime != nil { + v := *s.EndTime + + e.SetValue(protocol.QueryTarget, "endTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OrganizationId != nil { + v := *s.OrganizationId + + e.SetValue(protocol.QueryTarget, "organizationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartTime != nil { + v := *s.StartTime + + e.SetValue(protocol.QueryTarget, "startTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.UserId != nil { + v := *s.UserId + + e.SetValue(protocol.QueryTarget, "userId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeActivitiesResponse type DescribeActivitiesOutput struct { _ struct{} `type:"structure"` @@ -6201,6 +6957,22 @@ func (s *DescribeActivitiesOutput) SetUserActivities(v []*Activity) *DescribeAct return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeActivitiesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.UserActivities) > 0 { + v := s.UserActivities + + e.SetList(protocol.BodyTarget, "UserActivities", encodeActivityList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeCommentsRequest type DescribeCommentsInput struct { _ struct{} `type:"structure"` @@ -6298,6 +7070,37 @@ func (s *DescribeCommentsInput) SetVersionId(v string) *DescribeCommentsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeCommentsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DocumentId != nil { + v := *s.DocumentId + + e.SetValue(protocol.PathTarget, "DocumentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.PathTarget, "VersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeCommentsResponse type DescribeCommentsOutput struct { _ struct{} `type:"structure"` @@ -6332,6 +7135,22 @@ func (s *DescribeCommentsOutput) SetMarker(v string) *DescribeCommentsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeCommentsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Comments) > 0 { + v := s.Comments + + e.SetList(protocol.BodyTarget, "Comments", encodeCommentList(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeDocumentVersionsRequest type DescribeDocumentVersionsInput struct { _ struct{} `type:"structure"` @@ -6438,6 +7257,42 @@ func (s *DescribeDocumentVersionsInput) SetMarker(v string) *DescribeDocumentVer return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeDocumentVersionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DocumentId != nil { + v := *s.DocumentId + + e.SetValue(protocol.PathTarget, "DocumentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Fields != nil { + v := *s.Fields + + e.SetValue(protocol.QueryTarget, "fields", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Include != nil { + v := *s.Include + + e.SetValue(protocol.QueryTarget, "include", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeDocumentVersionsResponse type DescribeDocumentVersionsOutput struct { _ struct{} `type:"structure"` @@ -6472,6 +7327,22 @@ func (s *DescribeDocumentVersionsOutput) SetMarker(v string) *DescribeDocumentVe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeDocumentVersionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.DocumentVersions) > 0 { + v := s.DocumentVersions + + e.SetList(protocol.BodyTarget, "DocumentVersions", encodeDocumentVersionMetadataList(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeFolderContentsRequest type DescribeFolderContentsInput struct { _ struct{} `type:"structure"` @@ -6591,6 +7462,52 @@ func (s *DescribeFolderContentsInput) SetType(v string) *DescribeFolderContentsI return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeFolderContentsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FolderId != nil { + v := *s.FolderId + + e.SetValue(protocol.PathTarget, "FolderId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Include != nil { + v := *s.Include + + e.SetValue(protocol.QueryTarget, "include", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Order != nil { + v := *s.Order + + e.SetValue(protocol.QueryTarget, "order", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Sort != nil { + v := *s.Sort + + e.SetValue(protocol.QueryTarget, "sort", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.QueryTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeFolderContentsResponse type DescribeFolderContentsOutput struct { _ struct{} `type:"structure"` @@ -6634,6 +7551,27 @@ func (s *DescribeFolderContentsOutput) SetMarker(v string) *DescribeFolderConten return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeFolderContentsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Documents) > 0 { + v := s.Documents + + e.SetList(protocol.BodyTarget, "Documents", encodeDocumentMetadataList(v), protocol.Metadata{}) + } + if len(s.Folders) > 0 { + v := s.Folders + + e.SetList(protocol.BodyTarget, "Folders", encodeFolderMetadataList(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeGroupsRequest type DescribeGroupsInput struct { _ struct{} `type:"structure"` @@ -6726,6 +7664,37 @@ func (s *DescribeGroupsInput) SetSearchQuery(v string) *DescribeGroupsInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeGroupsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OrganizationId != nil { + v := *s.OrganizationId + + e.SetValue(protocol.QueryTarget, "organizationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SearchQuery != nil { + v := *s.SearchQuery + + e.SetValue(protocol.QueryTarget, "searchQuery", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeGroupsResponse type DescribeGroupsOutput struct { _ struct{} `type:"structure"` @@ -6760,6 +7729,22 @@ func (s *DescribeGroupsOutput) SetMarker(v string) *DescribeGroupsOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeGroupsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Groups) > 0 { + v := s.Groups + + e.SetList(protocol.BodyTarget, "Groups", encodeGroupMetadataList(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeNotificationSubscriptionsRequest type DescribeNotificationSubscriptionsInput struct { _ struct{} `type:"structure"` @@ -6827,6 +7812,27 @@ func (s *DescribeNotificationSubscriptionsInput) SetOrganizationId(v string) *De return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeNotificationSubscriptionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OrganizationId != nil { + v := *s.OrganizationId + + e.SetValue(protocol.PathTarget, "OrganizationId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeNotificationSubscriptionsResponse type DescribeNotificationSubscriptionsOutput struct { _ struct{} `type:"structure"` @@ -6861,6 +7867,22 @@ func (s *DescribeNotificationSubscriptionsOutput) SetSubscriptions(v []*Subscrip return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeNotificationSubscriptionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Subscriptions) > 0 { + v := s.Subscriptions + + e.SetList(protocol.BodyTarget, "Subscriptions", encodeSubscriptionList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeResourcePermissionsRequest type DescribeResourcePermissionsInput struct { _ struct{} `type:"structure"` @@ -6953,6 +7975,37 @@ func (s *DescribeResourcePermissionsInput) SetResourceId(v string) *DescribeReso return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeResourcePermissionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PrincipalId != nil { + v := *s.PrincipalId + + e.SetValue(protocol.QueryTarget, "principalId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "ResourceId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeResourcePermissionsResponse type DescribeResourcePermissionsOutput struct { _ struct{} `type:"structure"` @@ -6987,13 +8040,29 @@ func (s *DescribeResourcePermissionsOutput) SetPrincipals(v []*Principal) *Descr return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeRootFoldersRequest -type DescribeRootFoldersInput struct { - _ struct{} `type:"structure"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeResourcePermissionsOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Marker != nil { + v := *s.Marker - // Amazon WorkDocs authentication token. Do not set this field when using administrative - // API actions, as in accessing the API using AWS credentials. - // + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Principals) > 0 { + v := s.Principals + + e.SetList(protocol.BodyTarget, "Principals", encodePrincipalList(v), protocol.Metadata{}) + } + + return nil +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeRootFoldersRequest +type DescribeRootFoldersInput struct { + _ struct{} `type:"structure"` + + // Amazon WorkDocs authentication token. Do not set this field when using administrative + // API actions, as in accessing the API using AWS credentials. + // // AuthenticationToken is a required field AuthenticationToken *string `location:"header" locationName:"Authentication" min:"1" type:"string" required:"true"` @@ -7055,6 +8124,27 @@ func (s *DescribeRootFoldersInput) SetMarker(v string) *DescribeRootFoldersInput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeRootFoldersInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeRootFoldersResponse type DescribeRootFoldersOutput struct { _ struct{} `type:"structure"` @@ -7088,6 +8178,22 @@ func (s *DescribeRootFoldersOutput) SetMarker(v string) *DescribeRootFoldersOutp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeRootFoldersOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Folders) > 0 { + v := s.Folders + + e.SetList(protocol.BodyTarget, "Folders", encodeFolderMetadataList(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeUsersRequest type DescribeUsersInput struct { _ struct{} `type:"structure"` @@ -7227,6 +8333,62 @@ func (s *DescribeUsersInput) SetUserIds(v string) *DescribeUsersInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeUsersInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Fields != nil { + v := *s.Fields + + e.SetValue(protocol.QueryTarget, "fields", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Include != nil { + v := *s.Include + + e.SetValue(protocol.QueryTarget, "include", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Order != nil { + v := *s.Order + + e.SetValue(protocol.QueryTarget, "order", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OrganizationId != nil { + v := *s.OrganizationId + + e.SetValue(protocol.QueryTarget, "organizationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Query != nil { + v := *s.Query + + e.SetValue(protocol.QueryTarget, "query", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Sort != nil { + v := *s.Sort + + e.SetValue(protocol.QueryTarget, "sort", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UserIds != nil { + v := *s.UserIds + + e.SetValue(protocol.QueryTarget, "userIds", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeUsersResponse type DescribeUsersOutput struct { _ struct{} `type:"structure"` @@ -7270,6 +8432,27 @@ func (s *DescribeUsersOutput) SetUsers(v []*User) *DescribeUsersOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DescribeUsersOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.BodyTarget, "Marker", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TotalNumberOfUsers != nil { + v := *s.TotalNumberOfUsers + + e.SetValue(protocol.BodyTarget, "TotalNumberOfUsers", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Users) > 0 { + v := s.Users + + e.SetList(protocol.BodyTarget, "Users", encodeUserList(v), protocol.Metadata{}) + } + + return nil +} + // Describes the document. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DocumentMetadata type DocumentMetadata struct { @@ -7358,6 +8541,60 @@ func (s *DocumentMetadata) SetResourceState(v string) *DocumentMetadata { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DocumentMetadata) MarshalFields(e protocol.FieldEncoder) error { + if s.CreatedTimestamp != nil { + v := *s.CreatedTimestamp + + e.SetValue(protocol.BodyTarget, "CreatedTimestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.CreatorId != nil { + v := *s.CreatorId + + e.SetValue(protocol.BodyTarget, "CreatorId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Labels) > 0 { + v := s.Labels + + e.SetList(protocol.BodyTarget, "Labels", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.LatestVersionMetadata != nil { + v := s.LatestVersionMetadata + + e.SetFields(protocol.BodyTarget, "LatestVersionMetadata", v, protocol.Metadata{}) + } + if s.ModifiedTimestamp != nil { + v := *s.ModifiedTimestamp + + e.SetValue(protocol.BodyTarget, "ModifiedTimestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.ParentFolderId != nil { + v := *s.ParentFolderId + + e.SetValue(protocol.BodyTarget, "ParentFolderId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceState != nil { + v := *s.ResourceState + + e.SetValue(protocol.BodyTarget, "ResourceState", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDocumentMetadataList(vs []*DocumentMetadata) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Describes a version of a document. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DocumentVersionMetadata type DocumentVersionMetadata struct { @@ -7491,6 +8728,85 @@ func (s *DocumentVersionMetadata) SetThumbnail(v map[string]*string) *DocumentVe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *DocumentVersionMetadata) MarshalFields(e protocol.FieldEncoder) error { + if s.ContentCreatedTimestamp != nil { + v := *s.ContentCreatedTimestamp + + e.SetValue(protocol.BodyTarget, "ContentCreatedTimestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.ContentModifiedTimestamp != nil { + v := *s.ContentModifiedTimestamp + + e.SetValue(protocol.BodyTarget, "ContentModifiedTimestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.BodyTarget, "ContentType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.CreatedTimestamp != nil { + v := *s.CreatedTimestamp + + e.SetValue(protocol.BodyTarget, "CreatedTimestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.CreatorId != nil { + v := *s.CreatorId + + e.SetValue(protocol.BodyTarget, "CreatorId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ModifiedTimestamp != nil { + v := *s.ModifiedTimestamp + + e.SetValue(protocol.BodyTarget, "ModifiedTimestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Signature != nil { + v := *s.Signature + + e.SetValue(protocol.BodyTarget, "Signature", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Size != nil { + v := *s.Size + + e.SetValue(protocol.BodyTarget, "Size", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.Source) > 0 { + v := s.Source + + e.SetMap(protocol.BodyTarget, "Source", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Thumbnail) > 0 { + v := s.Thumbnail + + e.SetMap(protocol.BodyTarget, "Thumbnail", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + + return nil +} + +func encodeDocumentVersionMetadataList(vs []*DocumentVersionMetadata) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Describes a folder. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/FolderMetadata type FolderMetadata struct { @@ -7606,6 +8922,75 @@ func (s *FolderMetadata) SetSize(v int64) *FolderMetadata { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FolderMetadata) MarshalFields(e protocol.FieldEncoder) error { + if s.CreatedTimestamp != nil { + v := *s.CreatedTimestamp + + e.SetValue(protocol.BodyTarget, "CreatedTimestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.CreatorId != nil { + v := *s.CreatorId + + e.SetValue(protocol.BodyTarget, "CreatorId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Labels) > 0 { + v := s.Labels + + e.SetList(protocol.BodyTarget, "Labels", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.LatestVersionSize != nil { + v := *s.LatestVersionSize + + e.SetValue(protocol.BodyTarget, "LatestVersionSize", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ModifiedTimestamp != nil { + v := *s.ModifiedTimestamp + + e.SetValue(protocol.BodyTarget, "ModifiedTimestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParentFolderId != nil { + v := *s.ParentFolderId + + e.SetValue(protocol.BodyTarget, "ParentFolderId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceState != nil { + v := *s.ResourceState + + e.SetValue(protocol.BodyTarget, "ResourceState", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Signature != nil { + v := *s.Signature + + e.SetValue(protocol.BodyTarget, "Signature", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Size != nil { + v := *s.Size + + e.SetValue(protocol.BodyTarget, "Size", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeFolderMetadataList(vs []*FolderMetadata) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetCurrentUserRequest type GetCurrentUserInput struct { _ struct{} `type:"structure"` @@ -7649,6 +9034,17 @@ func (s *GetCurrentUserInput) SetAuthenticationToken(v string) *GetCurrentUserIn return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCurrentUserInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetCurrentUserResponse type GetCurrentUserOutput struct { _ struct{} `type:"structure"` @@ -7673,6 +9069,17 @@ func (s *GetCurrentUserOutput) SetUser(v *User) *GetCurrentUserOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetCurrentUserOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.User != nil { + v := s.User + + e.SetFields(protocol.BodyTarget, "User", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentRequest type GetDocumentInput struct { _ struct{} `type:"structure"` @@ -7737,6 +9144,27 @@ func (s *GetDocumentInput) SetIncludeCustomMetadata(v bool) *GetDocumentInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDocumentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DocumentId != nil { + v := *s.DocumentId + + e.SetValue(protocol.PathTarget, "DocumentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IncludeCustomMetadata != nil { + v := *s.IncludeCustomMetadata + + e.SetValue(protocol.QueryTarget, "includeCustomMetadata", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentResponse type GetDocumentOutput struct { _ struct{} `type:"structure"` @@ -7770,6 +9198,22 @@ func (s *GetDocumentOutput) SetMetadata(v *DocumentMetadata) *GetDocumentOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDocumentOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.CustomMetadata) > 0 { + v := s.CustomMetadata + + e.SetMap(protocol.BodyTarget, "CustomMetadata", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.Metadata != nil { + v := s.Metadata + + e.SetFields(protocol.BodyTarget, "Metadata", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentPathRequest type GetDocumentPathInput struct { _ struct{} `type:"structure"` @@ -7862,6 +9306,37 @@ func (s *GetDocumentPathInput) SetMarker(v string) *GetDocumentPathInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDocumentPathInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DocumentId != nil { + v := *s.DocumentId + + e.SetValue(protocol.PathTarget, "DocumentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Fields != nil { + v := *s.Fields + + e.SetValue(protocol.QueryTarget, "fields", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentPathResponse type GetDocumentPathOutput struct { _ struct{} `type:"structure"` @@ -7886,6 +9361,17 @@ func (s *GetDocumentPathOutput) SetPath(v *ResourcePath) *GetDocumentPathOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDocumentPathOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Path != nil { + v := s.Path + + e.SetFields(protocol.BodyTarget, "Path", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentVersionRequest type GetDocumentVersionInput struct { _ struct{} `type:"structure"` @@ -7980,6 +9466,37 @@ func (s *GetDocumentVersionInput) SetVersionId(v string) *GetDocumentVersionInpu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDocumentVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DocumentId != nil { + v := *s.DocumentId + + e.SetValue(protocol.PathTarget, "DocumentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Fields != nil { + v := *s.Fields + + e.SetValue(protocol.QueryTarget, "fields", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IncludeCustomMetadata != nil { + v := *s.IncludeCustomMetadata + + e.SetValue(protocol.QueryTarget, "includeCustomMetadata", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.PathTarget, "VersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetDocumentVersionResponse type GetDocumentVersionOutput struct { _ struct{} `type:"structure"` @@ -8013,6 +9530,22 @@ func (s *GetDocumentVersionOutput) SetMetadata(v *DocumentVersionMetadata) *GetD return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetDocumentVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.CustomMetadata) > 0 { + v := s.CustomMetadata + + e.SetMap(protocol.BodyTarget, "CustomMetadata", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.Metadata != nil { + v := s.Metadata + + e.SetFields(protocol.BodyTarget, "Metadata", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolderRequest type GetFolderInput struct { _ struct{} `type:"structure"` @@ -8077,6 +9610,27 @@ func (s *GetFolderInput) SetIncludeCustomMetadata(v bool) *GetFolderInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetFolderInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FolderId != nil { + v := *s.FolderId + + e.SetValue(protocol.PathTarget, "FolderId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IncludeCustomMetadata != nil { + v := *s.IncludeCustomMetadata + + e.SetValue(protocol.QueryTarget, "includeCustomMetadata", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolderResponse type GetFolderOutput struct { _ struct{} `type:"structure"` @@ -8110,6 +9664,22 @@ func (s *GetFolderOutput) SetMetadata(v *FolderMetadata) *GetFolderOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetFolderOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.CustomMetadata) > 0 { + v := s.CustomMetadata + + e.SetMap(protocol.BodyTarget, "CustomMetadata", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.Metadata != nil { + v := s.Metadata + + e.SetFields(protocol.BodyTarget, "Metadata", v, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolderPathRequest type GetFolderPathInput struct { _ struct{} `type:"structure"` @@ -8202,18 +9772,49 @@ func (s *GetFolderPathInput) SetMarker(v string) *GetFolderPathInput { return s } -// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolderPathResponse -type GetFolderPathOutput struct { - _ struct{} `type:"structure"` +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetFolderPathInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken - // The path information. - Path *ResourcePath `type:"structure"` -} + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Fields != nil { + v := *s.Fields -// String returns the string representation -func (s GetFolderPathOutput) String() string { - return awsutil.Prettify(s) -} + e.SetValue(protocol.QueryTarget, "fields", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FolderId != nil { + v := *s.FolderId + + e.SetValue(protocol.PathTarget, "FolderId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Limit != nil { + v := *s.Limit + + e.SetValue(protocol.QueryTarget, "limit", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Marker != nil { + v := *s.Marker + + e.SetValue(protocol.QueryTarget, "marker", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GetFolderPathResponse +type GetFolderPathOutput struct { + _ struct{} `type:"structure"` + + // The path information. + Path *ResourcePath `type:"structure"` +} + +// String returns the string representation +func (s GetFolderPathOutput) String() string { + return awsutil.Prettify(s) +} // GoString returns the string representation func (s GetFolderPathOutput) GoString() string { @@ -8226,6 +9827,17 @@ func (s *GetFolderPathOutput) SetPath(v *ResourcePath) *GetFolderPathOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetFolderPathOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Path != nil { + v := s.Path + + e.SetFields(protocol.BodyTarget, "Path", v, protocol.Metadata{}) + } + + return nil +} + // Describes the metadata of a user group. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/GroupMetadata type GroupMetadata struct { @@ -8260,6 +9872,30 @@ func (s *GroupMetadata) SetName(v string) *GroupMetadata { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GroupMetadata) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeGroupMetadataList(vs []*GroupMetadata) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/InitiateDocumentVersionUploadRequest type InitiateDocumentVersionUploadInput struct { _ struct{} `type:"structure"` @@ -8378,6 +10014,52 @@ func (s *InitiateDocumentVersionUploadInput) SetParentFolderId(v string) *Initia return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InitiateDocumentVersionUploadInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ContentCreatedTimestamp != nil { + v := *s.ContentCreatedTimestamp + + e.SetValue(protocol.BodyTarget, "ContentCreatedTimestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.ContentModifiedTimestamp != nil { + v := *s.ContentModifiedTimestamp + + e.SetValue(protocol.BodyTarget, "ContentModifiedTimestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.ContentType != nil { + v := *s.ContentType + + e.SetValue(protocol.BodyTarget, "ContentType", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DocumentSizeInBytes != nil { + v := *s.DocumentSizeInBytes + + e.SetValue(protocol.BodyTarget, "DocumentSizeInBytes", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParentFolderId != nil { + v := *s.ParentFolderId + + e.SetValue(protocol.BodyTarget, "ParentFolderId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/InitiateDocumentVersionUploadResponse type InitiateDocumentVersionUploadOutput struct { _ struct{} `type:"structure"` @@ -8411,6 +10093,22 @@ func (s *InitiateDocumentVersionUploadOutput) SetUploadMetadata(v *UploadMetadat return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *InitiateDocumentVersionUploadOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.Metadata != nil { + v := s.Metadata + + e.SetFields(protocol.BodyTarget, "Metadata", v, protocol.Metadata{}) + } + if s.UploadMetadata != nil { + v := s.UploadMetadata + + e.SetFields(protocol.BodyTarget, "UploadMetadata", v, protocol.Metadata{}) + } + + return nil +} + // Set of options which defines notification preferences of given action. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/NotificationOptions type NotificationOptions struct { @@ -8445,6 +10143,22 @@ func (s *NotificationOptions) SetSendEmail(v bool) *NotificationOptions { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *NotificationOptions) MarshalFields(e protocol.FieldEncoder) error { + if s.EmailMessage != nil { + v := *s.EmailMessage + + e.SetValue(protocol.BodyTarget, "EmailMessage", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SendEmail != nil { + v := *s.SendEmail + + e.SetValue(protocol.BodyTarget, "SendEmail", protocol.BoolValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes the users or user groups. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/Participants type Participants struct { @@ -8479,6 +10193,22 @@ func (s *Participants) SetUsers(v []*UserMetadata) *Participants { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Participants) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Groups) > 0 { + v := s.Groups + + e.SetList(protocol.BodyTarget, "Groups", encodeGroupMetadataList(v), protocol.Metadata{}) + } + if len(s.Users) > 0 { + v := s.Users + + e.SetList(protocol.BodyTarget, "Users", encodeUserMetadataList(v), protocol.Metadata{}) + } + + return nil +} + // Describes the permissions. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/PermissionInfo type PermissionInfo struct { @@ -8513,6 +10243,30 @@ func (s *PermissionInfo) SetType(v string) *PermissionInfo { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PermissionInfo) MarshalFields(e protocol.FieldEncoder) error { + if s.Role != nil { + v := *s.Role + + e.SetValue(protocol.BodyTarget, "Role", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodePermissionInfoList(vs []*PermissionInfo) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Describes a resource. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/Principal type Principal struct { @@ -8556,6 +10310,35 @@ func (s *Principal) SetType(v string) *Principal { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Principal) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Roles) > 0 { + v := s.Roles + + e.SetList(protocol.BodyTarget, "Roles", encodePermissionInfoList(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodePrincipalList(vs []*Principal) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/RemoveAllResourcePermissionsRequest type RemoveAllResourcePermissionsInput struct { _ struct{} `type:"structure"` @@ -8611,6 +10394,22 @@ func (s *RemoveAllResourcePermissionsInput) SetResourceId(v string) *RemoveAllRe return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RemoveAllResourcePermissionsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "ResourceId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/RemoveAllResourcePermissionsOutput type RemoveAllResourcePermissionsOutput struct { _ struct{} `type:"structure"` @@ -8626,6 +10425,12 @@ func (s RemoveAllResourcePermissionsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RemoveAllResourcePermissionsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/RemoveResourcePermissionRequest type RemoveResourcePermissionInput struct { _ struct{} `type:"structure"` @@ -8707,6 +10512,32 @@ func (s *RemoveResourcePermissionInput) SetResourceId(v string) *RemoveResourceP return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RemoveResourcePermissionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PrincipalId != nil { + v := *s.PrincipalId + + e.SetValue(protocol.PathTarget, "PrincipalId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.PrincipalType != nil { + v := *s.PrincipalType + + e.SetValue(protocol.QueryTarget, "type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceId != nil { + v := *s.ResourceId + + e.SetValue(protocol.PathTarget, "ResourceId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/RemoveResourcePermissionOutput type RemoveResourcePermissionOutput struct { _ struct{} `type:"structure"` @@ -8722,6 +10553,12 @@ func (s RemoveResourcePermissionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *RemoveResourcePermissionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Describes the metadata of a resource. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/ResourceMetadata type ResourceMetadata struct { @@ -8802,6 +10639,47 @@ func (s *ResourceMetadata) SetVersionId(v string) *ResourceMetadata { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ResourceMetadata) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.OriginalName != nil { + v := *s.OriginalName + + e.SetValue(protocol.BodyTarget, "OriginalName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Owner != nil { + v := s.Owner + + e.SetFields(protocol.BodyTarget, "Owner", v, protocol.Metadata{}) + } + if s.ParentId != nil { + v := *s.ParentId + + e.SetValue(protocol.BodyTarget, "ParentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.BodyTarget, "VersionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes the path information of a resource. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/ResourcePath type ResourcePath struct { @@ -8827,6 +10705,17 @@ func (s *ResourcePath) SetComponents(v []*ResourcePathComponent) *ResourcePath { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ResourcePath) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Components) > 0 { + v := s.Components + + e.SetList(protocol.BodyTarget, "Components", encodeResourcePathComponentList(v), protocol.Metadata{}) + } + + return nil +} + // Describes the resource path. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/ResourcePathComponent type ResourcePathComponent struct { @@ -8861,6 +10750,30 @@ func (s *ResourcePathComponent) SetName(v string) *ResourcePathComponent { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ResourcePathComponent) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeResourcePathComponentList(vs []*ResourcePathComponent) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Describes the recipient type and ID, if available. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/SharePrincipal type SharePrincipal struct { @@ -8932,6 +10845,35 @@ func (s *SharePrincipal) SetType(v string) *SharePrincipal { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *SharePrincipal) MarshalFields(e protocol.FieldEncoder) error { + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Role != nil { + v := *s.Role + + e.SetValue(protocol.BodyTarget, "Role", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeSharePrincipalList(vs []*SharePrincipal) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Describes the share results of a resource. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/ShareResult type ShareResult struct { @@ -8993,6 +10935,45 @@ func (s *ShareResult) SetStatusMessage(v string) *ShareResult { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ShareResult) MarshalFields(e protocol.FieldEncoder) error { + if s.PrincipalId != nil { + v := *s.PrincipalId + + e.SetValue(protocol.BodyTarget, "PrincipalId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Role != nil { + v := *s.Role + + e.SetValue(protocol.BodyTarget, "Role", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ShareId != nil { + v := *s.ShareId + + e.SetValue(protocol.BodyTarget, "ShareId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StatusMessage != nil { + v := *s.StatusMessage + + e.SetValue(protocol.BodyTarget, "StatusMessage", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeShareResultList(vs []*ShareResult) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Describes the storage for a user. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/StorageRuleType type StorageRuleType struct { @@ -9027,6 +11008,22 @@ func (s *StorageRuleType) SetStorageType(v string) *StorageRuleType { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *StorageRuleType) MarshalFields(e protocol.FieldEncoder) error { + if s.StorageAllocatedInBytes != nil { + v := *s.StorageAllocatedInBytes + + e.SetValue(protocol.BodyTarget, "StorageAllocatedInBytes", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.StorageType != nil { + v := *s.StorageType + + e.SetValue(protocol.BodyTarget, "StorageType", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes a subscription. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/Subscription type Subscription struct { @@ -9070,6 +11067,35 @@ func (s *Subscription) SetSubscriptionId(v string) *Subscription { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Subscription) MarshalFields(e protocol.FieldEncoder) error { + if s.EndPoint != nil { + v := *s.EndPoint + + e.SetValue(protocol.BodyTarget, "EndPoint", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Protocol != nil { + v := *s.Protocol + + e.SetValue(protocol.BodyTarget, "Protocol", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SubscriptionId != nil { + v := *s.SubscriptionId + + e.SetValue(protocol.BodyTarget, "SubscriptionId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeSubscriptionList(vs []*Subscription) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateDocumentRequest type UpdateDocumentInput struct { _ struct{} `type:"structure"` @@ -9158,6 +11184,37 @@ func (s *UpdateDocumentInput) SetResourceState(v string) *UpdateDocumentInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateDocumentInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DocumentId != nil { + v := *s.DocumentId + + e.SetValue(protocol.PathTarget, "DocumentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParentFolderId != nil { + v := *s.ParentFolderId + + e.SetValue(protocol.BodyTarget, "ParentFolderId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceState != nil { + v := *s.ResourceState + + e.SetValue(protocol.BodyTarget, "ResourceState", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateDocumentOutput type UpdateDocumentOutput struct { _ struct{} `type:"structure"` @@ -9173,6 +11230,12 @@ func (s UpdateDocumentOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateDocumentOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateDocumentVersionRequest type UpdateDocumentVersionInput struct { _ struct{} `type:"structure"` @@ -9254,6 +11317,32 @@ func (s *UpdateDocumentVersionInput) SetVersionStatus(v string) *UpdateDocumentV return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateDocumentVersionInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.DocumentId != nil { + v := *s.DocumentId + + e.SetValue(protocol.PathTarget, "DocumentId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionId != nil { + v := *s.VersionId + + e.SetValue(protocol.PathTarget, "VersionId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.VersionStatus != nil { + v := *s.VersionStatus + + e.SetValue(protocol.BodyTarget, "VersionStatus", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateDocumentVersionOutput type UpdateDocumentVersionOutput struct { _ struct{} `type:"structure"` @@ -9269,6 +11358,12 @@ func (s UpdateDocumentVersionOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateDocumentVersionOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateFolderRequest type UpdateFolderInput struct { _ struct{} `type:"structure"` @@ -9358,6 +11453,37 @@ func (s *UpdateFolderInput) SetResourceState(v string) *UpdateFolderInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateFolderInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.FolderId != nil { + v := *s.FolderId + + e.SetValue(protocol.PathTarget, "FolderId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ParentFolderId != nil { + v := *s.ParentFolderId + + e.SetValue(protocol.BodyTarget, "ParentFolderId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceState != nil { + v := *s.ResourceState + + e.SetValue(protocol.BodyTarget, "ResourceState", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateFolderOutput type UpdateFolderOutput struct { _ struct{} `type:"structure"` @@ -9373,6 +11499,12 @@ func (s UpdateFolderOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateFolderOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateUserRequest type UpdateUserInput struct { _ struct{} `type:"structure"` @@ -9500,6 +11632,57 @@ func (s *UpdateUserInput) SetUserId(v string) *UpdateUserInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateUserInput) MarshalFields(e protocol.FieldEncoder) error { + if s.AuthenticationToken != nil { + v := *s.AuthenticationToken + + e.SetValue(protocol.HeaderTarget, "Authentication", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GivenName != nil { + v := *s.GivenName + + e.SetValue(protocol.BodyTarget, "GivenName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GrantPoweruserPrivileges != nil { + v := *s.GrantPoweruserPrivileges + + e.SetValue(protocol.BodyTarget, "GrantPoweruserPrivileges", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Locale != nil { + v := *s.Locale + + e.SetValue(protocol.BodyTarget, "Locale", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StorageRule != nil { + v := s.StorageRule + + e.SetFields(protocol.BodyTarget, "StorageRule", v, protocol.Metadata{}) + } + if s.Surname != nil { + v := *s.Surname + + e.SetValue(protocol.BodyTarget, "Surname", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimeZoneId != nil { + v := *s.TimeZoneId + + e.SetValue(protocol.BodyTarget, "TimeZoneId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UserId != nil { + v := *s.UserId + + e.SetValue(protocol.PathTarget, "UserId", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UpdateUserResponse type UpdateUserOutput struct { _ struct{} `type:"structure"` @@ -9524,6 +11707,17 @@ func (s *UpdateUserOutput) SetUser(v *User) *UpdateUserOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UpdateUserOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.User != nil { + v := s.User + + e.SetFields(protocol.BodyTarget, "User", v, protocol.Metadata{}) + } + + return nil +} + // Describes the upload. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UploadMetadata type UploadMetadata struct { @@ -9558,6 +11752,22 @@ func (s *UploadMetadata) SetUploadUrl(v string) *UploadMetadata { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UploadMetadata) MarshalFields(e protocol.FieldEncoder) error { + if len(s.SignedHeaders) > 0 { + v := s.SignedHeaders + + e.SetMap(protocol.BodyTarget, "SignedHeaders", protocol.EncodeStringMap(v), protocol.Metadata{}) + } + if s.UploadUrl != nil { + v := *s.UploadUrl + + e.SetValue(protocol.BodyTarget, "UploadUrl", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Describes a user. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/User type User struct { @@ -9709,6 +11919,95 @@ func (s *User) SetUsername(v string) *User { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *User) MarshalFields(e protocol.FieldEncoder) error { + if s.CreatedTimestamp != nil { + v := *s.CreatedTimestamp + + e.SetValue(protocol.BodyTarget, "CreatedTimestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.EmailAddress != nil { + v := *s.EmailAddress + + e.SetValue(protocol.BodyTarget, "EmailAddress", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GivenName != nil { + v := *s.GivenName + + e.SetValue(protocol.BodyTarget, "GivenName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Locale != nil { + v := *s.Locale + + e.SetValue(protocol.BodyTarget, "Locale", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ModifiedTimestamp != nil { + v := *s.ModifiedTimestamp + + e.SetValue(protocol.BodyTarget, "ModifiedTimestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.OrganizationId != nil { + v := *s.OrganizationId + + e.SetValue(protocol.BodyTarget, "OrganizationId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RecycleBinFolderId != nil { + v := *s.RecycleBinFolderId + + e.SetValue(protocol.BodyTarget, "RecycleBinFolderId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.RootFolderId != nil { + v := *s.RootFolderId + + e.SetValue(protocol.BodyTarget, "RootFolderId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Status != nil { + v := *s.Status + + e.SetValue(protocol.BodyTarget, "Status", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Storage != nil { + v := s.Storage + + e.SetFields(protocol.BodyTarget, "Storage", v, protocol.Metadata{}) + } + if s.Surname != nil { + v := *s.Surname + + e.SetValue(protocol.BodyTarget, "Surname", protocol.StringValue(v), protocol.Metadata{}) + } + if s.TimeZoneId != nil { + v := *s.TimeZoneId + + e.SetValue(protocol.BodyTarget, "TimeZoneId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Username != nil { + v := *s.Username + + e.SetValue(protocol.BodyTarget, "Username", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeUserList(vs []*User) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Describes the metadata of the user. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UserMetadata type UserMetadata struct { @@ -9770,6 +12069,45 @@ func (s *UserMetadata) SetUsername(v string) *UserMetadata { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UserMetadata) MarshalFields(e protocol.FieldEncoder) error { + if s.EmailAddress != nil { + v := *s.EmailAddress + + e.SetValue(protocol.BodyTarget, "EmailAddress", protocol.StringValue(v), protocol.Metadata{}) + } + if s.GivenName != nil { + v := *s.GivenName + + e.SetValue(protocol.BodyTarget, "GivenName", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Surname != nil { + v := *s.Surname + + e.SetValue(protocol.BodyTarget, "Surname", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Username != nil { + v := *s.Username + + e.SetValue(protocol.BodyTarget, "Username", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeUserMetadataList(vs []*UserMetadata) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Describes the storage for a user. // Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/UserStorageMetadata type UserStorageMetadata struct { @@ -9804,6 +12142,22 @@ func (s *UserStorageMetadata) SetStorageUtilizedInBytes(v int64) *UserStorageMet return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UserStorageMetadata) MarshalFields(e protocol.FieldEncoder) error { + if s.StorageRule != nil { + v := s.StorageRule + + e.SetFields(protocol.BodyTarget, "StorageRule", v, protocol.Metadata{}) + } + if s.StorageUtilizedInBytes != nil { + v := *s.StorageUtilizedInBytes + + e.SetValue(protocol.BodyTarget, "StorageUtilizedInBytes", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + const ( // ActivityTypeDocumentCheckedIn is a ActivityType enum value ActivityTypeDocumentCheckedIn = "DOCUMENT_CHECKED_IN" diff --git a/service/xray/api.go b/service/xray/api.go index 5b6e91d8133..dd3c4199a1e 100644 --- a/service/xray/api.go +++ b/service/xray/api.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" ) const opBatchGetTraces = "BatchGetTraces" @@ -837,6 +838,35 @@ func (s *Alias) SetType(v string) *Alias { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Alias) MarshalFields(e protocol.FieldEncoder) error { + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Names) > 0 { + v := s.Names + + e.SetList(protocol.BodyTarget, "Names", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeAliasList(vs []*Alias) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Value of a segment annotation. Has one of three value types: Number, Boolean // or String. // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/AnnotationValue @@ -881,6 +911,27 @@ func (s *AnnotationValue) SetStringValue(v string) *AnnotationValue { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *AnnotationValue) MarshalFields(e protocol.FieldEncoder) error { + if s.BooleanValue != nil { + v := *s.BooleanValue + + e.SetValue(protocol.BodyTarget, "BooleanValue", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.NumberValue != nil { + v := *s.NumberValue + + e.SetValue(protocol.BodyTarget, "NumberValue", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.StringValue != nil { + v := *s.StringValue + + e.SetValue(protocol.BodyTarget, "StringValue", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/BackendConnectionErrors type BackendConnectionErrors struct { _ struct{} `type:"structure"` @@ -944,6 +995,42 @@ func (s *BackendConnectionErrors) SetUnknownHostCount(v int64) *BackendConnectio return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BackendConnectionErrors) MarshalFields(e protocol.FieldEncoder) error { + if s.ConnectionRefusedCount != nil { + v := *s.ConnectionRefusedCount + + e.SetValue(protocol.BodyTarget, "ConnectionRefusedCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.HTTPCode4XXCount != nil { + v := *s.HTTPCode4XXCount + + e.SetValue(protocol.BodyTarget, "HTTPCode4XXCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.HTTPCode5XXCount != nil { + v := *s.HTTPCode5XXCount + + e.SetValue(protocol.BodyTarget, "HTTPCode5XXCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.OtherCount != nil { + v := *s.OtherCount + + e.SetValue(protocol.BodyTarget, "OtherCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TimeoutCount != nil { + v := *s.TimeoutCount + + e.SetValue(protocol.BodyTarget, "TimeoutCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.UnknownHostCount != nil { + v := *s.UnknownHostCount + + e.SetValue(protocol.BodyTarget, "UnknownHostCount", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/BatchGetTracesRequest type BatchGetTracesInput struct { _ struct{} `type:"structure"` @@ -992,6 +1079,22 @@ func (s *BatchGetTracesInput) SetTraceIds(v []*string) *BatchGetTracesInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchGetTracesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TraceIds) > 0 { + v := s.TraceIds + + e.SetList(protocol.BodyTarget, "TraceIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/BatchGetTracesResult type BatchGetTracesOutput struct { _ struct{} `type:"structure"` @@ -1034,6 +1137,27 @@ func (s *BatchGetTracesOutput) SetUnprocessedTraceIds(v []*string) *BatchGetTrac return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *BatchGetTracesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Traces) > 0 { + v := s.Traces + + e.SetList(protocol.BodyTarget, "Traces", encodeTraceList(v), protocol.Metadata{}) + } + if len(s.UnprocessedTraceIds) > 0 { + v := s.UnprocessedTraceIds + + e.SetList(protocol.BodyTarget, "UnprocessedTraceIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Information about a connection between two services. // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/Edge type Edge struct { @@ -1104,6 +1228,50 @@ func (s *Edge) SetSummaryStatistics(v *EdgeStatistics) *Edge { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Edge) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Aliases) > 0 { + v := s.Aliases + + e.SetList(protocol.BodyTarget, "Aliases", encodeAliasList(v), protocol.Metadata{}) + } + if s.EndTime != nil { + v := *s.EndTime + + e.SetValue(protocol.BodyTarget, "EndTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.ReferenceId != nil { + v := *s.ReferenceId + + e.SetValue(protocol.BodyTarget, "ReferenceId", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.ResponseTimeHistogram) > 0 { + v := s.ResponseTimeHistogram + + e.SetList(protocol.BodyTarget, "ResponseTimeHistogram", encodeHistogramEntryList(v), protocol.Metadata{}) + } + if s.StartTime != nil { + v := *s.StartTime + + e.SetValue(protocol.BodyTarget, "StartTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.SummaryStatistics != nil { + v := s.SummaryStatistics + + e.SetFields(protocol.BodyTarget, "SummaryStatistics", v, protocol.Metadata{}) + } + + return nil +} + +func encodeEdgeList(vs []*Edge) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Response statistics for an edge. // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/EdgeStatistics type EdgeStatistics struct { @@ -1165,6 +1333,37 @@ func (s *EdgeStatistics) SetTotalResponseTime(v float64) *EdgeStatistics { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *EdgeStatistics) MarshalFields(e protocol.FieldEncoder) error { + if s.ErrorStatistics != nil { + v := s.ErrorStatistics + + e.SetFields(protocol.BodyTarget, "ErrorStatistics", v, protocol.Metadata{}) + } + if s.FaultStatistics != nil { + v := s.FaultStatistics + + e.SetFields(protocol.BodyTarget, "FaultStatistics", v, protocol.Metadata{}) + } + if s.OkCount != nil { + v := *s.OkCount + + e.SetValue(protocol.BodyTarget, "OkCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TotalCount != nil { + v := *s.TotalCount + + e.SetValue(protocol.BodyTarget, "TotalCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TotalResponseTime != nil { + v := *s.TotalResponseTime + + e.SetValue(protocol.BodyTarget, "TotalResponseTime", protocol.Float64Value(v), protocol.Metadata{}) + } + + return nil +} + // Information about requests that failed with a 4xx Client Error status code. // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/ErrorStatistics type ErrorStatistics struct { @@ -1209,6 +1408,27 @@ func (s *ErrorStatistics) SetTotalCount(v int64) *ErrorStatistics { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ErrorStatistics) MarshalFields(e protocol.FieldEncoder) error { + if s.OtherCount != nil { + v := *s.OtherCount + + e.SetValue(protocol.BodyTarget, "OtherCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.ThrottleCount != nil { + v := *s.ThrottleCount + + e.SetValue(protocol.BodyTarget, "ThrottleCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TotalCount != nil { + v := *s.TotalCount + + e.SetValue(protocol.BodyTarget, "TotalCount", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Information about requests that failed with a 5xx Server Error status code. // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/FaultStatistics type FaultStatistics struct { @@ -1244,6 +1464,22 @@ func (s *FaultStatistics) SetTotalCount(v int64) *FaultStatistics { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *FaultStatistics) MarshalFields(e protocol.FieldEncoder) error { + if s.OtherCount != nil { + v := *s.OtherCount + + e.SetValue(protocol.BodyTarget, "OtherCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TotalCount != nil { + v := *s.TotalCount + + e.SetValue(protocol.BodyTarget, "TotalCount", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetServiceGraphRequest type GetServiceGraphInput struct { _ struct{} `type:"structure"` @@ -1306,6 +1542,27 @@ func (s *GetServiceGraphInput) SetStartTime(v time.Time) *GetServiceGraphInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetServiceGraphInput) MarshalFields(e protocol.FieldEncoder) error { + if s.EndTime != nil { + v := *s.EndTime + + e.SetValue(protocol.BodyTarget, "EndTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.StartTime != nil { + v := *s.StartTime + + e.SetValue(protocol.BodyTarget, "StartTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetServiceGraphResult type GetServiceGraphOutput struct { _ struct{} `type:"structure"` @@ -1358,6 +1615,32 @@ func (s *GetServiceGraphOutput) SetStartTime(v time.Time) *GetServiceGraphOutput return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetServiceGraphOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.EndTime != nil { + v := *s.EndTime + + e.SetValue(protocol.BodyTarget, "EndTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Services) > 0 { + v := s.Services + + e.SetList(protocol.BodyTarget, "Services", encodeServiceList(v), protocol.Metadata{}) + } + if s.StartTime != nil { + v := *s.StartTime + + e.SetValue(protocol.BodyTarget, "StartTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTraceGraphRequest type GetTraceGraphInput struct { _ struct{} `type:"structure"` @@ -1406,6 +1689,22 @@ func (s *GetTraceGraphInput) SetTraceIds(v []*string) *GetTraceGraphInput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetTraceGraphInput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TraceIds) > 0 { + v := s.TraceIds + + e.SetList(protocol.BodyTarget, "TraceIds", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTraceGraphResult type GetTraceGraphOutput struct { _ struct{} `type:"structure"` @@ -1439,6 +1738,22 @@ func (s *GetTraceGraphOutput) SetServices(v []*Service) *GetTraceGraphOutput { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetTraceGraphOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Services) > 0 { + v := s.Services + + e.SetList(protocol.BodyTarget, "Services", encodeServiceList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTraceSummariesRequest type GetTraceSummariesInput struct { _ struct{} `type:"structure"` @@ -1524,6 +1839,37 @@ func (s *GetTraceSummariesInput) SetStartTime(v time.Time) *GetTraceSummariesInp return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetTraceSummariesInput) MarshalFields(e protocol.FieldEncoder) error { + if s.EndTime != nil { + v := *s.EndTime + + e.SetValue(protocol.BodyTarget, "EndTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.FilterExpression != nil { + v := *s.FilterExpression + + e.SetValue(protocol.BodyTarget, "FilterExpression", protocol.StringValue(v), protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Sampling != nil { + v := *s.Sampling + + e.SetValue(protocol.BodyTarget, "Sampling", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.StartTime != nil { + v := *s.StartTime + + e.SetValue(protocol.BodyTarget, "StartTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTraceSummariesResult type GetTraceSummariesOutput struct { _ struct{} `type:"structure"` @@ -1577,6 +1923,32 @@ func (s *GetTraceSummariesOutput) SetTracesProcessedCount(v int64) *GetTraceSumm return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *GetTraceSummariesOutput) MarshalFields(e protocol.FieldEncoder) error { + if s.ApproximateTime != nil { + v := *s.ApproximateTime + + e.SetValue(protocol.BodyTarget, "ApproximateTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.NextToken != nil { + v := *s.NextToken + + e.SetValue(protocol.BodyTarget, "NextToken", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TraceSummaries) > 0 { + v := s.TraceSummaries + + e.SetList(protocol.BodyTarget, "TraceSummaries", encodeTraceSummaryList(v), protocol.Metadata{}) + } + if s.TracesProcessedCount != nil { + v := *s.TracesProcessedCount + + e.SetValue(protocol.BodyTarget, "TracesProcessedCount", protocol.Int64Value(v), protocol.Metadata{}) + } + + return nil +} + // An entry in a histogram for a statistic. A histogram maps the range of observed // values on the X axis, and the prevalence of each value on the Y axis. // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/HistogramEntry @@ -1612,6 +1984,30 @@ func (s *HistogramEntry) SetValue(v float64) *HistogramEntry { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *HistogramEntry) MarshalFields(e protocol.FieldEncoder) error { + if s.Count != nil { + v := *s.Count + + e.SetValue(protocol.BodyTarget, "Count", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Value != nil { + v := *s.Value + + e.SetValue(protocol.BodyTarget, "Value", protocol.Float64Value(v), protocol.Metadata{}) + } + + return nil +} + +func encodeHistogramEntryList(vs []*HistogramEntry) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information about an HTTP request. // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/Http type Http struct { @@ -1673,6 +2069,37 @@ func (s *Http) SetUserAgent(v string) *Http { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Http) MarshalFields(e protocol.FieldEncoder) error { + if s.ClientIp != nil { + v := *s.ClientIp + + e.SetValue(protocol.BodyTarget, "ClientIp", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HttpMethod != nil { + v := *s.HttpMethod + + e.SetValue(protocol.BodyTarget, "HttpMethod", protocol.StringValue(v), protocol.Metadata{}) + } + if s.HttpStatus != nil { + v := *s.HttpStatus + + e.SetValue(protocol.BodyTarget, "HttpStatus", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.HttpURL != nil { + v := *s.HttpURL + + e.SetValue(protocol.BodyTarget, "HttpURL", protocol.StringValue(v), protocol.Metadata{}) + } + if s.UserAgent != nil { + v := *s.UserAgent + + e.SetValue(protocol.BodyTarget, "UserAgent", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutTelemetryRecordsRequest type PutTelemetryRecordsInput struct { _ struct{} `type:"structure"` @@ -1744,6 +2171,32 @@ func (s *PutTelemetryRecordsInput) SetTelemetryRecords(v []*TelemetryRecord) *Pu return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutTelemetryRecordsInput) MarshalFields(e protocol.FieldEncoder) error { + if s.EC2InstanceId != nil { + v := *s.EC2InstanceId + + e.SetValue(protocol.BodyTarget, "EC2InstanceId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Hostname != nil { + v := *s.Hostname + + e.SetValue(protocol.BodyTarget, "Hostname", protocol.StringValue(v), protocol.Metadata{}) + } + if s.ResourceARN != nil { + v := *s.ResourceARN + + e.SetValue(protocol.BodyTarget, "ResourceARN", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.TelemetryRecords) > 0 { + v := s.TelemetryRecords + + e.SetList(protocol.BodyTarget, "TelemetryRecords", encodeTelemetryRecordList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutTelemetryRecordsResult type PutTelemetryRecordsOutput struct { _ struct{} `type:"structure"` @@ -1759,6 +2212,12 @@ func (s PutTelemetryRecordsOutput) GoString() string { return s.String() } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutTelemetryRecordsOutput) MarshalFields(e protocol.FieldEncoder) error { + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutTraceSegmentsRequest type PutTraceSegmentsInput struct { _ struct{} `type:"structure"` @@ -1798,6 +2257,17 @@ func (s *PutTraceSegmentsInput) SetTraceSegmentDocuments(v []*string) *PutTraceS return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutTraceSegmentsInput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.TraceSegmentDocuments) > 0 { + v := s.TraceSegmentDocuments + + e.SetList(protocol.BodyTarget, "TraceSegmentDocuments", protocol.EncodeStringList(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutTraceSegmentsResult type PutTraceSegmentsOutput struct { _ struct{} `type:"structure"` @@ -1822,6 +2292,17 @@ func (s *PutTraceSegmentsOutput) SetUnprocessedTraceSegments(v []*UnprocessedTra return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *PutTraceSegmentsOutput) MarshalFields(e protocol.FieldEncoder) error { + if len(s.UnprocessedTraceSegments) > 0 { + v := s.UnprocessedTraceSegments + + e.SetList(protocol.BodyTarget, "UnprocessedTraceSegments", encodeUnprocessedTraceSegmentList(v), protocol.Metadata{}) + } + + return nil +} + // A segment from a trace that has been ingested by the X-Ray service. The segment // can be compiled from documents uploaded with PutTraceSegments, or an inferred // segment for a downstream service, generated from a subsegment sent by the @@ -1859,6 +2340,30 @@ func (s *Segment) SetId(v string) *Segment { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Segment) MarshalFields(e protocol.FieldEncoder) error { + if s.Document != nil { + v := *s.Document + + e.SetValue(protocol.BodyTarget, "Document", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeSegmentList(vs []*Segment) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information about an application that processed requests, users that made // requests, or downstream services, resources and applications that an application // used. @@ -2006,6 +2511,85 @@ func (s *Service) SetType(v string) *Service { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Service) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.BodyTarget, "AccountId", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.DurationHistogram) > 0 { + v := s.DurationHistogram + + e.SetList(protocol.BodyTarget, "DurationHistogram", encodeHistogramEntryList(v), protocol.Metadata{}) + } + if len(s.Edges) > 0 { + v := s.Edges + + e.SetList(protocol.BodyTarget, "Edges", encodeEdgeList(v), protocol.Metadata{}) + } + if s.EndTime != nil { + v := *s.EndTime + + e.SetValue(protocol.BodyTarget, "EndTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Names) > 0 { + v := s.Names + + e.SetList(protocol.BodyTarget, "Names", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.ReferenceId != nil { + v := *s.ReferenceId + + e.SetValue(protocol.BodyTarget, "ReferenceId", protocol.Int64Value(v), protocol.Metadata{}) + } + if len(s.ResponseTimeHistogram) > 0 { + v := s.ResponseTimeHistogram + + e.SetList(protocol.BodyTarget, "ResponseTimeHistogram", encodeHistogramEntryList(v), protocol.Metadata{}) + } + if s.Root != nil { + v := *s.Root + + e.SetValue(protocol.BodyTarget, "Root", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.StartTime != nil { + v := *s.StartTime + + e.SetValue(protocol.BodyTarget, "StartTime", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + if s.State != nil { + v := *s.State + + e.SetValue(protocol.BodyTarget, "State", protocol.StringValue(v), protocol.Metadata{}) + } + if s.SummaryStatistics != nil { + v := s.SummaryStatistics + + e.SetFields(protocol.BodyTarget, "SummaryStatistics", v, protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeServiceList(vs []*Service) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/ServiceId type ServiceId struct { _ struct{} `type:"structure"` @@ -2053,6 +2637,40 @@ func (s *ServiceId) SetType(v string) *ServiceId { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ServiceId) MarshalFields(e protocol.FieldEncoder) error { + if s.AccountId != nil { + v := *s.AccountId + + e.SetValue(protocol.BodyTarget, "AccountId", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Name != nil { + v := *s.Name + + e.SetValue(protocol.BodyTarget, "Name", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Names) > 0 { + v := s.Names + + e.SetList(protocol.BodyTarget, "Names", protocol.EncodeStringList(v), protocol.Metadata{}) + } + if s.Type != nil { + v := *s.Type + + e.SetValue(protocol.BodyTarget, "Type", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeServiceIdList(vs []*ServiceId) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Response statistics for a service. // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/ServiceStatistics type ServiceStatistics struct { @@ -2114,6 +2732,37 @@ func (s *ServiceStatistics) SetTotalResponseTime(v float64) *ServiceStatistics { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ServiceStatistics) MarshalFields(e protocol.FieldEncoder) error { + if s.ErrorStatistics != nil { + v := s.ErrorStatistics + + e.SetFields(protocol.BodyTarget, "ErrorStatistics", v, protocol.Metadata{}) + } + if s.FaultStatistics != nil { + v := s.FaultStatistics + + e.SetFields(protocol.BodyTarget, "FaultStatistics", v, protocol.Metadata{}) + } + if s.OkCount != nil { + v := *s.OkCount + + e.SetValue(protocol.BodyTarget, "OkCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TotalCount != nil { + v := *s.TotalCount + + e.SetValue(protocol.BodyTarget, "TotalCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.TotalResponseTime != nil { + v := *s.TotalResponseTime + + e.SetValue(protocol.BodyTarget, "TotalResponseTime", protocol.Float64Value(v), protocol.Metadata{}) + } + + return nil +} + // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/TelemetryRecord type TelemetryRecord struct { _ struct{} `type:"structure"` @@ -2191,6 +2840,50 @@ func (s *TelemetryRecord) SetTimestamp(v time.Time) *TelemetryRecord { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TelemetryRecord) MarshalFields(e protocol.FieldEncoder) error { + if s.BackendConnectionErrors != nil { + v := s.BackendConnectionErrors + + e.SetFields(protocol.BodyTarget, "BackendConnectionErrors", v, protocol.Metadata{}) + } + if s.SegmentsReceivedCount != nil { + v := *s.SegmentsReceivedCount + + e.SetValue(protocol.BodyTarget, "SegmentsReceivedCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SegmentsRejectedCount != nil { + v := *s.SegmentsRejectedCount + + e.SetValue(protocol.BodyTarget, "SegmentsRejectedCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SegmentsSentCount != nil { + v := *s.SegmentsSentCount + + e.SetValue(protocol.BodyTarget, "SegmentsSentCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.SegmentsSpilloverCount != nil { + v := *s.SegmentsSpilloverCount + + e.SetValue(protocol.BodyTarget, "SegmentsSpilloverCount", protocol.Int64Value(v), protocol.Metadata{}) + } + if s.Timestamp != nil { + v := *s.Timestamp + + e.SetValue(protocol.BodyTarget, "Timestamp", protocol.TimeValue{V: v, Format: protocol.UnixTimeFormat}, protocol.Metadata{}) + } + + return nil +} + +func encodeTelemetryRecordList(vs []*TelemetryRecord) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // A collection of segment documents with matching trace IDs. // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/Trace type Trace struct { @@ -2236,6 +2929,35 @@ func (s *Trace) SetSegments(v []*Segment) *Trace { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *Trace) MarshalFields(e protocol.FieldEncoder) error { + if s.Duration != nil { + v := *s.Duration + + e.SetValue(protocol.BodyTarget, "Duration", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if len(s.Segments) > 0 { + v := s.Segments + + e.SetList(protocol.BodyTarget, "Segments", encodeSegmentList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTraceList(vs []*Trace) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Metadata generated from the segment documents in a trace. // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/TraceSummary type TraceSummary struct { @@ -2356,6 +3078,80 @@ func (s *TraceSummary) SetUsers(v []*TraceUser) *TraceSummary { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TraceSummary) MarshalFields(e protocol.FieldEncoder) error { + if len(s.Annotations) > 0 { + v := s.Annotations + + e.SetMap(protocol.BodyTarget, "Annotations", func(me protocol.MapEncoder) { + for k, item := range v { + v := item + me.MapSetList(k, encodeValueWithServiceIdsList(v)) + } + }, protocol.Metadata{}) + } + if s.Duration != nil { + v := *s.Duration + + e.SetValue(protocol.BodyTarget, "Duration", protocol.Float64Value(v), protocol.Metadata{}) + } + if s.HasError != nil { + v := *s.HasError + + e.SetValue(protocol.BodyTarget, "HasError", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HasFault != nil { + v := *s.HasFault + + e.SetValue(protocol.BodyTarget, "HasFault", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.HasThrottle != nil { + v := *s.HasThrottle + + e.SetValue(protocol.BodyTarget, "HasThrottle", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.Http != nil { + v := s.Http + + e.SetFields(protocol.BodyTarget, "Http", v, protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.IsPartial != nil { + v := *s.IsPartial + + e.SetValue(protocol.BodyTarget, "IsPartial", protocol.BoolValue(v), protocol.Metadata{}) + } + if s.ResponseTime != nil { + v := *s.ResponseTime + + e.SetValue(protocol.BodyTarget, "ResponseTime", protocol.Float64Value(v), protocol.Metadata{}) + } + if len(s.ServiceIds) > 0 { + v := s.ServiceIds + + e.SetList(protocol.BodyTarget, "ServiceIds", encodeServiceIdList(v), protocol.Metadata{}) + } + if len(s.Users) > 0 { + v := s.Users + + e.SetList(protocol.BodyTarget, "Users", encodeTraceUserList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTraceSummaryList(vs []*TraceSummary) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information about a user recorded in segment documents. // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/TraceUser type TraceUser struct { @@ -2390,6 +3186,30 @@ func (s *TraceUser) SetUserName(v string) *TraceUser { return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *TraceUser) MarshalFields(e protocol.FieldEncoder) error { + if len(s.ServiceIds) > 0 { + v := s.ServiceIds + + e.SetList(protocol.BodyTarget, "ServiceIds", encodeServiceIdList(v), protocol.Metadata{}) + } + if s.UserName != nil { + v := *s.UserName + + e.SetValue(protocol.BodyTarget, "UserName", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeTraceUserList(vs []*TraceUser) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information about a segment that failed processing. // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/UnprocessedTraceSegment type UnprocessedTraceSegment struct { @@ -2433,6 +3253,35 @@ func (s *UnprocessedTraceSegment) SetMessage(v string) *UnprocessedTraceSegment return s } +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *UnprocessedTraceSegment) MarshalFields(e protocol.FieldEncoder) error { + if s.ErrorCode != nil { + v := *s.ErrorCode + + e.SetValue(protocol.BodyTarget, "ErrorCode", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Id != nil { + v := *s.Id + + e.SetValue(protocol.BodyTarget, "Id", protocol.StringValue(v), protocol.Metadata{}) + } + if s.Message != nil { + v := *s.Message + + e.SetValue(protocol.BodyTarget, "Message", protocol.StringValue(v), protocol.Metadata{}) + } + + return nil +} + +func encodeUnprocessedTraceSegmentList(vs []*UnprocessedTraceSegment) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +} + // Information about a segment annotation. // Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/ValueWithServiceIds type ValueWithServiceIds struct { @@ -2466,3 +3315,27 @@ func (s *ValueWithServiceIds) SetServiceIds(v []*ServiceId) *ValueWithServiceIds s.ServiceIds = v return s } + +// MarshalFields encodes the AWS API shape using the passed in protocol encoder. +func (s *ValueWithServiceIds) MarshalFields(e protocol.FieldEncoder) error { + if s.AnnotationValue != nil { + v := s.AnnotationValue + + e.SetFields(protocol.BodyTarget, "AnnotationValue", v, protocol.Metadata{}) + } + if len(s.ServiceIds) > 0 { + v := s.ServiceIds + + e.SetList(protocol.BodyTarget, "ServiceIds", encodeServiceIdList(v), protocol.Metadata{}) + } + + return nil +} + +func encodeValueWithServiceIdsList(vs []*ValueWithServiceIds) func(protocol.ListEncoder) { + return func(le protocol.ListEncoder) { + for _, v := range vs { + le.ListAddFields(v) + } + } +}