From 1f00b94bd29f00304b2f8ed55eef50faf88bd45b Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Wed, 9 Dec 2020 16:53:31 -0800 Subject: [PATCH] Regenerated Clients --- aws/credential_cache.go | 2 +- aws/credential_cache_test.go | 4 +- config/resolve_credentials.go | 2 +- example/service/s3/listObjects/go.mod | 7 - feature/s3/manager/go.mod | 6 - .../protocoltest/awsrestjson/types/types.go | 11 + .../awsrestjson/types/types_public_test.go | 48 ++++ internal/protocoltest/jsonrpc/types/types.go | 11 + .../jsonrpc/types/types_public_test.go | 48 ++++ .../protocoltest/jsonrpc10/types/types.go | 11 + .../jsonrpc10/types/types_public_test.go | 48 ++++ internal/repotools/changes/go.mod | 2 + internal/repotools/changes/go.sum | 2 - service/appmesh/types/types.go | 53 ++++ service/appmesh/types/types_public_test.go | 251 ++++++++++++++++++ service/groundstation/types/types.go | 8 + .../groundstation/types/types_public_test.go | 39 +++ service/internal/benchmark/go.mod | 1 - service/internal/integrationtest/go.mod | 5 - service/rdsdata/types/types.go | 28 ++ service/rdsdata/types/types_public_test.go | 113 ++++++++ service/redshiftdata/types/types.go | 8 + .../redshiftdata/types/types_public_test.go | 39 +++ service/s3/internal/configtesting/go.mod | 7 - 24 files changed, 722 insertions(+), 32 deletions(-) create mode 100644 internal/protocoltest/awsrestjson/types/types_public_test.go create mode 100644 internal/protocoltest/jsonrpc/types/types_public_test.go create mode 100644 internal/protocoltest/jsonrpc10/types/types_public_test.go create mode 100644 service/appmesh/types/types_public_test.go create mode 100644 service/groundstation/types/types_public_test.go create mode 100644 service/rdsdata/types/types_public_test.go create mode 100644 service/redshiftdata/types/types_public_test.go diff --git a/aws/credential_cache.go b/aws/credential_cache.go index 1203281019a..1411a5c32d6 100644 --- a/aws/credential_cache.go +++ b/aws/credential_cache.go @@ -70,7 +70,7 @@ func NewCredentialsCache(provider CredentialsProvider, optFns ...func(options *C return &CredentialsCache{ provider: provider, - options: options, + options: options, } } diff --git a/aws/credential_cache_test.go b/aws/credential_cache_test.go index b9d350c0fc5..314c7c1da81 100644 --- a/aws/credential_cache_test.go +++ b/aws/credential_cache_test.go @@ -174,8 +174,8 @@ func TestCredentialsCache_ExpireTime(t *testing.T) { }, }, "no expire window with jitter": { - ExpireTime: mockTime, - JitterFrac: 0.5, + ExpireTime: mockTime, + JitterFrac: 0.5, Validate: func(t *testing.T, v time.Time) { t.Helper() if e, a := mockTime, v; !e.Equal(a) { diff --git a/config/resolve_credentials.go b/config/resolve_credentials.go index e0ceab59054..c54d112036c 100644 --- a/config/resolve_credentials.go +++ b/config/resolve_credentials.go @@ -267,7 +267,7 @@ func resolveEC2RoleCredentials(cfg *aws.Config, configs configs) error { provider := ec2rolecreds.New(optFns...) cfg.Credentials = wrapWithCredentialsCache(provider, func(options *aws.CredentialsCacheOptions) { - options.ExpiryWindow = 5*time.Minute + options.ExpiryWindow = 5 * time.Minute }) return nil diff --git a/example/service/s3/listObjects/go.mod b/example/service/s3/listObjects/go.mod index 70e3c0e858e..e786e70972e 100644 --- a/example/service/s3/listObjects/go.mod +++ b/example/service/s3/listObjects/go.mod @@ -4,14 +4,7 @@ go 1.15 require ( github.com/aws/aws-sdk-go-v2/config v0.3.0 - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v0.3.2 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v0.30.0 - github.com/aws/aws-sdk-go-v2 v0.30.0 - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v0.3.1 - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v0.1.2 - github.com/aws/aws-sdk-go-v2/service/sts v0.30.0 - github.com/aws/aws-sdk-go-v2/credentials v0.1.5 - github.com/aws/aws-sdk-go-v2/ec2imds v0.1.5 ) replace github.com/aws/aws-sdk-go-v2/config => ../../../../config/ diff --git a/feature/s3/manager/go.mod b/feature/s3/manager/go.mod index d11b726a377..73c7a3a026f 100644 --- a/feature/s3/manager/go.mod +++ b/feature/s3/manager/go.mod @@ -5,15 +5,9 @@ go 1.15 require ( github.com/aws/aws-sdk-go-v2 v0.30.0 github.com/aws/aws-sdk-go-v2/config v0.3.0 - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v0.3.2 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v0.30.0 github.com/awslabs/smithy-go v0.4.0 github.com/google/go-cmp v0.5.4 - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v0.3.1 - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v0.1.2 - github.com/aws/aws-sdk-go-v2/service/sts v0.30.0 - github.com/aws/aws-sdk-go-v2/credentials v0.1.5 - github.com/aws/aws-sdk-go-v2/ec2imds v0.1.5 ) replace github.com/aws/aws-sdk-go-v2 => ../../../ diff --git a/internal/protocoltest/awsrestjson/types/types.go b/internal/protocoltest/awsrestjson/types/types.go index 1bce5386794..9eb3db46075 100644 --- a/internal/protocoltest/awsrestjson/types/types.go +++ b/internal/protocoltest/awsrestjson/types/types.go @@ -11,6 +11,17 @@ type ComplexNestedErrorData struct { } // A union with a representative set of types for members. +// +// The following types satisfy this interface: +// MyUnionMemberStringValue +// MyUnionMemberBooleanValue +// MyUnionMemberNumberValue +// MyUnionMemberBlobValue +// MyUnionMemberTimestampValue +// MyUnionMemberEnumValue +// MyUnionMemberListValue +// MyUnionMemberMapValue +// MyUnionMemberStructureValue type MyUnion interface { isMyUnion() } diff --git a/internal/protocoltest/awsrestjson/types/types_public_test.go b/internal/protocoltest/awsrestjson/types/types_public_test.go new file mode 100644 index 00000000000..bab3f37f60c --- /dev/null +++ b/internal/protocoltest/awsrestjson/types/types_public_test.go @@ -0,0 +1,48 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" +) + +func ExampleMyUnion_outputUsage() { + var union types.MyUnion + // type switches can be used to check the union value + switch v := union.(type) { + case *types.MyUnionMemberBlobValue: + _ = v.Value // Value is []byte + + case *types.MyUnionMemberBooleanValue: + _ = v.Value // Value is bool + + case *types.MyUnionMemberEnumValue: + _ = v.Value // Value is FooEnum + + case *types.MyUnionMemberListValue: + _ = v.Value // Value is StringList + + case *types.MyUnionMemberMapValue: + _ = v.Value // Value is StringMap + + case *types.MyUnionMemberNumberValue: + _ = v.Value // Value is int32 + + case *types.MyUnionMemberStringValue: + _ = v.Value // Value is string + + case *types.MyUnionMemberStructureValue: + _ = v.Value // Value is GreetingStruct + + case *types.MyUnionMemberTimestampValue: + _ = v.Value // Value is Time + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} diff --git a/internal/protocoltest/jsonrpc/types/types.go b/internal/protocoltest/jsonrpc/types/types.go index 045ad1d22c6..ff7dfb73596 100644 --- a/internal/protocoltest/jsonrpc/types/types.go +++ b/internal/protocoltest/jsonrpc/types/types.go @@ -68,6 +68,17 @@ type KitchenSink struct { } // A union with a representative set of types for members. +// +// The following types satisfy this interface: +// MyUnionMemberStringValue +// MyUnionMemberBooleanValue +// MyUnionMemberNumberValue +// MyUnionMemberBlobValue +// MyUnionMemberTimestampValue +// MyUnionMemberEnumValue +// MyUnionMemberListValue +// MyUnionMemberMapValue +// MyUnionMemberStructureValue type MyUnion interface { isMyUnion() } diff --git a/internal/protocoltest/jsonrpc/types/types_public_test.go b/internal/protocoltest/jsonrpc/types/types_public_test.go new file mode 100644 index 00000000000..70cec8d8117 --- /dev/null +++ b/internal/protocoltest/jsonrpc/types/types_public_test.go @@ -0,0 +1,48 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/internal/protocoltest/jsonrpc/types" +) + +func ExampleMyUnion_outputUsage() { + var union types.MyUnion + // type switches can be used to check the union value + switch v := union.(type) { + case *types.MyUnionMemberBlobValue: + _ = v.Value // Value is []byte + + case *types.MyUnionMemberBooleanValue: + _ = v.Value // Value is bool + + case *types.MyUnionMemberEnumValue: + _ = v.Value // Value is FooEnum + + case *types.MyUnionMemberListValue: + _ = v.Value // Value is StringList + + case *types.MyUnionMemberMapValue: + _ = v.Value // Value is StringMap + + case *types.MyUnionMemberNumberValue: + _ = v.Value // Value is int32 + + case *types.MyUnionMemberStringValue: + _ = v.Value // Value is string + + case *types.MyUnionMemberStructureValue: + _ = v.Value // Value is GreetingStruct + + case *types.MyUnionMemberTimestampValue: + _ = v.Value // Value is Time + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} diff --git a/internal/protocoltest/jsonrpc10/types/types.go b/internal/protocoltest/jsonrpc10/types/types.go index f7ec6390704..dfc69cd6906 100644 --- a/internal/protocoltest/jsonrpc10/types/types.go +++ b/internal/protocoltest/jsonrpc10/types/types.go @@ -11,6 +11,17 @@ type ComplexNestedErrorData struct { } // A union with a representative set of types for members. +// +// The following types satisfy this interface: +// MyUnionMemberStringValue +// MyUnionMemberBooleanValue +// MyUnionMemberNumberValue +// MyUnionMemberBlobValue +// MyUnionMemberTimestampValue +// MyUnionMemberEnumValue +// MyUnionMemberListValue +// MyUnionMemberMapValue +// MyUnionMemberStructureValue type MyUnion interface { isMyUnion() } diff --git a/internal/protocoltest/jsonrpc10/types/types_public_test.go b/internal/protocoltest/jsonrpc10/types/types_public_test.go new file mode 100644 index 00000000000..cac38ec9293 --- /dev/null +++ b/internal/protocoltest/jsonrpc10/types/types_public_test.go @@ -0,0 +1,48 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/internal/protocoltest/jsonrpc10/types" +) + +func ExampleMyUnion_outputUsage() { + var union types.MyUnion + // type switches can be used to check the union value + switch v := union.(type) { + case *types.MyUnionMemberBlobValue: + _ = v.Value // Value is []byte + + case *types.MyUnionMemberBooleanValue: + _ = v.Value // Value is bool + + case *types.MyUnionMemberEnumValue: + _ = v.Value // Value is FooEnum + + case *types.MyUnionMemberListValue: + _ = v.Value // Value is StringList + + case *types.MyUnionMemberMapValue: + _ = v.Value // Value is StringMap + + case *types.MyUnionMemberNumberValue: + _ = v.Value // Value is int32 + + case *types.MyUnionMemberStringValue: + _ = v.Value // Value is string + + case *types.MyUnionMemberStructureValue: + _ = v.Value // Value is GreetingStruct + + case *types.MyUnionMemberTimestampValue: + _ = v.Value // Value is Time + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} diff --git a/internal/repotools/changes/go.mod b/internal/repotools/changes/go.mod index 340f0caf5e7..9861f2a497b 100644 --- a/internal/repotools/changes/go.mod +++ b/internal/repotools/changes/go.mod @@ -8,3 +8,5 @@ require ( golang.org/x/mod v0.3.0 gopkg.in/yaml.v2 v2.3.0 ) + +replace github.com/aws/aws-sdk-go-v2 => ../../../ diff --git a/internal/repotools/changes/go.sum b/internal/repotools/changes/go.sum index 5d84a21c973..b4791223a63 100644 --- a/internal/repotools/changes/go.sum +++ b/internal/repotools/changes/go.sum @@ -1,5 +1,3 @@ -github.com/aws/aws-sdk-go-v2 v0.30.0 h1:/CjXUnWXnvdgOqHa65UIs2TODa5D5lm3ty7O0wWuYHY= -github.com/aws/aws-sdk-go-v2 v0.30.0/go.mod h1:vEDjzdktTH+FoEOV6BWgYLEzvPti13Onp5/qQrSiLPg= github.com/awslabs/smithy-go v0.4.0 h1:El0KyKn4zdM3pLuWJlgoeitQuu/mjwUPssr7L3xu3vs= github.com/awslabs/smithy-go v0.4.0/go.mod h1:hPOQwnmBLHsUphH13tVSjQhTAFma0/0XoZGbBcOuABI= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/service/appmesh/types/types.go b/service/appmesh/types/types.go index a35c691cbbe..d93ba9c0d06 100644 --- a/service/appmesh/types/types.go +++ b/service/appmesh/types/types.go @@ -7,6 +7,9 @@ import ( ) // An object that represents the access logging information for a virtual node. +// +// The following types satisfy this interface: +// AccessLogMemberFile type AccessLog interface { isAccessLog() } @@ -58,6 +61,9 @@ type AwsCloudMapServiceDiscovery struct { // An object that represents the backends that a virtual node is expected to send // outbound traffic to. +// +// The following types satisfy this interface: +// BackendMemberVirtualService type Backend interface { isBackend() } @@ -406,6 +412,13 @@ type GrpcRouteMetadata struct { } // An object that represents the match method. Specify one of the match values. +// +// The following types satisfy this interface: +// GrpcRouteMetadataMatchMethodMemberExact +// GrpcRouteMetadataMatchMethodMemberRegex +// GrpcRouteMetadataMatchMethodMemberRange +// GrpcRouteMetadataMatchMethodMemberPrefix +// GrpcRouteMetadataMatchMethodMemberSuffix type GrpcRouteMetadataMatchMethod interface { isGrpcRouteMetadataMatchMethod() } @@ -463,6 +476,13 @@ type GrpcTimeout struct { // An object that represents the method and value to match with the header value // sent in a request. Specify one match method. +// +// The following types satisfy this interface: +// HeaderMatchMethodMemberExact +// HeaderMatchMethodMemberRegex +// HeaderMatchMethodMemberRange +// HeaderMatchMethodMemberPrefix +// HeaderMatchMethodMemberSuffix type HeaderMatchMethod interface { isHeaderMatchMethod() } @@ -714,6 +734,12 @@ type Listener struct { } // An object that represents timeouts for different protocols. +// +// The following types satisfy this interface: +// ListenerTimeoutMemberTcp +// ListenerTimeoutMemberHttp +// ListenerTimeoutMemberHttp2 +// ListenerTimeoutMemberGrpc type ListenerTimeout interface { isListenerTimeout() } @@ -784,6 +810,10 @@ type ListenerTlsAcmCertificate struct { // An object that represents a listener's Transport Layer Security (TLS) // certificate. +// +// The following types satisfy this interface: +// ListenerTlsCertificateMemberAcm +// ListenerTlsCertificateMemberFile type ListenerTlsCertificate interface { isListenerTlsCertificate() } @@ -1108,6 +1138,10 @@ type RouteStatus struct { } // An object that represents the service discovery information for a virtual node. +// +// The following types satisfy this interface: +// ServiceDiscoveryMemberDns +// ServiceDiscoveryMemberAwsCloudMap type ServiceDiscovery interface { isServiceDiscovery() } @@ -1204,6 +1238,10 @@ type TlsValidationContextFileTrust struct { // An object that represents a Transport Layer Security (TLS) validation context // trust. +// +// The following types satisfy this interface: +// TlsValidationContextTrustMemberAcm +// TlsValidationContextTrustMemberFile type TlsValidationContextTrust interface { isTlsValidationContextTrust() } @@ -1224,6 +1262,9 @@ type TlsValidationContextTrustMemberFile struct { func (*TlsValidationContextTrustMemberFile) isTlsValidationContextTrust() {} // The access log configuration for a virtual gateway. +// +// The following types satisfy this interface: +// VirtualGatewayAccessLogMemberFile type VirtualGatewayAccessLog interface { isVirtualGatewayAccessLog() } @@ -1405,6 +1446,10 @@ type VirtualGatewayListenerTlsAcmCertificate struct { // An object that represents a listener's Transport Layer Security (TLS) // certificate. +// +// The following types satisfy this interface: +// VirtualGatewayListenerTlsCertificateMemberAcm +// VirtualGatewayListenerTlsCertificateMemberFile type VirtualGatewayListenerTlsCertificate interface { isVirtualGatewayListenerTlsCertificate() } @@ -1571,6 +1616,10 @@ type VirtualGatewayTlsValidationContextFileTrust struct { // An object that represents a Transport Layer Security (TLS) validation context // trust. +// +// The following types satisfy this interface: +// VirtualGatewayTlsValidationContextTrustMemberAcm +// VirtualGatewayTlsValidationContextTrustMemberFile type VirtualGatewayTlsValidationContextTrust interface { isVirtualGatewayTlsValidationContextTrust() } @@ -1869,6 +1918,10 @@ type VirtualServiceData struct { } // An object that represents the provider for a virtual service. +// +// The following types satisfy this interface: +// VirtualServiceProviderMemberVirtualNode +// VirtualServiceProviderMemberVirtualRouter type VirtualServiceProvider interface { isVirtualServiceProvider() } diff --git a/service/appmesh/types/types_public_test.go b/service/appmesh/types/types_public_test.go new file mode 100644 index 00000000000..16a128a2605 --- /dev/null +++ b/service/appmesh/types/types_public_test.go @@ -0,0 +1,251 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/service/appmesh/types" +) + +func ExampleAccessLog_outputUsage() { + var union types.AccessLog + // type switches can be used to check the union value + switch v := union.(type) { + case *types.AccessLogMemberFile: + _ = v.Value // Value is FileAccessLog + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +func ExampleBackend_outputUsage() { + var union types.Backend + // type switches can be used to check the union value + switch v := union.(type) { + case *types.BackendMemberVirtualService: + _ = v.Value // Value is VirtualServiceBackend + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +func ExampleGrpcRouteMetadataMatchMethod_outputUsage() { + var union types.GrpcRouteMetadataMatchMethod + // type switches can be used to check the union value + switch v := union.(type) { + case *types.GrpcRouteMetadataMatchMethodMemberExact: + _ = v.Value // Value is string + + case *types.GrpcRouteMetadataMatchMethodMemberPrefix: + _ = v.Value // Value is string + + case *types.GrpcRouteMetadataMatchMethodMemberRange: + _ = v.Value // Value is MatchRange + + case *types.GrpcRouteMetadataMatchMethodMemberRegex: + _ = v.Value // Value is string + + case *types.GrpcRouteMetadataMatchMethodMemberSuffix: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +func ExampleHeaderMatchMethod_outputUsage() { + var union types.HeaderMatchMethod + // type switches can be used to check the union value + switch v := union.(type) { + case *types.HeaderMatchMethodMemberExact: + _ = v.Value // Value is string + + case *types.HeaderMatchMethodMemberPrefix: + _ = v.Value // Value is string + + case *types.HeaderMatchMethodMemberRange: + _ = v.Value // Value is MatchRange + + case *types.HeaderMatchMethodMemberRegex: + _ = v.Value // Value is string + + case *types.HeaderMatchMethodMemberSuffix: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +func ExampleListenerTimeout_outputUsage() { + var union types.ListenerTimeout + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ListenerTimeoutMemberGrpc: + _ = v.Value // Value is GrpcTimeout + + case *types.ListenerTimeoutMemberHttp: + _ = v.Value // Value is HttpTimeout + + case *types.ListenerTimeoutMemberHttp2: + _ = v.Value // Value is HttpTimeout + + case *types.ListenerTimeoutMemberTcp: + _ = v.Value // Value is TcpTimeout + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +func ExampleListenerTlsCertificate_outputUsage() { + var union types.ListenerTlsCertificate + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ListenerTlsCertificateMemberAcm: + _ = v.Value // Value is ListenerTlsAcmCertificate + + case *types.ListenerTlsCertificateMemberFile: + _ = v.Value // Value is ListenerTlsFileCertificate + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +func ExampleServiceDiscovery_outputUsage() { + var union types.ServiceDiscovery + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ServiceDiscoveryMemberAwsCloudMap: + _ = v.Value // Value is AwsCloudMapServiceDiscovery + + case *types.ServiceDiscoveryMemberDns: + _ = v.Value // Value is DnsServiceDiscovery + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +func ExampleTlsValidationContextTrust_outputUsage() { + var union types.TlsValidationContextTrust + // type switches can be used to check the union value + switch v := union.(type) { + case *types.TlsValidationContextTrustMemberAcm: + _ = v.Value // Value is TlsValidationContextAcmTrust + + case *types.TlsValidationContextTrustMemberFile: + _ = v.Value // Value is TlsValidationContextFileTrust + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +func ExampleVirtualGatewayAccessLog_outputUsage() { + var union types.VirtualGatewayAccessLog + // type switches can be used to check the union value + switch v := union.(type) { + case *types.VirtualGatewayAccessLogMemberFile: + _ = v.Value // Value is VirtualGatewayFileAccessLog + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +func ExampleVirtualGatewayListenerTlsCertificate_outputUsage() { + var union types.VirtualGatewayListenerTlsCertificate + // type switches can be used to check the union value + switch v := union.(type) { + case *types.VirtualGatewayListenerTlsCertificateMemberAcm: + _ = v.Value // Value is VirtualGatewayListenerTlsAcmCertificate + + case *types.VirtualGatewayListenerTlsCertificateMemberFile: + _ = v.Value // Value is VirtualGatewayListenerTlsFileCertificate + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +func ExampleVirtualGatewayTlsValidationContextTrust_outputUsage() { + var union types.VirtualGatewayTlsValidationContextTrust + // type switches can be used to check the union value + switch v := union.(type) { + case *types.VirtualGatewayTlsValidationContextTrustMemberAcm: + _ = v.Value // Value is VirtualGatewayTlsValidationContextAcmTrust + + case *types.VirtualGatewayTlsValidationContextTrustMemberFile: + _ = v.Value // Value is VirtualGatewayTlsValidationContextFileTrust + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +func ExampleVirtualServiceProvider_outputUsage() { + var union types.VirtualServiceProvider + // type switches can be used to check the union value + switch v := union.(type) { + case *types.VirtualServiceProviderMemberVirtualNode: + _ = v.Value // Value is VirtualNodeServiceProvider + + case *types.VirtualServiceProviderMemberVirtualRouter: + _ = v.Value // Value is VirtualRouterServiceProvider + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} diff --git a/service/groundstation/types/types.go b/service/groundstation/types/types.go index 8e0a4ce0768..215780d5c0d 100644 --- a/service/groundstation/types/types.go +++ b/service/groundstation/types/types.go @@ -70,6 +70,14 @@ type ConfigListItem struct { // Object containing the parameters of a Config. See the subtype definitions for // what each type of Config contains. +// +// The following types satisfy this interface: +// ConfigTypeDataMemberAntennaDownlinkConfig +// ConfigTypeDataMemberAntennaDownlinkDemodDecodeConfig +// ConfigTypeDataMemberAntennaUplinkConfig +// ConfigTypeDataMemberDataflowEndpointConfig +// ConfigTypeDataMemberTrackingConfig +// ConfigTypeDataMemberUplinkEchoConfig type ConfigTypeData interface { isConfigTypeData() } diff --git a/service/groundstation/types/types_public_test.go b/service/groundstation/types/types_public_test.go new file mode 100644 index 00000000000..3ef783b53d1 --- /dev/null +++ b/service/groundstation/types/types_public_test.go @@ -0,0 +1,39 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/service/groundstation/types" +) + +func ExampleConfigTypeData_outputUsage() { + var union types.ConfigTypeData + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ConfigTypeDataMemberAntennaDownlinkConfig: + _ = v.Value // Value is AntennaDownlinkConfig + + case *types.ConfigTypeDataMemberAntennaDownlinkDemodDecodeConfig: + _ = v.Value // Value is AntennaDownlinkDemodDecodeConfig + + case *types.ConfigTypeDataMemberAntennaUplinkConfig: + _ = v.Value // Value is AntennaUplinkConfig + + case *types.ConfigTypeDataMemberDataflowEndpointConfig: + _ = v.Value // Value is DataflowEndpointConfig + + case *types.ConfigTypeDataMemberTrackingConfig: + _ = v.Value // Value is TrackingConfig + + case *types.ConfigTypeDataMemberUplinkEchoConfig: + _ = v.Value // Value is UplinkEchoConfig + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} diff --git a/service/internal/benchmark/go.mod b/service/internal/benchmark/go.mod index 6a153cb4d7c..e1be27aa04a 100644 --- a/service/internal/benchmark/go.mod +++ b/service/internal/benchmark/go.mod @@ -8,7 +8,6 @@ require ( github.com/aws/aws-sdk-go-v2/service/dynamodb v0.30.0 github.com/aws/aws-sdk-go-v2/service/lexruntimeservice v0.30.0 github.com/awslabs/smithy-go v0.4.0 - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v0.3.1 ) replace github.com/aws/aws-sdk-go-v2 => ../../../ diff --git a/service/internal/integrationtest/go.mod b/service/internal/integrationtest/go.mod index d7ec343fb7d..343d60dd7f9 100644 --- a/service/internal/integrationtest/go.mod +++ b/service/internal/integrationtest/go.mod @@ -50,8 +50,6 @@ require ( github.com/aws/aws-sdk-go-v2/service/health v0.30.0 github.com/aws/aws-sdk-go-v2/service/iam v0.30.0 github.com/aws/aws-sdk-go-v2/service/inspector v0.30.0 - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v0.1.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v0.3.2 // indirect github.com/aws/aws-sdk-go-v2/service/iot v0.30.0 github.com/aws/aws-sdk-go-v2/service/kinesis v0.30.0 github.com/aws/aws-sdk-go-v2/service/kms v0.30.0 @@ -88,9 +86,6 @@ require ( github.com/aws/aws-sdk-go-v2/service/workspaces v0.30.0 github.com/awslabs/smithy-go v0.4.0 github.com/google/go-cmp v0.5.4 - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v0.3.1 - github.com/aws/aws-sdk-go-v2/credentials v0.1.5 - github.com/aws/aws-sdk-go-v2/ec2imds v0.1.5 ) go 1.15 diff --git a/service/rdsdata/types/types.go b/service/rdsdata/types/types.go index 673a2385595..80d45595475 100644 --- a/service/rdsdata/types/types.go +++ b/service/rdsdata/types/types.go @@ -3,6 +3,13 @@ package types // Contains an array. +// +// The following types satisfy this interface: +// ArrayValueMemberArrayValues +// ArrayValueMemberBooleanValues +// ArrayValueMemberDoubleValues +// ArrayValueMemberLongValues +// ArrayValueMemberStringValues type ArrayValue interface { isArrayValue() } @@ -89,6 +96,15 @@ type ColumnMetadata struct { } // Contains a value. +// +// The following types satisfy this interface: +// FieldMemberArrayValue +// FieldMemberBlobValue +// FieldMemberBooleanValue +// FieldMemberDoubleValue +// FieldMemberIsNull +// FieldMemberLongValue +// FieldMemberStringValue type Field interface { isField() } @@ -235,6 +251,18 @@ type UpdateResult struct { } // Contains the value of a column. This data type is deprecated. +// +// The following types satisfy this interface: +// ValueMemberArrayValues +// ValueMemberBigIntValue +// ValueMemberBitValue +// ValueMemberBlobValue +// ValueMemberDoubleValue +// ValueMemberIntValue +// ValueMemberIsNull +// ValueMemberRealValue +// ValueMemberStringValue +// ValueMemberStructValue type Value interface { isValue() } diff --git a/service/rdsdata/types/types_public_test.go b/service/rdsdata/types/types_public_test.go new file mode 100644 index 00000000000..e1fd39a102a --- /dev/null +++ b/service/rdsdata/types/types_public_test.go @@ -0,0 +1,113 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/service/rdsdata/types" +) + +func ExampleArrayValue_outputUsage() { + var union types.ArrayValue + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ArrayValueMemberArrayValues: + _ = v.Value // Value is ArrayOfArray + + case *types.ArrayValueMemberBooleanValues: + _ = v.Value // Value is BooleanArray + + case *types.ArrayValueMemberDoubleValues: + _ = v.Value // Value is DoubleArray + + case *types.ArrayValueMemberLongValues: + _ = v.Value // Value is LongArray + + case *types.ArrayValueMemberStringValues: + _ = v.Value // Value is StringArray + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +func ExampleField_outputUsage() { + var union types.Field + // type switches can be used to check the union value + switch v := union.(type) { + case *types.FieldMemberArrayValue: + _ = v.Value // Value is ArrayValue + + case *types.FieldMemberBlobValue: + _ = v.Value // Value is []byte + + case *types.FieldMemberBooleanValue: + _ = v.Value // Value is bool + + case *types.FieldMemberDoubleValue: + _ = v.Value // Value is float64 + + case *types.FieldMemberIsNull: + _ = v.Value // Value is bool + + case *types.FieldMemberLongValue: + _ = v.Value // Value is int64 + + case *types.FieldMemberStringValue: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +func ExampleValue_outputUsage() { + var union types.Value + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ValueMemberArrayValues: + _ = v.Value // Value is ArrayValueList + + case *types.ValueMemberBigIntValue: + _ = v.Value // Value is int64 + + case *types.ValueMemberBitValue: + _ = v.Value // Value is bool + + case *types.ValueMemberBlobValue: + _ = v.Value // Value is []byte + + case *types.ValueMemberDoubleValue: + _ = v.Value // Value is float64 + + case *types.ValueMemberIntValue: + _ = v.Value // Value is int32 + + case *types.ValueMemberIsNull: + _ = v.Value // Value is bool + + case *types.ValueMemberRealValue: + _ = v.Value // Value is float32 + + case *types.ValueMemberStringValue: + _ = v.Value // Value is string + + case *types.ValueMemberStructValue: + _ = v.Value // Value is StructValue + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} diff --git a/service/redshiftdata/types/types.go b/service/redshiftdata/types/types.go index bc9f388f52f..290dc94878f 100644 --- a/service/redshiftdata/types/types.go +++ b/service/redshiftdata/types/types.go @@ -50,6 +50,14 @@ type ColumnMetadata struct { } // A data value in a column. +// +// The following types satisfy this interface: +// FieldMemberIsNull +// FieldMemberBooleanValue +// FieldMemberLongValue +// FieldMemberDoubleValue +// FieldMemberStringValue +// FieldMemberBlobValue type Field interface { isField() } diff --git a/service/redshiftdata/types/types_public_test.go b/service/redshiftdata/types/types_public_test.go new file mode 100644 index 00000000000..967166106cc --- /dev/null +++ b/service/redshiftdata/types/types_public_test.go @@ -0,0 +1,39 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/service/redshiftdata/types" +) + +func ExampleField_outputUsage() { + var union types.Field + // type switches can be used to check the union value + switch v := union.(type) { + case *types.FieldMemberBlobValue: + _ = v.Value // Value is []byte + + case *types.FieldMemberBooleanValue: + _ = v.Value // Value is bool + + case *types.FieldMemberDoubleValue: + _ = v.Value // Value is float64 + + case *types.FieldMemberIsNull: + _ = v.Value // Value is bool + + case *types.FieldMemberLongValue: + _ = v.Value // Value is int64 + + case *types.FieldMemberStringValue: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} diff --git a/service/s3/internal/configtesting/go.mod b/service/s3/internal/configtesting/go.mod index 0a53866b913..7a5f1eeb0ac 100644 --- a/service/s3/internal/configtesting/go.mod +++ b/service/s3/internal/configtesting/go.mod @@ -5,13 +5,6 @@ go 1.15 require ( github.com/aws/aws-sdk-go-v2/config v0.3.0 github.com/aws/aws-sdk-go-v2/service/s3 v0.30.0 - github.com/aws/aws-sdk-go-v2 v0.30.0 - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v0.3.1 - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v0.1.2 - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v0.3.2 - github.com/aws/aws-sdk-go-v2/service/sts v0.30.0 - github.com/aws/aws-sdk-go-v2/credentials v0.1.5 - github.com/aws/aws-sdk-go-v2/ec2imds v0.1.5 ) replace (