From 8b6883c370175cc15cc78cfd87313a989ca1a995 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Wed, 17 Aug 2022 18:15:41 +0000 Subject: [PATCH] Regenerated Clients --- .../2075cff7ffb246a9915d82a792b322b0.json | 8 + .../4254a6c0ea8946cfb56d097fbfcb4372.json | 8 + .../609aefd659874bfa8297fd7bb6a3ab74.json | 8 + .../94f057969247481384f3b0a194465480.json | 8 + .../a06acce389ca42f1b218db9df08f9ea4.json | 8 + .../e190bbf7944643daad6e91b78407e1be.json | 8 + .../e6eee9455dc74dbea648f1e2ab9f0635.json | 8 + .../e95123a9ece4453291dc4aa10ea55346.json | 8 + service/appmesh/deserializers.go | 270 ++++ service/appmesh/serializers.go | 115 ++ service/appmesh/types/types.go | 97 +- service/appmesh/types/types_exported_test.go | 22 + service/appmesh/validators.go | 64 + service/connectcampaigns/deserializers.go | 15 + service/kendra/api_op_CreateDataSource.go | 8 +- service/kendra/api_op_DescribeDataSource.go | 7 +- service/kendra/api_op_UpdateDataSource.go | 8 +- service/kendra/deserializers.go | 66 + service/kendra/document/doc.go | 66 + service/kendra/document/document.go | 34 + service/kendra/generated.json | 4 + service/kendra/internal/document/document.go | 99 ++ .../kendra/internal/document/document_test.go | 11 + service/kendra/serializers.go | 66 + service/kendra/types/enums.go | 2 + service/kendra/types/types.go | 56 +- service/kendra/validators.go | 20 + .../api_op_AssumeDecoratedRoleWithSAML.go | 162 +++ service/lakeformation/api_op_DeleteLFTag.go | 11 +- service/lakeformation/deserializers.go | 197 +++ service/lakeformation/generated.json | 1 + service/lakeformation/serializers.go | 83 ++ service/lakeformation/validators.go | 45 + .../lambda/api_op_CreateEventSourceMapping.go | 32 +- .../lambda/api_op_DeleteEventSourceMapping.go | 7 + .../lambda/api_op_GetEventSourceMapping.go | 7 + service/lambda/api_op_Invoke.go | 3 + .../lambda/api_op_ListEventSourceMappings.go | 2 +- .../lambda/api_op_UpdateEventSourceMapping.go | 17 +- service/lambda/deserializers.go | 130 ++ service/lambda/serializers.go | 38 + service/lambda/types/types.go | 34 +- service/lexmodelsv2/api_op_CreateIntent.go | 8 + service/lexmodelsv2/api_op_DescribeIntent.go | 3 + service/lexmodelsv2/api_op_UpdateIntent.go | 6 + service/lexmodelsv2/deserializers.go | 1135 +++++++++++++++-- service/lexmodelsv2/serializers.go | 616 +++++++++ service/lexmodelsv2/types/enums.go | 50 + service/lexmodelsv2/types/types.go | 408 +++++- service/lexmodelsv2/validators.go | 443 ++++++- .../api_op_AuthorizeDBSecurityGroupIngress.go | 12 +- service/rds/api_op_CreateDBCluster.go | 14 + service/rds/api_op_CreateDBSecurityGroup.go | 11 +- service/rds/api_op_CreateEventSubscription.go | 10 +- service/rds/api_op_DeleteDBSecurityGroup.go | 11 +- .../rds/api_op_DescribeDBSecurityGroups.go | 11 +- service/rds/api_op_ModifyDBCluster.go | 14 + service/rds/api_op_RestoreDBClusterFromS3.go | 14 + .../api_op_RestoreDBClusterFromSnapshot.go | 14 + .../api_op_RestoreDBClusterToPointInTime.go | 14 + .../api_op_RevokeDBSecurityGroupIngress.go | 12 +- service/rds/deserializers.go | 13 + service/rds/serializers.go | 25 + service/rds/types/types.go | 14 + service/secretsmanager/api_op_CreateSecret.go | 17 +- .../secretsmanager/api_op_DescribeSecret.go | 15 +- .../secretsmanager/api_op_GetSecretValue.go | 4 + service/secretsmanager/api_op_UpdateSecret.go | 36 +- service/secretsmanager/types/errors.go | 5 + service/secretsmanager/types/types.go | 7 +- 70 files changed, 4642 insertions(+), 163 deletions(-) create mode 100644 .changelog/2075cff7ffb246a9915d82a792b322b0.json create mode 100644 .changelog/4254a6c0ea8946cfb56d097fbfcb4372.json create mode 100644 .changelog/609aefd659874bfa8297fd7bb6a3ab74.json create mode 100644 .changelog/94f057969247481384f3b0a194465480.json create mode 100644 .changelog/a06acce389ca42f1b218db9df08f9ea4.json create mode 100644 .changelog/e190bbf7944643daad6e91b78407e1be.json create mode 100644 .changelog/e6eee9455dc74dbea648f1e2ab9f0635.json create mode 100644 .changelog/e95123a9ece4453291dc4aa10ea55346.json create mode 100644 service/kendra/document/doc.go create mode 100644 service/kendra/document/document.go create mode 100644 service/kendra/internal/document/document.go create mode 100644 service/kendra/internal/document/document_test.go create mode 100644 service/lakeformation/api_op_AssumeDecoratedRoleWithSAML.go diff --git a/.changelog/2075cff7ffb246a9915d82a792b322b0.json b/.changelog/2075cff7ffb246a9915d82a792b322b0.json new file mode 100644 index 00000000000..c684c3d61c6 --- /dev/null +++ b/.changelog/2075cff7ffb246a9915d82a792b322b0.json @@ -0,0 +1,8 @@ +{ + "id": "2075cff7-ffb2-46a9-915d-82a792b322b0", + "type": "feature", + "description": "This release adds a new API support \"AssumeDecoratedRoleWithSAML\" and also release updates the corresponding documentation.", + "modules": [ + "service/lakeformation" + ] +} \ No newline at end of file diff --git a/.changelog/4254a6c0ea8946cfb56d097fbfcb4372.json b/.changelog/4254a6c0ea8946cfb56d097fbfcb4372.json new file mode 100644 index 00000000000..33a57d02539 --- /dev/null +++ b/.changelog/4254a6c0ea8946cfb56d097fbfcb4372.json @@ -0,0 +1,8 @@ +{ + "id": "4254a6c0-ea89-46cf-b56d-097fbfcb4372", + "type": "feature", + "description": "Added support for customization of Consumer Group ID for MSK and Kafka Event Source Mappings.", + "modules": [ + "service/lambda" + ] +} \ No newline at end of file diff --git a/.changelog/609aefd659874bfa8297fd7bb6a3ab74.json b/.changelog/609aefd659874bfa8297fd7bb6a3ab74.json new file mode 100644 index 00000000000..93f9ffd9271 --- /dev/null +++ b/.changelog/609aefd659874bfa8297fd7bb6a3ab74.json @@ -0,0 +1,8 @@ +{ + "id": "609aefd6-5987-4bfa-8297-fd7bb6a3ab74", + "type": "feature", + "description": "Updated exceptions for Amazon Connect Outbound Campaign api's.", + "modules": [ + "service/connectcampaigns" + ] +} \ No newline at end of file diff --git a/.changelog/94f057969247481384f3b0a194465480.json b/.changelog/94f057969247481384f3b0a194465480.json new file mode 100644 index 00000000000..f114da87dcd --- /dev/null +++ b/.changelog/94f057969247481384f3b0a194465480.json @@ -0,0 +1,8 @@ +{ + "id": "94f05796-9247-4813-84f3-b0a194465480", + "type": "feature", + "description": "This release introduces support for enhanced conversation design with the ability to define custom conversation flows with conditional branching and new bot responses.", + "modules": [ + "service/lexmodelsv2" + ] +} \ No newline at end of file diff --git a/.changelog/a06acce389ca42f1b218db9df08f9ea4.json b/.changelog/a06acce389ca42f1b218db9df08f9ea4.json new file mode 100644 index 00000000000..239bcf64efc --- /dev/null +++ b/.changelog/a06acce389ca42f1b218db9df08f9ea4.json @@ -0,0 +1,8 @@ +{ + "id": "a06acce3-89ca-42f1-b218-db9df08f9ea4", + "type": "feature", + "description": "Adds support for Internet Protocol Version 6 (IPv6) for RDS Aurora database clusters.", + "modules": [ + "service/rds" + ] +} \ No newline at end of file diff --git a/.changelog/e190bbf7944643daad6e91b78407e1be.json b/.changelog/e190bbf7944643daad6e91b78407e1be.json new file mode 100644 index 00000000000..d83b7bab601 --- /dev/null +++ b/.changelog/e190bbf7944643daad6e91b78407e1be.json @@ -0,0 +1,8 @@ +{ + "id": "e190bbf7-9446-43da-ad6e-91b78407e1be", + "type": "feature", + "description": "This release adds Zendesk connector (which allows you to specify Zendesk SAAS platform as data source), Proxy Support for Sharepoint and Confluence Server (which allows you to specify the proxy configuration if proxy is required to connect to your Sharepoint/Confluence Server as data source).", + "modules": [ + "service/kendra" + ] +} \ No newline at end of file diff --git a/.changelog/e6eee9455dc74dbea648f1e2ab9f0635.json b/.changelog/e6eee9455dc74dbea648f1e2ab9f0635.json new file mode 100644 index 00000000000..c807548e35b --- /dev/null +++ b/.changelog/e6eee9455dc74dbea648f1e2ab9f0635.json @@ -0,0 +1,8 @@ +{ + "id": "e6eee945-5dc7-4dbe-a648-f1e2ab9f0635", + "type": "documentation", + "description": "Documentation updates for Secrets Manager.", + "modules": [ + "service/secretsmanager" + ] +} \ No newline at end of file diff --git a/.changelog/e95123a9ece4453291dc4aa10ea55346.json b/.changelog/e95123a9ece4453291dc4aa10ea55346.json new file mode 100644 index 00000000000..72091957a6f --- /dev/null +++ b/.changelog/e95123a9ece4453291dc4aa10ea55346.json @@ -0,0 +1,8 @@ +{ + "id": "e95123a9-ece4-4532-91dc-4aa10ea55346", + "type": "feature", + "description": "AWS App Mesh release to support Multiple Listener and Access Log Format feature", + "modules": [ + "service/appmesh" + ] +} \ No newline at end of file diff --git a/service/appmesh/deserializers.go b/service/appmesh/deserializers.go index 050131796d3..c41fb834ea4 100644 --- a/service/appmesh/deserializers.go +++ b/service/appmesh/deserializers.go @@ -7308,6 +7308,11 @@ func awsRestjson1_deserializeDocumentFileAccessLog(v **types.FileAccessLog, valu for key, value := range shape { switch key { + case "format": + if err := awsRestjson1_deserializeDocumentLoggingFormat(&sv.Format, value); err != nil { + return err + } + case "path": if value != nil { jtv, ok := value.(string) @@ -7813,6 +7818,19 @@ func awsRestjson1_deserializeDocumentGatewayRouteTarget(v **types.GatewayRouteTa for key, value := range shape { switch key { + case "port": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ListenerPort to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Port = ptr.Int32(int32(i64)) + } + case "virtualService": if err := awsRestjson1_deserializeDocumentGatewayRouteVirtualService(&sv.VirtualService, value); err != nil { return err @@ -7981,6 +7999,19 @@ func awsRestjson1_deserializeDocumentGrpcGatewayRouteMatch(v **types.GrpcGateway return err } + case "port": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ListenerPort to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Port = ptr.Int32(int32(i64)) + } + case "serviceName": if value != nil { jtv, ok := value.(string) @@ -8434,6 +8465,19 @@ func awsRestjson1_deserializeDocumentGrpcRouteMatch(v **types.GrpcRouteMatch, va sv.MethodName = ptr.String(jtv) } + case "port": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ListenerPort to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Port = ptr.Int32(int32(i64)) + } + case "serviceName": if value != nil { jtv, ok := value.(string) @@ -9087,6 +9131,19 @@ func awsRestjson1_deserializeDocumentHttpGatewayRouteMatch(v **types.HttpGateway return err } + case "port": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ListenerPort to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Port = ptr.Int32(int32(i64)) + } + case "prefix": if value != nil { jtv, ok := value.(string) @@ -9684,6 +9741,19 @@ func awsRestjson1_deserializeDocumentHttpRouteMatch(v **types.HttpRouteMatch, va return err } + case "port": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ListenerPort to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Port = ptr.Int32(int32(i64)) + } + case "prefix": if value != nil { jtv, ok := value.(string) @@ -9797,6 +9867,89 @@ func awsRestjson1_deserializeDocumentInternalServerErrorException(v **types.Inte return nil } +func awsRestjson1_deserializeDocumentJsonFormat(v *[]types.JsonFormatRef, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.JsonFormatRef + if *v == nil { + cv = []types.JsonFormatRef{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.JsonFormatRef + destAddr := &col + if err := awsRestjson1_deserializeDocumentJsonFormatRef(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentJsonFormatRef(v **types.JsonFormatRef, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.JsonFormatRef + if *v == nil { + sv = &types.JsonFormatRef{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JsonKey to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JsonValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10368,6 +10521,56 @@ func awsRestjson1_deserializeDocumentLogging(v **types.Logging, value interface{ return nil } +func awsRestjson1_deserializeDocumentLoggingFormat(v *types.LoggingFormat, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.LoggingFormat +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "json": + var mv []types.JsonFormatRef + if err := awsRestjson1_deserializeDocumentJsonFormat(&mv, value); err != nil { + return err + } + uv = &types.LoggingFormatMemberJson{Value: mv} + break loop + + case "text": + var mv string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TextFormat to be of type string, got %T instead", value) + } + mv = jtv + } + uv = &types.LoggingFormatMemberText{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsRestjson1_deserializeDocumentMatchRange(v **types.MatchRange, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11824,6 +12027,11 @@ func awsRestjson1_deserializeDocumentTcpRoute(v **types.TcpRoute, value interfac return err } + case "match": + if err := awsRestjson1_deserializeDocumentTcpRouteMatch(&sv.Match, value); err != nil { + return err + } + case "timeout": if err := awsRestjson1_deserializeDocumentTcpTimeout(&sv.Timeout, value); err != nil { return err @@ -11874,6 +12082,50 @@ func awsRestjson1_deserializeDocumentTcpRouteAction(v **types.TcpRouteAction, va return nil } +func awsRestjson1_deserializeDocumentTcpRouteMatch(v **types.TcpRouteMatch, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TcpRouteMatch + if *v == nil { + sv = &types.TcpRouteMatch{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "port": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ListenerPort to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Port = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentTcpTimeout(v **types.TcpTimeout, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12606,6 +12858,11 @@ func awsRestjson1_deserializeDocumentVirtualGatewayFileAccessLog(v **types.Virtu for key, value := range shape { switch key { + case "format": + if err := awsRestjson1_deserializeDocumentLoggingFormat(&sv.Format, value); err != nil { + return err + } + case "path": if value != nil { jtv, ok := value.(string) @@ -15276,6 +15533,19 @@ func awsRestjson1_deserializeDocumentWeightedTarget(v **types.WeightedTarget, va for key, value := range shape { switch key { + case "port": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected ListenerPort to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Port = ptr.Int32(int32(i64)) + } + case "virtualNode": if value != nil { jtv, ok := value.(string) diff --git a/service/appmesh/serializers.go b/service/appmesh/serializers.go index aac6aec9a33..2e6d3153f01 100644 --- a/service/appmesh/serializers.go +++ b/service/appmesh/serializers.go @@ -3437,6 +3437,13 @@ func awsRestjson1_serializeDocumentFileAccessLog(v *types.FileAccessLog, value s object := value.Object() defer object.Close() + if v.Format != nil { + ok := object.Key("format") + if err := awsRestjson1_serializeDocumentLoggingFormat(v.Format, ok); err != nil { + return err + } + } + if v.Path != nil { ok := object.Key("path") ok.String(*v.Path) @@ -3511,6 +3518,11 @@ func awsRestjson1_serializeDocumentGatewayRouteTarget(v *types.GatewayRouteTarge object := value.Object() defer object.Close() + if v.Port != nil { + ok := object.Key("port") + ok.Integer(*v.Port) + } + if v.VirtualService != nil { ok := object.Key("virtualService") if err := awsRestjson1_serializeDocumentGatewayRouteVirtualService(v.VirtualService, ok); err != nil { @@ -3593,6 +3605,11 @@ func awsRestjson1_serializeDocumentGrpcGatewayRouteMatch(v *types.GrpcGatewayRou } } + if v.Port != nil { + ok := object.Key("port") + ok.Integer(*v.Port) + } + if v.ServiceName != nil { ok := object.Key("serviceName") ok.String(*v.ServiceName) @@ -3802,6 +3819,11 @@ func awsRestjson1_serializeDocumentGrpcRouteMatch(v *types.GrpcRouteMatch, value ok.String(*v.MethodName) } + if v.Port != nil { + ok := object.Key("port") + ok.Integer(*v.Port) + } + if v.ServiceName != nil { ok := object.Key("serviceName") ok.String(*v.ServiceName) @@ -4087,6 +4109,11 @@ func awsRestjson1_serializeDocumentHttpGatewayRouteMatch(v *types.HttpGatewayRou } } + if v.Port != nil { + ok := object.Key("port") + ok.Integer(*v.Port) + } + if v.Prefix != nil { ok := object.Key("prefix") ok.String(*v.Prefix) @@ -4361,6 +4388,11 @@ func awsRestjson1_serializeDocumentHttpRouteMatch(v *types.HttpRouteMatch, value } } + if v.Port != nil { + ok := object.Key("port") + ok.Integer(*v.Port) + } + if v.Prefix != nil { ok := object.Key("prefix") ok.String(*v.Prefix) @@ -4402,6 +4434,36 @@ func awsRestjson1_serializeDocumentHttpTimeout(v *types.HttpTimeout, value smith return nil } +func awsRestjson1_serializeDocumentJsonFormat(v []types.JsonFormatRef, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentJsonFormatRef(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentJsonFormatRef(v *types.JsonFormatRef, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + func awsRestjson1_serializeDocumentListener(v *types.Listener, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4656,6 +4718,28 @@ func awsRestjson1_serializeDocumentLogging(v *types.Logging, value smithyjson.Va return nil } +func awsRestjson1_serializeDocumentLoggingFormat(v types.LoggingFormat, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.LoggingFormatMemberJson: + av := object.Key("json") + if err := awsRestjson1_serializeDocumentJsonFormat(uv.Value, av); err != nil { + return err + } + + case *types.LoggingFormatMemberText: + av := object.Key("text") + av.String(uv.Value) + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsRestjson1_serializeDocumentMatchRange(v *types.MatchRange, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4943,6 +5027,13 @@ func awsRestjson1_serializeDocumentTcpRoute(v *types.TcpRoute, value smithyjson. } } + if v.Match != nil { + ok := object.Key("match") + if err := awsRestjson1_serializeDocumentTcpRouteMatch(v.Match, ok); err != nil { + return err + } + } + if v.Timeout != nil { ok := object.Key("timeout") if err := awsRestjson1_serializeDocumentTcpTimeout(v.Timeout, ok); err != nil { @@ -4967,6 +5058,18 @@ func awsRestjson1_serializeDocumentTcpRouteAction(v *types.TcpRouteAction, value return nil } +func awsRestjson1_serializeDocumentTcpRouteMatch(v *types.TcpRouteMatch, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Port != nil { + ok := object.Key("port") + ok.Integer(*v.Port) + } + + return nil +} + func awsRestjson1_serializeDocumentTcpTimeout(v *types.TcpTimeout, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5218,6 +5321,13 @@ func awsRestjson1_serializeDocumentVirtualGatewayFileAccessLog(v *types.VirtualG object := value.Object() defer object.Close() + if v.Format != nil { + ok := object.Key("format") + if err := awsRestjson1_serializeDocumentLoggingFormat(v.Format, ok); err != nil { + return err + } + } + if v.Path != nil { ok := object.Key("path") ok.String(*v.Path) @@ -5904,6 +6014,11 @@ func awsRestjson1_serializeDocumentWeightedTarget(v *types.WeightedTarget, value object := value.Object() defer object.Close() + if v.Port != nil { + ok := object.Key("port") + ok.Integer(*v.Port) + } + if v.VirtualNode != nil { ok := object.Key("virtualNode") ok.String(*v.VirtualNode) diff --git a/service/appmesh/types/types.go b/service/appmesh/types/types.go index 1f52c2a94b1..091a2b4187e 100644 --- a/service/appmesh/types/types.go +++ b/service/appmesh/types/types.go @@ -64,7 +64,9 @@ type AwsCloudMapServiceDiscovery struct { // returned. Attributes []AwsCloudMapInstanceAttribute - // The IP version to use to control traffic within the mesh. + // The preferred IP version that this virtual node uses. Setting the IP preference + // on the virtual node only overrides the IP preference set for the mesh on this + // specific node. IpPreference IpPreference noSmithyDocumentSerde @@ -170,7 +172,9 @@ type DnsServiceDiscovery struct { // This member is required. Hostname *string - // The IP version to use to control traffic within the mesh. + // The preferred IP version that this virtual node uses. Setting the IP preference + // on the virtual node only overrides the IP preference set for the mesh on this + // specific node. IpPreference IpPreference // Specifies the DNS response type for the virtual node. @@ -220,6 +224,10 @@ type FileAccessLog struct { // This member is required. Path *string + // The specified format for the logs. The format is either json_format or + // text_format. + Format LoggingFormat + noSmithyDocumentSerde } @@ -377,6 +385,9 @@ type GatewayRouteTarget struct { // This member is required. VirtualService *GatewayRouteVirtualService + // The port number of the gateway route target. + Port *int32 + noSmithyDocumentSerde } @@ -431,6 +442,9 @@ type GrpcGatewayRouteMatch struct { // The gateway route metadata to be matched on. Metadata []GrpcGatewayRouteMetadata + // The port number to match from the request. + Port *int32 + // The fully qualified domain name for the service to match from the request. ServiceName *string @@ -611,6 +625,9 @@ type GrpcRouteMatch struct { // specify a serviceName. MethodName *string + // The port number to match on. + Port *int32 + // The fully qualified domain name for the service to match from the request. ServiceName *string @@ -880,6 +897,9 @@ type HttpGatewayRouteMatch struct { // The path to match on. Path *HttpPathMatch + // The port number to match on. + Port *int32 + // Specifies the path to match requests with. This parameter must always start with // /, which by itself matches all requests to the virtual service name. You can // also match for path-based routing of requests. For example, if your virtual @@ -1060,6 +1080,9 @@ type HttpRouteMatch struct { // The client request path to match on. Path *HttpPathMatch + // The port number to match on. + Port *int32 + // Specifies the path to match requests with. This parameter must always start with // /, which by itself matches all requests to the virtual service name. You can // also match for path-based routing of requests. For example, if your virtual @@ -1095,6 +1118,22 @@ type HttpTimeout struct { noSmithyDocumentSerde } +// An object that represents the key value pairs for the JSON. +type JsonFormatRef struct { + + // The specified key for the JSON. + // + // This member is required. + Key *string + + // The specified value for the JSON. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + // An object that represents a listener for a virtual node. type Listener struct { @@ -1348,6 +1387,32 @@ type Logging struct { noSmithyDocumentSerde } +// An object that represents the format for the logs. +// +// The following types satisfy this interface: +// +// LoggingFormatMemberJson +// LoggingFormatMemberText +type LoggingFormat interface { + isLoggingFormat() +} + +type LoggingFormatMemberJson struct { + Value []JsonFormatRef + + noSmithyDocumentSerde +} + +func (*LoggingFormatMemberJson) isLoggingFormat() {} + +type LoggingFormatMemberText struct { + Value string + + noSmithyDocumentSerde +} + +func (*LoggingFormatMemberText) isLoggingFormat() {} + // An object that represents the range of values to match on. The first character // of the range is included in the range, though the last character is not. For // example, if the range specified were 1-100, only values 1-99 would be matched. @@ -1781,6 +1846,9 @@ type TcpRoute struct { // This member is required. Action *TcpRouteAction + // An object that represents the criteria for determining a request match. + Match *TcpRouteMatch + // An object that represents types of timeouts. Timeout *TcpTimeout @@ -1799,6 +1867,15 @@ type TcpRouteAction struct { noSmithyDocumentSerde } +// An object representing the TCP route to match. +type TcpRouteMatch struct { + + // The port number to match on. + Port *int32 + + noSmithyDocumentSerde +} + // An object that represents types of timeouts. type TcpTimeout struct { @@ -1820,7 +1897,13 @@ type TlsValidationContext struct { Trust TlsValidationContextTrust // A reference to an object that represents the SANs for a Transport Layer Security - // (TLS) validation context. + // (TLS) validation context. If you don't specify SANs on the terminating mesh + // endpoint, the Envoy proxy for that node doesn't verify the SAN on a peer client + // certificate. If you don't specify SANs on the originating mesh endpoint, the SAN + // on the certificate provided by the terminating endpoint must match the mesh + // endpoint service discovery configuration. Since SPIRE vended certificates have a + // SPIFFE ID as a name, you must set the SAN since the name doesn't match the + // service discovery name. SubjectAlternativeNames *SubjectAlternativeNames noSmithyDocumentSerde @@ -2084,6 +2167,10 @@ type VirtualGatewayFileAccessLog struct { // This member is required. Path *string + // The specified format for the virtual gateway access logs. It can be either + // json_format or text_format. + Format LoggingFormat + noSmithyDocumentSerde } @@ -3103,6 +3190,9 @@ type WeightedTarget struct { // This member is required. Weight int32 + // The targeted port of the weighted object. + Port *int32 + noSmithyDocumentSerde } @@ -3126,6 +3216,7 @@ func (*UnknownUnionMember) isHeaderMatchMethod() { func (*UnknownUnionMember) isListenerTimeout() {} func (*UnknownUnionMember) isListenerTlsCertificate() {} func (*UnknownUnionMember) isListenerTlsValidationContextTrust() {} +func (*UnknownUnionMember) isLoggingFormat() {} func (*UnknownUnionMember) isServiceDiscovery() {} func (*UnknownUnionMember) isTlsValidationContextTrust() {} func (*UnknownUnionMember) isVirtualGatewayAccessLog() {} diff --git a/service/appmesh/types/types_exported_test.go b/service/appmesh/types/types_exported_test.go index 7cc87957c5f..5fa1478f8ae 100644 --- a/service/appmesh/types/types_exported_test.go +++ b/service/appmesh/types/types_exported_test.go @@ -235,6 +235,28 @@ func ExampleListenerTlsValidationContextTrust_outputUsage() { var _ *types.TlsValidationContextFileTrust var _ *types.TlsValidationContextSdsTrust +func ExampleLoggingFormat_outputUsage() { + var union types.LoggingFormat + // type switches can be used to check the union value + switch v := union.(type) { + case *types.LoggingFormatMemberJson: + _ = v.Value // Value is []types.JsonFormatRef + + case *types.LoggingFormatMemberText: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ []types.JsonFormatRef +var _ *string + func ExampleServiceDiscovery_outputUsage() { var union types.ServiceDiscovery // type switches can be used to check the union value diff --git a/service/appmesh/validators.go b/service/appmesh/validators.go index ca9af89300b..570b4132b53 100644 --- a/service/appmesh/validators.go +++ b/service/appmesh/validators.go @@ -1131,6 +1131,11 @@ func validateFileAccessLog(v *types.FileAccessLog) error { if v.Path == nil { invalidParams.Add(smithy.NewErrParamRequired("Path")) } + if v.Format != nil { + if err := validateLoggingFormat(v.Format); err != nil { + invalidParams.AddNested("Format", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1761,6 +1766,41 @@ func validateHttpRouteMatch(v *types.HttpRouteMatch) error { } } +func validateJsonFormat(v []types.JsonFormatRef) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "JsonFormat"} + for i := range v { + if err := validateJsonFormatRef(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateJsonFormatRef(v *types.JsonFormatRef) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "JsonFormatRef"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateListener(v *types.Listener) error { if v == nil { return nil @@ -1986,6 +2026,25 @@ func validateLogging(v *types.Logging) error { } } +func validateLoggingFormat(v types.LoggingFormat) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LoggingFormat"} + switch uv := v.(type) { + case *types.LoggingFormatMemberJson: + if err := validateJsonFormat(uv.Value); err != nil { + invalidParams.AddNested("[json]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateMatchRange(v *types.MatchRange) error { if v == nil { return nil @@ -2459,6 +2518,11 @@ func validateVirtualGatewayFileAccessLog(v *types.VirtualGatewayFileAccessLog) e if v.Path == nil { invalidParams.Add(smithy.NewErrParamRequired("Path")) } + if v.Format != nil { + if err := validateLoggingFormat(v.Format); err != nil { + invalidParams.AddNested("Format", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/connectcampaigns/deserializers.go b/service/connectcampaigns/deserializers.go index a7b19135328..7df00325a29 100644 --- a/service/connectcampaigns/deserializers.go +++ b/service/connectcampaigns/deserializers.go @@ -772,6 +772,9 @@ func awsRestjson1_deserializeOpErrorGetCampaignState(response *smithyhttp.Respon case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1710,6 +1713,9 @@ func awsRestjson1_deserializeOpErrorPauseCampaign(response *smithyhttp.Response, case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1984,6 +1990,9 @@ func awsRestjson1_deserializeOpErrorResumeCampaign(response *smithyhttp.Response case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2088,6 +2097,9 @@ func awsRestjson1_deserializeOpErrorStartCampaign(response *smithyhttp.Response, case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2354,6 +2366,9 @@ func awsRestjson1_deserializeOpErrorStopCampaign(response *smithyhttp.Response, case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, diff --git a/service/kendra/api_op_CreateDataSource.go b/service/kendra/api_op_CreateDataSource.go index 5ec370d5a6f..62566cd32c8 100644 --- a/service/kendra/api_op_CreateDataSource.go +++ b/service/kendra/api_op_CreateDataSource.go @@ -47,8 +47,7 @@ type CreateDataSourceInput struct { // This member is required. IndexId *string - // A unique name for the data source connector. A data source name can't be changed - // without deleting and recreating the data source connector. + // A name for the data source connector. // // This member is required. Name *string @@ -108,6 +107,11 @@ type CreateDataSourceInput struct { // resources. Tags []types.Tag + // Configuration information for an Amazon Virtual Private Cloud to connect to your + // data source. For more information, see Configuring a VPC + // (https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html). + VpcConfiguration *types.DataSourceVpcConfiguration + noSmithyDocumentSerde } diff --git a/service/kendra/api_op_DescribeDataSource.go b/service/kendra/api_op_DescribeDataSource.go index 340d11ec5a2..bdc6dadddd4 100644 --- a/service/kendra/api_op_DescribeDataSource.go +++ b/service/kendra/api_op_DescribeDataSource.go @@ -81,7 +81,7 @@ type DescribeDataSourceOutput struct { // (https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html). LanguageCode *string - // The name that you gave the data source when it was created. + // The name for the data source. Name *string // The Amazon Resource Name (ARN) of the role that enables the data source to @@ -102,6 +102,11 @@ type DescribeDataSourceOutput struct { // The Unix timestamp of when the data source was last updated. UpdatedAt *time.Time + // Configuration information for an Amazon Virtual Private Cloud to connect to your + // data source. For more information, see Configuring a VPC + // (https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html). + VpcConfiguration *types.DataSourceVpcConfiguration + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/kendra/api_op_UpdateDataSource.go b/service/kendra/api_op_UpdateDataSource.go index 0413e385fec..de3364022f2 100644 --- a/service/kendra/api_op_UpdateDataSource.go +++ b/service/kendra/api_op_UpdateDataSource.go @@ -60,8 +60,7 @@ type UpdateDataSourceInput struct { // English (https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html). LanguageCode *string - // A new name for the data source connector. You must first delete the data source - // and re-create it to change the name of the data source. + // A new name for the data source connector. Name *string // The Amazon Resource Name (ARN) of a role with permission to access the data @@ -72,6 +71,11 @@ type UpdateDataSourceInput struct { // The sync schedule you want to update for the data source connector. Schedule *string + // Configuration information for an Amazon Virtual Private Cloud to connect to your + // data source. For more information, see Configuring a VPC + // (https://docs.aws.amazon.com/kendra/latest/dg/vpc-configuration.html). + VpcConfiguration *types.DataSourceVpcConfiguration + noSmithyDocumentSerde } diff --git a/service/kendra/deserializers.go b/service/kendra/deserializers.go index 77cba37f632..a8fa829c53f 100644 --- a/service/kendra/deserializers.go +++ b/service/kendra/deserializers.go @@ -8,6 +8,8 @@ import ( "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/kendra/document" + internaldocument "github.com/aws/aws-sdk-go-v2/service/kendra/internal/document" "github.com/aws/aws-sdk-go-v2/service/kendra/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" @@ -9087,6 +9089,11 @@ func awsAwsjson11_deserializeDocumentConfluenceConfiguration(v **types.Confluenc return err } + case "ProxyConfiguration": + if err := awsAwsjson11_deserializeDocumentProxyConfiguration(&sv.ProxyConfiguration, value); err != nil { + return err + } + case "SecretArn": if value != nil { jtv, ok := value.(string) @@ -9909,6 +9916,11 @@ func awsAwsjson11_deserializeDocumentDataSourceConfiguration(v **types.DataSourc return err } + case "TemplateConfiguration": + if err := awsAwsjson11_deserializeDocumentTemplateConfiguration(&sv.TemplateConfiguration, value); err != nil { + return err + } + case "WebCrawlerConfiguration": if err := awsAwsjson11_deserializeDocumentWebCrawlerConfiguration(&sv.WebCrawlerConfiguration, value); err != nil { return err @@ -16154,6 +16166,11 @@ func awsAwsjson11_deserializeDocumentSharePointConfiguration(v **types.SharePoin return err } + case "ProxyConfiguration": + if err := awsAwsjson11_deserializeDocumentProxyConfiguration(&sv.ProxyConfiguration, value); err != nil { + return err + } + case "SecretArn": if value != nil { jtv, ok := value.(string) @@ -17178,6 +17195,50 @@ func awsAwsjson11_deserializeDocumentTagList(v *[]types.Tag, value interface{}) return nil } +func awsAwsjson11_deserializeDocumentTemplate(v *document.Interface, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + *v = internaldocument.NewDocumentUnmarshaler(value) + return nil +} + +func awsAwsjson11_deserializeDocumentTemplateConfiguration(v **types.TemplateConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.TemplateConfiguration + if *v == nil { + sv = &types.TemplateConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Template": + if err := awsAwsjson11_deserializeDocumentTemplate(&sv.Template, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentTextDocumentStatistics(v **types.TextDocumentStatistics, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -18817,6 +18878,11 @@ func awsAwsjson11_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeData } } + case "VpcConfiguration": + if err := awsAwsjson11_deserializeDocumentDataSourceVpcConfiguration(&sv.VpcConfiguration, value); err != nil { + return err + } + default: _, _ = key, value diff --git a/service/kendra/document/doc.go b/service/kendra/document/doc.go new file mode 100644 index 00000000000..2b06b14f3cd --- /dev/null +++ b/service/kendra/document/doc.go @@ -0,0 +1,66 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package document implements encoding and decoding of open-content that has a JSON-like data model. +// This data-model allows for UTF-8 strings, arbitrary precision numbers, booleans, nulls, a list of these values, and a +// map of UTF-8 strings to these values. +// +// Interface defines the semantics for how a document type is marshalled and unmarshalled for requests and responses +// for the service. To send a document as input to the service you use NewLazyDocument and pass it the Go type to be +// sent to the service. NewLazyDocument returns a document Interface type that encodes the provided Go type during +// the request serialization step after you have invoked an API client operation that uses the document type. +// +// The following examples show how you can create document types using basic Go types. +// +// NewLazyDocument(map[string]interface{}{ +// "favoriteNumber": 42, +// "fruits": []string{"apple", "orange"}, +// "capitals": map[string]interface{}{ +// "Washington": "Olympia", +// "Oregon": "Salem", +// }, +// "skyIsBlue": true, +// }) +// +// NewLazyDocument(3.14159) +// +// NewLazyDocument([]interface{"One", 2, 3, 3.5, "four"}) +// +// NewLazyDocument(true) +// +// Services can send document types as part of their API responses. To retrieve the content of a response document +// you use the UnmarshalSmithyDocument method on the response document. When calling UnmarshalSmithyDocument you pass +// a reference to the Go type that you want to unmarshal and map the response to. +// +// For example, if you expect to receive key/value map from the service response: +// +// var kv map[string]interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&kv); err != nil { +// // handle error +// } +// +// If a service can return one or more data-types in the response, you can use an empty interface and type switch to +// dynamically handle the response type. +// +// var v interface{} +// if err := outputDocument.UnmarshalSmithyDocument(&v); err != nil { +// // handle error +// } +// +// switch vv := v.(type) { +// case map[string]interface{}: +// // handle key/value map +// case []interface{}: +// // handle array of values +// case bool: +// // handle boolean +// case document.Number: +// // handle an arbitrary precision number +// case string: +// // handle string +// default: +// // handle unknown case +// } +// +// The mapping of Go types to document types is covered in more depth in https://pkg.go.dev/github.com/aws/smithy-go/document +// including more in depth examples that cover user-defined structure types. +package document diff --git a/service/kendra/document/document.go b/service/kendra/document/document.go new file mode 100644 index 00000000000..394ba084ef8 --- /dev/null +++ b/service/kendra/document/document.go @@ -0,0 +1,34 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package document + +import ( + internaldocument "github.com/aws/aws-sdk-go-v2/service/kendra/internal/document" +) + +// Interface defines a document which is a protocol-agnostic type which supports a +// JSON-like data-model. You can use this type to send UTF-8 strings, arbitrary +// precision numbers, booleans, nulls, a list of these values, and a map of UTF-8 +// strings to these values. +// +// You create a document type using the NewLazyDocument function and passing it the +// Go type to marshal. When receiving a document in an API response, you use the +// document's UnmarshalSmithyDocument function to decode the response to your +// desired Go type. Unless documented specifically generated structure types in +// client packages or client types packages are not supported at this time. Such +// types embed a noSmithyDocumentSerde and will cause an error to be returned when +// attempting to send an API request. +// +// For more information see the accompanying package documentation and linked +// references. +type Interface = internaldocument.Interface + +// You create document type using the NewLazyDocument function and passing it the +// Go type to be marshaled and sent to the service. The document marshaler supports +// semantics similar to the encoding/json Go standard library. +// +// For more information see the accompanying package documentation and linked +// references. +func NewLazyDocument(v interface{}) Interface { + return internaldocument.NewDocumentMarshaler(v) +} diff --git a/service/kendra/generated.json b/service/kendra/generated.json index b5e02f1cba6..3c2a6ebe966 100644 --- a/service/kendra/generated.json +++ b/service/kendra/generated.json @@ -70,8 +70,12 @@ "api_op_UpdateThesaurus.go", "deserializers.go", "doc.go", + "document/doc.go", + "document/document.go", "endpoints.go", "generated.json", + "internal/document/document.go", + "internal/document/document_test.go", "internal/endpoints/endpoints.go", "internal/endpoints/endpoints_test.go", "protocol_test.go", diff --git a/service/kendra/internal/document/document.go b/service/kendra/internal/document/document.go new file mode 100644 index 00000000000..d19b45b41bf --- /dev/null +++ b/service/kendra/internal/document/document.go @@ -0,0 +1,99 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package document + +import ( + "bytes" + "encoding/json" + smithydocument "github.com/aws/smithy-go/document" + smithydocumentjson "github.com/aws/smithy-go/document/json" +) + +// github.com/aws/aws-sdk-go-v2/service/kendra/internal/document.smithyDocument is +// an interface which is used to bind a document type to its service client. +type smithyDocument interface { + isSmithyDocument() +} + +// github.com/aws/aws-sdk-go-v2/service/kendra/internal/document.Interface is a +// JSON-like data model type that is protocol agnostic and is usedto send +// open-content to a service. +type Interface interface { + smithyDocument + smithydocument.Marshaler + smithydocument.Unmarshaler +} + +type documentMarshaler struct { + value interface{} +} + +func (m *documentMarshaler) UnmarshalSmithyDocument(v interface{}) error { + mBytes, err := m.MarshalSmithyDocument() + if err != nil { + return err + } + + jDecoder := json.NewDecoder(bytes.NewReader(mBytes)) + jDecoder.UseNumber() + + var jv interface{} + if err := jDecoder.Decode(&v); err != nil { + return err + } + + return NewDocumentUnmarshaler(v).UnmarshalSmithyDocument(&jv) +} + +func (m *documentMarshaler) MarshalSmithyDocument() ([]byte, error) { + return smithydocumentjson.NewEncoder().Encode(m.value) +} + +func (m *documentMarshaler) isSmithyDocument() {} + +var _ Interface = (*documentMarshaler)(nil) + +type documentUnmarshaler struct { + value interface{} +} + +func (m *documentUnmarshaler) UnmarshalSmithyDocument(v interface{}) error { + decoder := smithydocumentjson.NewDecoder() + return decoder.DecodeJSONInterface(m.value, v) +} + +func (m *documentUnmarshaler) MarshalSmithyDocument() ([]byte, error) { + return json.Marshal(m.value) +} + +func (m *documentUnmarshaler) isSmithyDocument() {} + +var _ Interface = (*documentUnmarshaler)(nil) + +// NewDocumentMarshaler creates a new document marshaler for the given input type +func NewDocumentMarshaler(v interface{}) Interface { + return &documentMarshaler{ + value: v, + } +} + +// NewDocumentUnmarshaler creates a new document unmarshaler for the given service +// response +func NewDocumentUnmarshaler(v interface{}) Interface { + return &documentUnmarshaler{ + value: v, + } +} + +// github.com/aws/aws-sdk-go-v2/service/kendra/internal/document.IsInterface +// returns whether the given Interface implementation is a valid client +// implementation +func IsInterface(v Interface) (ok bool) { + defer func() { + if err := recover(); err != nil { + ok = false + } + }() + v.isSmithyDocument() + return true +} diff --git a/service/kendra/internal/document/document_test.go b/service/kendra/internal/document/document_test.go new file mode 100644 index 00000000000..775645dcd6e --- /dev/null +++ b/service/kendra/internal/document/document_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package document + +import ( + smithydocument "github.com/aws/smithy-go/document" +) + +var _ smithyDocument = (Interface)(nil) +var _ smithydocument.Marshaler = (Interface)(nil) +var _ smithydocument.Unmarshaler = (Interface)(nil) diff --git a/service/kendra/serializers.go b/service/kendra/serializers.go index c546bf81137..ad7d12c73dd 100644 --- a/service/kendra/serializers.go +++ b/service/kendra/serializers.go @@ -6,6 +6,8 @@ import ( "bytes" "context" "fmt" + "github.com/aws/aws-sdk-go-v2/service/kendra/document" + internaldocument "github.com/aws/aws-sdk-go-v2/service/kendra/internal/document" "github.com/aws/aws-sdk-go-v2/service/kendra/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" @@ -3902,6 +3904,13 @@ func awsAwsjson11_serializeDocumentConfluenceConfiguration(v *types.ConfluenceCo } } + if v.ProxyConfiguration != nil { + ok := object.Key("ProxyConfiguration") + if err := awsAwsjson11_serializeDocumentProxyConfiguration(v.ProxyConfiguration, ok); err != nil { + return err + } + } + if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) @@ -4314,6 +4323,13 @@ func awsAwsjson11_serializeDocumentDataSourceConfiguration(v *types.DataSourceCo } } + if v.TemplateConfiguration != nil { + ok := object.Key("TemplateConfiguration") + if err := awsAwsjson11_serializeDocumentTemplateConfiguration(v.TemplateConfiguration, ok); err != nil { + return err + } + } + if v.WebCrawlerConfiguration != nil { ok := object.Key("WebCrawlerConfiguration") if err := awsAwsjson11_serializeDocumentWebCrawlerConfiguration(v.WebCrawlerConfiguration, ok); err != nil { @@ -6636,6 +6652,13 @@ func awsAwsjson11_serializeDocumentSharePointConfiguration(v *types.SharePointCo } } + if v.ProxyConfiguration != nil { + ok := object.Key("ProxyConfiguration") + if err := awsAwsjson11_serializeDocumentProxyConfiguration(v.ProxyConfiguration, ok); err != nil { + return err + } + } + if v.SecretArn != nil { ok := object.Key("SecretArn") ok.String(*v.SecretArn) @@ -6917,6 +6940,35 @@ func awsAwsjson11_serializeDocumentTagList(v []types.Tag, value smithyjson.Value return nil } +func awsAwsjson11_serializeDocumentTemplate(v document.Interface, value smithyjson.Value) error { + if v == nil { + return nil + } + if !internaldocument.IsInterface(v) { + return fmt.Errorf("%T is not a compatible document type", v) + } + db, err := v.MarshalSmithyDocument() + if err != nil { + return err + } + value.Write(db) + return nil +} + +func awsAwsjson11_serializeDocumentTemplateConfiguration(v *types.TemplateConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Template != nil { + ok := object.Key("Template") + if err := awsAwsjson11_serializeDocumentTemplate(v.Template, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentTimeRange(v *types.TimeRange, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -7415,6 +7467,13 @@ func awsAwsjson11_serializeOpDocumentCreateDataSourceInput(v *CreateDataSourceIn ok.String(string(v.Type)) } + if v.VpcConfiguration != nil { + ok := object.Key("VpcConfiguration") + if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil { + return err + } + } + return nil } @@ -8664,6 +8723,13 @@ func awsAwsjson11_serializeOpDocumentUpdateDataSourceInput(v *UpdateDataSourceIn ok.String(*v.Schedule) } + if v.VpcConfiguration != nil { + ok := object.Key("VpcConfiguration") + if err := awsAwsjson11_serializeDocumentDataSourceVpcConfiguration(v.VpcConfiguration, ok); err != nil { + return err + } + } + return nil } diff --git a/service/kendra/types/enums.go b/service/kendra/types/enums.go index 682451527ac..e19e519f07e 100644 --- a/service/kendra/types/enums.go +++ b/service/kendra/types/enums.go @@ -342,6 +342,7 @@ const ( DataSourceTypeJira DataSourceType = "JIRA" DataSourceTypeGithub DataSourceType = "GITHUB" DataSourceTypeAlfresco DataSourceType = "ALFRESCO" + DataSourceTypeTemplate DataSourceType = "TEMPLATE" ) // Values returns all known values for DataSourceType. Note that this can be @@ -367,6 +368,7 @@ func (DataSourceType) Values() []DataSourceType { "JIRA", "GITHUB", "ALFRESCO", + "TEMPLATE", } } diff --git a/service/kendra/types/types.go b/service/kendra/types/types.go index 8a30d380149..169ad2ef68b 100644 --- a/service/kendra/types/types.go +++ b/service/kendra/types/types.go @@ -3,6 +3,7 @@ package types import ( + "github.com/aws/aws-sdk-go-v2/service/kendra/document" smithydocument "github.com/aws/smithy-go/document" "time" ) @@ -24,7 +25,7 @@ type AccessControlConfigurationSummary struct { // (https://docs.aws.amazon.com/kendra/latest/dg/s3-acl.html). type AccessControlListConfiguration struct { - // Path to the Amazon Web Services S3 bucket that contains the ACL files. + // Path to the Amazon S3 bucket that contains the ACL files. KeyPath *string noSmithyDocumentSerde @@ -619,6 +620,21 @@ type ConfluenceConfiguration struct { // Configuration information for indexing Confluence pages. PageConfiguration *ConfluencePageConfiguration + // Configuration information to connect to your Confluence URL instance via a web + // proxy. You can use this option for Confluence Server. You must provide the + // website host name and port number. For example, the host name of + // https://a.example.com/page1.html is "a.example.com" and the port is 443, the + // standard port for HTTPS. Web proxy credentials are optional and you can use them + // to connect to a web proxy server that requires basic authentication of user name + // and password. To store web proxy credentials, you use a secret in Secrets + // Manager. It is recommended that you follow best security practices when + // configuring your web proxy. This includes setting up throttling, setting up + // logging and monitoring, and applying security patches on a regular basis. If you + // use your web proxy with multiple data sources, sync jobs that occur at the same + // time could strain the load on your proxy. It is recommended you prepare your + // proxy beforehand for any security and load requirements. + ProxyConfiguration *ProxyConfiguration + // Configuration information for indexing Confluence spaces. SpaceConfiguration *ConfluenceSpaceConfiguration @@ -932,6 +948,10 @@ type DataSourceConfiguration struct { // Provides the configuration information to connect to Slack as your data source. SlackConfiguration *SlackConfiguration + // Provides a template for the configuration information to connect to your data + // source. + TemplateConfiguration *TemplateConfiguration + // Provides the configuration information required for Amazon Kendra Web Crawler. WebCrawlerConfiguration *WebCrawlerConfiguration @@ -2634,7 +2654,9 @@ type QuipConfiguration struct { // precedence, and the file isn't included in the index. ExclusionPatterns []string - // The identifiers of the Quip folders you want to index. + // The identifiers of the Quip folders you want to index. You can find in your + // browser URL when you access your folder in Quip. For example, + // https://quip-company.com/zlLuOVNSarTL/folder-name. FolderIds []string // A list of regular expression patterns to include certain files in your Quip file @@ -3325,6 +3347,21 @@ type SharePointConfiguration struct { // to the display URL of the SharePoint document. InclusionPatterns []string + // Configuration information to connect to your Microsoft SharePoint site URLs via + // instance via a web proxy. You can use this option for SharePoint Server. You + // must provide the website host name and port number. For example, the host name + // of https://a.example.com/page1.html is "a.example.com" and the port is 443, the + // standard port for HTTPS. Web proxy credentials are optional and you can use them + // to connect to a web proxy server that requires basic authentication of user name + // and password. To store web proxy credentials, you use a secret in Secrets + // Manager. It is recommended that you follow best security practices when + // configuring your web proxy. This includes setting up throttling, setting up + // logging and monitoring, and applying security patches on a regular basis. If you + // use your web proxy with multiple data sources, sync jobs that occur at the same + // time could strain the load on your proxy. It is recommended you prepare your + // proxy beforehand for any security and load requirements. + ProxyConfiguration *ProxyConfiguration + // The path to the SSL certificate stored in an Amazon S3 bucket. You use this to // connect to SharePoint. SslCertificateS3Path *S3Path @@ -3633,6 +3670,21 @@ type Tag struct { noSmithyDocumentSerde } +// Provides a template for the configuration information to connect to your data +// source. +type TemplateConfiguration struct { + + // The template schema used for the data source. The following links to the + // template schema for data sources where templates are supported: + // + // * Zendesk + // template schema + // (https://docs.aws.amazon.com/kendra/latest/dg/data-source-zendesk.html#zendesk-template-schema) + Template document.Interface + + noSmithyDocumentSerde +} + // Provides information about text documents indexed in an index. type TextDocumentStatistics struct { diff --git a/service/kendra/validators.go b/service/kendra/validators.go index f3e174a499a..5ff60dc11e8 100644 --- a/service/kendra/validators.go +++ b/service/kendra/validators.go @@ -1781,6 +1781,11 @@ func validateConfluenceConfiguration(v *types.ConfluenceConfiguration) error { invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) } } + if v.ProxyConfiguration != nil { + if err := validateProxyConfiguration(v.ProxyConfiguration); err != nil { + invalidParams.AddNested("ProxyConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -3315,6 +3320,11 @@ func validateSharePointConfiguration(v *types.SharePointConfiguration) error { invalidParams.AddNested("SslCertificateS3Path", err.(smithy.InvalidParamsError)) } } + if v.ProxyConfiguration != nil { + if err := validateProxyConfiguration(v.ProxyConfiguration); err != nil { + invalidParams.AddNested("ProxyConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -3762,6 +3772,11 @@ func validateOpCreateDataSourceInput(v *CreateDataSourceInput) error { invalidParams.AddNested("Configuration", err.(smithy.InvalidParamsError)) } } + if v.VpcConfiguration != nil { + if err := validateDataSourceVpcConfiguration(v.VpcConfiguration); err != nil { + invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) + } + } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) @@ -4701,6 +4716,11 @@ func validateOpUpdateDataSourceInput(v *UpdateDataSourceInput) error { invalidParams.AddNested("Configuration", err.(smithy.InvalidParamsError)) } } + if v.VpcConfiguration != nil { + if err := validateDataSourceVpcConfiguration(v.VpcConfiguration); err != nil { + invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) + } + } if v.CustomDocumentEnrichmentConfiguration != nil { if err := validateCustomDocumentEnrichmentConfiguration(v.CustomDocumentEnrichmentConfiguration); err != nil { invalidParams.AddNested("CustomDocumentEnrichmentConfiguration", err.(smithy.InvalidParamsError)) diff --git a/service/lakeformation/api_op_AssumeDecoratedRoleWithSAML.go b/service/lakeformation/api_op_AssumeDecoratedRoleWithSAML.go new file mode 100644 index 00000000000..88c6ee91e39 --- /dev/null +++ b/service/lakeformation/api_op_AssumeDecoratedRoleWithSAML.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package lakeformation + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Allows a caller to assume an IAM role decorated as the SAML user specified in +// the SAML assertion included in the request. This decoration allows Lake +// Formation to enforce access policies against the SAML users and groups. This API +// operation requires SAML federation setup in the caller’s account as it can only +// be called with valid SAML assertions. Lake Formation does not scope down the +// permission of the assumed role. All permissions attached to the role via the +// SAML federation setup will be included in the role session. This decorated role +// is expected to access data in Amazon S3 by getting temporary access from Lake +// Formation which is authorized via the virtual API GetDataAccess. Therefore, all +// SAML roles that can be assumed via AssumeDecoratedRoleWithSAML must at a minimum +// include lakeformation:GetDataAccess in their role policies. A typical IAM policy +// attached to such a role would look as follows: +func (c *Client) AssumeDecoratedRoleWithSAML(ctx context.Context, params *AssumeDecoratedRoleWithSAMLInput, optFns ...func(*Options)) (*AssumeDecoratedRoleWithSAMLOutput, error) { + if params == nil { + params = &AssumeDecoratedRoleWithSAMLInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssumeDecoratedRoleWithSAML", params, optFns, c.addOperationAssumeDecoratedRoleWithSAMLMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssumeDecoratedRoleWithSAMLOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssumeDecoratedRoleWithSAMLInput struct { + + // The Amazon Resource Name (ARN) of the SAML provider in IAM that describes the + // IdP. + // + // This member is required. + PrincipalArn *string + + // The role that represents an IAM principal whose scope down policy allows it to + // call credential vending APIs such as GetTemporaryTableCredentials. The caller + // must also have iam:PassRole permission on this role. + // + // This member is required. + RoleArn *string + + // A SAML assertion consisting of an assertion statement for the user who needs + // temporary credentials. This must match the SAML assertion that was issued to + // IAM. This must be Base64 encoded. + // + // This member is required. + SAMLAssertion *string + + // The time period, between 900 and 43,200 seconds, for the timeout of the + // temporary credentials. + DurationSeconds *int32 + + noSmithyDocumentSerde +} + +type AssumeDecoratedRoleWithSAMLOutput struct { + + // The access key ID for the temporary credentials. (The access key consists of an + // access key ID and a secret key). + AccessKeyId *string + + // The date and time when the temporary credentials expire. + Expiration *time.Time + + // The secret key for the temporary credentials. (The access key consists of an + // access key ID and a secret key). + SecretAccessKey *string + + // The session token for the temporary credentials. + SessionToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssumeDecoratedRoleWithSAMLMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpAssumeDecoratedRoleWithSAML{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssumeDecoratedRoleWithSAML{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpAssumeDecoratedRoleWithSAMLValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeDecoratedRoleWithSAML(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssumeDecoratedRoleWithSAML(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "lakeformation", + OperationName: "AssumeDecoratedRoleWithSAML", + } +} diff --git a/service/lakeformation/api_op_DeleteLFTag.go b/service/lakeformation/api_op_DeleteLFTag.go index 88eadd19572..9988c8876a1 100644 --- a/service/lakeformation/api_op_DeleteLFTag.go +++ b/service/lakeformation/api_op_DeleteLFTag.go @@ -10,12 +10,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the specified LF-tag key name. If the attribute key does not exist or -// the LF-tag does not exist, then the operation will not do anything. If the -// attribute key exists, then the operation checks if any resources are tagged with -// this attribute key, if yes, the API throws a 400 Exception with the message -// "Delete not allowed" as the LF-tag key is still attached with resources. You can -// consider untagging resources with this LF-tag key. +// Deletes the specified LF-tag given a key name. If the input parameter tag key +// was not found, then the operation will throw an exception. When you delete an +// LF-tag, the LFTagPolicy attached to the LF-tag becomes invalid. If the deleted +// LF-tag was still assigned to any resource, the tag policy attach to the deleted +// LF-tag will no longer be applied to the resource. func (c *Client) DeleteLFTag(ctx context.Context, params *DeleteLFTagInput, optFns ...func(*Options)) (*DeleteLFTagOutput, error) { if params == nil { params = &DeleteLFTagInput{} diff --git a/service/lakeformation/deserializers.go b/service/lakeformation/deserializers.go index d45bd700eb2..c60d28fa134 100644 --- a/service/lakeformation/deserializers.go +++ b/service/lakeformation/deserializers.go @@ -181,6 +181,203 @@ func awsRestjson1_deserializeOpDocumentAddLFTagsToResourceOutput(v **AddLFTagsTo return nil } +type awsRestjson1_deserializeOpAssumeDecoratedRoleWithSAML struct { +} + +func (*awsRestjson1_deserializeOpAssumeDecoratedRoleWithSAML) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpAssumeDecoratedRoleWithSAML) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorAssumeDecoratedRoleWithSAML(response, &metadata) + } + output := &AssumeDecoratedRoleWithSAMLOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentAssumeDecoratedRoleWithSAMLOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorAssumeDecoratedRoleWithSAML(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsRestjson1_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsRestjson1_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsRestjson1_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsRestjson1_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentAssumeDecoratedRoleWithSAMLOutput(v **AssumeDecoratedRoleWithSAMLOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *AssumeDecoratedRoleWithSAMLOutput + if *v == nil { + sv = &AssumeDecoratedRoleWithSAMLOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessKeyIdString to be of type string, got %T instead", value) + } + sv.AccessKeyId = ptr.String(jtv) + } + + case "Expiration": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Expiration = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ExpirationTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "SecretAccessKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SecretAccessKeyString to be of type string, got %T instead", value) + } + sv.SecretAccessKey = ptr.String(jtv) + } + + case "SessionToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SessionTokenString to be of type string, got %T instead", value) + } + sv.SessionToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpBatchGrantPermissions struct { } diff --git a/service/lakeformation/generated.json b/service/lakeformation/generated.json index 14f604ac2f1..0743886568c 100644 --- a/service/lakeformation/generated.json +++ b/service/lakeformation/generated.json @@ -9,6 +9,7 @@ "api_client.go", "api_client_test.go", "api_op_AddLFTagsToResource.go", + "api_op_AssumeDecoratedRoleWithSAML.go", "api_op_BatchGrantPermissions.go", "api_op_BatchRevokePermissions.go", "api_op_CancelTransaction.go", diff --git a/service/lakeformation/serializers.go b/service/lakeformation/serializers.go index 0953dec3c81..0d952ace4b6 100644 --- a/service/lakeformation/serializers.go +++ b/service/lakeformation/serializers.go @@ -97,6 +97,89 @@ func awsRestjson1_serializeOpDocumentAddLFTagsToResourceInput(v *AddLFTagsToReso return nil } +type awsRestjson1_serializeOpAssumeDecoratedRoleWithSAML struct { +} + +func (*awsRestjson1_serializeOpAssumeDecoratedRoleWithSAML) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAssumeDecoratedRoleWithSAML) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AssumeDecoratedRoleWithSAMLInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/AssumeDecoratedRoleWithSAML") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAssumeDecoratedRoleWithSAMLInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsAssumeDecoratedRoleWithSAMLInput(v *AssumeDecoratedRoleWithSAMLInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAssumeDecoratedRoleWithSAMLInput(v *AssumeDecoratedRoleWithSAMLInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DurationSeconds != nil { + ok := object.Key("DurationSeconds") + ok.Integer(*v.DurationSeconds) + } + + if v.PrincipalArn != nil { + ok := object.Key("PrincipalArn") + ok.String(*v.PrincipalArn) + } + + if v.RoleArn != nil { + ok := object.Key("RoleArn") + ok.String(*v.RoleArn) + } + + if v.SAMLAssertion != nil { + ok := object.Key("SAMLAssertion") + ok.String(*v.SAMLAssertion) + } + + return nil +} + type awsRestjson1_serializeOpBatchGrantPermissions struct { } diff --git a/service/lakeformation/validators.go b/service/lakeformation/validators.go index 8bae0d9bb12..3667d88e6da 100644 --- a/service/lakeformation/validators.go +++ b/service/lakeformation/validators.go @@ -30,6 +30,26 @@ func (m *validateOpAddLFTagsToResource) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpAssumeDecoratedRoleWithSAML struct { +} + +func (*validateOpAssumeDecoratedRoleWithSAML) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssumeDecoratedRoleWithSAML) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssumeDecoratedRoleWithSAMLInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssumeDecoratedRoleWithSAMLInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpBatchGrantPermissions struct { } @@ -754,6 +774,10 @@ func addOpAddLFTagsToResourceValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpAddLFTagsToResource{}, middleware.After) } +func addOpAssumeDecoratedRoleWithSAMLValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssumeDecoratedRoleWithSAML{}, middleware.After) +} + func addOpBatchGrantPermissionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpBatchGrantPermissions{}, middleware.After) } @@ -1334,6 +1358,27 @@ func validateOpAddLFTagsToResourceInput(v *AddLFTagsToResourceInput) error { } } +func validateOpAssumeDecoratedRoleWithSAMLInput(v *AssumeDecoratedRoleWithSAMLInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssumeDecoratedRoleWithSAMLInput"} + if v.SAMLAssertion == nil { + invalidParams.Add(smithy.NewErrParamRequired("SAMLAssertion")) + } + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if v.PrincipalArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpBatchGrantPermissionsInput(v *BatchGrantPermissionsInput) error { if v == nil { return nil diff --git a/service/lambda/api_op_CreateEventSourceMapping.go b/service/lambda/api_op_CreateEventSourceMapping.go index 5f156cde3ef..9d2b257c2f5 100644 --- a/service/lambda/api_op_CreateEventSourceMapping.go +++ b/service/lambda/api_op_CreateEventSourceMapping.go @@ -13,7 +13,7 @@ import ( ) // Creates a mapping between an event source and an Lambda function. Lambda reads -// items from the event source and triggers the function. For details about how to +// items from the event source and invokes the function. For details about how to // configure different event sources, see the following topics. // // * Amazon DynamoDB @@ -39,7 +39,7 @@ import ( // Apache Kafka (https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html) // // The -// following error handling options are only available for stream sources (DynamoDB +// following error handling options are available only for stream sources (DynamoDB // and Kinesis): // // * BisectBatchOnFunctionError - If the function returns an error, @@ -124,6 +124,10 @@ type CreateEventSourceMappingInput struct { // This member is required. FunctionName *string + // Specific configuration settings for an Amazon Managed Streaming for Apache Kafka + // (Amazon MSK) event source. + AmazonManagedKafkaEventSourceConfig *types.AmazonManagedKafkaEventSourceConfig + // The maximum number of records in each batch that Lambda pulls from your stream // or queue and sends to your function. Lambda passes all of the records in the // batch to the function in a single call, up to the payload limit for synchronous @@ -141,7 +145,7 @@ type CreateEventSourceMappingInput struct { // * Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000. // // * - // Self-Managed Apache Kafka - Default 100. Max 10,000. + // Self-managed Apache Kafka - Default 100. Max 10,000. // // * Amazon MQ (ActiveMQ and // RabbitMQ) - Default 100. Max 10,000. @@ -194,8 +198,8 @@ type CreateEventSourceMappingInput struct { MaximumRecordAgeInSeconds *int32 // (Streams only) Discard records after the specified number of retries. The - // default value is infinite (-1). When set to infinite (-1), failed records will - // be retried until the record expires. + // default value is infinite (-1). When set to infinite (-1), failed records are + // retried until the record expires. MaximumRetryAttempts *int32 // (Streams only) The number of batches to process from each shard concurrently. @@ -204,16 +208,19 @@ type CreateEventSourceMappingInput struct { // (MQ) The name of the Amazon MQ broker destination queue to consume. Queues []string - // The Self-Managed Apache Kafka cluster to send records. + // The self-managed Apache Kafka cluster to receive records from. SelfManagedEventSource *types.SelfManagedEventSource + // Specific configuration settings for a self-managed Apache Kafka event source. + SelfManagedKafkaEventSourceConfig *types.SelfManagedKafkaEventSourceConfig + // An array of authentication protocols or VPC components required to secure your // event source. SourceAccessConfigurations []types.SourceAccessConfiguration // The position in a stream from which to start reading. Required for Amazon - // Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources. AT_TIMESTAMP is only - // supported for Amazon Kinesis streams. + // Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources. AT_TIMESTAMP is + // supported only for Amazon Kinesis streams. StartingPosition types.EventSourcePosition // With StartingPosition set to AT_TIMESTAMP, the time from which to start reading. @@ -223,7 +230,7 @@ type CreateEventSourceMappingInput struct { Topics []string // (Streams only) The duration in seconds of a processing window. The range is - // between 1 second up to 900 seconds. + // between 1 second and 900 seconds. TumblingWindowInSeconds *int32 noSmithyDocumentSerde @@ -233,6 +240,10 @@ type CreateEventSourceMappingInput struct { // details, see CreateEventSourceMapping. type CreateEventSourceMappingOutput struct { + // Specific configuration settings for an Amazon Managed Streaming for Apache Kafka + // (Amazon MSK) event source. + AmazonManagedKafkaEventSourceConfig *types.AmazonManagedKafkaEventSourceConfig + // The maximum number of records in each batch that Lambda pulls from your stream // or queue and sends to your function. Lambda passes all of the records in the // batch to the function in a single call, up to the payload limit for synchronous @@ -300,6 +311,9 @@ type CreateEventSourceMappingOutput struct { // The self-managed Apache Kafka cluster for your event source. SelfManagedEventSource *types.SelfManagedEventSource + // Specific configuration settings for a self-managed Apache Kafka event source. + SelfManagedKafkaEventSourceConfig *types.SelfManagedKafkaEventSourceConfig + // An array of the authentication protocol, VPC components, or virtual host to // secure and define your event source. SourceAccessConfigurations []types.SourceAccessConfiguration diff --git a/service/lambda/api_op_DeleteEventSourceMapping.go b/service/lambda/api_op_DeleteEventSourceMapping.go index 4fb3ddbc03c..a40d3623018 100644 --- a/service/lambda/api_op_DeleteEventSourceMapping.go +++ b/service/lambda/api_op_DeleteEventSourceMapping.go @@ -46,6 +46,10 @@ type DeleteEventSourceMappingInput struct { // details, see CreateEventSourceMapping. type DeleteEventSourceMappingOutput struct { + // Specific configuration settings for an Amazon Managed Streaming for Apache Kafka + // (Amazon MSK) event source. + AmazonManagedKafkaEventSourceConfig *types.AmazonManagedKafkaEventSourceConfig + // The maximum number of records in each batch that Lambda pulls from your stream // or queue and sends to your function. Lambda passes all of the records in the // batch to the function in a single call, up to the payload limit for synchronous @@ -113,6 +117,9 @@ type DeleteEventSourceMappingOutput struct { // The self-managed Apache Kafka cluster for your event source. SelfManagedEventSource *types.SelfManagedEventSource + // Specific configuration settings for a self-managed Apache Kafka event source. + SelfManagedKafkaEventSourceConfig *types.SelfManagedKafkaEventSourceConfig + // An array of the authentication protocol, VPC components, or virtual host to // secure and define your event source. SourceAccessConfigurations []types.SourceAccessConfiguration diff --git a/service/lambda/api_op_GetEventSourceMapping.go b/service/lambda/api_op_GetEventSourceMapping.go index 3780b691db3..e47df50bb83 100644 --- a/service/lambda/api_op_GetEventSourceMapping.go +++ b/service/lambda/api_op_GetEventSourceMapping.go @@ -43,6 +43,10 @@ type GetEventSourceMappingInput struct { // details, see CreateEventSourceMapping. type GetEventSourceMappingOutput struct { + // Specific configuration settings for an Amazon Managed Streaming for Apache Kafka + // (Amazon MSK) event source. + AmazonManagedKafkaEventSourceConfig *types.AmazonManagedKafkaEventSourceConfig + // The maximum number of records in each batch that Lambda pulls from your stream // or queue and sends to your function. Lambda passes all of the records in the // batch to the function in a single call, up to the payload limit for synchronous @@ -110,6 +114,9 @@ type GetEventSourceMappingOutput struct { // The self-managed Apache Kafka cluster for your event source. SelfManagedEventSource *types.SelfManagedEventSource + // Specific configuration settings for a self-managed Apache Kafka event source. + SelfManagedKafkaEventSourceConfig *types.SelfManagedKafkaEventSourceConfig + // An array of the authentication protocol, VPC components, or virtual host to // secure and define your event source. SourceAccessConfigurations []types.SourceAccessConfiguration diff --git a/service/lambda/api_op_Invoke.go b/service/lambda/api_op_Invoke.go index 4249e560412..d605bfdd44f 100644 --- a/service/lambda/api_op_Invoke.go +++ b/service/lambda/api_op_Invoke.go @@ -47,6 +47,9 @@ import ( // operating system to allow for long connections with timeout or keep-alive // settings. This operation requires permission for the lambda:InvokeFunction // (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awslambda.html) action. +// For details on how to set up permissions for cross-account invocations, see +// Granting function access to other accounts +// (https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html#permissions-resource-xaccountinvoke). func (c *Client) Invoke(ctx context.Context, params *InvokeInput, optFns ...func(*Options)) (*InvokeOutput, error) { if params == nil { params = &InvokeInput{} diff --git a/service/lambda/api_op_ListEventSourceMappings.go b/service/lambda/api_op_ListEventSourceMappings.go index c585ffb483e..d8d1aef40f0 100644 --- a/service/lambda/api_op_ListEventSourceMappings.go +++ b/service/lambda/api_op_ListEventSourceMappings.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists event source mappings. Specify an EventSourceArn to only show event source +// Lists event source mappings. Specify an EventSourceArn to show only event source // mappings for a single event source. func (c *Client) ListEventSourceMappings(ctx context.Context, params *ListEventSourceMappingsInput, optFns ...func(*Options)) (*ListEventSourceMappingsOutput, error) { if params == nil { diff --git a/service/lambda/api_op_UpdateEventSourceMapping.go b/service/lambda/api_op_UpdateEventSourceMapping.go index c054b60a9a7..5274a0359c0 100644 --- a/service/lambda/api_op_UpdateEventSourceMapping.go +++ b/service/lambda/api_op_UpdateEventSourceMapping.go @@ -39,7 +39,7 @@ import ( // Apache Kafka (https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html) // // The -// following error handling options are only available for stream sources (DynamoDB +// following error handling options are available only for stream sources (DynamoDB // and Kinesis): // // * BisectBatchOnFunctionError - If the function returns an error, @@ -125,7 +125,7 @@ type UpdateEventSourceMappingInput struct { // * Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000. // // * - // Self-Managed Apache Kafka - Default 100. Max 10,000. + // Self-managed Apache Kafka - Default 100. Max 10,000. // // * Amazon MQ (ActiveMQ and // RabbitMQ) - Default 100. Max 10,000. @@ -183,8 +183,8 @@ type UpdateEventSourceMappingInput struct { MaximumRecordAgeInSeconds *int32 // (Streams only) Discard records after the specified number of retries. The - // default value is infinite (-1). When set to infinite (-1), failed records will - // be retried until the record expires. + // default value is infinite (-1). When set to infinite (-1), failed records are + // retried until the record expires. MaximumRetryAttempts *int32 // (Streams only) The number of batches to process from each shard concurrently. @@ -195,7 +195,7 @@ type UpdateEventSourceMappingInput struct { SourceAccessConfigurations []types.SourceAccessConfiguration // (Streams only) The duration in seconds of a processing window. The range is - // between 1 second up to 900 seconds. + // between 1 second and 900 seconds. TumblingWindowInSeconds *int32 noSmithyDocumentSerde @@ -205,6 +205,10 @@ type UpdateEventSourceMappingInput struct { // details, see CreateEventSourceMapping. type UpdateEventSourceMappingOutput struct { + // Specific configuration settings for an Amazon Managed Streaming for Apache Kafka + // (Amazon MSK) event source. + AmazonManagedKafkaEventSourceConfig *types.AmazonManagedKafkaEventSourceConfig + // The maximum number of records in each batch that Lambda pulls from your stream // or queue and sends to your function. Lambda passes all of the records in the // batch to the function in a single call, up to the payload limit for synchronous @@ -272,6 +276,9 @@ type UpdateEventSourceMappingOutput struct { // The self-managed Apache Kafka cluster for your event source. SelfManagedEventSource *types.SelfManagedEventSource + // Specific configuration settings for a self-managed Apache Kafka event source. + SelfManagedKafkaEventSourceConfig *types.SelfManagedKafkaEventSourceConfig + // An array of the authentication protocol, VPC components, or virtual host to // secure and define your event source. SourceAccessConfigurations []types.SourceAccessConfiguration diff --git a/service/lambda/deserializers.go b/service/lambda/deserializers.go index dfab275ce53..d645ee2a783 100644 --- a/service/lambda/deserializers.go +++ b/service/lambda/deserializers.go @@ -867,6 +867,11 @@ func awsRestjson1_deserializeOpDocumentCreateEventSourceMappingOutput(v **Create for key, value := range shape { switch key { + case "AmazonManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(&sv.AmazonManagedKafkaEventSourceConfig, value); err != nil { + return err + } + case "BatchSize": if value != nil { jtv, ok := value.(json.Number) @@ -1009,6 +1014,11 @@ func awsRestjson1_deserializeOpDocumentCreateEventSourceMappingOutput(v **Create return err } + case "SelfManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(&sv.SelfManagedKafkaEventSourceConfig, value); err != nil { + return err + } + case "SourceAccessConfigurations": if err := awsRestjson1_deserializeDocumentSourceAccessConfigurations(&sv.SourceAccessConfigurations, value); err != nil { return err @@ -2062,6 +2072,11 @@ func awsRestjson1_deserializeOpDocumentDeleteEventSourceMappingOutput(v **Delete for key, value := range shape { switch key { + case "AmazonManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(&sv.AmazonManagedKafkaEventSourceConfig, value); err != nil { + return err + } + case "BatchSize": if value != nil { jtv, ok := value.(json.Number) @@ -2204,6 +2219,11 @@ func awsRestjson1_deserializeOpDocumentDeleteEventSourceMappingOutput(v **Delete return err } + case "SelfManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(&sv.SelfManagedKafkaEventSourceConfig, value); err != nil { + return err + } + case "SourceAccessConfigurations": if err := awsRestjson1_deserializeDocumentSourceAccessConfigurations(&sv.SourceAccessConfigurations, value); err != nil { return err @@ -3637,6 +3657,11 @@ func awsRestjson1_deserializeOpDocumentGetEventSourceMappingOutput(v **GetEventS for key, value := range shape { switch key { + case "AmazonManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(&sv.AmazonManagedKafkaEventSourceConfig, value); err != nil { + return err + } + case "BatchSize": if value != nil { jtv, ok := value.(json.Number) @@ -3779,6 +3804,11 @@ func awsRestjson1_deserializeOpDocumentGetEventSourceMappingOutput(v **GetEventS return err } + case "SelfManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(&sv.SelfManagedKafkaEventSourceConfig, value); err != nil { + return err + } + case "SourceAccessConfigurations": if err := awsRestjson1_deserializeDocumentSourceAccessConfigurations(&sv.SourceAccessConfigurations, value); err != nil { return err @@ -10829,6 +10859,11 @@ func awsRestjson1_deserializeOpDocumentUpdateEventSourceMappingOutput(v **Update for key, value := range shape { switch key { + case "AmazonManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(&sv.AmazonManagedKafkaEventSourceConfig, value); err != nil { + return err + } + case "BatchSize": if value != nil { jtv, ok := value.(json.Number) @@ -10971,6 +11006,11 @@ func awsRestjson1_deserializeOpDocumentUpdateEventSourceMappingOutput(v **Update return err } + case "SelfManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(&sv.SelfManagedKafkaEventSourceConfig, value); err != nil { + return err + } + case "SourceAccessConfigurations": if err := awsRestjson1_deserializeDocumentSourceAccessConfigurations(&sv.SourceAccessConfigurations, value); err != nil { return err @@ -14063,6 +14103,46 @@ func awsRestjson1_deserializeDocumentAllowOriginsList(v *[]string, value interfa return nil } +func awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(v **types.AmazonManagedKafkaEventSourceConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AmazonManagedKafkaEventSourceConfig + if *v == nil { + sv = &types.AmazonManagedKafkaEventSourceConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConsumerGroupId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected URI to be of type string, got %T instead", value) + } + sv.ConsumerGroupId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentArchitecturesList(v *[]types.Architecture, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15330,6 +15410,11 @@ func awsRestjson1_deserializeDocumentEventSourceMappingConfiguration(v **types.E for key, value := range shape { switch key { + case "AmazonManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentAmazonManagedKafkaEventSourceConfig(&sv.AmazonManagedKafkaEventSourceConfig, value); err != nil { + return err + } + case "BatchSize": if value != nil { jtv, ok := value.(json.Number) @@ -15472,6 +15557,11 @@ func awsRestjson1_deserializeDocumentEventSourceMappingConfiguration(v **types.E return err } + case "SelfManagedKafkaEventSourceConfig": + if err := awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(&sv.SelfManagedKafkaEventSourceConfig, value); err != nil { + return err + } + case "SourceAccessConfigurations": if err := awsRestjson1_deserializeDocumentSourceAccessConfigurations(&sv.SourceAccessConfigurations, value); err != nil { return err @@ -18328,6 +18418,46 @@ func awsRestjson1_deserializeDocumentSelfManagedEventSource(v **types.SelfManage return nil } +func awsRestjson1_deserializeDocumentSelfManagedKafkaEventSourceConfig(v **types.SelfManagedKafkaEventSourceConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SelfManagedKafkaEventSourceConfig + if *v == nil { + sv = &types.SelfManagedKafkaEventSourceConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConsumerGroupId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected URI to be of type string, got %T instead", value) + } + sv.ConsumerGroupId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentServiceException(v **types.ServiceException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/lambda/serializers.go b/service/lambda/serializers.go index 7b79aeeefae..7b5f2f2d812 100644 --- a/service/lambda/serializers.go +++ b/service/lambda/serializers.go @@ -487,6 +487,13 @@ func awsRestjson1_serializeOpDocumentCreateEventSourceMappingInput(v *CreateEven object := value.Object() defer object.Close() + if v.AmazonManagedKafkaEventSourceConfig != nil { + ok := object.Key("AmazonManagedKafkaEventSourceConfig") + if err := awsRestjson1_serializeDocumentAmazonManagedKafkaEventSourceConfig(v.AmazonManagedKafkaEventSourceConfig, ok); err != nil { + return err + } + } + if v.BatchSize != nil { ok := object.Key("BatchSize") ok.Integer(*v.BatchSize) @@ -567,6 +574,13 @@ func awsRestjson1_serializeOpDocumentCreateEventSourceMappingInput(v *CreateEven } } + if v.SelfManagedKafkaEventSourceConfig != nil { + ok := object.Key("SelfManagedKafkaEventSourceConfig") + if err := awsRestjson1_serializeDocumentSelfManagedKafkaEventSourceConfig(v.SelfManagedKafkaEventSourceConfig, ok); err != nil { + return err + } + } + if v.SourceAccessConfigurations != nil { ok := object.Key("SourceAccessConfigurations") if err := awsRestjson1_serializeDocumentSourceAccessConfigurations(v.SourceAccessConfigurations, ok); err != nil { @@ -5087,6 +5101,18 @@ func awsRestjson1_serializeDocumentAllowOriginsList(v []string, value smithyjson return nil } +func awsRestjson1_serializeDocumentAmazonManagedKafkaEventSourceConfig(v *types.AmazonManagedKafkaEventSourceConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConsumerGroupId != nil { + ok := object.Key("ConsumerGroupId") + ok.String(*v.ConsumerGroupId) + } + + return nil +} + func awsRestjson1_serializeDocumentArchitecturesList(v []types.Architecture, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -5521,6 +5547,18 @@ func awsRestjson1_serializeDocumentSelfManagedEventSource(v *types.SelfManagedEv return nil } +func awsRestjson1_serializeDocumentSelfManagedKafkaEventSourceConfig(v *types.SelfManagedKafkaEventSourceConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConsumerGroupId != nil { + ok := object.Key("ConsumerGroupId") + ok.String(*v.ConsumerGroupId) + } + + return nil +} + func awsRestjson1_serializeDocumentSigningProfileVersionArns(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/lambda/types/types.go b/service/lambda/types/types.go index 5b6ca5b7bf4..bc6a4ba4566 100644 --- a/service/lambda/types/types.go +++ b/service/lambda/types/types.go @@ -96,6 +96,19 @@ type AllowedPublishers struct { noSmithyDocumentSerde } +// Specific configuration settings for an Amazon Managed Streaming for Apache Kafka +// (Amazon MSK) event source. +type AmazonManagedKafkaEventSourceConfig struct { + + // The identifier for the Kafka consumer group to join. The consumer group ID must + // be unique among all your Kafka event sources. After creating a Kafka event + // source mapping with the consumer group ID specified, you cannot update this + // value. For more information, see services-msk-consumer-group-id. + ConsumerGroupId *string + + noSmithyDocumentSerde +} + // Details about a Code signing configuration // (https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html). type CodeSigningConfig struct { @@ -274,6 +287,10 @@ type EphemeralStorage struct { // details, see CreateEventSourceMapping. type EventSourceMappingConfiguration struct { + // Specific configuration settings for an Amazon Managed Streaming for Apache Kafka + // (Amazon MSK) event source. + AmazonManagedKafkaEventSourceConfig *AmazonManagedKafkaEventSourceConfig + // The maximum number of records in each batch that Lambda pulls from your stream // or queue and sends to your function. Lambda passes all of the records in the // batch to the function in a single call, up to the payload limit for synchronous @@ -341,6 +358,9 @@ type EventSourceMappingConfiguration struct { // The self-managed Apache Kafka cluster for your event source. SelfManagedEventSource *SelfManagedEventSource + // Specific configuration settings for a self-managed Apache Kafka event source. + SelfManagedKafkaEventSourceConfig *SelfManagedKafkaEventSourceConfig + // An array of the authentication protocol, VPC components, or virtual host to // secure and define your event source. SourceAccessConfigurations []SourceAccessConfiguration @@ -858,6 +878,18 @@ type SelfManagedEventSource struct { noSmithyDocumentSerde } +// Specific configuration settings for a self-managed Apache Kafka event source. +type SelfManagedKafkaEventSourceConfig struct { + + // The identifier for the Kafka consumer group to join. The consumer group ID must + // be unique among all your Kafka event sources. After creating a Kafka event + // source mapping with the consumer group ID specified, you cannot update this + // value. For more information, see services-msk-consumer-group-id. + ConsumerGroupId *string + + noSmithyDocumentSerde +} + // To secure and define access to your event source, you can specify the // authentication protocol, VPC components, or virtual host. type SourceAccessConfiguration struct { @@ -893,7 +925,7 @@ type SourceAccessConfiguration struct { // event source. This property cannot be specified in an UpdateEventSourceMapping // API call. // - // * CLIENT_CERTIFICATE_TLS_AUTH - (Amazon MSK, Self-managed Apache + // * CLIENT_CERTIFICATE_TLS_AUTH - (Amazon MSK, self-managed Apache // Kafka) The Secrets Manager ARN of your secret key containing the certificate // chain (X.509 PEM), private key (PKCS#8 PEM), and private key password (optional) // used for mutual TLS authentication of your MSK/Apache Kafka brokers. diff --git a/service/lexmodelsv2/api_op_CreateIntent.go b/service/lexmodelsv2/api_op_CreateIntent.go index d2ec045fddf..8836c87932f 100644 --- a/service/lexmodelsv2/api_op_CreateIntent.go +++ b/service/lexmodelsv2/api_op_CreateIntent.go @@ -102,6 +102,10 @@ type CreateIntentInput struct { // then place an order on the customer's behalf. FulfillmentCodeHook *types.FulfillmentCodeHookSettings + // Configuration settings for the response that is sent to the user at the + // beginning of a conversation, before eliciting slot values. + InitialResponseSetting *types.InitialResponseSetting + // A list of contexts that must be active for this intent to be considered by // Amazon Lex. When an intent has an input context list, Amazon Lex only considers // using the intent in an interaction with the user when the specified contexts are @@ -168,6 +172,10 @@ type CreateIntentOutput struct { // The fulfillment Lambda function specified for the intent. FulfillmentCodeHook *types.FulfillmentCodeHookSettings + // Configuration settings for the response that is sent to the user at the + // beginning of a conversation, before eliciting slot values. + InitialResponseSetting *types.InitialResponseSetting + // The list of input contexts specified for the intent. InputContexts []types.InputContext diff --git a/service/lexmodelsv2/api_op_DescribeIntent.go b/service/lexmodelsv2/api_op_DescribeIntent.go index 4a451fe5524..27d9f620b90 100644 --- a/service/lexmodelsv2/api_op_DescribeIntent.go +++ b/service/lexmodelsv2/api_op_DescribeIntent.go @@ -76,6 +76,9 @@ type DescribeIntentOutput struct { // fulfillment. FulfillmentCodeHook *types.FulfillmentCodeHookSettings + // + InitialResponseSetting *types.InitialResponseSetting + // A list of contexts that must be active for the intent to be considered for // sending to the user. InputContexts []types.InputContext diff --git a/service/lexmodelsv2/api_op_UpdateIntent.go b/service/lexmodelsv2/api_op_UpdateIntent.go index 0692e432ff0..389a616c407 100644 --- a/service/lexmodelsv2/api_op_UpdateIntent.go +++ b/service/lexmodelsv2/api_op_UpdateIntent.go @@ -68,6 +68,9 @@ type UpdateIntentInput struct { // provided and the intent is ready for fulfillment. FulfillmentCodeHook *types.FulfillmentCodeHookSettings + // + InitialResponseSetting *types.InitialResponseSetting + // A new list of contexts that must be active in order for Amazon Lex to consider // the intent. InputContexts []types.InputContext @@ -118,6 +121,9 @@ type UpdateIntentOutput struct { // The updated Lambda function called when the intent is ready for fulfillment. FulfillmentCodeHook *types.FulfillmentCodeHookSettings + // + InitialResponseSetting *types.InitialResponseSetting + // The updated list of contexts that must be active for the intent to be considered // by Amazon Lex. InputContexts []types.InputContext diff --git a/service/lexmodelsv2/deserializers.go b/service/lexmodelsv2/deserializers.go index ff2e83fb2fc..a7da3cb7478 100644 --- a/service/lexmodelsv2/deserializers.go +++ b/service/lexmodelsv2/deserializers.go @@ -1610,6 +1610,11 @@ func awsRestjson1_deserializeOpDocumentCreateIntentOutput(v **CreateIntentOutput return err } + case "initialResponseSetting": + if err := awsRestjson1_deserializeDocumentInitialResponseSetting(&sv.InitialResponseSetting, value); err != nil { + return err + } + case "inputContexts": if err := awsRestjson1_deserializeDocumentInputContextsList(&sv.InputContexts, value); err != nil { return err @@ -6960,6 +6965,11 @@ func awsRestjson1_deserializeOpDocumentDescribeIntentOutput(v **DescribeIntentOu return err } + case "initialResponseSetting": + if err := awsRestjson1_deserializeDocumentInitialResponseSetting(&sv.InitialResponseSetting, value); err != nil { + return err + } + case "inputContexts": if err := awsRestjson1_deserializeDocumentInputContextsList(&sv.InputContexts, value); err != nil { return err @@ -12893,6 +12903,11 @@ func awsRestjson1_deserializeOpDocumentUpdateIntentOutput(v **UpdateIntentOutput return err } + case "initialResponseSetting": + if err := awsRestjson1_deserializeDocumentInitialResponseSetting(&sv.InitialResponseSetting, value); err != nil { + return err + } + case "inputContexts": if err := awsRestjson1_deserializeDocumentInputContextsList(&sv.InputContexts, value); err != nil { return err @@ -16043,6 +16058,185 @@ func awsRestjson1_deserializeDocumentCodeHookSpecification(v **types.CodeHookSpe return nil } +func awsRestjson1_deserializeDocumentCondition(v **types.Condition, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Condition + if *v == nil { + sv = &types.Condition{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "expressionString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConditionExpression to be of type string, got %T instead", value) + } + sv.ExpressionString = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConditionalBranch(v **types.ConditionalBranch, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConditionalBranch + if *v == nil { + sv = &types.ConditionalBranch{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "condition": + if err := awsRestjson1_deserializeDocumentCondition(&sv.Condition, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "nextStep": + if err := awsRestjson1_deserializeDocumentDialogState(&sv.NextStep, value); err != nil { + return err + } + + case "response": + if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.Response, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConditionalBranches(v *[]types.ConditionalBranch, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ConditionalBranch + if *v == nil { + cv = []types.ConditionalBranch{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ConditionalBranch + destAddr := &col + if err := awsRestjson1_deserializeDocumentConditionalBranch(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConditionalSpecification(v **types.ConditionalSpecification, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConditionalSpecification + if *v == nil { + sv = &types.ConditionalSpecification{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "active": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value) + } + sv.Active = ptr.Bool(jtv) + } + + case "conditionalBranches": + if err := awsRestjson1_deserializeDocumentConditionalBranches(&sv.ConditionalBranches, value); err != nil { + return err + } + + case "defaultBranch": + if err := awsRestjson1_deserializeDocumentDefaultConditionalBranch(&sv.DefaultBranch, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16383,7 +16577,7 @@ func awsRestjson1_deserializeDocumentDateRangeFilter(v **types.DateRangeFilter, return nil } -func awsRestjson1_deserializeDocumentDialogCodeHookSettings(v **types.DialogCodeHookSettings, value interface{}) error { +func awsRestjson1_deserializeDocumentDefaultConditionalBranch(v **types.DefaultConditionalBranch, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16396,22 +16590,23 @@ func awsRestjson1_deserializeDocumentDialogCodeHookSettings(v **types.DialogCode return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DialogCodeHookSettings + var sv *types.DefaultConditionalBranch if *v == nil { - sv = &types.DialogCodeHookSettings{} + sv = &types.DefaultConditionalBranch{} } else { sv = *v } for key, value := range shape { switch key { - case "enabled": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.Enabled = jtv + case "nextStep": + if err := awsRestjson1_deserializeDocumentDialogState(&sv.NextStep, value); err != nil { + return err + } + + case "response": + if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.Response, value); err != nil { + return err } default: @@ -16423,7 +16618,7 @@ func awsRestjson1_deserializeDocumentDialogCodeHookSettings(v **types.DialogCode return nil } -func awsRestjson1_deserializeDocumentEncryptionSetting(v **types.EncryptionSetting, value interface{}) error { +func awsRestjson1_deserializeDocumentDialogAction(v **types.DialogAction, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16436,40 +16631,40 @@ func awsRestjson1_deserializeDocumentEncryptionSetting(v **types.EncryptionSetti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EncryptionSetting + var sv *types.DialogAction if *v == nil { - sv = &types.EncryptionSetting{} + sv = &types.DialogAction{} } else { sv = *v } for key, value := range shape { switch key { - case "associatedTranscriptsPassword": + case "slotToElicit": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected FilePassword to be of type string, got %T instead", value) + return fmt.Errorf("expected Name to be of type string, got %T instead", value) } - sv.AssociatedTranscriptsPassword = ptr.String(jtv) + sv.SlotToElicit = ptr.String(jtv) } - case "botLocaleExportPassword": + case "suppressNextMessage": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected FilePassword to be of type string, got %T instead", value) + return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value) } - sv.BotLocaleExportPassword = ptr.String(jtv) + sv.SuppressNextMessage = ptr.Bool(jtv) } - case "kmsKeyArn": + case "type": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected KmsKeyArn to be of type string, got %T instead", value) + return fmt.Errorf("expected DialogActionType to be of type string, got %T instead", value) } - sv.KmsKeyArn = ptr.String(jtv) + sv.Type = types.DialogActionType(jtv) } default: @@ -16481,7 +16676,7 @@ func awsRestjson1_deserializeDocumentEncryptionSetting(v **types.EncryptionSetti return nil } -func awsRestjson1_deserializeDocumentExportResourceSpecification(v **types.ExportResourceSpecification, value interface{}) error { +func awsRestjson1_deserializeDocumentDialogCodeHookInvocationSetting(v **types.DialogCodeHookInvocationSetting, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16494,27 +16689,44 @@ func awsRestjson1_deserializeDocumentExportResourceSpecification(v **types.Expor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ExportResourceSpecification + var sv *types.DialogCodeHookInvocationSetting if *v == nil { - sv = &types.ExportResourceSpecification{} + sv = &types.DialogCodeHookInvocationSetting{} } else { sv = *v } for key, value := range shape { switch key { - case "botExportSpecification": - if err := awsRestjson1_deserializeDocumentBotExportSpecification(&sv.BotExportSpecification, value); err != nil { - return err + case "active": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value) + } + sv.Active = ptr.Bool(jtv) } - case "botLocaleExportSpecification": - if err := awsRestjson1_deserializeDocumentBotLocaleExportSpecification(&sv.BotLocaleExportSpecification, value); err != nil { - return err + case "enableCodeHookInvocation": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value) + } + sv.EnableCodeHookInvocation = ptr.Bool(jtv) } - case "customVocabularyExportSpecification": - if err := awsRestjson1_deserializeDocumentCustomVocabularyExportSpecification(&sv.CustomVocabularyExportSpecification, value); err != nil { + case "invocationLabel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.InvocationLabel = ptr.String(jtv) + } + + case "postCodeHookSpecification": + if err := awsRestjson1_deserializeDocumentPostDialogCodeHookInvocationSpecification(&sv.PostCodeHookSpecification, value); err != nil { return err } @@ -16527,7 +16739,7 @@ func awsRestjson1_deserializeDocumentExportResourceSpecification(v **types.Expor return nil } -func awsRestjson1_deserializeDocumentExportSummary(v **types.ExportSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentDialogCodeHookSettings(v **types.DialogCodeHookSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16540,45 +16752,284 @@ func awsRestjson1_deserializeDocumentExportSummary(v **types.ExportSummary, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ExportSummary + var sv *types.DialogCodeHookSettings if *v == nil { - sv = &types.ExportSummary{} + sv = &types.DialogCodeHookSettings{} } else { sv = *v } for key, value := range shape { switch key { - case "creationDateTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "exportId": + case "enabled": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected Id to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.ExportId = ptr.String(jtv) + sv.Enabled = jtv } - case "exportStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ExportStatus to be of type string, got %T instead", value) + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDialogState(v **types.DialogState, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DialogState + if *v == nil { + sv = &types.DialogState{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "dialogAction": + if err := awsRestjson1_deserializeDocumentDialogAction(&sv.DialogAction, value); err != nil { + return err + } + + case "intent": + if err := awsRestjson1_deserializeDocumentIntentOverride(&sv.Intent, value); err != nil { + return err + } + + case "sessionAttributes": + if err := awsRestjson1_deserializeDocumentStringMap(&sv.SessionAttributes, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentElicitationCodeHookInvocationSetting(v **types.ElicitationCodeHookInvocationSetting, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ElicitationCodeHookInvocationSetting + if *v == nil { + sv = &types.ElicitationCodeHookInvocationSetting{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "enableCodeHookInvocation": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value) + } + sv.EnableCodeHookInvocation = ptr.Bool(jtv) + } + + case "invocationLabel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.InvocationLabel = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEncryptionSetting(v **types.EncryptionSetting, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EncryptionSetting + if *v == nil { + sv = &types.EncryptionSetting{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "associatedTranscriptsPassword": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilePassword to be of type string, got %T instead", value) + } + sv.AssociatedTranscriptsPassword = ptr.String(jtv) + } + + case "botLocaleExportPassword": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilePassword to be of type string, got %T instead", value) + } + sv.BotLocaleExportPassword = ptr.String(jtv) + } + + case "kmsKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyArn to be of type string, got %T instead", value) + } + sv.KmsKeyArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExportResourceSpecification(v **types.ExportResourceSpecification, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ExportResourceSpecification + if *v == nil { + sv = &types.ExportResourceSpecification{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "botExportSpecification": + if err := awsRestjson1_deserializeDocumentBotExportSpecification(&sv.BotExportSpecification, value); err != nil { + return err + } + + case "botLocaleExportSpecification": + if err := awsRestjson1_deserializeDocumentBotLocaleExportSpecification(&sv.BotLocaleExportSpecification, value); err != nil { + return err + } + + case "customVocabularyExportSpecification": + if err := awsRestjson1_deserializeDocumentCustomVocabularyExportSpecification(&sv.CustomVocabularyExportSpecification, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExportSummary(v **types.ExportSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ExportSummary + if *v == nil { + sv = &types.ExportSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "exportId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Id to be of type string, got %T instead", value) + } + sv.ExportId = ptr.String(jtv) + } + + case "exportStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportStatus to be of type string, got %T instead", value) } sv.ExportStatus = types.ExportStatus(jtv) } @@ -16750,6 +17201,15 @@ func awsRestjson1_deserializeDocumentFulfillmentCodeHookSettings(v **types.Fulfi for key, value := range shape { switch key { + case "active": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected BoxedBoolean to be of type *bool, got %T instead", value) + } + sv.Active = ptr.Bool(jtv) + } + case "enabled": if value != nil { jtv, ok := value.(bool) @@ -17311,6 +17771,57 @@ func awsRestjson1_deserializeDocumentImportSummaryList(v *[]types.ImportSummary, return nil } +func awsRestjson1_deserializeDocumentInitialResponseSetting(v **types.InitialResponseSetting, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InitialResponseSetting + if *v == nil { + sv = &types.InitialResponseSetting{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "codeHook": + if err := awsRestjson1_deserializeDocumentDialogCodeHookInvocationSetting(&sv.CodeHook, value); err != nil { + return err + } + + case "conditional": + if err := awsRestjson1_deserializeDocumentConditionalSpecification(&sv.Conditional, value); err != nil { + return err + } + + case "initialResponse": + if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.InitialResponse, value); err != nil { + return err + } + + case "nextStep": + if err := awsRestjson1_deserializeDocumentDialogState(&sv.NextStep, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInputContext(v **types.InputContext, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -17421,6 +17932,16 @@ func awsRestjson1_deserializeDocumentIntentClosingSetting(v **types.IntentClosin return err } + case "conditional": + if err := awsRestjson1_deserializeDocumentConditionalSpecification(&sv.Conditional, value); err != nil { + return err + } + + case "nextStep": + if err := awsRestjson1_deserializeDocumentDialogState(&sv.NextStep, value); err != nil { + return err + } + default: _, _ = key, value @@ -17461,11 +17982,61 @@ func awsRestjson1_deserializeDocumentIntentConfirmationSetting(v **types.IntentC sv.Active = ptr.Bool(jtv) } + case "codeHook": + if err := awsRestjson1_deserializeDocumentDialogCodeHookInvocationSetting(&sv.CodeHook, value); err != nil { + return err + } + + case "confirmationConditional": + if err := awsRestjson1_deserializeDocumentConditionalSpecification(&sv.ConfirmationConditional, value); err != nil { + return err + } + + case "confirmationNextStep": + if err := awsRestjson1_deserializeDocumentDialogState(&sv.ConfirmationNextStep, value); err != nil { + return err + } + + case "confirmationResponse": + if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.ConfirmationResponse, value); err != nil { + return err + } + + case "declinationConditional": + if err := awsRestjson1_deserializeDocumentConditionalSpecification(&sv.DeclinationConditional, value); err != nil { + return err + } + + case "declinationNextStep": + if err := awsRestjson1_deserializeDocumentDialogState(&sv.DeclinationNextStep, value); err != nil { + return err + } + case "declinationResponse": if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.DeclinationResponse, value); err != nil { return err } + case "elicitationCodeHook": + if err := awsRestjson1_deserializeDocumentElicitationCodeHookInvocationSetting(&sv.ElicitationCodeHook, value); err != nil { + return err + } + + case "failureConditional": + if err := awsRestjson1_deserializeDocumentConditionalSpecification(&sv.FailureConditional, value); err != nil { + return err + } + + case "failureNextStep": + if err := awsRestjson1_deserializeDocumentDialogState(&sv.FailureNextStep, value); err != nil { + return err + } + + case "failureResponse": + if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.FailureResponse, value); err != nil { + return err + } + case "promptSpecification": if err := awsRestjson1_deserializeDocumentPromptSpecification(&sv.PromptSpecification, value); err != nil { return err @@ -17480,6 +18051,51 @@ func awsRestjson1_deserializeDocumentIntentConfirmationSetting(v **types.IntentC return nil } +func awsRestjson1_deserializeDocumentIntentOverride(v **types.IntentOverride, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.IntentOverride + if *v == nil { + sv = &types.IntentOverride{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "slots": + if err := awsRestjson1_deserializeDocumentSlotValueOverrideMap(&sv.Slots, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentIntentStatistics(v **types.IntentStatistics, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -18266,15 +18882,91 @@ func awsRestjson1_deserializeDocumentPlainTextMessage(v **types.PlainTextMessage sv = *v } - for key, value := range shape { - switch key { - case "value": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PlainTextMessageValue to be of type string, got %T instead", value) - } - sv.Value = ptr.String(jtv) + for key, value := range shape { + switch key { + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PlainTextMessageValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPostDialogCodeHookInvocationSpecification(v **types.PostDialogCodeHookInvocationSpecification, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PostDialogCodeHookInvocationSpecification + if *v == nil { + sv = &types.PostDialogCodeHookInvocationSpecification{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "failureConditional": + if err := awsRestjson1_deserializeDocumentConditionalSpecification(&sv.FailureConditional, value); err != nil { + return err + } + + case "failureNextStep": + if err := awsRestjson1_deserializeDocumentDialogState(&sv.FailureNextStep, value); err != nil { + return err + } + + case "failureResponse": + if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.FailureResponse, value); err != nil { + return err + } + + case "successConditional": + if err := awsRestjson1_deserializeDocumentConditionalSpecification(&sv.SuccessConditional, value); err != nil { + return err + } + + case "successNextStep": + if err := awsRestjson1_deserializeDocumentDialogState(&sv.SuccessNextStep, value); err != nil { + return err + } + + case "successResponse": + if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.SuccessResponse, value); err != nil { + return err + } + + case "timeoutConditional": + if err := awsRestjson1_deserializeDocumentConditionalSpecification(&sv.TimeoutConditional, value); err != nil { + return err + } + + case "timeoutNextStep": + if err := awsRestjson1_deserializeDocumentDialogState(&sv.TimeoutNextStep, value); err != nil { + return err + } + + case "timeoutResponse": + if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.TimeoutResponse, value); err != nil { + return err } default: @@ -18308,16 +19000,46 @@ func awsRestjson1_deserializeDocumentPostFulfillmentStatusSpecification(v **type for key, value := range shape { switch key { + case "failureConditional": + if err := awsRestjson1_deserializeDocumentConditionalSpecification(&sv.FailureConditional, value); err != nil { + return err + } + + case "failureNextStep": + if err := awsRestjson1_deserializeDocumentDialogState(&sv.FailureNextStep, value); err != nil { + return err + } + case "failureResponse": if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.FailureResponse, value); err != nil { return err } + case "successConditional": + if err := awsRestjson1_deserializeDocumentConditionalSpecification(&sv.SuccessConditional, value); err != nil { + return err + } + + case "successNextStep": + if err := awsRestjson1_deserializeDocumentDialogState(&sv.SuccessNextStep, value); err != nil { + return err + } + case "successResponse": if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.SuccessResponse, value); err != nil { return err } + case "timeoutConditional": + if err := awsRestjson1_deserializeDocumentConditionalSpecification(&sv.TimeoutConditional, value); err != nil { + return err + } + + case "timeoutNextStep": + if err := awsRestjson1_deserializeDocumentDialogState(&sv.TimeoutNextStep, value); err != nil { + return err + } + case "timeoutResponse": if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.TimeoutResponse, value); err != nil { return err @@ -19029,6 +19751,77 @@ func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.Ser return nil } +func awsRestjson1_deserializeDocumentSlotCaptureSetting(v **types.SlotCaptureSetting, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SlotCaptureSetting + if *v == nil { + sv = &types.SlotCaptureSetting{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "captureConditional": + if err := awsRestjson1_deserializeDocumentConditionalSpecification(&sv.CaptureConditional, value); err != nil { + return err + } + + case "captureNextStep": + if err := awsRestjson1_deserializeDocumentDialogState(&sv.CaptureNextStep, value); err != nil { + return err + } + + case "captureResponse": + if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.CaptureResponse, value); err != nil { + return err + } + + case "codeHook": + if err := awsRestjson1_deserializeDocumentDialogCodeHookInvocationSetting(&sv.CodeHook, value); err != nil { + return err + } + + case "elicitationCodeHook": + if err := awsRestjson1_deserializeDocumentElicitationCodeHookInvocationSetting(&sv.ElicitationCodeHook, value); err != nil { + return err + } + + case "failureConditional": + if err := awsRestjson1_deserializeDocumentConditionalSpecification(&sv.FailureConditional, value); err != nil { + return err + } + + case "failureNextStep": + if err := awsRestjson1_deserializeDocumentDialogState(&sv.FailureNextStep, value); err != nil { + return err + } + + case "failureResponse": + if err := awsRestjson1_deserializeDocumentResponseSpecification(&sv.FailureResponse, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSlotDefaultValue(v **types.SlotDefaultValue, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -19602,6 +20395,46 @@ func awsRestjson1_deserializeDocumentSlotTypeValues(v *[]types.SlotTypeValue, va return nil } +func awsRestjson1_deserializeDocumentSlotValue(v **types.SlotValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SlotValue + if *v == nil { + sv = &types.SlotValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "interpretedValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.InterpretedValue = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSlotValueElicitationSetting(v **types.SlotValueElicitationSetting, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -19639,6 +20472,11 @@ func awsRestjson1_deserializeDocumentSlotValueElicitationSetting(v **types.SlotV return err } + case "slotCaptureSetting": + if err := awsRestjson1_deserializeDocumentSlotCaptureSetting(&sv.SlotCaptureSetting, value); err != nil { + return err + } + case "slotConstraint": if value != nil { jtv, ok := value.(string) @@ -19662,6 +20500,91 @@ func awsRestjson1_deserializeDocumentSlotValueElicitationSetting(v **types.SlotV return nil } +func awsRestjson1_deserializeDocumentSlotValueOverride(v **types.SlotValueOverride, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SlotValueOverride + if *v == nil { + sv = &types.SlotValueOverride{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "shape": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SlotShape to be of type string, got %T instead", value) + } + sv.Shape = types.SlotShape(jtv) + } + + case "value": + if err := awsRestjson1_deserializeDocumentSlotValue(&sv.Value, value); err != nil { + return err + } + + case "values": + if err := awsRestjson1_deserializeDocumentSlotValues(&sv.Values, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSlotValueOverrideMap(v *map[string]types.SlotValueOverride, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.SlotValueOverride + if *v == nil { + mv = map[string]types.SlotValueOverride{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.SlotValueOverride + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentSlotValueOverride(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsRestjson1_deserializeDocumentSlotValueRegexFilter(v **types.SlotValueRegexFilter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -19702,6 +20625,40 @@ func awsRestjson1_deserializeDocumentSlotValueRegexFilter(v **types.SlotValueReg return nil } +func awsRestjson1_deserializeDocumentSlotValues(v *[]types.SlotValueOverride, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.SlotValueOverride + if *v == nil { + cv = []types.SlotValueOverride{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SlotValueOverride + destAddr := &col + if err := awsRestjson1_deserializeDocumentSlotValueOverride(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentSlotValueSelectionSetting(v **types.SlotValueSelectionSetting, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -19863,6 +20820,42 @@ func awsRestjson1_deserializeDocumentStillWaitingResponseSpecification(v **types return nil } +func awsRestjson1_deserializeDocumentStringMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsRestjson1_deserializeDocumentSynonymList(v *[]types.SampleValue, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/lexmodelsv2/serializers.go b/service/lexmodelsv2/serializers.go index 46569c61d57..d73e36e028e 100644 --- a/service/lexmodelsv2/serializers.go +++ b/service/lexmodelsv2/serializers.go @@ -713,6 +713,13 @@ func awsRestjson1_serializeOpDocumentCreateIntentInput(v *CreateIntentInput, val } } + if v.InitialResponseSetting != nil { + ok := object.Key("initialResponseSetting") + if err := awsRestjson1_serializeDocumentInitialResponseSetting(v.InitialResponseSetting, ok); err != nil { + return err + } + } + if v.InputContexts != nil { ok := object.Key("inputContexts") if err := awsRestjson1_serializeDocumentInputContextsList(v.InputContexts, ok); err != nil { @@ -5728,6 +5735,13 @@ func awsRestjson1_serializeOpDocumentUpdateIntentInput(v *UpdateIntentInput, val } } + if v.InitialResponseSetting != nil { + ok := object.Key("initialResponseSetting") + if err := awsRestjson1_serializeDocumentInitialResponseSetting(v.InitialResponseSetting, ok); err != nil { + return err + } + } + if v.InputContexts != nil { ok := object.Key("inputContexts") if err := awsRestjson1_serializeDocumentInputContextsList(v.InputContexts, ok); err != nil { @@ -6714,6 +6728,90 @@ func awsRestjson1_serializeDocumentCodeHookSpecification(v *types.CodeHookSpecif return nil } +func awsRestjson1_serializeDocumentCondition(v *types.Condition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExpressionString != nil { + ok := object.Key("expressionString") + ok.String(*v.ExpressionString) + } + + return nil +} + +func awsRestjson1_serializeDocumentConditionalBranch(v *types.ConditionalBranch, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Condition != nil { + ok := object.Key("condition") + if err := awsRestjson1_serializeDocumentCondition(v.Condition, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.NextStep != nil { + ok := object.Key("nextStep") + if err := awsRestjson1_serializeDocumentDialogState(v.NextStep, ok); err != nil { + return err + } + } + + if v.Response != nil { + ok := object.Key("response") + if err := awsRestjson1_serializeDocumentResponseSpecification(v.Response, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentConditionalBranches(v []types.ConditionalBranch, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentConditionalBranch(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentConditionalSpecification(v *types.ConditionalSpecification, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Active != nil { + ok := object.Key("active") + ok.Boolean(*v.Active) + } + + if v.ConditionalBranches != nil { + ok := object.Key("conditionalBranches") + if err := awsRestjson1_serializeDocumentConditionalBranches(v.ConditionalBranches, ok); err != nil { + return err + } + } + + if v.DefaultBranch != nil { + ok := object.Key("defaultBranch") + if err := awsRestjson1_serializeDocumentDefaultConditionalBranch(v.DefaultBranch, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentConditionKeyValueMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6847,6 +6945,78 @@ func awsRestjson1_serializeDocumentDateRangeFilter(v *types.DateRangeFilter, val return nil } +func awsRestjson1_serializeDocumentDefaultConditionalBranch(v *types.DefaultConditionalBranch, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NextStep != nil { + ok := object.Key("nextStep") + if err := awsRestjson1_serializeDocumentDialogState(v.NextStep, ok); err != nil { + return err + } + } + + if v.Response != nil { + ok := object.Key("response") + if err := awsRestjson1_serializeDocumentResponseSpecification(v.Response, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentDialogAction(v *types.DialogAction, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SlotToElicit != nil { + ok := object.Key("slotToElicit") + ok.String(*v.SlotToElicit) + } + + if v.SuppressNextMessage != nil { + ok := object.Key("suppressNextMessage") + ok.Boolean(*v.SuppressNextMessage) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsRestjson1_serializeDocumentDialogCodeHookInvocationSetting(v *types.DialogCodeHookInvocationSetting, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Active != nil { + ok := object.Key("active") + ok.Boolean(*v.Active) + } + + if v.EnableCodeHookInvocation != nil { + ok := object.Key("enableCodeHookInvocation") + ok.Boolean(*v.EnableCodeHookInvocation) + } + + if v.InvocationLabel != nil { + ok := object.Key("invocationLabel") + ok.String(*v.InvocationLabel) + } + + if v.PostCodeHookSpecification != nil { + ok := object.Key("postCodeHookSpecification") + if err := awsRestjson1_serializeDocumentPostDialogCodeHookInvocationSpecification(v.PostCodeHookSpecification, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentDialogCodeHookSettings(v *types.DialogCodeHookSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6859,6 +7029,51 @@ func awsRestjson1_serializeDocumentDialogCodeHookSettings(v *types.DialogCodeHoo return nil } +func awsRestjson1_serializeDocumentDialogState(v *types.DialogState, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DialogAction != nil { + ok := object.Key("dialogAction") + if err := awsRestjson1_serializeDocumentDialogAction(v.DialogAction, ok); err != nil { + return err + } + } + + if v.Intent != nil { + ok := object.Key("intent") + if err := awsRestjson1_serializeDocumentIntentOverride(v.Intent, ok); err != nil { + return err + } + } + + if v.SessionAttributes != nil { + ok := object.Key("sessionAttributes") + if err := awsRestjson1_serializeDocumentStringMap(v.SessionAttributes, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentElicitationCodeHookInvocationSetting(v *types.ElicitationCodeHookInvocationSetting, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EnableCodeHookInvocation != nil { + ok := object.Key("enableCodeHookInvocation") + ok.Boolean(*v.EnableCodeHookInvocation) + } + + if v.InvocationLabel != nil { + ok := object.Key("invocationLabel") + ok.String(*v.InvocationLabel) + } + + return nil +} + func awsRestjson1_serializeDocumentEncryptionSetting(v *types.EncryptionSetting, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6992,6 +7207,11 @@ func awsRestjson1_serializeDocumentFulfillmentCodeHookSettings(v *types.Fulfillm object := value.Object() defer object.Close() + if v.Active != nil { + ok := object.Key("active") + ok.Boolean(*v.Active) + } + { ok := object.Key("enabled") ok.Boolean(v.Enabled) @@ -7240,6 +7460,41 @@ func awsRestjson1_serializeDocumentImportSortBy(v *types.ImportSortBy, value smi return nil } +func awsRestjson1_serializeDocumentInitialResponseSetting(v *types.InitialResponseSetting, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CodeHook != nil { + ok := object.Key("codeHook") + if err := awsRestjson1_serializeDocumentDialogCodeHookInvocationSetting(v.CodeHook, ok); err != nil { + return err + } + } + + if v.Conditional != nil { + ok := object.Key("conditional") + if err := awsRestjson1_serializeDocumentConditionalSpecification(v.Conditional, ok); err != nil { + return err + } + } + + if v.InitialResponse != nil { + ok := object.Key("initialResponse") + if err := awsRestjson1_serializeDocumentResponseSpecification(v.InitialResponse, ok); err != nil { + return err + } + } + + if v.NextStep != nil { + ok := object.Key("nextStep") + if err := awsRestjson1_serializeDocumentDialogState(v.NextStep, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentInputContext(v *types.InputContext, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -7281,6 +7536,20 @@ func awsRestjson1_serializeDocumentIntentClosingSetting(v *types.IntentClosingSe } } + if v.Conditional != nil { + ok := object.Key("conditional") + if err := awsRestjson1_serializeDocumentConditionalSpecification(v.Conditional, ok); err != nil { + return err + } + } + + if v.NextStep != nil { + ok := object.Key("nextStep") + if err := awsRestjson1_serializeDocumentDialogState(v.NextStep, ok); err != nil { + return err + } + } + return nil } @@ -7293,6 +7562,48 @@ func awsRestjson1_serializeDocumentIntentConfirmationSetting(v *types.IntentConf ok.Boolean(*v.Active) } + if v.CodeHook != nil { + ok := object.Key("codeHook") + if err := awsRestjson1_serializeDocumentDialogCodeHookInvocationSetting(v.CodeHook, ok); err != nil { + return err + } + } + + if v.ConfirmationConditional != nil { + ok := object.Key("confirmationConditional") + if err := awsRestjson1_serializeDocumentConditionalSpecification(v.ConfirmationConditional, ok); err != nil { + return err + } + } + + if v.ConfirmationNextStep != nil { + ok := object.Key("confirmationNextStep") + if err := awsRestjson1_serializeDocumentDialogState(v.ConfirmationNextStep, ok); err != nil { + return err + } + } + + if v.ConfirmationResponse != nil { + ok := object.Key("confirmationResponse") + if err := awsRestjson1_serializeDocumentResponseSpecification(v.ConfirmationResponse, ok); err != nil { + return err + } + } + + if v.DeclinationConditional != nil { + ok := object.Key("declinationConditional") + if err := awsRestjson1_serializeDocumentConditionalSpecification(v.DeclinationConditional, ok); err != nil { + return err + } + } + + if v.DeclinationNextStep != nil { + ok := object.Key("declinationNextStep") + if err := awsRestjson1_serializeDocumentDialogState(v.DeclinationNextStep, ok); err != nil { + return err + } + } + if v.DeclinationResponse != nil { ok := object.Key("declinationResponse") if err := awsRestjson1_serializeDocumentResponseSpecification(v.DeclinationResponse, ok); err != nil { @@ -7300,6 +7611,34 @@ func awsRestjson1_serializeDocumentIntentConfirmationSetting(v *types.IntentConf } } + if v.ElicitationCodeHook != nil { + ok := object.Key("elicitationCodeHook") + if err := awsRestjson1_serializeDocumentElicitationCodeHookInvocationSetting(v.ElicitationCodeHook, ok); err != nil { + return err + } + } + + if v.FailureConditional != nil { + ok := object.Key("failureConditional") + if err := awsRestjson1_serializeDocumentConditionalSpecification(v.FailureConditional, ok); err != nil { + return err + } + } + + if v.FailureNextStep != nil { + ok := object.Key("failureNextStep") + if err := awsRestjson1_serializeDocumentDialogState(v.FailureNextStep, ok); err != nil { + return err + } + } + + if v.FailureResponse != nil { + ok := object.Key("failureResponse") + if err := awsRestjson1_serializeDocumentResponseSpecification(v.FailureResponse, ok); err != nil { + return err + } + } + if v.PromptSpecification != nil { ok := object.Key("promptSpecification") if err := awsRestjson1_serializeDocumentPromptSpecification(v.PromptSpecification, ok); err != nil { @@ -7347,6 +7686,25 @@ func awsRestjson1_serializeDocumentIntentFilters(v []types.IntentFilter, value s return nil } +func awsRestjson1_serializeDocumentIntentOverride(v *types.IntentOverride, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Slots != nil { + ok := object.Key("slots") + if err := awsRestjson1_serializeDocumentSlotValueOverrideMap(v.Slots, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentIntentSortBy(v *types.IntentSortBy, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -7606,10 +7964,94 @@ func awsRestjson1_serializeDocumentPlainTextMessage(v *types.PlainTextMessage, v return nil } +func awsRestjson1_serializeDocumentPostDialogCodeHookInvocationSpecification(v *types.PostDialogCodeHookInvocationSpecification, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FailureConditional != nil { + ok := object.Key("failureConditional") + if err := awsRestjson1_serializeDocumentConditionalSpecification(v.FailureConditional, ok); err != nil { + return err + } + } + + if v.FailureNextStep != nil { + ok := object.Key("failureNextStep") + if err := awsRestjson1_serializeDocumentDialogState(v.FailureNextStep, ok); err != nil { + return err + } + } + + if v.FailureResponse != nil { + ok := object.Key("failureResponse") + if err := awsRestjson1_serializeDocumentResponseSpecification(v.FailureResponse, ok); err != nil { + return err + } + } + + if v.SuccessConditional != nil { + ok := object.Key("successConditional") + if err := awsRestjson1_serializeDocumentConditionalSpecification(v.SuccessConditional, ok); err != nil { + return err + } + } + + if v.SuccessNextStep != nil { + ok := object.Key("successNextStep") + if err := awsRestjson1_serializeDocumentDialogState(v.SuccessNextStep, ok); err != nil { + return err + } + } + + if v.SuccessResponse != nil { + ok := object.Key("successResponse") + if err := awsRestjson1_serializeDocumentResponseSpecification(v.SuccessResponse, ok); err != nil { + return err + } + } + + if v.TimeoutConditional != nil { + ok := object.Key("timeoutConditional") + if err := awsRestjson1_serializeDocumentConditionalSpecification(v.TimeoutConditional, ok); err != nil { + return err + } + } + + if v.TimeoutNextStep != nil { + ok := object.Key("timeoutNextStep") + if err := awsRestjson1_serializeDocumentDialogState(v.TimeoutNextStep, ok); err != nil { + return err + } + } + + if v.TimeoutResponse != nil { + ok := object.Key("timeoutResponse") + if err := awsRestjson1_serializeDocumentResponseSpecification(v.TimeoutResponse, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentPostFulfillmentStatusSpecification(v *types.PostFulfillmentStatusSpecification, value smithyjson.Value) error { object := value.Object() defer object.Close() + if v.FailureConditional != nil { + ok := object.Key("failureConditional") + if err := awsRestjson1_serializeDocumentConditionalSpecification(v.FailureConditional, ok); err != nil { + return err + } + } + + if v.FailureNextStep != nil { + ok := object.Key("failureNextStep") + if err := awsRestjson1_serializeDocumentDialogState(v.FailureNextStep, ok); err != nil { + return err + } + } + if v.FailureResponse != nil { ok := object.Key("failureResponse") if err := awsRestjson1_serializeDocumentResponseSpecification(v.FailureResponse, ok); err != nil { @@ -7617,6 +8059,20 @@ func awsRestjson1_serializeDocumentPostFulfillmentStatusSpecification(v *types.P } } + if v.SuccessConditional != nil { + ok := object.Key("successConditional") + if err := awsRestjson1_serializeDocumentConditionalSpecification(v.SuccessConditional, ok); err != nil { + return err + } + } + + if v.SuccessNextStep != nil { + ok := object.Key("successNextStep") + if err := awsRestjson1_serializeDocumentDialogState(v.SuccessNextStep, ok); err != nil { + return err + } + } + if v.SuccessResponse != nil { ok := object.Key("successResponse") if err := awsRestjson1_serializeDocumentResponseSpecification(v.SuccessResponse, ok); err != nil { @@ -7624,6 +8080,20 @@ func awsRestjson1_serializeDocumentPostFulfillmentStatusSpecification(v *types.P } } + if v.TimeoutConditional != nil { + ok := object.Key("timeoutConditional") + if err := awsRestjson1_serializeDocumentConditionalSpecification(v.TimeoutConditional, ok); err != nil { + return err + } + } + + if v.TimeoutNextStep != nil { + ok := object.Key("timeoutNextStep") + if err := awsRestjson1_serializeDocumentDialogState(v.TimeoutNextStep, ok); err != nil { + return err + } + } + if v.TimeoutResponse != nil { ok := object.Key("timeoutResponse") if err := awsRestjson1_serializeDocumentResponseSpecification(v.TimeoutResponse, ok); err != nil { @@ -7836,6 +8306,69 @@ func awsRestjson1_serializeDocumentSentimentAnalysisSettings(v *types.SentimentA return nil } +func awsRestjson1_serializeDocumentSlotCaptureSetting(v *types.SlotCaptureSetting, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CaptureConditional != nil { + ok := object.Key("captureConditional") + if err := awsRestjson1_serializeDocumentConditionalSpecification(v.CaptureConditional, ok); err != nil { + return err + } + } + + if v.CaptureNextStep != nil { + ok := object.Key("captureNextStep") + if err := awsRestjson1_serializeDocumentDialogState(v.CaptureNextStep, ok); err != nil { + return err + } + } + + if v.CaptureResponse != nil { + ok := object.Key("captureResponse") + if err := awsRestjson1_serializeDocumentResponseSpecification(v.CaptureResponse, ok); err != nil { + return err + } + } + + if v.CodeHook != nil { + ok := object.Key("codeHook") + if err := awsRestjson1_serializeDocumentDialogCodeHookInvocationSetting(v.CodeHook, ok); err != nil { + return err + } + } + + if v.ElicitationCodeHook != nil { + ok := object.Key("elicitationCodeHook") + if err := awsRestjson1_serializeDocumentElicitationCodeHookInvocationSetting(v.ElicitationCodeHook, ok); err != nil { + return err + } + } + + if v.FailureConditional != nil { + ok := object.Key("failureConditional") + if err := awsRestjson1_serializeDocumentConditionalSpecification(v.FailureConditional, ok); err != nil { + return err + } + } + + if v.FailureNextStep != nil { + ok := object.Key("failureNextStep") + if err := awsRestjson1_serializeDocumentDialogState(v.FailureNextStep, ok); err != nil { + return err + } + } + + if v.FailureResponse != nil { + ok := object.Key("failureResponse") + if err := awsRestjson1_serializeDocumentResponseSpecification(v.FailureResponse, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentSlotDefaultValue(v *types.SlotDefaultValue, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -8047,6 +8580,18 @@ func awsRestjson1_serializeDocumentSlotTypeValues(v []types.SlotTypeValue, value return nil } +func awsRestjson1_serializeDocumentSlotValue(v *types.SlotValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InterpretedValue != nil { + ok := object.Key("interpretedValue") + ok.String(*v.InterpretedValue) + } + + return nil +} + func awsRestjson1_serializeDocumentSlotValueElicitationSetting(v *types.SlotValueElicitationSetting, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -8072,6 +8617,13 @@ func awsRestjson1_serializeDocumentSlotValueElicitationSetting(v *types.SlotValu } } + if v.SlotCaptureSetting != nil { + ok := object.Key("slotCaptureSetting") + if err := awsRestjson1_serializeDocumentSlotCaptureSetting(v.SlotCaptureSetting, ok); err != nil { + return err + } + } + if len(v.SlotConstraint) > 0 { ok := object.Key("slotConstraint") ok.String(string(v.SlotConstraint)) @@ -8087,6 +8639,46 @@ func awsRestjson1_serializeDocumentSlotValueElicitationSetting(v *types.SlotValu return nil } +func awsRestjson1_serializeDocumentSlotValueOverride(v *types.SlotValueOverride, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Shape) > 0 { + ok := object.Key("shape") + ok.String(string(v.Shape)) + } + + if v.Value != nil { + ok := object.Key("value") + if err := awsRestjson1_serializeDocumentSlotValue(v.Value, ok); err != nil { + return err + } + } + + if v.Values != nil { + ok := object.Key("values") + if err := awsRestjson1_serializeDocumentSlotValues(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSlotValueOverrideMap(v map[string]types.SlotValueOverride, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentSlotValueOverride(&mapVar, om); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentSlotValueRegexFilter(v *types.SlotValueRegexFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -8099,6 +8691,19 @@ func awsRestjson1_serializeDocumentSlotValueRegexFilter(v *types.SlotValueRegexF return nil } +func awsRestjson1_serializeDocumentSlotValues(v []types.SlotValueOverride, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentSlotValueOverride(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentSlotValueSelectionSetting(v *types.SlotValueSelectionSetting, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -8166,6 +8771,17 @@ func awsRestjson1_serializeDocumentStillWaitingResponseSpecification(v *types.St return nil } +func awsRestjson1_serializeDocumentStringMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + func awsRestjson1_serializeDocumentSynonymList(v []types.SampleValue, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/lexmodelsv2/types/enums.go b/service/lexmodelsv2/types/enums.go index f47cece85b0..30767e016c7 100644 --- a/service/lexmodelsv2/types/enums.go +++ b/service/lexmodelsv2/types/enums.go @@ -374,6 +374,38 @@ func (CustomVocabularyStatus) Values() []CustomVocabularyStatus { } } +type DialogActionType string + +// Enum values for DialogActionType +const ( + DialogActionTypeElicitIntent DialogActionType = "ElicitIntent" + DialogActionTypeStartIntent DialogActionType = "StartIntent" + DialogActionTypeElicitSlot DialogActionType = "ElicitSlot" + DialogActionTypeEvaluateConditional DialogActionType = "EvaluateConditional" + DialogActionTypeInvokeDialogCodeHook DialogActionType = "InvokeDialogCodeHook" + DialogActionTypeConfirmIntent DialogActionType = "ConfirmIntent" + DialogActionTypeFulfillIntent DialogActionType = "FulfillIntent" + DialogActionTypeCloseIntent DialogActionType = "CloseIntent" + DialogActionTypeEndConversation DialogActionType = "EndConversation" +) + +// Values returns all known values for DialogActionType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (DialogActionType) Values() []DialogActionType { + return []DialogActionType{ + "ElicitIntent", + "StartIntent", + "ElicitSlot", + "EvaluateConditional", + "InvokeDialogCodeHook", + "ConfirmIntent", + "FulfillIntent", + "CloseIntent", + "EndConversation", + } +} + type Effect string // Enum values for Effect @@ -752,6 +784,24 @@ func (SlotFilterOperator) Values() []SlotFilterOperator { } } +type SlotShape string + +// Enum values for SlotShape +const ( + SlotShapeScalar SlotShape = "Scalar" + SlotShapeList SlotShape = "List" +) + +// Values returns all known values for SlotShape. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (SlotShape) Values() []SlotShape { + return []SlotShape{ + "Scalar", + "List", + } +} + type SlotSortAttribute string // Enum values for SlotSortAttribute diff --git a/service/lexmodelsv2/types/types.go b/service/lexmodelsv2/types/types.go index 803a55960c8..6a22c1ed8bd 100644 --- a/service/lexmodelsv2/types/types.go +++ b/service/lexmodelsv2/types/types.go @@ -712,6 +712,73 @@ type CodeHookSpecification struct { noSmithyDocumentSerde } +// Provides an expression that evaluates to true or false. +type Condition struct { + + // The expression string that is evaluated. + // + // This member is required. + ExpressionString *string + + noSmithyDocumentSerde +} + +// A set of actions that Amazon Lex should run if the condition is matched. +type ConditionalBranch struct { + + // Contains the expression to evaluate. If the condition is true, the branch's + // actions are taken. + // + // This member is required. + Condition *Condition + + // The name of the branch. + // + // This member is required. + Name *string + + // The next step in the conversation. + // + // This member is required. + NextStep *DialogState + + // Specifies a list of message groups that Amazon Lex uses to respond the user + // input. + Response *ResponseSpecification + + noSmithyDocumentSerde +} + +// Provides a list of conditional branches. Branches are evaluated in the order +// that they are entered in the list. The first branch with a condition that +// evaluates to true is executed. The last branch in the list is the default +// branch. The default branch should not have any condition expression. The default +// branch is executed if no other branch has a matching condition. +type ConditionalSpecification struct { + + // Determines whether a conditional branch is active. When active is false, the + // conditions are not evaluated. + // + // This member is required. + Active *bool + + // A list of conditional branches. A conditional branch is made up of a condition, + // a response and a next step. The response and next step are executed when the + // condition is true. + // + // This member is required. + ConditionalBranches []ConditionalBranch + + // The conditional branch that should be followed when the conditions for other + // branches are not satisfied. A conditional branch is made up of a condition, a + // response and a next step. + // + // This member is required. + DefaultBranch *DefaultConditionalBranch + + noSmithyDocumentSerde +} + // Configures conversation logging that saves audio, text, and metadata for the // conversations with your users. type ConversationLogSettings struct { @@ -830,6 +897,65 @@ type DateRangeFilter struct { noSmithyDocumentSerde } +// A set of actions that Amazon Lex should run if none of the other conditions are +// met. +type DefaultConditionalBranch struct { + + // The next step in the conversation. + NextStep *DialogState + + // Specifies a list of message groups that Amazon Lex uses to respond the user + // input. + Response *ResponseSpecification + + noSmithyDocumentSerde +} + +// Defines the action that the bot executes at runtime when the conversation +// reaches this step. +type DialogAction struct { + + // The action that the bot should execute. + // + // This member is required. + Type DialogActionType + + // If the dialog action is ElicitSlot, defines the slot to elicit from the user. + SlotToElicit *string + + // When true the next message for the intent is not used. + SuppressNextMessage *bool + + noSmithyDocumentSerde +} + +// Settings that specify the dialog code hook that is called by Amazon Lex at a +// step of the conversation. +type DialogCodeHookInvocationSetting struct { + + // Determines whether a dialog code hook is used when the intent is activated. + // + // This member is required. + Active *bool + + // Indicates whether a Lambda function should be invoked for the dialog. + // + // This member is required. + EnableCodeHookInvocation *bool + + // Contains the responses and actions that Amazon Lex takes after the Lambda + // function is complete. + // + // This member is required. + PostCodeHookSpecification *PostDialogCodeHookInvocationSpecification + + // A label that indicates the dialog step from which the dialog code hook is + // happening. + InvocationLabel *string + + noSmithyDocumentSerde +} + // Settings that determine the Lambda function that Amazon Lex uses for processing // user responses. type DialogCodeHookSettings struct { @@ -842,6 +968,40 @@ type DialogCodeHookSettings struct { noSmithyDocumentSerde } +// The current state of the conversation with the user. +type DialogState struct { + + // Defines the action that the bot executes at runtime when the conversation + // reaches this step. + DialogAction *DialogAction + + // Override settings to configure the intent state. + Intent *IntentOverride + + // Map of key/value pairs representing session-specific context information. It + // contains application information passed between Amazon Lex and a client + // application. + SessionAttributes map[string]string + + noSmithyDocumentSerde +} + +// Settings that specify the dialog code hook that is called by Amazon Lex between +// eliciting slot values. +type ElicitationCodeHookInvocationSetting struct { + + // Indicates whether a Lambda function should be invoked for the dialog. + // + // This member is required. + EnableCodeHookInvocation *bool + + // A label that indicates the dialog step from which the dialog code hook is + // happening. + InvocationLabel *string + + noSmithyDocumentSerde +} + // The object representing the passwords that were used to encrypt the data related // to the bot recommendation, as well as the KMS key ARN used to encrypt the // associated metadata. @@ -962,6 +1122,10 @@ type FulfillmentCodeHookSettings struct { // This member is required. Enabled bool + // Determines whether the fulfillment code hook is used. When active is false, the + // code hook doesn't run. + Active *bool + // Provides settings for update messages sent to the user for long-running Lambda // fulfillment functions. Fulfillment updates can be used only with streaming // conversations. @@ -1196,6 +1360,31 @@ type ImportSummary struct { noSmithyDocumentSerde } +// Configuration setting for a response sent to the user before Amazon Lex starts +// eliciting slots. +type InitialResponseSetting struct { + + // Settings that specify the dialog code hook that is called by Amazon Lex at a + // step of the conversation. + CodeHook *DialogCodeHookInvocationSetting + + // Provides a list of conditional branches. Branches are evaluated in the order + // that they are entered in the list. The first branch with a condition that + // evaluates to true is executed. The last branch in the list is the default + // branch. The default branch should not have any condition expression. The default + // branch is executed if no other branch has a matching condition. + Conditional *ConditionalSpecification + + // Specifies a list of message groups that Amazon Lex uses to respond the user + // input. + InitialResponse *ResponseSpecification + + // The next step in the conversation. + NextStep *DialogState + + noSmithyDocumentSerde +} + // The name of a context that must be active for an intent to be selected by Amazon // Lex. type InputContext struct { @@ -1212,16 +1401,23 @@ type InputContext struct { // successfully fulfilled. type IntentClosingSetting struct { - // The response that Amazon Lex sends to the user when the intent is complete. - // - // This member is required. - ClosingResponse *ResponseSpecification - // Specifies whether an intent's closing response is used. When this field is // false, the closing response isn't sent to the user. If the active field isn't // specified, the default is true. Active *bool + // The response that Amazon Lex sends to the user when the intent is complete. + ClosingResponse *ResponseSpecification + + // A list of conditional branches associated with the intent's closing response. + // These branches are executed when the nextStep attribute is set to + // EvalutateConditional. + Conditional *ConditionalSpecification + + // Specifies the next step that the bot executes after playing the intent's closing + // response. + NextStep *DialogState + noSmithyDocumentSerde } @@ -1229,13 +1425,6 @@ type IntentClosingSetting struct { // fulfilled. type IntentConfirmationSetting struct { - // When the user answers "no" to the question defined in promptSpecification, - // Amazon Lex responds with this response to acknowledge that the intent was - // canceled. - // - // This member is required. - DeclinationResponse *ResponseSpecification - // Prompts the user to confirm the intent. This question should have a yes or no // answer. Amazon Lex uses this prompt to ensure that the user acknowledges that // the intent is ready for fulfillment. For example, with the OrderPizza intent, @@ -1251,6 +1440,53 @@ type IntentConfirmationSetting struct { // field isn't specified, the default is true. Active *bool + // The DialogCodeHookInvocationSetting object associated with intent's confirmation + // step. The dialog code hook is triggered based on these invocation settings when + // the confirmation next step or declination next step or failure next step is + // InvokeDialogCodeHook. + CodeHook *DialogCodeHookInvocationSetting + + // A list of conditional branches to evaluate after the intent is closed. + ConfirmationConditional *ConditionalSpecification + + // Specifies the next step that the bot executes when the customer confirms the + // intent. + ConfirmationNextStep *DialogState + + // Specifies a list of message groups that Amazon Lex uses to respond the user + // input. + ConfirmationResponse *ResponseSpecification + + // A list of conditional branches to evaluate after the intent is declined. + DeclinationConditional *ConditionalSpecification + + // Specifies the next step that the bot executes when the customer declines the + // intent. + DeclinationNextStep *DialogState + + // When the user answers "no" to the question defined in promptSpecification, + // Amazon Lex responds with this response to acknowledge that the intent was + // canceled. + DeclinationResponse *ResponseSpecification + + // The DialogCodeHookInvocationSetting used when the code hook is invoked during + // confirmation prompt retries. + ElicitationCodeHook *ElicitationCodeHookInvocationSetting + + // Provides a list of conditional branches. Branches are evaluated in the order + // that they are entered in the list. The first branch with a condition that + // evaluates to true is executed. The last branch in the list is the default + // branch. The default branch should not have any condition expression. The default + // branch is executed if no other branch has a matching condition. + FailureConditional *ConditionalSpecification + + // The next step to take in the conversation if the confirmation step fails. + FailureNextStep *DialogState + + // Specifies a list of message groups that Amazon Lex uses to respond the user + // input. + FailureResponse *ResponseSpecification + noSmithyDocumentSerde } @@ -1277,6 +1513,20 @@ type IntentFilter struct { noSmithyDocumentSerde } +// Override settings to configure the intent state. +type IntentOverride struct { + + // The name of the intent. Only required when you're switching intents. + Name *string + + // A map of all of the slot value overrides for the intent. The name of the slot + // maps to the value of the slot. Slots that are not included in the map aren't + // overridden., + Slots map[string]SlotValueOverride + + noSmithyDocumentSerde +} + // Specifies attributes for sorting a list of intents. type IntentSortBy struct { @@ -1495,20 +1745,85 @@ type PlainTextMessage struct { noSmithyDocumentSerde } +// Specifies next steps to run after the dialog code hook finishes. +type PostDialogCodeHookInvocationSpecification struct { + + // A list of conditional branches to evaluate after the dialog code hook throws an + // exception or returns with the State field of the Intent object set to Failed. + FailureConditional *ConditionalSpecification + + // Specifies the next step the bot runs after the dialog code hook throws an + // exception or returns with the State field of the Intent object set to Failed. + FailureNextStep *DialogState + + // Specifies a list of message groups that Amazon Lex uses to respond the user + // input. + FailureResponse *ResponseSpecification + + // A list of conditional branches to evaluate after the dialog code hook finishes + // successfully. + SuccessConditional *ConditionalSpecification + + // Specifics the next step the bot runs after the dialog code hook finishes + // successfully. + SuccessNextStep *DialogState + + // Specifies a list of message groups that Amazon Lex uses to respond the user + // input. + SuccessResponse *ResponseSpecification + + // A list of conditional branches to evaluate if the code hook times out. + TimeoutConditional *ConditionalSpecification + + // Specifies the next step that the bot runs when the code hook times out. + TimeoutNextStep *DialogState + + // Specifies a list of message groups that Amazon Lex uses to respond the user + // input. + TimeoutResponse *ResponseSpecification + + noSmithyDocumentSerde +} + // Provides a setting that determines whether the post-fulfillment response is sent // to the user. For more information, see // https://docs.aws.amazon.com/lexv2/latest/dg/streaming-progress.html#progress-complete // (https://docs.aws.amazon.com/lexv2/latest/dg/streaming-progress.html#progress-complete) type PostFulfillmentStatusSpecification struct { + // A list of conditional branches to evaluate after the fulfillment code hook + // throws an exception or returns with the State field of the Intent object set to + // Failed. + FailureConditional *ConditionalSpecification + + // Specifies the next step the bot runs after the fulfillment code hook throws an + // exception or returns with the State field of the Intent object set to Failed. + FailureNextStep *DialogState + // Specifies a list of message groups that Amazon Lex uses to respond the user // input. FailureResponse *ResponseSpecification + // A list of conditional branches to evaluate after the fulfillment code hook + // finishes successfully. + SuccessConditional *ConditionalSpecification + + // Specifies the next step in the conversation that Amazon Lex invokes when the + // fulfillment code hook completes successfully. + SuccessNextStep *DialogState + // Specifies a list of message groups that Amazon Lex uses to respond the user // input. SuccessResponse *ResponseSpecification + // A list of conditional branches to evaluate if the fulfillment code hook times + // out. + TimeoutConditional *ConditionalSpecification + + // Specifies the next step that the bot runs when the fulfillment code hook times + // out. + TimeoutNextStep *DialogState + // Specifies a list of message groups that Amazon Lex uses to respond the user // input. TimeoutResponse *ResponseSpecification @@ -1721,6 +2036,40 @@ type SentimentAnalysisSettings struct { noSmithyDocumentSerde } +// Settings used when Amazon Lex successfully captures a slot value from a user. +type SlotCaptureSetting struct { + + // A list of conditional branches to evaluate after the slot value is captured. + CaptureConditional *ConditionalSpecification + + // Specifies the next step that the bot runs when the slot value is captured before + // the code hook times out. + CaptureNextStep *DialogState + + // Specifies a list of message groups that Amazon Lex uses to respond the user + // input. + CaptureResponse *ResponseSpecification + + // Code hook called after Amazon Lex successfully captures a slot value. + CodeHook *DialogCodeHookInvocationSetting + + // Code hook called when Amazon Lex doesn't capture a slot value. + ElicitationCodeHook *ElicitationCodeHookInvocationSetting + + // A list of conditional branches to evaluate when the slot value isn't captured. + FailureConditional *ConditionalSpecification + + // Specifies the next step that the bot runs when the slot value code is not + // recognized. + FailureNextStep *DialogState + + // Specifies a list of message groups that Amazon Lex uses to respond the user + // input. + FailureResponse *ResponseSpecification + + noSmithyDocumentSerde +} + // Specifies the default value to use when a user doesn't provide a value for a // slot. type SlotDefaultValue struct { @@ -1931,6 +2280,18 @@ type SlotTypeValue struct { noSmithyDocumentSerde } +// The value to set in a slot. +type SlotValue struct { + + // The value that Amazon Lex determines for the slot. The actual value depends on + // the setting of the value selection strategy for the bot. You can choose to use + // the value entered by the user, or you can have Amazon Lex choose the first value + // in the resolvedValues list. + InterpretedValue *string + + noSmithyDocumentSerde +} + // Settings that you can use for eliciting a slot value. type SlotValueElicitationSetting struct { @@ -1952,6 +2313,10 @@ type SlotValueElicitationSetting struct { // optional. In most cases, Amazon Lex is capable of understanding user utterances. SampleUtterances []SampleUtterance + // Specifies the settings that Amazon Lex uses when a slot value is successfully + // entered by a user. + SlotCaptureSetting *SlotCaptureSetting + // Specifies the prompts that Amazon Lex uses while a bot is waiting for customer // input. WaitAndContinueSpecification *WaitAndContinueSpecification @@ -1959,6 +2324,25 @@ type SlotValueElicitationSetting struct { noSmithyDocumentSerde } +// The slot values that Amazon Lex uses when it sets slot values in a dialog step. +type SlotValueOverride struct { + + // When the shape value is List, it indicates that the values field contains a list + // of slot values. When the value is Scalar, it indicates that the value field + // contains a single value. + Shape SlotShape + + // The current value of the slot. + Value *SlotValue + + // A list of one or more values that the user provided for the slot. For example, + // for a slot that elicits pizza toppings, the values might be "pepperoni" and + // "pineapple." + Values []SlotValueOverride + + noSmithyDocumentSerde +} + // Provides a regular expression used to validate the value of a slot. type SlotValueRegexFilter struct { diff --git a/service/lexmodelsv2/validators.go b/service/lexmodelsv2/validators.go index 1413439f10a..49d53b2e1e2 100644 --- a/service/lexmodelsv2/validators.go +++ b/service/lexmodelsv2/validators.go @@ -2112,6 +2112,101 @@ func validateCodeHookSpecification(v *types.CodeHookSpecification) error { } } +func validateCondition(v *types.Condition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Condition"} + if v.ExpressionString == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExpressionString")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateConditionalBranch(v *types.ConditionalBranch) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ConditionalBranch"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Condition == nil { + invalidParams.Add(smithy.NewErrParamRequired("Condition")) + } else if v.Condition != nil { + if err := validateCondition(v.Condition); err != nil { + invalidParams.AddNested("Condition", err.(smithy.InvalidParamsError)) + } + } + if v.NextStep == nil { + invalidParams.Add(smithy.NewErrParamRequired("NextStep")) + } else if v.NextStep != nil { + if err := validateDialogState(v.NextStep); err != nil { + invalidParams.AddNested("NextStep", err.(smithy.InvalidParamsError)) + } + } + if v.Response != nil { + if err := validateResponseSpecification(v.Response); err != nil { + invalidParams.AddNested("Response", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateConditionalBranches(v []types.ConditionalBranch) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ConditionalBranches"} + for i := range v { + if err := validateConditionalBranch(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateConditionalSpecification(v *types.ConditionalSpecification) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ConditionalSpecification"} + if v.Active == nil { + invalidParams.Add(smithy.NewErrParamRequired("Active")) + } + if v.ConditionalBranches == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConditionalBranches")) + } else if v.ConditionalBranches != nil { + if err := validateConditionalBranches(v.ConditionalBranches); err != nil { + invalidParams.AddNested("ConditionalBranches", err.(smithy.InvalidParamsError)) + } + } + if v.DefaultBranch == nil { + invalidParams.Add(smithy.NewErrParamRequired("DefaultBranch")) + } else if v.DefaultBranch != nil { + if err := validateDefaultConditionalBranch(v.DefaultBranch); err != nil { + invalidParams.AddNested("DefaultBranch", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateConversationLogSettings(v *types.ConversationLogSettings) error { if v == nil { return nil @@ -2221,6 +2316,68 @@ func validateDateRangeFilter(v *types.DateRangeFilter) error { } } +func validateDefaultConditionalBranch(v *types.DefaultConditionalBranch) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DefaultConditionalBranch"} + if v.NextStep != nil { + if err := validateDialogState(v.NextStep); err != nil { + invalidParams.AddNested("NextStep", err.(smithy.InvalidParamsError)) + } + } + if v.Response != nil { + if err := validateResponseSpecification(v.Response); err != nil { + invalidParams.AddNested("Response", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDialogAction(v *types.DialogAction) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DialogAction"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDialogCodeHookInvocationSetting(v *types.DialogCodeHookInvocationSetting) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DialogCodeHookInvocationSetting"} + if v.EnableCodeHookInvocation == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnableCodeHookInvocation")) + } + if v.Active == nil { + invalidParams.Add(smithy.NewErrParamRequired("Active")) + } + if v.PostCodeHookSpecification == nil { + invalidParams.Add(smithy.NewErrParamRequired("PostCodeHookSpecification")) + } else if v.PostCodeHookSpecification != nil { + if err := validatePostDialogCodeHookInvocationSpecification(v.PostCodeHookSpecification); err != nil { + invalidParams.AddNested("PostCodeHookSpecification", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateDialogCodeHookSettings(v *types.DialogCodeHookSettings) error { if v == nil { return nil @@ -2233,6 +2390,38 @@ func validateDialogCodeHookSettings(v *types.DialogCodeHookSettings) error { } } +func validateDialogState(v *types.DialogState) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DialogState"} + if v.DialogAction != nil { + if err := validateDialogAction(v.DialogAction); err != nil { + invalidParams.AddNested("DialogAction", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateElicitationCodeHookInvocationSetting(v *types.ElicitationCodeHookInvocationSetting) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ElicitationCodeHookInvocationSetting"} + if v.EnableCodeHookInvocation == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnableCodeHookInvocation")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateExportFilter(v *types.ExportFilter) error { if v == nil { return nil @@ -2562,6 +2751,38 @@ func validateImportSortBy(v *types.ImportSortBy) error { } } +func validateInitialResponseSetting(v *types.InitialResponseSetting) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InitialResponseSetting"} + if v.InitialResponse != nil { + if err := validateResponseSpecification(v.InitialResponse); err != nil { + invalidParams.AddNested("InitialResponse", err.(smithy.InvalidParamsError)) + } + } + if v.NextStep != nil { + if err := validateDialogState(v.NextStep); err != nil { + invalidParams.AddNested("NextStep", err.(smithy.InvalidParamsError)) + } + } + if v.Conditional != nil { + if err := validateConditionalSpecification(v.Conditional); err != nil { + invalidParams.AddNested("Conditional", err.(smithy.InvalidParamsError)) + } + } + if v.CodeHook != nil { + if err := validateDialogCodeHookInvocationSetting(v.CodeHook); err != nil { + invalidParams.AddNested("CodeHook", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateInputContext(v *types.InputContext) error { if v == nil { return nil @@ -2599,13 +2820,21 @@ func validateIntentClosingSetting(v *types.IntentClosingSetting) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "IntentClosingSetting"} - if v.ClosingResponse == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClosingResponse")) - } else if v.ClosingResponse != nil { + if v.ClosingResponse != nil { if err := validateResponseSpecification(v.ClosingResponse); err != nil { invalidParams.AddNested("ClosingResponse", err.(smithy.InvalidParamsError)) } } + if v.NextStep != nil { + if err := validateDialogState(v.NextStep); err != nil { + invalidParams.AddNested("NextStep", err.(smithy.InvalidParamsError)) + } + } + if v.Conditional != nil { + if err := validateConditionalSpecification(v.Conditional); err != nil { + invalidParams.AddNested("Conditional", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -2625,13 +2854,61 @@ func validateIntentConfirmationSetting(v *types.IntentConfirmationSetting) error invalidParams.AddNested("PromptSpecification", err.(smithy.InvalidParamsError)) } } - if v.DeclinationResponse == nil { - invalidParams.Add(smithy.NewErrParamRequired("DeclinationResponse")) - } else if v.DeclinationResponse != nil { + if v.DeclinationResponse != nil { if err := validateResponseSpecification(v.DeclinationResponse); err != nil { invalidParams.AddNested("DeclinationResponse", err.(smithy.InvalidParamsError)) } } + if v.ConfirmationResponse != nil { + if err := validateResponseSpecification(v.ConfirmationResponse); err != nil { + invalidParams.AddNested("ConfirmationResponse", err.(smithy.InvalidParamsError)) + } + } + if v.ConfirmationNextStep != nil { + if err := validateDialogState(v.ConfirmationNextStep); err != nil { + invalidParams.AddNested("ConfirmationNextStep", err.(smithy.InvalidParamsError)) + } + } + if v.ConfirmationConditional != nil { + if err := validateConditionalSpecification(v.ConfirmationConditional); err != nil { + invalidParams.AddNested("ConfirmationConditional", err.(smithy.InvalidParamsError)) + } + } + if v.DeclinationNextStep != nil { + if err := validateDialogState(v.DeclinationNextStep); err != nil { + invalidParams.AddNested("DeclinationNextStep", err.(smithy.InvalidParamsError)) + } + } + if v.DeclinationConditional != nil { + if err := validateConditionalSpecification(v.DeclinationConditional); err != nil { + invalidParams.AddNested("DeclinationConditional", err.(smithy.InvalidParamsError)) + } + } + if v.FailureResponse != nil { + if err := validateResponseSpecification(v.FailureResponse); err != nil { + invalidParams.AddNested("FailureResponse", err.(smithy.InvalidParamsError)) + } + } + if v.FailureNextStep != nil { + if err := validateDialogState(v.FailureNextStep); err != nil { + invalidParams.AddNested("FailureNextStep", err.(smithy.InvalidParamsError)) + } + } + if v.FailureConditional != nil { + if err := validateConditionalSpecification(v.FailureConditional); err != nil { + invalidParams.AddNested("FailureConditional", err.(smithy.InvalidParamsError)) + } + } + if v.CodeHook != nil { + if err := validateDialogCodeHookInvocationSetting(v.CodeHook); err != nil { + invalidParams.AddNested("CodeHook", err.(smithy.InvalidParamsError)) + } + } + if v.ElicitationCodeHook != nil { + if err := validateElicitationCodeHookInvocationSetting(v.ElicitationCodeHook); err != nil { + invalidParams.AddNested("ElicitationCodeHook", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -2903,6 +3180,63 @@ func validatePlainTextMessage(v *types.PlainTextMessage) error { } } +func validatePostDialogCodeHookInvocationSpecification(v *types.PostDialogCodeHookInvocationSpecification) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PostDialogCodeHookInvocationSpecification"} + if v.SuccessResponse != nil { + if err := validateResponseSpecification(v.SuccessResponse); err != nil { + invalidParams.AddNested("SuccessResponse", err.(smithy.InvalidParamsError)) + } + } + if v.SuccessNextStep != nil { + if err := validateDialogState(v.SuccessNextStep); err != nil { + invalidParams.AddNested("SuccessNextStep", err.(smithy.InvalidParamsError)) + } + } + if v.SuccessConditional != nil { + if err := validateConditionalSpecification(v.SuccessConditional); err != nil { + invalidParams.AddNested("SuccessConditional", err.(smithy.InvalidParamsError)) + } + } + if v.FailureResponse != nil { + if err := validateResponseSpecification(v.FailureResponse); err != nil { + invalidParams.AddNested("FailureResponse", err.(smithy.InvalidParamsError)) + } + } + if v.FailureNextStep != nil { + if err := validateDialogState(v.FailureNextStep); err != nil { + invalidParams.AddNested("FailureNextStep", err.(smithy.InvalidParamsError)) + } + } + if v.FailureConditional != nil { + if err := validateConditionalSpecification(v.FailureConditional); err != nil { + invalidParams.AddNested("FailureConditional", err.(smithy.InvalidParamsError)) + } + } + if v.TimeoutResponse != nil { + if err := validateResponseSpecification(v.TimeoutResponse); err != nil { + invalidParams.AddNested("TimeoutResponse", err.(smithy.InvalidParamsError)) + } + } + if v.TimeoutNextStep != nil { + if err := validateDialogState(v.TimeoutNextStep); err != nil { + invalidParams.AddNested("TimeoutNextStep", err.(smithy.InvalidParamsError)) + } + } + if v.TimeoutConditional != nil { + if err := validateConditionalSpecification(v.TimeoutConditional); err != nil { + invalidParams.AddNested("TimeoutConditional", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validatePostFulfillmentStatusSpecification(v *types.PostFulfillmentStatusSpecification) error { if v == nil { return nil @@ -2923,6 +3257,36 @@ func validatePostFulfillmentStatusSpecification(v *types.PostFulfillmentStatusSp invalidParams.AddNested("TimeoutResponse", err.(smithy.InvalidParamsError)) } } + if v.SuccessNextStep != nil { + if err := validateDialogState(v.SuccessNextStep); err != nil { + invalidParams.AddNested("SuccessNextStep", err.(smithy.InvalidParamsError)) + } + } + if v.SuccessConditional != nil { + if err := validateConditionalSpecification(v.SuccessConditional); err != nil { + invalidParams.AddNested("SuccessConditional", err.(smithy.InvalidParamsError)) + } + } + if v.FailureNextStep != nil { + if err := validateDialogState(v.FailureNextStep); err != nil { + invalidParams.AddNested("FailureNextStep", err.(smithy.InvalidParamsError)) + } + } + if v.FailureConditional != nil { + if err := validateConditionalSpecification(v.FailureConditional); err != nil { + invalidParams.AddNested("FailureConditional", err.(smithy.InvalidParamsError)) + } + } + if v.TimeoutNextStep != nil { + if err := validateDialogState(v.TimeoutNextStep); err != nil { + invalidParams.AddNested("TimeoutNextStep", err.(smithy.InvalidParamsError)) + } + } + if v.TimeoutConditional != nil { + if err := validateConditionalSpecification(v.TimeoutConditional); err != nil { + invalidParams.AddNested("TimeoutConditional", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -3086,6 +3450,58 @@ func validateSentimentAnalysisSettings(v *types.SentimentAnalysisSettings) error } } +func validateSlotCaptureSetting(v *types.SlotCaptureSetting) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SlotCaptureSetting"} + if v.CaptureResponse != nil { + if err := validateResponseSpecification(v.CaptureResponse); err != nil { + invalidParams.AddNested("CaptureResponse", err.(smithy.InvalidParamsError)) + } + } + if v.CaptureNextStep != nil { + if err := validateDialogState(v.CaptureNextStep); err != nil { + invalidParams.AddNested("CaptureNextStep", err.(smithy.InvalidParamsError)) + } + } + if v.CaptureConditional != nil { + if err := validateConditionalSpecification(v.CaptureConditional); err != nil { + invalidParams.AddNested("CaptureConditional", err.(smithy.InvalidParamsError)) + } + } + if v.FailureResponse != nil { + if err := validateResponseSpecification(v.FailureResponse); err != nil { + invalidParams.AddNested("FailureResponse", err.(smithy.InvalidParamsError)) + } + } + if v.FailureNextStep != nil { + if err := validateDialogState(v.FailureNextStep); err != nil { + invalidParams.AddNested("FailureNextStep", err.(smithy.InvalidParamsError)) + } + } + if v.FailureConditional != nil { + if err := validateConditionalSpecification(v.FailureConditional); err != nil { + invalidParams.AddNested("FailureConditional", err.(smithy.InvalidParamsError)) + } + } + if v.CodeHook != nil { + if err := validateDialogCodeHookInvocationSetting(v.CodeHook); err != nil { + invalidParams.AddNested("CodeHook", err.(smithy.InvalidParamsError)) + } + } + if v.ElicitationCodeHook != nil { + if err := validateElicitationCodeHookInvocationSetting(v.ElicitationCodeHook); err != nil { + invalidParams.AddNested("ElicitationCodeHook", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSlotDefaultValue(v *types.SlotDefaultValue) error { if v == nil { return nil @@ -3351,6 +3767,11 @@ func validateSlotValueElicitationSetting(v *types.SlotValueElicitationSetting) e invalidParams.AddNested("WaitAndContinueSpecification", err.(smithy.InvalidParamsError)) } } + if v.SlotCaptureSetting != nil { + if err := validateSlotCaptureSetting(v.SlotCaptureSetting); err != nil { + invalidParams.AddNested("SlotCaptureSetting", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -3816,6 +4237,11 @@ func validateOpCreateIntentInput(v *CreateIntentInput) error { if v.LocaleId == nil { invalidParams.Add(smithy.NewErrParamRequired("LocaleId")) } + if v.InitialResponseSetting != nil { + if err := validateInitialResponseSetting(v.InitialResponseSetting); err != nil { + invalidParams.AddNested("InitialResponseSetting", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -5112,6 +5538,11 @@ func validateOpUpdateIntentInput(v *UpdateIntentInput) error { if v.LocaleId == nil { invalidParams.Add(smithy.NewErrParamRequired("LocaleId")) } + if v.InitialResponseSetting != nil { + if err := validateInitialResponseSetting(v.InitialResponseSetting); err != nil { + invalidParams.AddNested("InitialResponseSetting", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go b/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go index a0612d1fb48..4cd3cbebbbf 100644 --- a/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go +++ b/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go @@ -22,7 +22,17 @@ import ( // Amazon RDS DB instance in another. You can't authorize ingress from a VPC // security group in one VPC to an Amazon RDS DB instance in another. For an // overview of CIDR ranges, go to the Wikipedia Tutorial -// (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). +// (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing). EC2-Classic was +// retired on August 15, 2022. If you haven't migrated from EC2-Classic to a VPC, +// we recommend that you migrate as soon as possible. For more information, see +// Migrate from EC2-Classic to a VPC +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the +// Amazon EC2 User Guide, the blog EC2-Classic Networking is Retiring – Here’s How +// to Prepare +// (http://aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/), +// and Moving a DB instance not in a VPC into a VPC +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Non-VPC2VPC.html) +// in the Amazon RDS User Guide. func (c *Client) AuthorizeDBSecurityGroupIngress(ctx context.Context, params *AuthorizeDBSecurityGroupIngressInput, optFns ...func(*Options)) (*AuthorizeDBSecurityGroupIngressOutput, error) { if params == nil { params = &AuthorizeDBSecurityGroupIngressInput{} diff --git a/service/rds/api_op_CreateDBCluster.go b/service/rds/api_op_CreateDBCluster.go index 430b7439f47..2d45e47f9b7 100644 --- a/service/rds/api_op_CreateDBCluster.go +++ b/service/rds/api_op_CreateDBCluster.go @@ -358,6 +358,20 @@ type CreateDBClusterInput struct { // 0, supply a MonitoringRoleArn value. Valid for: Multi-AZ DB clusters only MonitoringRoleArn *string + // The network type of the DB cluster. Valid values: + // + // * IPV4 + // + // * DUAL + // + // The network + // type is determined by the DBSubnetGroup specified for the DB cluster. A + // DBSubnetGroup can support only the IPv4 protocol or the IPv4 and the IPv6 + // protocols (DUAL). For more information, see Working with a DB instance in a VPC + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html) + // in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only + NetworkType *string + // A value that indicates that the DB cluster should be associated with the // specified option group. DB clusters are associated with a default option group // that can't be modified. diff --git a/service/rds/api_op_CreateDBSecurityGroup.go b/service/rds/api_op_CreateDBSecurityGroup.go index fd72c39c1f8..b8e05e955b7 100644 --- a/service/rds/api_op_CreateDBSecurityGroup.go +++ b/service/rds/api_op_CreateDBSecurityGroup.go @@ -13,7 +13,16 @@ import ( // Creates a new DB security group. DB security groups control access to a DB // instance. A DB security group controls access to EC2-Classic DB instances that -// are not in a VPC. +// are not in a VPC. EC2-Classic was retired on August 15, 2022. If you haven't +// migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as +// possible. For more information, see Migrate from EC2-Classic to a VPC +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the +// Amazon EC2 User Guide, the blog EC2-Classic Networking is Retiring – Here’s How +// to Prepare +// (http://aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/), +// and Moving a DB instance not in a VPC into a VPC +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Non-VPC2VPC.html) +// in the Amazon RDS User Guide. func (c *Client) CreateDBSecurityGroup(ctx context.Context, params *CreateDBSecurityGroupInput, optFns ...func(*Options)) (*CreateDBSecurityGroupOutput, error) { if params == nil { params = &CreateDBSecurityGroupInput{} diff --git a/service/rds/api_op_CreateEventSubscription.go b/service/rds/api_op_CreateEventSubscription.go index 85686128299..ded748c0185 100644 --- a/service/rds/api_op_CreateEventSubscription.go +++ b/service/rds/api_op_CreateEventSubscription.go @@ -26,9 +26,13 @@ import ( // SourceIds, you receive notice of the events for that source type for all your // RDS sources. If you don't specify either the SourceType or the SourceIds, you // are notified of events generated from all RDS sources belonging to your customer -// account. RDS event notification is only available for unencrypted SNS topics. If -// you specify an encrypted SNS topic, event notifications aren't sent for the -// topic. +// account. For more information about subscribing to an event for RDS DB engines, +// see Subscribing to Amazon RDS event notification +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.Subscribing.html) +// in the Amazon RDS User Guide. For more information about subscribing to an event +// for Aurora DB engines, see Subscribing to Amazon RDS event notification +// (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Events.Subscribing.html) +// in the Amazon Aurora User Guide. func (c *Client) CreateEventSubscription(ctx context.Context, params *CreateEventSubscriptionInput, optFns ...func(*Options)) (*CreateEventSubscriptionOutput, error) { if params == nil { params = &CreateEventSubscriptionInput{} diff --git a/service/rds/api_op_DeleteDBSecurityGroup.go b/service/rds/api_op_DeleteDBSecurityGroup.go index 122af6daa31..fbc79be52fe 100644 --- a/service/rds/api_op_DeleteDBSecurityGroup.go +++ b/service/rds/api_op_DeleteDBSecurityGroup.go @@ -11,7 +11,16 @@ import ( ) // Deletes a DB security group. The specified DB security group must not be -// associated with any DB instances. +// associated with any DB instances. EC2-Classic was retired on August 15, 2022. If +// you haven't migrated from EC2-Classic to a VPC, we recommend that you migrate as +// soon as possible. For more information, see Migrate from EC2-Classic to a VPC +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the +// Amazon EC2 User Guide, the blog EC2-Classic Networking is Retiring – Here’s How +// to Prepare +// (http://aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/), +// and Moving a DB instance not in a VPC into a VPC +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Non-VPC2VPC.html) +// in the Amazon RDS User Guide. func (c *Client) DeleteDBSecurityGroup(ctx context.Context, params *DeleteDBSecurityGroupInput, optFns ...func(*Options)) (*DeleteDBSecurityGroupOutput, error) { if params == nil { params = &DeleteDBSecurityGroupInput{} diff --git a/service/rds/api_op_DescribeDBSecurityGroups.go b/service/rds/api_op_DescribeDBSecurityGroups.go index 23635b7efab..cb444a2c811 100644 --- a/service/rds/api_op_DescribeDBSecurityGroups.go +++ b/service/rds/api_op_DescribeDBSecurityGroups.go @@ -14,7 +14,16 @@ import ( // Returns a list of DBSecurityGroup descriptions. If a DBSecurityGroupName is // specified, the list will contain only the descriptions of the specified DB -// security group. +// security group. EC2-Classic was retired on August 15, 2022. If you haven't +// migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as +// possible. For more information, see Migrate from EC2-Classic to a VPC +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the +// Amazon EC2 User Guide, the blog EC2-Classic Networking is Retiring – Here’s How +// to Prepare +// (http://aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/), +// and Moving a DB instance not in a VPC into a VPC +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Non-VPC2VPC.html) +// in the Amazon RDS User Guide. func (c *Client) DescribeDBSecurityGroups(ctx context.Context, params *DescribeDBSecurityGroupsInput, optFns ...func(*Options)) (*DescribeDBSecurityGroupsOutput, error) { if params == nil { params = &DescribeDBSecurityGroupsInput{} diff --git a/service/rds/api_op_ModifyDBCluster.go b/service/rds/api_op_ModifyDBCluster.go index 793a0a8916b..7648a3ee354 100644 --- a/service/rds/api_op_ModifyDBCluster.go +++ b/service/rds/api_op_ModifyDBCluster.go @@ -244,6 +244,20 @@ type ModifyDBClusterInput struct { // 0, supply a MonitoringRoleArn value. Valid for: Multi-AZ DB clusters only MonitoringRoleArn *string + // The network type of the DB cluster. Valid values: + // + // * IPV4 + // + // * DUAL + // + // The network + // type is determined by the DBSubnetGroup specified for the DB cluster. A + // DBSubnetGroup can support only the IPv4 protocol or the IPv4 and the IPv6 + // protocols (DUAL). For more information, see Working with a DB instance in a VPC + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html) + // in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only + NetworkType *string + // The new DB cluster identifier for the DB cluster when renaming a DB cluster. // This value is stored as a lowercase string. Constraints: // diff --git a/service/rds/api_op_RestoreDBClusterFromS3.go b/service/rds/api_op_RestoreDBClusterFromS3.go index c3180036508..b335151ff4e 100644 --- a/service/rds/api_op_RestoreDBClusterFromS3.go +++ b/service/rds/api_op_RestoreDBClusterFromS3.go @@ -207,6 +207,20 @@ type RestoreDBClusterFromS3Input struct { // KMS key for each Amazon Web Services Region. KmsKeyId *string + // The network type of the DB cluster. Valid values: + // + // * IPV4 + // + // * DUAL + // + // The network + // type is determined by the DBSubnetGroup specified for the DB cluster. A + // DBSubnetGroup can support only the IPv4 protocol or the IPv4 and the IPv6 + // protocols (DUAL). For more information, see Working with a DB instance in a VPC + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html) + // in the Amazon Aurora User Guide. + NetworkType *string + // A value that indicates that the restored DB cluster should be associated with // the specified option group. Permanent options can't be removed from an option // group. An option group can't be removed from a DB cluster once it is associated diff --git a/service/rds/api_op_RestoreDBClusterFromSnapshot.go b/service/rds/api_op_RestoreDBClusterFromSnapshot.go index 7f34318263e..8b4f3b76332 100644 --- a/service/rds/api_op_RestoreDBClusterFromSnapshot.go +++ b/service/rds/api_op_RestoreDBClusterFromSnapshot.go @@ -240,6 +240,20 @@ type RestoreDBClusterFromSnapshotInput struct { // Multi-AZ DB clusters KmsKeyId *string + // The network type of the DB cluster. Valid values: + // + // * IPV4 + // + // * DUAL + // + // The network + // type is determined by the DBSubnetGroup specified for the DB cluster. A + // DBSubnetGroup can support only the IPv4 protocol or the IPv4 and the IPv6 + // protocols (DUAL). For more information, see Working with a DB instance in a VPC + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html) + // in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only + NetworkType *string + // The name of the option group to use for the restored DB cluster. DB clusters are // associated with a default option group that can't be modified. OptionGroupName *string diff --git a/service/rds/api_op_RestoreDBClusterToPointInTime.go b/service/rds/api_op_RestoreDBClusterToPointInTime.go index 96ce7c25181..4a4fce7be30 100644 --- a/service/rds/api_op_RestoreDBClusterToPointInTime.go +++ b/service/rds/api_op_RestoreDBClusterToPointInTime.go @@ -198,6 +198,20 @@ type RestoreDBClusterToPointInTimeInput struct { // and Multi-AZ DB clusters KmsKeyId *string + // The network type of the DB cluster. Valid values: + // + // * IPV4 + // + // * DUAL + // + // The network + // type is determined by the DBSubnetGroup specified for the DB cluster. A + // DBSubnetGroup can support only the IPv4 protocol or the IPv4 and the IPv6 + // protocols (DUAL). For more information, see Working with a DB instance in a VPC + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html) + // in the Amazon Aurora User Guide. Valid for: Aurora DB clusters only + NetworkType *string + // The name of the option group for the new DB cluster. DB clusters are associated // with a default option group that can't be modified. OptionGroupName *string diff --git a/service/rds/api_op_RevokeDBSecurityGroupIngress.go b/service/rds/api_op_RevokeDBSecurityGroupIngress.go index 1734fcec8c6..52e1959692b 100644 --- a/service/rds/api_op_RevokeDBSecurityGroupIngress.go +++ b/service/rds/api_op_RevokeDBSecurityGroupIngress.go @@ -14,7 +14,17 @@ import ( // Revokes ingress from a DBSecurityGroup for previously authorized IP ranges or // EC2 or VPC security groups. Required parameters for this API are one of CIDRIP, // EC2SecurityGroupId for VPC, or (EC2SecurityGroupOwnerId and either -// EC2SecurityGroupName or EC2SecurityGroupId). +// EC2SecurityGroupName or EC2SecurityGroupId). EC2-Classic was retired on August +// 15, 2022. If you haven't migrated from EC2-Classic to a VPC, we recommend that +// you migrate as soon as possible. For more information, see Migrate from +// EC2-Classic to a VPC +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the +// Amazon EC2 User Guide, the blog EC2-Classic Networking is Retiring – Here’s How +// to Prepare +// (http://aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/), +// and Moving a DB instance not in a VPC into a VPC +// (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Non-VPC2VPC.html) +// in the Amazon RDS User Guide. func (c *Client) RevokeDBSecurityGroupIngress(ctx context.Context, params *RevokeDBSecurityGroupIngressInput, optFns ...func(*Options)) (*RevokeDBSecurityGroupIngressOutput, error) { if params == nil { params = &RevokeDBSecurityGroupIngressInput{} diff --git a/service/rds/deserializers.go b/service/rds/deserializers.go index dac7b35cb9c..9ce146ba2a5 100644 --- a/service/rds/deserializers.go +++ b/service/rds/deserializers.go @@ -22992,6 +22992,19 @@ func awsAwsquery_deserializeDocumentDBCluster(v **types.DBCluster, decoder smith sv.MultiAZ = ptr.Bool(xtv) } + case strings.EqualFold("NetworkType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NetworkType = ptr.String(xtv) + } + case strings.EqualFold("PendingModifiedValues", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentClusterPendingModifiedValues(&sv.PendingModifiedValues, nodeDecoder); err != nil { diff --git a/service/rds/serializers.go b/service/rds/serializers.go index 2e7d1666258..7b1ff3a25a5 100644 --- a/service/rds/serializers.go +++ b/service/rds/serializers.go @@ -9982,6 +9982,11 @@ func awsAwsquery_serializeOpDocumentCreateDBClusterInput(v *CreateDBClusterInput objectKey.String(*v.MonitoringRoleArn) } + if v.NetworkType != nil { + objectKey := object.Key("NetworkType") + objectKey.String(*v.NetworkType) + } + if v.OptionGroupName != nil { objectKey := object.Key("OptionGroupName") objectKey.String(*v.OptionGroupName) @@ -12797,6 +12802,11 @@ func awsAwsquery_serializeOpDocumentModifyDBClusterInput(v *ModifyDBClusterInput objectKey.String(*v.MonitoringRoleArn) } + if v.NetworkType != nil { + objectKey := object.Key("NetworkType") + objectKey.String(*v.NetworkType) + } + if v.NewDBClusterIdentifier != nil { objectKey := object.Key("NewDBClusterIdentifier") objectKey.String(*v.NewDBClusterIdentifier) @@ -13834,6 +13844,11 @@ func awsAwsquery_serializeOpDocumentRestoreDBClusterFromS3Input(v *RestoreDBClus objectKey.String(*v.MasterUserPassword) } + if v.NetworkType != nil { + objectKey := object.Key("NetworkType") + objectKey.String(*v.NetworkType) + } + if v.OptionGroupName != nil { objectKey := object.Key("OptionGroupName") objectKey.String(*v.OptionGroupName) @@ -14006,6 +14021,11 @@ func awsAwsquery_serializeOpDocumentRestoreDBClusterFromSnapshotInput(v *Restore objectKey.String(*v.KmsKeyId) } + if v.NetworkType != nil { + objectKey := object.Key("NetworkType") + objectKey.String(*v.NetworkType) + } + if v.OptionGroupName != nil { objectKey := object.Key("OptionGroupName") objectKey.String(*v.OptionGroupName) @@ -14138,6 +14158,11 @@ func awsAwsquery_serializeOpDocumentRestoreDBClusterToPointInTimeInput(v *Restor objectKey.String(*v.KmsKeyId) } + if v.NetworkType != nil { + objectKey := object.Key("NetworkType") + objectKey.String(*v.NetworkType) + } + if v.OptionGroupName != nil { objectKey := object.Key("OptionGroupName") objectKey.String(*v.OptionGroupName) diff --git a/service/rds/types/types.go b/service/rds/types/types.go index b818181f3b4..db76a2f96c4 100644 --- a/service/rds/types/types.go +++ b/service/rds/types/types.go @@ -536,6 +536,20 @@ type DBCluster struct { // Specifies whether the DB cluster has instances in multiple Availability Zones. MultiAZ *bool + // The network type of the DB instance. Valid values: + // + // * IPV4 + // + // * DUAL + // + // The network + // type is determined by the DBSubnetGroup specified for the DB cluster. A + // DBSubnetGroup can support only the IPv4 protocol or the IPv4 and the IPv6 + // protocols (DUAL). For more information, see Working with a DB instance in a VPC + // (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html) + // in the Amazon Aurora User Guide. This setting is only for Aurora DB clusters. + NetworkType *string + // A value that specifies that changes to the DB cluster are pending. This element // is only included when changes are pending. Specific changes are identified by // subelements. diff --git a/service/secretsmanager/api_op_CreateSecret.go b/service/secretsmanager/api_op_CreateSecret.go index ea323c342f0..75d12b3b6b4 100644 --- a/service/secretsmanager/api_op_CreateSecret.go +++ b/service/secretsmanager/api_op_CreateSecret.go @@ -113,13 +113,16 @@ type CreateSecretInput struct { ForceOverwriteReplicaSecret bool // The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt - // the secret value in the secret. To use a KMS key in a different account, use the - // key ARN or the alias ARN. If you don't specify this value, then Secrets Manager - // uses the key aws/secretsmanager. If that key doesn't yet exist, then Secrets - // Manager creates it for you automatically the first time it encrypts the secret - // value. If the secret is in a different Amazon Web Services account from the - // credentials calling the API, then you can't use aws/secretsmanager to encrypt - // the secret, and you must create and use a customer managed KMS key. + // the secret value in the secret. An alias is always prefixed by alias/, for + // example alias/aws/secretsmanager. For more information, see About aliases + // (https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html). To use + // a KMS key in a different account, use the key ARN or the alias ARN. If you don't + // specify this value, then Secrets Manager uses the key aws/secretsmanager. If + // that key doesn't yet exist, then Secrets Manager creates it for you + // automatically the first time it encrypts the secret value. If the secret is in a + // different Amazon Web Services account from the credentials calling the API, then + // you can't use aws/secretsmanager to encrypt the secret, and you must create and + // use a customer managed KMS key. KmsKeyId *string // The binary data to encrypt and store in the new version of the secret. We diff --git a/service/secretsmanager/api_op_DescribeSecret.go b/service/secretsmanager/api_op_DescribeSecret.go index ef3129e88da..2ccced3a382 100644 --- a/service/secretsmanager/api_op_DescribeSecret.go +++ b/service/secretsmanager/api_op_DescribeSecret.go @@ -66,13 +66,14 @@ type DescribeSecretOutput struct { // The description of the secret. Description *string - // The ARN of the KMS key that Secrets Manager uses to encrypt the secret value. If - // the secret is encrypted with the Amazon Web Services managed key - // aws/secretsmanager, this field is omitted. + // The key ID or alias ARN of the KMS key that Secrets Manager uses to encrypt the + // secret value. If the secret is encrypted with the Amazon Web Services managed + // key aws/secretsmanager, this field is omitted. Secrets created using the console + // use an KMS key ID. KmsKeyId *string - // The last date that the secret value was retrieved. This value does not include - // the time. This field is omitted if the secret has never been retrieved. + // The date that the secret was last accessed in the Region. This field is omitted + // if the secret has never been retrieved in the Region. LastAccessedDate *time.Time // The last date and time that this secret was modified in any way. @@ -85,7 +86,9 @@ type DescribeSecretOutput struct { // The name of the secret. Name *string - // The name of the service that created this secret. + // The ID of the service that created this secret. For more information, see + // Secrets managed by other Amazon Web Services services + // (https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html). OwningService *string // The Region the secret is in. If a secret is replicated to other Regions, the diff --git a/service/secretsmanager/api_op_GetSecretValue.go b/service/secretsmanager/api_op_GetSecretValue.go index 0136012e9a0..7edc2dcbd0f 100644 --- a/service/secretsmanager/api_op_GetSecretValue.go +++ b/service/secretsmanager/api_op_GetSecretValue.go @@ -17,6 +17,10 @@ import ( // improves speed and reduces your costs. For more information, see Cache secrets // for your applications // (https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieving-secrets.html). +// To retrieve the previous version of a secret, use VersionStage and specify +// AWSPREVIOUS. To revert to the previous version of a secret, call +// UpdateSecretVersionStage +// (https://docs.aws.amazon.com/cli/latest/reference/secretsmanager/update-secret-version-stage.html). // Required permissions: secretsmanager:GetSecretValue. If the secret is encrypted // using a customer-managed key instead of the Amazon Web Services managed key // aws/secretsmanager, then you also need kms:Decrypt permissions for that key. For diff --git a/service/secretsmanager/api_op_UpdateSecret.go b/service/secretsmanager/api_op_UpdateSecret.go index cf026e5e424..628c08ab5df 100644 --- a/service/secretsmanager/api_op_UpdateSecret.go +++ b/service/secretsmanager/api_op_UpdateSecret.go @@ -26,17 +26,8 @@ import ( // ClientRequestToken that matches an existing version's VersionId, the operation // results in an error. You can't modify an existing version, you can only create a // new version. To remove a version, remove all staging labels from it. See -// UpdateSecretVersionStage. If you don't specify an KMS encryption key, Secrets -// Manager uses the Amazon Web Services managed key aws/secretsmanager. If this key -// doesn't already exist in your account, then Secrets Manager creates it for you -// automatically. All users and roles in the Amazon Web Services account -// automatically have access to use aws/secretsmanager. Creating aws/secretsmanager -// can result in a one-time significant delay in returning the result. If the -// secret is in a different Amazon Web Services account from the credentials -// calling the API, then you can't use aws/secretsmanager to encrypt the secret, -// and you must create and use a customer managed key. Required permissions: -// secretsmanager:UpdateSecret. For more information, see IAM policy actions for -// Secrets Manager +// UpdateSecretVersionStage. Required permissions: secretsmanager:UpdateSecret. For +// more information, see IAM policy actions for Secrets Manager // (https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions) // and Authentication and access control in Secrets Manager // (https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html). @@ -83,16 +74,25 @@ type UpdateSecretInput struct { Description *string // The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt - // new secret versions as well as any existing versions the staging labels + // new secret versions as well as any existing versions with the staging labels // AWSCURRENT, AWSPENDING, or AWSPREVIOUS. For more information about versions and // staging labels, see Concepts: Version // (https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version). - // You can only use the Amazon Web Services managed key aws/secretsmanager if you - // call this operation using credentials from the same Amazon Web Services account - // that owns the secret. If the secret is in a different account, then you must use - // a customer managed key and provide the ARN of that KMS key in this field. The - // user making the call must have permissions to both the secret and the KMS key in - // their respective accounts. + // A key alias is always prefixed by alias/, for example alias/aws/secretsmanager. + // For more information, see About aliases + // (https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html). If you + // set this to an empty string, Secrets Manager uses the Amazon Web Services + // managed key aws/secretsmanager. If this key doesn't already exist in your + // account, then Secrets Manager creates it for you automatically. All users and + // roles in the Amazon Web Services account automatically have access to use + // aws/secretsmanager. Creating aws/secretsmanager can result in a one-time + // significant delay in returning the result. You can only use the Amazon Web + // Services managed key aws/secretsmanager if you call this operation using + // credentials from the same Amazon Web Services account that owns the secret. If + // the secret is in a different account, then you must use a customer managed key + // and provide the ARN of that KMS key in this field. The user making the call must + // have permissions to both the secret and the KMS key in their respective + // accounts. KmsKeyId *string // The binary data to encrypt and store in the new version of the secret. We diff --git a/service/secretsmanager/types/errors.go b/service/secretsmanager/types/errors.go index 1cc2143fc8b..731d4602248 100644 --- a/service/secretsmanager/types/errors.go +++ b/service/secretsmanager/types/errors.go @@ -114,6 +114,11 @@ func (e *InvalidParameterException) ErrorFault() smithy.ErrorFault { return smit // * You tried to enable rotation // on a secret that doesn't already have a Lambda function ARN configured and you // didn't include such an ARN as a parameter in this call. +// +// * The secret is managed +// by another service, and you must use that service to update it. For more +// information, see Secrets managed by other Amazon Web Services services +// (https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html). type InvalidRequestException struct { Message *string diff --git a/service/secretsmanager/types/types.go b/service/secretsmanager/types/types.go index ccf1073a7ef..05828530dad 100644 --- a/service/secretsmanager/types/types.go +++ b/service/secretsmanager/types/types.go @@ -59,7 +59,8 @@ type ReplicationStatusType struct { // Can be an ARN, Key ID, or Alias. KmsKeyId *string - // The date that you last accessed the secret in the Region. + // The date that the secret was last accessed in the Region. This field is omitted + // if the secret has never been retrieved in the Region. LastAccessedDate *time.Time // The Region where replication occurs. @@ -143,8 +144,8 @@ type SecretListEntry struct { // aws/secretsmanager, this field is omitted. KmsKeyId *string - // The last date that this secret was accessed. This value is truncated to midnight - // of the date and therefore shows only the date, not the time. + // The date that the secret was last accessed in the Region. This field is omitted + // if the secret has never been retrieved in the Region. LastAccessedDate *time.Time // The last date and time that this secret was modified in any way.