diff --git a/codegen/sdk-codegen/aws-models/nimble.json b/codegen/sdk-codegen/aws-models/nimble.json deleted file mode 100644 index 8af2f87c6da..00000000000 --- a/codegen/sdk-codegen/aws-models/nimble.json +++ /dev/null @@ -1,10345 +0,0 @@ -{ - "smithy": "2.0", - "shapes": { - "com.amazonaws.nimble#AcceptEulas": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#AcceptEulasRequest" - }, - "output": { - "target": "com.amazonaws.nimble#AcceptEulasResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to accept EULAs", - "smithy.api#documentation": "
Accept EULAs.
", - "smithy.api#http": { - "method": "POST", - "uri": "/2020-08-01/studios/{studioId}/eula-acceptances", - "code": 200 - } - } - }, - "com.amazonaws.nimble#AcceptEulasRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "eulaIds": { - "target": "com.amazonaws.nimble#EulaIdList", - "traits": { - "smithy.api#documentation": "The EULA ID.
" - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#AcceptEulasResponse": { - "type": "structure", - "members": { - "eulaAcceptances": { - "target": "com.amazonaws.nimble#EulaAcceptanceList", - "traits": { - "smithy.api#documentation": "A collection of EULA acceptances.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#AccessDeniedException": { - "type": "structure", - "members": { - "code": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "A more specific error code.
" - } - }, - "context": { - "target": "com.amazonaws.nimble#ExceptionContext", - "traits": { - "smithy.api#documentation": "The exception context.
" - } - }, - "message": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "A human-readable description of the error.
" - } - } - }, - "traits": { - "smithy.api#documentation": "You are not authorized to perform this operation. Check your IAM\n policies, and ensure that you are using the correct access keys.
", - "smithy.api#error": "client", - "smithy.api#httpError": 403 - } - }, - "com.amazonaws.nimble#ActiveDirectoryComputerAttribute": { - "type": "structure", - "members": { - "name": { - "target": "com.amazonaws.nimble#ActiveDirectoryComputerAttributeName", - "traits": { - "smithy.api#documentation": "The name for the LDAP attribute.
" - } - }, - "value": { - "target": "com.amazonaws.nimble#ActiveDirectoryComputerAttributeValue", - "traits": { - "smithy.api#documentation": "The value for the LDAP attribute.
" - } - } - }, - "traits": { - "smithy.api#documentation": "An LDAP attribute of an Active Directory computer account, in the form of a name:value\n pair.
" - } - }, - "com.amazonaws.nimble#ActiveDirectoryComputerAttributeList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#ActiveDirectoryComputerAttribute" - }, - "traits": { - "smithy.api#documentation": "A collection of LDAP attributes to apply to Active Directory computer accounts that\n are created for streaming sessions.
", - "smithy.api#length": { - "min": 0, - "max": 50 - }, - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.nimble#ActiveDirectoryComputerAttributeName": { - "type": "string", - "traits": { - "smithy.api#documentation": "The name for the LDAP attribute.
", - "smithy.api#length": { - "min": 1, - "max": 40 - } - } - }, - "com.amazonaws.nimble#ActiveDirectoryComputerAttributeValue": { - "type": "string", - "traits": { - "smithy.api#documentation": "The value for the LDAP attribute.
", - "smithy.api#length": { - "min": 1, - "max": 64 - } - } - }, - "com.amazonaws.nimble#ActiveDirectoryConfiguration": { - "type": "structure", - "members": { - "computerAttributes": { - "target": "com.amazonaws.nimble#ActiveDirectoryComputerAttributeList", - "traits": { - "smithy.api#documentation": "A collection of custom attributes for an Active Directory computer.
" - } - }, - "directoryId": { - "target": "com.amazonaws.nimble#DirectoryId", - "traits": { - "smithy.api#documentation": "The directory ID of the Directory Service for Microsoft Active Directory to access using this studio\n component.
" - } - }, - "organizationalUnitDistinguishedName": { - "target": "com.amazonaws.nimble#ActiveDirectoryOrganizationalUnitDistinguishedName", - "traits": { - "smithy.api#documentation": "The distinguished name (DN) and organizational unit (OU) of an Active Directory\n computer.
" - } - } - }, - "traits": { - "smithy.api#documentation": "The configuration for a Directory Service for Microsoft Active Directory studio resource.
" - } - }, - "com.amazonaws.nimble#ActiveDirectoryDnsIpAddress": { - "type": "string" - }, - "com.amazonaws.nimble#ActiveDirectoryDnsIpAddressList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#ActiveDirectoryDnsIpAddress" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 10 - } - } - }, - "com.amazonaws.nimble#ActiveDirectoryOrganizationalUnitDistinguishedName": { - "type": "string", - "traits": { - "smithy.api#documentation": "The fully-qualified distinguished name of the organizational unit to place the\n computer account in.
", - "smithy.api#length": { - "min": 1, - "max": 2000 - } - } - }, - "com.amazonaws.nimble#AutomaticTerminationMode": { - "type": "enum", - "members": { - "DEACTIVATED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DEACTIVATED" - } - }, - "ACTIVATED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ACTIVATED" - } - } - } - }, - "com.amazonaws.nimble#ClientToken": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 64 - } - } - }, - "com.amazonaws.nimble#ComputeFarmConfiguration": { - "type": "structure", - "members": { - "activeDirectoryUser": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The name of an Active Directory user that is used on ComputeFarm worker\n instances.
" - } - }, - "endpoint": { - "target": "com.amazonaws.nimble#SensitiveString", - "traits": { - "smithy.api#documentation": "The endpoint of the ComputeFarm that is accessed by the studio component\n resource.
" - } - } - }, - "traits": { - "smithy.api#documentation": "The configuration for a render farm that is associated with a studio resource.
" - } - }, - "com.amazonaws.nimble#ConflictException": { - "type": "structure", - "members": { - "code": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "A more specific error code.
" - } - }, - "context": { - "target": "com.amazonaws.nimble#ExceptionContext", - "traits": { - "smithy.api#documentation": "The exception context.
" - } - }, - "message": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "A human-readable description of the error.
" - } - } - }, - "traits": { - "smithy.api#documentation": "Another operation is in progress.
", - "smithy.api#error": "client", - "smithy.api#httpError": 409 - } - }, - "com.amazonaws.nimble#CreateLaunchProfile": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#CreateLaunchProfileRequest" - }, - "output": { - "target": "com.amazonaws.nimble#CreateLaunchProfileResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to create a launch profile", - "aws.iam#conditionKeys": [ - "aws:TagKeys", - "aws:RequestTag/${TagKey}" - ], - "aws.iam#requiredActions": [ - "ec2:CreateNetworkInterface", - "ec2:RunInstances", - "ec2:DescribeSubnets", - "ec2:DescribeRouteTables", - "ec2:DescribeNetworkAcls", - "ec2:DescribeVpcEndpoints", - "ec2:DescribeNatGateways" - ], - "smithy.api#documentation": "Create a launch profile.
", - "smithy.api#http": { - "method": "POST", - "uri": "/2020-08-01/studios/{studioId}/launch-profiles", - "code": 200 - } - } - }, - "com.amazonaws.nimble#CreateLaunchProfileRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "description": { - "target": "com.amazonaws.nimble#LaunchProfileDescription", - "traits": { - "smithy.api#documentation": "The description.
" - } - }, - "ec2SubnetIds": { - "target": "com.amazonaws.nimble#EC2SubnetIdList", - "traits": { - "aws.cloudformation#cfnMutability": "create-and-read", - "smithy.api#documentation": "Specifies the IDs of the EC2 subnets where streaming sessions will be accessible from.\n These subnets must support the specified instance types.
", - "smithy.api#required": {} - } - }, - "launchProfileProtocolVersions": { - "target": "com.amazonaws.nimble#LaunchProfileProtocolVersionList", - "traits": { - "smithy.api#documentation": "The version number of the protocol that is used by the launch profile. The only valid\n version is \"2021-03-31\".
", - "smithy.api#required": {} - } - }, - "name": { - "target": "com.amazonaws.nimble#LaunchProfileName", - "traits": { - "smithy.api#documentation": "The name for the launch profile.
", - "smithy.api#required": {} - } - }, - "streamConfiguration": { - "target": "com.amazonaws.nimble#StreamConfigurationCreate", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "A configuration for a streaming session.
", - "smithy.api#required": {} - } - }, - "studioComponentIds": { - "target": "com.amazonaws.nimble#LaunchProfileStudioComponentIdList", - "traits": { - "smithy.api#documentation": "Unique identifiers for a collection of studio components that can be used with this\n launch profile.
", - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnMutability": "create-and-read", - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tags": { - "target": "com.amazonaws.nimble#Tags", - "traits": { - "smithy.api#documentation": "A collection of labels, in the form of key-value pairs, that apply to this\n resource.
" - } - } - }, - "traits": { - "smithy.api#input": {}, - "smithy.api#references": [ - { - "resource": "com.amazonaws.nimble#StudioResource" - } - ] - } - }, - "com.amazonaws.nimble#CreateLaunchProfileResponse": { - "type": "structure", - "members": { - "launchProfile": { - "target": "com.amazonaws.nimble#LaunchProfile", - "traits": { - "smithy.api#documentation": "The launch profile.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#CreateStreamingImage": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#CreateStreamingImageRequest" - }, - "output": { - "target": "com.amazonaws.nimble#CreateStreamingImageResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to create a streaming image", - "aws.iam#conditionKeys": [ - "aws:TagKeys", - "aws:RequestTag/${TagKey}" - ], - "aws.iam#requiredActions": [ - "ec2:ModifyInstanceAttribute", - "ec2:ModifySnapshotAttribute", - "ec2:RegisterImage", - "ec2:DescribeImages", - "ec2:DescribeSnapshots" - ], - "smithy.api#documentation": "Creates a streaming image resource in a studio.
", - "smithy.api#http": { - "method": "POST", - "uri": "/2020-08-01/studios/{studioId}/streaming-images", - "code": 200 - } - } - }, - "com.amazonaws.nimble#CreateStreamingImageRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "description": { - "target": "com.amazonaws.nimble#StreamingImageDescription", - "traits": { - "smithy.api#documentation": "A human-readable description of the streaming image.
" - } - }, - "ec2ImageId": { - "target": "com.amazonaws.nimble#EC2ImageId", - "traits": { - "smithy.api#documentation": "The ID of an EC2 machine image with which to create this streaming image.
", - "smithy.api#required": {} - } - }, - "name": { - "target": "com.amazonaws.nimble#StreamingImageName", - "traits": { - "smithy.api#documentation": "A friendly name for a streaming image resource.
", - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnMutability": "create-and-read", - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tags": { - "target": "com.amazonaws.nimble#Tags", - "traits": { - "aws.cloudformation#cfnMutability": "create-and-read", - "smithy.api#documentation": "A collection of labels, in the form of key-value pairs, that apply to this\n resource.
" - } - } - }, - "traits": { - "smithy.api#input": {}, - "smithy.api#references": [ - { - "resource": "com.amazonaws.nimble#StudioResource" - } - ] - } - }, - "com.amazonaws.nimble#CreateStreamingImageResponse": { - "type": "structure", - "members": { - "streamingImage": { - "target": "com.amazonaws.nimble#StreamingImage", - "traits": { - "smithy.api#documentation": "The streaming image.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#CreateStreamingSession": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#CreateStreamingSessionRequest" - }, - "output": { - "target": "com.amazonaws.nimble#CreateStreamingSessionResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to create a streaming session", - "aws.iam#conditionKeys": [ - "aws:TagKeys", - "aws:RequestTag/${TagKey}" - ], - "aws.iam#requiredActions": [ - "ec2:CreateNetworkInterface", - "ec2:CreateNetworkInterfacePermission", - "nimble:GetLaunchProfileInitialization", - "nimble:GetLaunchProfile", - "nimble:ListEulaAcceptances" - ], - "smithy.api#documentation": "Creates a streaming session in a studio.
\nAfter invoking this operation, you must poll GetStreamingSession until the streaming\n session is in the READY
state.
Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "ec2InstanceType": { - "target": "com.amazonaws.nimble#StreamingInstanceType", - "traits": { - "smithy.api#documentation": "The EC2 Instance type used for the streaming session.
" - } - }, - "launchProfileId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the launch profile used to control access from the streaming session.
", - "smithy.api#required": {} - } - }, - "ownedBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The user ID of the user that owns the streaming session. The user that owns the\n session will be logging into the session and interacting with the virtual\n workstation.
" - } - }, - "streamingImageId": { - "target": "com.amazonaws.nimble#StreamingImageId", - "traits": { - "smithy.api#documentation": "The ID of the streaming image.
" - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tags": { - "target": "com.amazonaws.nimble#Tags", - "traits": { - "smithy.api#documentation": "A collection of labels, in the form of key-value pairs, that apply to this\n resource.
" - } - } - }, - "traits": { - "smithy.api#input": {}, - "smithy.api#references": [ - { - "resource": "com.amazonaws.nimble#LaunchProfileResource" - } - ] - } - }, - "com.amazonaws.nimble#CreateStreamingSessionResponse": { - "type": "structure", - "members": { - "session": { - "target": "com.amazonaws.nimble#StreamingSession", - "traits": { - "smithy.api#documentation": "The session.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#CreateStreamingSessionStream": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#CreateStreamingSessionStreamRequest" - }, - "output": { - "target": "com.amazonaws.nimble#CreateStreamingSessionStreamResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to create a streaming session stream", - "aws.iam#conditionKeys": [ - "nimble:requesterPrincipalId" - ], - "smithy.api#documentation": "Creates a streaming session stream for a streaming session.
\nAfter invoking this API, invoke GetStreamingSessionStream with the returned streamId\n to poll the resource until it is in the READY
state.
Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "expirationInSeconds": { - "target": "com.amazonaws.nimble#StreamingSessionStreamExpirationInSeconds", - "traits": { - "smithy.api#default": 120, - "smithy.api#documentation": "The expiration time in seconds.
" - } - }, - "sessionId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The streaming session ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {}, - "smithy.api#references": [ - { - "resource": "com.amazonaws.nimble#StreamingSessionResource" - } - ] - } - }, - "com.amazonaws.nimble#CreateStreamingSessionStreamResponse": { - "type": "structure", - "members": { - "stream": { - "target": "com.amazonaws.nimble#StreamingSessionStream", - "traits": { - "smithy.api#documentation": "The stream.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#CreateStudio": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#CreateStudioRequest" - }, - "output": { - "target": "com.amazonaws.nimble#CreateStudioResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to create a studio", - "aws.iam#conditionKeys": [ - "aws:TagKeys", - "aws:RequestTag/${TagKey}" - ], - "aws.iam#requiredActions": [ - "sso:CreateManagedApplicationInstance", - "iam:PassRole" - ], - "smithy.api#documentation": "Create a new studio.
\nWhen creating a studio, two IAM roles must be provided: the admin role\n and the user role. These roles are assumed by your users when they log in to the Nimble Studio portal.
\nThe user role must have the AmazonNimbleStudio-StudioUser
managed policy\n attached for the portal to function properly.
The admin role must have the AmazonNimbleStudio-StudioAdmin
managed\n policy attached for the portal to function properly.
You may optionally specify a KMS key in the\n StudioEncryptionConfiguration
.
In Nimble Studio, resource names, descriptions, initialization scripts, and other\n data you provide are always encrypted at rest using an KMS key. By default, this key is\n owned by Amazon Web Services and managed on your behalf. You may provide your own KMS key\n when calling CreateStudio
to encrypt this data using a key you own and\n manage.
When providing an KMS key during studio creation, Nimble Studio creates KMS\n grants in your account to provide your studio user and admin roles access to these KMS\n keys.
\nIf you delete this grant, the studio will no longer be accessible to your portal\n users.
\nIf you delete the studio KMS key, your studio will no longer be accessible.
", - "smithy.api#http": { - "method": "POST", - "uri": "/2020-08-01/studios", - "code": 200 - } - } - }, - "com.amazonaws.nimble#CreateStudioComponent": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#CreateStudioComponentRequest" - }, - "output": { - "target": "com.amazonaws.nimble#CreateStudioComponentResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to create a studio component. A studio component designates a network resource to which a launch profile will provide access", - "aws.iam#conditionKeys": [ - "aws:TagKeys", - "aws:RequestTag/${TagKey}" - ], - "aws.iam#requiredActions": [ - "ec2:DescribeSecurityGroups", - "fsx:DescribeFileSystems", - "ds:DescribeDirectories", - "iam:PassRole" - ], - "smithy.api#documentation": "Creates a studio component resource.
", - "smithy.api#http": { - "method": "POST", - "uri": "/2020-08-01/studios/{studioId}/studio-components", - "code": 200 - } - } - }, - "com.amazonaws.nimble#CreateStudioComponentRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "configuration": { - "target": "com.amazonaws.nimble#StudioComponentConfiguration", - "traits": { - "smithy.api#documentation": "The configuration of the studio component, based on component type.
" - } - }, - "description": { - "target": "com.amazonaws.nimble#StudioComponentDescription", - "traits": { - "smithy.api#documentation": "The description.
" - } - }, - "ec2SecurityGroupIds": { - "target": "com.amazonaws.nimble#StudioComponentSecurityGroupIdList", - "traits": { - "smithy.api#documentation": "The EC2 security groups that control access to the studio component.
" - } - }, - "initializationScripts": { - "target": "com.amazonaws.nimble#StudioComponentInitializationScriptList", - "traits": { - "smithy.api#documentation": "Initialization scripts for studio components.
" - } - }, - "name": { - "target": "com.amazonaws.nimble#StudioComponentName", - "traits": { - "smithy.api#documentation": "The name for the studio component.
", - "smithy.api#required": {} - } - }, - "scriptParameters": { - "target": "com.amazonaws.nimble#StudioComponentScriptParameterKeyValueList", - "traits": { - "smithy.api#documentation": "Parameters for the studio component scripts.
" - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnMutability": "create-and-read", - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "subtype": { - "target": "com.amazonaws.nimble#StudioComponentSubtype", - "traits": { - "aws.cloudformation#cfnMutability": "create-and-read", - "smithy.api#documentation": "The specific subtype of a studio component.
" - } - }, - "tags": { - "target": "com.amazonaws.nimble#Tags", - "traits": { - "aws.cloudformation#cfnMutability": "create-and-read", - "smithy.api#documentation": "A collection of labels, in the form of key-value pairs, that apply to this\n resource.
" - } - }, - "type": { - "target": "com.amazonaws.nimble#StudioComponentType", - "traits": { - "smithy.api#documentation": "The type of the studio component.
", - "smithy.api#required": {} - } - }, - "secureInitializationRoleArn": { - "target": "com.amazonaws.nimble#RoleArn", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "An IAM role attached to Studio Component when the system initialization\n script runs which give the studio component access to Amazon Web Services resources when\n the system initialization script runs.
" - } - }, - "runtimeRoleArn": { - "target": "com.amazonaws.nimble#RoleArn", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "An IAM role attached to a Studio Component that gives the studio\n component access to Amazon Web Services resources at anytime while the instance is\n running.
" - } - } - }, - "traits": { - "smithy.api#input": {}, - "smithy.api#references": [ - { - "resource": "com.amazonaws.nimble#StudioResource" - } - ] - } - }, - "com.amazonaws.nimble#CreateStudioComponentResponse": { - "type": "structure", - "members": { - "studioComponent": { - "target": "com.amazonaws.nimble#StudioComponent", - "traits": { - "smithy.api#documentation": "Information about the studio component.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#CreateStudioRequest": { - "type": "structure", - "members": { - "adminRoleArn": { - "target": "com.amazonaws.nimble#RoleArn", - "traits": { - "smithy.api#documentation": "The IAM role that studio admins will assume when logging in to the\n Nimble Studio portal.
", - "smithy.api#required": {} - } - }, - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "displayName": { - "target": "com.amazonaws.nimble#StudioDisplayName", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "A friendly name for the studio.
", - "smithy.api#required": {} - } - }, - "studioEncryptionConfiguration": { - "target": "com.amazonaws.nimble#StudioEncryptionConfiguration", - "traits": { - "smithy.api#documentation": "The studio encryption configuration.
" - } - }, - "studioName": { - "target": "com.amazonaws.nimble#StudioName", - "traits": { - "aws.cloudformation#cfnMutability": "create-and-read", - "smithy.api#documentation": "The studio name that is used in the URL of the Nimble Studio portal when accessed\n by Nimble Studio users.
", - "smithy.api#required": {} - } - }, - "tags": { - "target": "com.amazonaws.nimble#Tags", - "traits": { - "smithy.api#documentation": "A collection of labels, in the form of key-value pairs, that apply to this\n resource.
" - } - }, - "userRoleArn": { - "target": "com.amazonaws.nimble#RoleArn", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "The IAM role that studio users will assume when logging in to the\n Nimble Studio portal.
", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#CreateStudioResponse": { - "type": "structure", - "members": { - "studio": { - "target": "com.amazonaws.nimble#Studio", - "traits": { - "smithy.api#documentation": "Information about a studio.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#DeleteLaunchProfile": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#DeleteLaunchProfileRequest" - }, - "output": { - "target": "com.amazonaws.nimble#DeleteLaunchProfileResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to delete a launch profile", - "smithy.api#documentation": "Permanently delete a launch profile.
", - "smithy.api#http": { - "method": "DELETE", - "uri": "/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}", - "code": 200 - }, - "smithy.api#idempotent": {} - } - }, - "com.amazonaws.nimble#DeleteLaunchProfileMember": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#DeleteLaunchProfileMemberRequest" - }, - "output": { - "target": "com.amazonaws.nimble#DeleteLaunchProfileMemberResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to delete a launch profile member", - "smithy.api#documentation": "Delete a user from launch profile membership.
", - "smithy.api#http": { - "method": "DELETE", - "uri": "/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/membership/{principalId}", - "code": 200 - }, - "smithy.api#idempotent": {} - } - }, - "com.amazonaws.nimble#DeleteLaunchProfileMemberRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "launchProfileId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the launch profile used to control access from the streaming session.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "principalId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The principal ID. This currently supports a IAM Identity Center UserId.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#DeleteLaunchProfileMemberResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#DeleteLaunchProfileRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "launchProfileId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the launch profile used to control access from the streaming session.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#DeleteLaunchProfileResponse": { - "type": "structure", - "members": { - "launchProfile": { - "target": "com.amazonaws.nimble#LaunchProfile", - "traits": { - "smithy.api#documentation": "The launch profile.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#DeleteStreamingImage": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#DeleteStreamingImageRequest" - }, - "output": { - "target": "com.amazonaws.nimble#DeleteStreamingImageResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to delete a streaming image", - "aws.iam#requiredActions": [ - "ec2:ModifyInstanceAttribute", - "ec2:ModifySnapshotAttribute", - "ec2:DeregisterImage", - "ec2:DeleteSnapshot" - ], - "smithy.api#documentation": "Delete streaming image.
", - "smithy.api#http": { - "method": "DELETE", - "uri": "/2020-08-01/studios/{studioId}/streaming-images/{streamingImageId}", - "code": 200 - }, - "smithy.api#idempotent": {} - } - }, - "com.amazonaws.nimble#DeleteStreamingImageRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "streamingImageId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The streaming image ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#DeleteStreamingImageResponse": { - "type": "structure", - "members": { - "streamingImage": { - "target": "com.amazonaws.nimble#StreamingImage", - "traits": { - "smithy.api#documentation": "The streaming image.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#DeleteStreamingSession": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#DeleteStreamingSessionRequest" - }, - "output": { - "target": "com.amazonaws.nimble#DeleteStreamingSessionResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to delete a streaming session", - "aws.iam#conditionKeys": [ - "nimble:requesterPrincipalId" - ], - "aws.iam#requiredActions": [ - "ec2:DeleteNetworkInterface" - ], - "smithy.api#documentation": "Deletes streaming session resource.
\nAfter invoking this operation, use GetStreamingSession to poll the resource until it\n transitions to a DELETED
state.
A streaming session will count against your streaming session quota until it is marked\n DELETED
.
Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "sessionId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The streaming session ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#DeleteStreamingSessionResponse": { - "type": "structure", - "members": { - "session": { - "target": "com.amazonaws.nimble#StreamingSession", - "traits": { - "smithy.api#documentation": "The session.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#DeleteStudio": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#DeleteStudioRequest" - }, - "output": { - "target": "com.amazonaws.nimble#DeleteStudioResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to delete a studio", - "aws.iam#requiredActions": [ - "sso:DeleteManagedApplicationInstance" - ], - "smithy.api#documentation": "Delete a studio resource.
", - "smithy.api#http": { - "method": "DELETE", - "uri": "/2020-08-01/studios/{studioId}", - "code": 200 - }, - "smithy.api#idempotent": {} - } - }, - "com.amazonaws.nimble#DeleteStudioComponent": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#DeleteStudioComponentRequest" - }, - "output": { - "target": "com.amazonaws.nimble#DeleteStudioComponentResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to delete a studio component", - "smithy.api#documentation": "Deletes a studio component resource.
", - "smithy.api#http": { - "method": "DELETE", - "uri": "/2020-08-01/studios/{studioId}/studio-components/{studioComponentId}", - "code": 200 - }, - "smithy.api#idempotent": {} - } - }, - "com.amazonaws.nimble#DeleteStudioComponentRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "studioComponentId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio component ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#DeleteStudioComponentResponse": { - "type": "structure", - "members": { - "studioComponent": { - "target": "com.amazonaws.nimble#StudioComponent", - "traits": { - "smithy.api#documentation": "Information about the studio component.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#DeleteStudioMember": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#DeleteStudioMemberRequest" - }, - "output": { - "target": "com.amazonaws.nimble#DeleteStudioMemberResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to delete a studio member", - "smithy.api#documentation": "Delete a user from studio membership.
", - "smithy.api#http": { - "method": "DELETE", - "uri": "/2020-08-01/studios/{studioId}/membership/{principalId}", - "code": 200 - }, - "smithy.api#idempotent": {} - } - }, - "com.amazonaws.nimble#DeleteStudioMemberRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "principalId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The principal ID. This currently supports a IAM Identity Center UserId.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#DeleteStudioMemberResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#DeleteStudioRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#DeleteStudioResponse": { - "type": "structure", - "members": { - "studio": { - "target": "com.amazonaws.nimble#Studio", - "traits": { - "smithy.api#documentation": "Information about a studio.
", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#DirectoryId": { - "type": "string" - }, - "com.amazonaws.nimble#EC2ImageId": { - "type": "string", - "traits": { - "smithy.api#pattern": "^ami-[0-9A-z]+$" - } - }, - "com.amazonaws.nimble#EC2SubnetId": { - "type": "string" - }, - "com.amazonaws.nimble#EC2SubnetIdList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#EC2SubnetId" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 6 - } - } - }, - "com.amazonaws.nimble#Eula": { - "type": "structure", - "members": { - "content": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The EULA content.
" - } - }, - "createdAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "smithy.api#documentation": "The ISO timestamp in seconds for when the resource was created.
" - } - }, - "eulaId": { - "target": "com.amazonaws.nimble#EulaId", - "traits": { - "smithy.api#documentation": "The EULA ID.
" - } - }, - "name": { - "target": "com.amazonaws.nimble#EulaName", - "traits": { - "smithy.api#documentation": "The name for the EULA.
" - } - }, - "updatedAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "smithy.api#documentation": "The ISO timestamp in seconds for when the resource was updated.
" - } - } - }, - "traits": { - "smithy.api#documentation": "Represents a EULA resource.
" - } - }, - "com.amazonaws.nimble#EulaAcceptance": { - "type": "structure", - "members": { - "acceptedAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "smithy.api#documentation": "The ISO timestamp in seconds for when the EULA was accepted.
" - } - }, - "acceptedBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the person who accepted the EULA.
" - } - }, - "accepteeId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the acceptee.
" - } - }, - "eulaAcceptanceId": { - "target": "com.amazonaws.nimble#EulaAcceptanceId", - "traits": { - "smithy.api#documentation": "The EULA acceptance ID.
" - } - }, - "eulaId": { - "target": "com.amazonaws.nimble#EulaId", - "traits": { - "smithy.api#documentation": "The EULA ID.
" - } - } - }, - "traits": { - "smithy.api#documentation": "The acceptance of a EULA, required to use Amazon-provided streaming images.
" - } - }, - "com.amazonaws.nimble#EulaAcceptanceId": { - "type": "string", - "traits": { - "smithy.api#documentation": "The EULA acceptance ID.
", - "smithy.api#length": { - "min": 0, - "max": 22 - }, - "smithy.api#pattern": "^[a-zA-Z0-9-_]*$" - } - }, - "com.amazonaws.nimble#EulaAcceptanceList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#EulaAcceptance" - } - }, - "com.amazonaws.nimble#EulaAcceptanceResource": { - "type": "resource", - "identifiers": { - "eulaAcceptanceId": { - "target": "com.amazonaws.nimble#EulaAcceptanceId" - } - }, - "create": { - "target": "com.amazonaws.nimble#AcceptEulas" - }, - "list": { - "target": "com.amazonaws.nimble#ListEulaAcceptances" - }, - "traits": { - "aws.api#arn": { - "template": "eula-acceptance/{eulaAcceptanceId}" - }, - "aws.iam#conditionKeys": [ - "aws:ResourceTag/${TagKey}", - "aws:RequestTag/${TagKey}", - "aws:TagKeys", - "nimble:studioId" - ], - "aws.iam#disableConditionKeyInference": {}, - "aws.iam#iamResource": { - "name": "eula-acceptance" - }, - "smithy.api#documentation": "Represents the acceptance of a EULA, specific to a studio" - } - }, - "com.amazonaws.nimble#EulaId": { - "type": "string", - "traits": { - "smithy.api#documentation": "Represents a EULA resource.
", - "smithy.api#length": { - "min": 0, - "max": 22 - }, - "smithy.api#pattern": "^[a-zA-Z0-9-_]*$" - } - }, - "com.amazonaws.nimble#EulaIdList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#String" - } - }, - "com.amazonaws.nimble#EulaList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#Eula" - } - }, - "com.amazonaws.nimble#EulaName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 64 - } - } - }, - "com.amazonaws.nimble#EulaResource": { - "type": "resource", - "identifiers": { - "eulaId": { - "target": "com.amazonaws.nimble#String" - } - }, - "read": { - "target": "com.amazonaws.nimble#GetEula" - }, - "list": { - "target": "com.amazonaws.nimble#ListEulas" - }, - "traits": { - "aws.api#arn": { - "template": "eula/{eulaId}" - }, - "aws.iam#conditionKeys": [ - "aws:ResourceTag/${TagKey}", - "aws:RequestTag/${TagKey}", - "aws:TagKeys" - ], - "aws.iam#disableConditionKeyInference": {}, - "aws.iam#iamResource": { - "name": "eula" - }, - "smithy.api#documentation": "Represents a EULA that is required to be accepted before the use of certain streaming images" - } - }, - "com.amazonaws.nimble#ExceptionContext": { - "type": "map", - "key": { - "target": "com.amazonaws.nimble#String" - }, - "value": { - "target": "com.amazonaws.nimble#String" - }, - "traits": { - "smithy.api#documentation": "ExceptionContext is a set of key-value pairs that provide you with more information\n about the error that occurred. For example, when the service returns a 404\n ResourceNotFound error, ExceptionContext will contain the key `resourceId` with the\n value of resource that was not found.
\n\n ExceptionContext
allows scripts and other programmatic clients to provide\n better error handling.
Get EULA.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/eulas/{eulaId}", - "code": 200 - }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.nimble#GetEulaRequest": { - "type": "structure", - "members": { - "eulaId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The EULA ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#GetEulaResponse": { - "type": "structure", - "members": { - "eula": { - "target": "com.amazonaws.nimble#Eula", - "traits": { - "smithy.api#documentation": "The EULA.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#GetLaunchProfile": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#GetLaunchProfileRequest" - }, - "output": { - "target": "com.amazonaws.nimble#GetLaunchProfileResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to get a launch profile", - "smithy.api#documentation": "Get a launch profile.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}", - "code": 200 - }, - "smithy.api#readonly": {}, - "smithy.waiters#waitable": { - "LaunchProfileReady": { - "documentation": "Wait until a LaunchProfile is Ready. Use this after invoking CreateLaunchProfile or UpdateLaunchProfile", - "minDelay": 5, - "maxDelay": 750, - "acceptors": [ - { - "state": "success", - "matcher": { - "output": { - "path": "launchProfile.state", - "expected": "READY", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "launchProfile.state", - "expected": "CREATE_FAILED", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "launchProfile.state", - "expected": "UPDATE_FAILED", - "comparator": "stringEquals" - } - } - } - ] - }, - "LaunchProfileDeleted": { - "documentation": "Wait until a LaunchProfile is Deleted. Use this after invoking DeleteLaunchProfile", - "minDelay": 5, - "maxDelay": 750, - "acceptors": [ - { - "state": "success", - "matcher": { - "output": { - "path": "launchProfile.state", - "expected": "DELETED", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "launchProfile.state", - "expected": "DELETE_FAILED", - "comparator": "stringEquals" - } - } - } - ] - } - } - } - }, - "com.amazonaws.nimble#GetLaunchProfileDetails": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#GetLaunchProfileDetailsRequest" - }, - "output": { - "target": "com.amazonaws.nimble#GetLaunchProfileDetailsResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to get a launch profile's details, which includes the summary of studio components and streaming images used by the launch profile", - "smithy.api#documentation": "Launch profile details include the launch profile resource and summary information of\n resources that are used by, or available to, the launch profile. This includes the name\n and description of all studio components used by the launch profiles, and the name and\n description of streaming images that can be used with this launch profile.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/details", - "code": 200 - }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.nimble#GetLaunchProfileDetailsRequest": { - "type": "structure", - "members": { - "launchProfileId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the launch profile used to control access from the streaming session.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#GetLaunchProfileDetailsResponse": { - "type": "structure", - "members": { - "launchProfile": { - "target": "com.amazonaws.nimble#LaunchProfile", - "traits": { - "smithy.api#documentation": "The launch profile.
" - } - }, - "streamingImages": { - "target": "com.amazonaws.nimble#StreamingImageList", - "traits": { - "smithy.api#documentation": "A collection of streaming images.
" - } - }, - "studioComponentSummaries": { - "target": "com.amazonaws.nimble#StudioComponentSummaryList", - "traits": { - "smithy.api#documentation": "A collection of studio component summaries.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#GetLaunchProfileInitialization": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#GetLaunchProfileInitializationRequest" - }, - "output": { - "target": "com.amazonaws.nimble#GetLaunchProfileInitializationResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to get a launch profile initialization. A launch profile initialization is a dereferenced version of a launch profile, including attached studio component connection information", - "aws.iam#requiredActions": [ - "ec2:DescribeSecurityGroups", - "fsx:DescribeFileSystems", - "ds:DescribeDirectories" - ], - "smithy.api#documentation": "Get a launch profile initialization.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/init", - "code": 200 - }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.nimble#GetLaunchProfileInitializationRequest": { - "type": "structure", - "members": { - "launchProfileId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the launch profile used to control access from the streaming session.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "launchProfileProtocolVersions": { - "target": "com.amazonaws.nimble#StringList", - "traits": { - "smithy.api#documentation": "The launch profile protocol versions supported by the client.
", - "smithy.api#httpQuery": "launchProfileProtocolVersions", - "smithy.api#required": {} - } - }, - "launchPurpose": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The launch purpose.
", - "smithy.api#httpQuery": "launchPurpose", - "smithy.api#required": {} - } - }, - "platform": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The platform where this Launch Profile will be used, either Windows or Linux.
", - "smithy.api#httpQuery": "platform", - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#GetLaunchProfileInitializationResponse": { - "type": "structure", - "members": { - "launchProfileInitialization": { - "target": "com.amazonaws.nimble#LaunchProfileInitialization", - "traits": { - "smithy.api#documentation": "The launch profile initialization.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#GetLaunchProfileMember": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#GetLaunchProfileMemberRequest" - }, - "output": { - "target": "com.amazonaws.nimble#GetLaunchProfileMemberResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to get a launch profile member", - "smithy.api#documentation": "Get a user persona in launch profile membership.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/membership/{principalId}", - "code": 200 - }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.nimble#GetLaunchProfileMemberRequest": { - "type": "structure", - "members": { - "launchProfileId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the launch profile used to control access from the streaming session.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "principalId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The principal ID. This currently supports a IAM Identity Center UserId.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#GetLaunchProfileMemberResponse": { - "type": "structure", - "members": { - "member": { - "target": "com.amazonaws.nimble#LaunchProfileMembership", - "traits": { - "smithy.api#documentation": "The member.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#GetLaunchProfileRequest": { - "type": "structure", - "members": { - "launchProfileId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the launch profile used to control access from the streaming session.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#GetLaunchProfileResponse": { - "type": "structure", - "members": { - "launchProfile": { - "target": "com.amazonaws.nimble#LaunchProfile", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The launch profile.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#GetStreamingImage": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#GetStreamingImageRequest" - }, - "output": { - "target": "com.amazonaws.nimble#GetStreamingImageResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to get a streaming image", - "smithy.api#documentation": "Get streaming image.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}/streaming-images/{streamingImageId}", - "code": 200 - }, - "smithy.api#readonly": {}, - "smithy.waiters#waitable": { - "StreamingImageReady": { - "documentation": "Wait until a StreamingImage is Ready. Use this after invoking CreateStreamingImage or UpdateStreamingImage", - "acceptors": [ - { - "state": "success", - "matcher": { - "output": { - "path": "streamingImage.state", - "expected": "READY", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "streamingImage.state", - "expected": "CREATE_FAILED", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "streamingImage.state", - "expected": "UPDATE_FAILED", - "comparator": "stringEquals" - } - } - } - ] - }, - "StreamingImageDeleted": { - "documentation": "Wait until a StreamingImage Deleted. Use this after invoking DeleteStreamingImage", - "acceptors": [ - { - "state": "success", - "matcher": { - "output": { - "path": "streamingImage.state", - "expected": "DELETED", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "streamingImage.state", - "expected": "DELETE_FAILED", - "comparator": "stringEquals" - } - } - } - ] - } - } - } - }, - "com.amazonaws.nimble#GetStreamingImageRequest": { - "type": "structure", - "members": { - "streamingImageId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The streaming image ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#GetStreamingImageResponse": { - "type": "structure", - "members": { - "streamingImage": { - "target": "com.amazonaws.nimble#StreamingImage", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The streaming image.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#GetStreamingSession": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#GetStreamingSessionRequest" - }, - "output": { - "target": "com.amazonaws.nimble#GetStreamingSessionResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to get a streaming session", - "aws.iam#conditionKeys": [ - "nimble:requesterPrincipalId" - ], - "smithy.api#documentation": "Gets StreamingSession resource.
\nInvoke this operation to poll for a streaming session state while creating or deleting\n a session.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}/streaming-sessions/{sessionId}", - "code": 200 - }, - "smithy.api#readonly": {}, - "smithy.waiters#waitable": { - "StreamingSessionReady": { - "minDelay": 10, - "maxDelay": 1800, - "documentation": "Wait until a StreamingSession is ready. Use this after invoking CreateStreamingSession, StartStreamingSession", - "acceptors": [ - { - "state": "success", - "matcher": { - "output": { - "path": "session.state", - "expected": "READY", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "session.state", - "expected": "CREATE_FAILED", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "session.state", - "expected": "START_FAILED", - "comparator": "stringEquals" - } - } - } - ] - }, - "StreamingSessionStopped": { - "minDelay": 5, - "maxDelay": 900, - "documentation": "Wait until a StreamingSessionStopped. Use this after invoking StopStreamingSession", - "acceptors": [ - { - "state": "success", - "matcher": { - "output": { - "path": "session.state", - "expected": "STOPPED", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "session.state", - "expected": "STOP_FAILED", - "comparator": "stringEquals" - } - } - } - ] - }, - "StreamingSessionDeleted": { - "minDelay": 5, - "maxDelay": 900, - "documentation": "Wait until a StreamingSessionDeleted. Use this after invoking DeleteStreamingSession", - "acceptors": [ - { - "state": "success", - "matcher": { - "output": { - "path": "session.state", - "expected": "DELETED", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "session.state", - "expected": "DELETE_FAILED", - "comparator": "stringEquals" - } - } - } - ] - } - } - } - }, - "com.amazonaws.nimble#GetStreamingSessionBackup": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#GetStreamingSessionBackupRequest" - }, - "output": { - "target": "com.amazonaws.nimble#GetStreamingSessionBackupResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to get a streaming session backup", - "aws.iam#conditionKeys": [ - "nimble:requesterPrincipalId" - ], - "smithy.api#documentation": "Gets StreamingSessionBackup
resource.
Invoke this operation to poll for a streaming session backup while stopping a\n streaming session.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}/streaming-session-backups/{backupId}", - "code": 200 - }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.nimble#GetStreamingSessionBackupRequest": { - "type": "structure", - "members": { - "backupId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the backup.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#GetStreamingSessionBackupResponse": { - "type": "structure", - "members": { - "streamingSessionBackup": { - "target": "com.amazonaws.nimble#StreamingSessionBackup", - "traits": { - "smithy.api#documentation": "Information about the streaming session backup.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#GetStreamingSessionRequest": { - "type": "structure", - "members": { - "sessionId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The streaming session ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#GetStreamingSessionResponse": { - "type": "structure", - "members": { - "session": { - "target": "com.amazonaws.nimble#StreamingSession", - "traits": { - "smithy.api#documentation": "The session.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#GetStreamingSessionStream": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#GetStreamingSessionStreamRequest" - }, - "output": { - "target": "com.amazonaws.nimble#GetStreamingSessionStreamResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to get a streaming session", - "aws.iam#conditionKeys": [ - "nimble:requesterPrincipalId" - ], - "smithy.api#documentation": "Gets a StreamingSessionStream for a streaming session.
\nInvoke this operation to poll the resource after invoking\n CreateStreamingSessionStream
.
After the StreamingSessionStream
changes to the READY
state,\n the url property will contain a stream to be used with the DCV streaming client.
The streaming session ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "streamId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The streaming session stream ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#GetStreamingSessionStreamResponse": { - "type": "structure", - "members": { - "stream": { - "target": "com.amazonaws.nimble#StreamingSessionStream", - "traits": { - "smithy.api#documentation": "The stream.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#GetStudio": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#GetStudioRequest" - }, - "output": { - "target": "com.amazonaws.nimble#GetStudioResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to get a studio", - "smithy.api#documentation": "Get a studio resource.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}", - "code": 200 - }, - "smithy.api#readonly": {}, - "smithy.waiters#waitable": { - "StudioReady": { - "documentation": "Wait until a Studio is Ready. Use this after invoking CreateStudio, UpdateStudio, or StartStudioSSOConfigurationRepair", - "acceptors": [ - { - "state": "success", - "matcher": { - "output": { - "path": "studio.state", - "expected": "READY", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "studio.state", - "expected": "CREATE_FAILED", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "studio.state", - "expected": "UPDATE_FAILED", - "comparator": "stringEquals" - } - } - } - ] - }, - "StudioDeleted": { - "documentation": "Wait until a Studio is Deleted. Use this after invoking DeleteStudio.", - "acceptors": [ - { - "state": "success", - "matcher": { - "output": { - "path": "studio.state", - "expected": "DELETED", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "studio.state", - "expected": "DELETE_FAILED", - "comparator": "stringEquals" - } - } - } - ] - } - } - } - }, - "com.amazonaws.nimble#GetStudioComponent": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#GetStudioComponentRequest" - }, - "output": { - "target": "com.amazonaws.nimble#GetStudioComponentResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to get a studio component", - "smithy.api#documentation": "Gets a studio component resource.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}/studio-components/{studioComponentId}", - "code": 200 - }, - "smithy.api#readonly": {}, - "smithy.waiters#waitable": { - "StudioComponentReady": { - "documentation": "Wait until a StudioComponent is Ready. Use this after invoking CreateStudioComponent or UpdateStudioComponent", - "acceptors": [ - { - "state": "success", - "matcher": { - "output": { - "path": "studioComponent.state", - "expected": "READY", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "studioComponent.state", - "expected": "CREATE_FAILED", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "studioComponent.state", - "expected": "UPDATE_FAILED", - "comparator": "stringEquals" - } - } - } - ] - }, - "StudioComponentDeleted": { - "minDelay": 1, - "maxDelay": 120, - "documentation": "Wait until a StudioComponent Deleted. Use this after invoking DeleteStudioComponent", - "acceptors": [ - { - "state": "success", - "matcher": { - "output": { - "path": "studioComponent.state", - "expected": "DELETED", - "comparator": "stringEquals" - } - } - }, - { - "state": "failure", - "matcher": { - "output": { - "path": "studioComponent.state", - "expected": "DELETE_FAILED", - "comparator": "stringEquals" - } - } - } - ] - } - } - } - }, - "com.amazonaws.nimble#GetStudioComponentRequest": { - "type": "structure", - "members": { - "studioComponentId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio component ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#GetStudioComponentResponse": { - "type": "structure", - "members": { - "studioComponent": { - "target": "com.amazonaws.nimble#StudioComponent", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "Information about the studio component.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#GetStudioMember": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#GetStudioMemberRequest" - }, - "output": { - "target": "com.amazonaws.nimble#GetStudioMemberResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to delete a studio member", - "smithy.api#documentation": "Get a user's membership in a studio.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}/membership/{principalId}", - "code": 200 - }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.nimble#GetStudioMemberRequest": { - "type": "structure", - "members": { - "principalId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The principal ID. This currently supports a IAM Identity Center UserId.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#GetStudioMemberResponse": { - "type": "structure", - "members": { - "member": { - "target": "com.amazonaws.nimble#StudioMembership", - "traits": { - "smithy.api#documentation": "The member.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#GetStudioRequest": { - "type": "structure", - "members": { - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#GetStudioResponse": { - "type": "structure", - "members": { - "studio": { - "target": "com.amazonaws.nimble#Studio", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "Information about a studio.
", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#InternalServerErrorException": { - "type": "structure", - "members": { - "code": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "A more specific error code.
" - } - }, - "context": { - "target": "com.amazonaws.nimble#ExceptionContext", - "traits": { - "smithy.api#documentation": "The exception context.
" - } - }, - "message": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "A human-readable description of the error.
" - } - } - }, - "traits": { - "smithy.api#documentation": "An internal error has occurred. Please retry your request.
", - "smithy.api#error": "server", - "smithy.api#httpError": 500, - "smithy.api#retryable": {} - } - }, - "com.amazonaws.nimble#LaunchProfile": { - "type": "structure", - "members": { - "arn": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The Amazon Resource Name (ARN) that is assigned to a studio resource and uniquely\n identifies it. ARNs are unique across all Regions.
" - } - }, - "createdAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The ISO timestamp in seconds for when the resource was created.
" - } - }, - "createdBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The user ID of the user that created the launch profile.
" - } - }, - "description": { - "target": "com.amazonaws.nimble#LaunchProfileDescription", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "A human-readable description of the launch profile.
" - } - }, - "ec2SubnetIds": { - "target": "com.amazonaws.nimble#EC2SubnetIdList", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "Unique identifiers for a collection of EC2 subnets.
" - } - }, - "launchProfileId": { - "target": "com.amazonaws.nimble#LaunchProfileId", - "traits": { - "smithy.api#documentation": "The ID of the launch profile used to control access from the streaming session.
" - } - }, - "launchProfileProtocolVersions": { - "target": "com.amazonaws.nimble#LaunchProfileProtocolVersionList", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "The version number of the protocol that is used by the launch profile. The only valid\n version is \"2021-03-31\".
" - } - }, - "name": { - "target": "com.amazonaws.nimble#LaunchProfileName", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "A friendly name for the launch profile.
" - } - }, - "state": { - "target": "com.amazonaws.nimble#LaunchProfileState", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The current state.
" - } - }, - "statusCode": { - "target": "com.amazonaws.nimble#LaunchProfileStatusCode", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The status code.
" - } - }, - "statusMessage": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The status message for the launch profile.
" - } - }, - "streamConfiguration": { - "target": "com.amazonaws.nimble#StreamConfiguration", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "A configuration for a streaming session.
" - } - }, - "studioComponentIds": { - "target": "com.amazonaws.nimble#LaunchProfileStudioComponentIdList", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "Unique identifiers for a collection of studio components that can be used with this\n launch profile.
" - } - }, - "tags": { - "target": "com.amazonaws.nimble#Tags", - "traits": { - "aws.cloudformation#cfnMutability": "create-and-read", - "smithy.api#documentation": "A collection of labels, in the form of key-value pairs, that apply to this\n resource.
" - } - }, - "updatedAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The ISO timestamp in seconds for when the resource was updated.
" - } - }, - "updatedBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The user ID of the user that most recently updated the resource.
" - } - }, - "validationResults": { - "target": "com.amazonaws.nimble#ValidationResults", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The list of the latest validation results.
" - } - } - }, - "traits": { - "smithy.api#documentation": "A launch profile controls your artist workforce’s access to studio components, like\n compute farms, shared file systems, managed file systems, and license server\n configurations, as well as instance types and Amazon Machine Images (AMIs).
\nStudio administrators create launch profiles in the Nimble Studio console.\n Artists can use their launch profiles to launch an instance from the Nimble Studio\n portal. Each user’s launch profile defines how they can launch a streaming session. By\n default, studio admins can use all launch profiles.
" - } - }, - "com.amazonaws.nimble#LaunchProfileDescription": { - "type": "string", - "traits": { - "smithy.api#documentation": "A human-readable description of the launch profile.
", - "smithy.api#length": { - "min": 0, - "max": 256 - }, - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.nimble#LaunchProfileId": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 22 - }, - "smithy.api#pattern": "^[a-zA-Z0-9-_]*$" - } - }, - "com.amazonaws.nimble#LaunchProfileInitialization": { - "type": "structure", - "members": { - "activeDirectory": { - "target": "com.amazonaws.nimble#LaunchProfileInitializationActiveDirectory", - "traits": { - "smithy.api#documentation": "A LaunchProfileInitializationActiveDirectory
resource.
The EC2 security groups that control access to the studio component.
" - } - }, - "launchProfileId": { - "target": "com.amazonaws.nimble#LaunchProfileId", - "traits": { - "smithy.api#documentation": "The ID of the launch profile used to control access from the streaming session.
" - } - }, - "launchProfileProtocolVersion": { - "target": "com.amazonaws.nimble#LaunchProfileProtocolVersion", - "traits": { - "smithy.api#documentation": "The version number of the protocol that is used by the launch profile. The only valid\n version is \"2021-03-31\".
" - } - }, - "launchPurpose": { - "target": "com.amazonaws.nimble#LaunchPurpose", - "traits": { - "smithy.api#documentation": "The launch purpose.
" - } - }, - "name": { - "target": "com.amazonaws.nimble#LaunchProfileName", - "traits": { - "smithy.api#documentation": "The name for the launch profile.
" - } - }, - "platform": { - "target": "com.amazonaws.nimble#LaunchProfilePlatform", - "traits": { - "smithy.api#documentation": "The platform of the launch platform, either Windows or Linux.
" - } - }, - "systemInitializationScripts": { - "target": "com.amazonaws.nimble#LaunchProfileInitializationScriptList", - "traits": { - "smithy.api#documentation": "The system initializtion scripts.
" - } - }, - "userInitializationScripts": { - "target": "com.amazonaws.nimble#LaunchProfileInitializationScriptList", - "traits": { - "smithy.api#documentation": "The user initializtion scripts.
" - } - } - }, - "traits": { - "smithy.api#documentation": "A launch profile initialization contains information required for a workstation or\n server to connect to a launch profile.
\nThis includes scripts, endpoints, security groups, subnets, and other\n configuration.
" - } - }, - "com.amazonaws.nimble#LaunchProfileInitializationActiveDirectory": { - "type": "structure", - "members": { - "computerAttributes": { - "target": "com.amazonaws.nimble#ActiveDirectoryComputerAttributeList", - "traits": { - "smithy.api#documentation": "A collection of custom attributes for an Active Directory computer.
" - } - }, - "directoryId": { - "target": "com.amazonaws.nimble#DirectoryId", - "traits": { - "smithy.api#documentation": "The directory ID of the Directory Service for Microsoft Active Directory to access using this launch\n profile.
" - } - }, - "directoryName": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The directory name.
" - } - }, - "dnsIpAddresses": { - "target": "com.amazonaws.nimble#ActiveDirectoryDnsIpAddressList", - "traits": { - "smithy.api#documentation": "The DNS IP address.
" - } - }, - "organizationalUnitDistinguishedName": { - "target": "com.amazonaws.nimble#ActiveDirectoryOrganizationalUnitDistinguishedName", - "traits": { - "smithy.api#documentation": "The name for the organizational unit distinguished name.
" - } - }, - "studioComponentId": { - "target": "com.amazonaws.nimble#StudioComponentId", - "traits": { - "smithy.api#documentation": "The unique identifier for a studio component resource.
" - } - }, - "studioComponentName": { - "target": "com.amazonaws.nimble#StudioComponentName", - "traits": { - "smithy.api#documentation": "The name for the studio component.
" - } - } - }, - "traits": { - "smithy.api#documentation": "The launch profile initialization Active Directory contains information required for\n the launch profile to connect to the Active Directory.
" - } - }, - "com.amazonaws.nimble#LaunchProfileInitializationScript": { - "type": "structure", - "members": { - "script": { - "target": "com.amazonaws.nimble#StudioComponentInitializationScriptContent", - "traits": { - "smithy.api#documentation": "The initialization script.
" - } - }, - "studioComponentId": { - "target": "com.amazonaws.nimble#StudioComponentId", - "traits": { - "smithy.api#documentation": "The unique identifier for a studio component resource.
" - } - }, - "studioComponentName": { - "target": "com.amazonaws.nimble#StudioComponentName", - "traits": { - "smithy.api#documentation": "The name for the studio component.
" - } - }, - "secureInitializationRoleArn": { - "target": "com.amazonaws.nimble#RoleArn", - "traits": { - "smithy.api#documentation": "An IAM role attached to Studio Component when the system initialization\n script runs which give the studio component access to Amazon Web Services resources when\n the system initialization script runs.
" - } - }, - "runtimeRoleArn": { - "target": "com.amazonaws.nimble#RoleArn", - "traits": { - "smithy.api#documentation": "An IAM role attached to a Studio Component that gives the studio\n component access to Amazon Web Services resources at anytime while the instance is\n running.
" - } - } - }, - "traits": { - "smithy.api#documentation": "The launch profile initialization script is used when start streaming session\n runs.
" - } - }, - "com.amazonaws.nimble#LaunchProfileInitializationScriptList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#LaunchProfileInitializationScript" - } - }, - "com.amazonaws.nimble#LaunchProfileList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#LaunchProfile" - } - }, - "com.amazonaws.nimble#LaunchProfileMembership": { - "type": "structure", - "members": { - "identityStoreId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the identity store.
" - } - }, - "persona": { - "target": "com.amazonaws.nimble#LaunchProfilePersona", - "traits": { - "smithy.api#documentation": "The persona.
" - } - }, - "principalId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The principal ID.
" - } - }, - "sid": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The Active Directory Security Identifier for this user, if available.
" - } - } - }, - "traits": { - "smithy.api#documentation": "Studio admins can use launch profile membership to delegate launch profile access to\n studio users in the Nimble Studio portal without writing or maintaining complex\n IAM policies. A launch profile member is a user association from your\n studio identity source who is granted permissions to a launch profile.
\nA launch profile member (type USER) provides the following permissions to that launch\n profile:
\nGetLaunchProfile
\nGetLaunchProfileInitialization
\nGetLaunchProfileMembers
\nGetLaunchProfileMember
\nCreateStreamingSession
\nGetLaunchProfileDetails
\nThe version number of the protocol that is used by the launch profile. The only valid\n version is \"2021-03-31\".
", - "smithy.api#length": { - "min": 0, - "max": 10 - }, - "smithy.api#pattern": "^2021\\-03\\-31$" - } - }, - "com.amazonaws.nimble#LaunchProfileProtocolVersionList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#LaunchProfileProtocolVersion" - } - }, - "com.amazonaws.nimble#LaunchProfileResource": { - "type": "resource", - "identifiers": { - "launchProfileId": { - "target": "com.amazonaws.nimble#String" - } - }, - "create": { - "target": "com.amazonaws.nimble#CreateLaunchProfile" - }, - "read": { - "target": "com.amazonaws.nimble#GetLaunchProfile" - }, - "update": { - "target": "com.amazonaws.nimble#UpdateLaunchProfile" - }, - "delete": { - "target": "com.amazonaws.nimble#DeleteLaunchProfile" - }, - "list": { - "target": "com.amazonaws.nimble#ListLaunchProfiles" - }, - "operations": [ - { - "target": "com.amazonaws.nimble#DeleteLaunchProfileMember" - }, - { - "target": "com.amazonaws.nimble#GetLaunchProfileDetails" - }, - { - "target": "com.amazonaws.nimble#GetLaunchProfileInitialization" - }, - { - "target": "com.amazonaws.nimble#GetLaunchProfileMember" - }, - { - "target": "com.amazonaws.nimble#ListLaunchProfileMembers" - }, - { - "target": "com.amazonaws.nimble#PutLaunchProfileMembers" - }, - { - "target": "com.amazonaws.nimble#UpdateLaunchProfileMember" - } - ], - "traits": { - "aws.api#arn": { - "template": "launch-profile/{launchProfileId}" - }, - "aws.cloudformation#cfnResource": { - "name": "LaunchProfile", - "additionalSchemas": [ - "com.amazonaws.nimble#LaunchProfile" - ] - }, - "aws.iam#conditionKeys": [ - "aws:ResourceTag/${TagKey}", - "aws:RequestTag/${TagKey}", - "aws:TagKeys", - "nimble:studioId" - ], - "aws.iam#disableConditionKeyInference": {}, - "aws.iam#iamResource": { - "name": "launch-profile" - }, - "smithy.api#documentation": "Represents a launch profile which delegates access to a collection of studio components to studio users", - "smithy.api#externalDocumentation": { - "CFNSourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-nimblestudio" - } - } - }, - "com.amazonaws.nimble#LaunchProfileSecurityGroupIdList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#SecurityGroupId" - }, - "traits": { - "smithy.api#length": { - "min": 1 - } - } - }, - "com.amazonaws.nimble#LaunchProfileState": { - "type": "enum", - "members": { - "CREATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CREATE_IN_PROGRESS" - } - }, - "READY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "READY" - } - }, - "UPDATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "UPDATE_IN_PROGRESS" - } - }, - "DELETE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETE_IN_PROGRESS" - } - }, - "DELETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETED" - } - }, - "DELETE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETE_FAILED" - } - }, - "CREATE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CREATE_FAILED" - } - }, - "UPDATE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "UPDATE_FAILED" - } - } - } - }, - "com.amazonaws.nimble#LaunchProfileStateList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#LaunchProfileState" - } - }, - "com.amazonaws.nimble#LaunchProfileStatusCode": { - "type": "enum", - "members": { - "LAUNCH_PROFILE_CREATED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "LAUNCH_PROFILE_CREATED" - } - }, - "LAUNCH_PROFILE_UPDATED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "LAUNCH_PROFILE_UPDATED" - } - }, - "LAUNCH_PROFILE_DELETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "LAUNCH_PROFILE_DELETED" - } - }, - "LAUNCH_PROFILE_CREATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "LAUNCH_PROFILE_CREATE_IN_PROGRESS" - } - }, - "LAUNCH_PROFILE_UPDATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "LAUNCH_PROFILE_UPDATE_IN_PROGRESS" - } - }, - "LAUNCH_PROFILE_DELETE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "LAUNCH_PROFILE_DELETE_IN_PROGRESS" - } - }, - "INTERNAL_ERROR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INTERNAL_ERROR" - } - }, - "STREAMING_IMAGE_NOT_FOUND": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAMING_IMAGE_NOT_FOUND" - } - }, - "STREAMING_IMAGE_NOT_READY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAMING_IMAGE_NOT_READY" - } - }, - "LAUNCH_PROFILE_WITH_STREAM_SESSIONS_NOT_DELETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "LAUNCH_PROFILE_WITH_STREAM_SESSIONS_NOT_DELETED" - } - }, - "ENCRYPTION_KEY_ACCESS_DENIED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ENCRYPTION_KEY_ACCESS_DENIED" - } - }, - "ENCRYPTION_KEY_NOT_FOUND": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ENCRYPTION_KEY_NOT_FOUND" - } - }, - "INVALID_SUBNETS_PROVIDED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INVALID_SUBNETS_PROVIDED" - } - }, - "INVALID_INSTANCE_TYPES_PROVIDED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INVALID_INSTANCE_TYPES_PROVIDED" - } - }, - "INVALID_SUBNETS_COMBINATION": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INVALID_SUBNETS_COMBINATION" - } - } - } - }, - "com.amazonaws.nimble#LaunchProfileStudioComponentIdList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#String" - }, - "traits": { - "smithy.api#length": { - "min": 1, - "max": 100 - } - } - }, - "com.amazonaws.nimble#LaunchProfileValidationState": { - "type": "enum", - "members": { - "VALIDATION_NOT_STARTED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATION_NOT_STARTED" - } - }, - "VALIDATION_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATION_IN_PROGRESS" - } - }, - "VALIDATION_SUCCESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATION_SUCCESS" - } - }, - "VALIDATION_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATION_FAILED" - } - }, - "VALIDATION_FAILED_INTERNAL_SERVER_ERROR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATION_FAILED_INTERNAL_SERVER_ERROR" - } - } - } - }, - "com.amazonaws.nimble#LaunchProfileValidationStatusCode": { - "type": "enum", - "members": { - "VALIDATION_NOT_STARTED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATION_NOT_STARTED" - } - }, - "VALIDATION_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATION_IN_PROGRESS" - } - }, - "VALIDATION_SUCCESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATION_SUCCESS" - } - }, - "VALIDATION_FAILED_INVALID_SUBNET_ROUTE_TABLE_ASSOCIATION": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATION_FAILED_INVALID_SUBNET_ROUTE_TABLE_ASSOCIATION" - } - }, - "VALIDATION_FAILED_SUBNET_NOT_FOUND": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATION_FAILED_SUBNET_NOT_FOUND" - } - }, - "VALIDATION_FAILED_INVALID_SECURITY_GROUP_ASSOCIATION": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATION_FAILED_INVALID_SECURITY_GROUP_ASSOCIATION" - } - }, - "VALIDATION_FAILED_INVALID_ACTIVE_DIRECTORY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATION_FAILED_INVALID_ACTIVE_DIRECTORY" - } - }, - "VALIDATION_FAILED_UNAUTHORIZED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATION_FAILED_UNAUTHORIZED" - } - }, - "VALIDATION_FAILED_INTERNAL_SERVER_ERROR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATION_FAILED_INTERNAL_SERVER_ERROR" - } - } - } - }, - "com.amazonaws.nimble#LaunchProfileValidationStatusMessage": { - "type": "string" - }, - "com.amazonaws.nimble#LaunchProfileValidationType": { - "type": "enum", - "members": { - "VALIDATE_ACTIVE_DIRECTORY_STUDIO_COMPONENT": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATE_ACTIVE_DIRECTORY_STUDIO_COMPONENT" - } - }, - "VALIDATE_SUBNET_ASSOCIATION": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATE_SUBNET_ASSOCIATION" - } - }, - "VALIDATE_NETWORK_ACL_ASSOCIATION": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATE_NETWORK_ACL_ASSOCIATION" - } - }, - "VALIDATE_SECURITY_GROUP_ASSOCIATION": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VALIDATE_SECURITY_GROUP_ASSOCIATION" - } - } - } - }, - "com.amazonaws.nimble#LaunchPurpose": { - "type": "string", - "traits": { - "smithy.api#documentation": "The launch purpose.
", - "smithy.api#length": { - "min": 0, - "max": 64 - }, - "smithy.api#pattern": "^[A-Z0-9_]+$" - } - }, - "com.amazonaws.nimble#LicenseServiceConfiguration": { - "type": "structure", - "members": { - "endpoint": { - "target": "com.amazonaws.nimble#SensitiveString", - "traits": { - "smithy.api#documentation": "The endpoint of the license service that is accessed by the studio component\n resource.
" - } - } - }, - "traits": { - "smithy.api#documentation": "The configuration for a license service that is associated with a studio\n resource.
" - } - }, - "com.amazonaws.nimble#LinuxMountPoint": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 128 - }, - "smithy.api#pattern": "^(/?|(\\$HOME)?(/[^/\\n\\s\\\\]+)*)$", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.nimble#ListEulaAcceptances": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#ListEulaAcceptancesRequest" - }, - "output": { - "target": "com.amazonaws.nimble#ListEulaAcceptancesResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to list EULA acceptances", - "smithy.api#documentation": "List EULA acceptances.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}/eula-acceptances", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "items": "eulaAcceptances" - }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.nimble#ListEulaAcceptancesRequest": { - "type": "structure", - "members": { - "eulaIds": { - "target": "com.amazonaws.nimble#StringList", - "traits": { - "smithy.api#documentation": "The list of EULA IDs that have been previously accepted.
", - "smithy.api#httpQuery": "eulaIds" - } - }, - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
", - "smithy.api#httpQuery": "nextToken" - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#ListEulaAcceptancesResponse": { - "type": "structure", - "members": { - "eulaAcceptances": { - "target": "com.amazonaws.nimble#EulaAcceptanceList", - "traits": { - "smithy.api#documentation": "A collection of EULA acceptances.
" - } - }, - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#ListEulas": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#ListEulasRequest" - }, - "output": { - "target": "com.amazonaws.nimble#ListEulasResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to list EULAs", - "smithy.api#documentation": "List EULAs.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/eulas", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "items": "eulas" - }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.nimble#ListEulasRequest": { - "type": "structure", - "members": { - "eulaIds": { - "target": "com.amazonaws.nimble#StringList", - "traits": { - "smithy.api#documentation": "The list of EULA IDs that should be returned
", - "smithy.api#httpQuery": "eulaIds" - } - }, - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
", - "smithy.api#httpQuery": "nextToken" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#ListEulasResponse": { - "type": "structure", - "members": { - "eulas": { - "target": "com.amazonaws.nimble#EulaList", - "traits": { - "smithy.api#documentation": "A collection of EULA resources.
" - } - }, - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#ListLaunchProfileMembers": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#ListLaunchProfileMembersRequest" - }, - "output": { - "target": "com.amazonaws.nimble#ListLaunchProfileMembersResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to list launch profile members", - "smithy.api#documentation": "Get all users in a given launch profile membership.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/membership", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "pageSize": "maxResults", - "items": "members" - }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.nimble#ListLaunchProfileMembersRequest": { - "type": "structure", - "members": { - "launchProfileId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the launch profile used to control access from the streaming session.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "maxResults": { - "target": "com.amazonaws.nimble#MaxResults", - "traits": { - "smithy.api#default": 100, - "smithy.api#documentation": "The max number of results to return in the response.
", - "smithy.api#httpQuery": "maxResults" - } - }, - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
", - "smithy.api#httpQuery": "nextToken" - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#ListLaunchProfileMembersResponse": { - "type": "structure", - "members": { - "members": { - "target": "com.amazonaws.nimble#LaunchProfileMembershipList", - "traits": { - "smithy.api#documentation": "A list of members.
" - } - }, - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#ListLaunchProfiles": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#ListLaunchProfilesRequest" - }, - "output": { - "target": "com.amazonaws.nimble#ListLaunchProfilesResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to list launch profiles", - "aws.iam#conditionKeys": [ - "nimble:principalId", - "nimble:requesterPrincipalId" - ], - "smithy.api#documentation": "List all the launch profiles a studio.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}/launch-profiles", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "pageSize": "maxResults", - "items": "launchProfiles" - }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.nimble#ListLaunchProfilesRequest": { - "type": "structure", - "members": { - "maxResults": { - "target": "com.amazonaws.nimble#MaxResults", - "traits": { - "smithy.api#default": 100, - "smithy.api#documentation": "The max number of results to return in the response.
", - "smithy.api#httpQuery": "maxResults" - } - }, - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
", - "smithy.api#httpQuery": "nextToken" - } - }, - "principalId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The principal ID. This currently supports a IAM Identity Center UserId.
", - "smithy.api#httpQuery": "principalId" - } - }, - "states": { - "target": "com.amazonaws.nimble#LaunchProfileStateList", - "traits": { - "smithy.api#documentation": "Filter this request to launch profiles in any of the given states.
", - "smithy.api#httpQuery": "states" - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#ListLaunchProfilesResponse": { - "type": "structure", - "members": { - "launchProfiles": { - "target": "com.amazonaws.nimble#LaunchProfileList", - "traits": { - "smithy.api#documentation": "A collection of launch profiles.
" - } - }, - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#ListStreamingImages": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#ListStreamingImagesRequest" - }, - "output": { - "target": "com.amazonaws.nimble#ListStreamingImagesResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to list streaming images", - "smithy.api#documentation": "List the streaming image resources available to this studio.
\nThis list will contain both images provided by Amazon Web Services, as well as\n streaming images that you have created in your studio.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}/streaming-images", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "items": "streamingImages" - }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.nimble#ListStreamingImagesRequest": { - "type": "structure", - "members": { - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
", - "smithy.api#httpQuery": "nextToken" - } - }, - "owner": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "Filter this request to streaming images with the given owner
", - "smithy.api#httpQuery": "owner" - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#ListStreamingImagesResponse": { - "type": "structure", - "members": { - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
" - } - }, - "streamingImages": { - "target": "com.amazonaws.nimble#StreamingImageList", - "traits": { - "smithy.api#documentation": "A collection of streaming images.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#ListStreamingSessionBackups": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#ListStreamingSessionBackupsRequest" - }, - "output": { - "target": "com.amazonaws.nimble#ListStreamingSessionBackupsResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to list streaming session backups", - "aws.iam#conditionKeys": [ - "nimble:ownedBy", - "nimble:requesterPrincipalId" - ], - "smithy.api#documentation": "Lists the backups of a streaming session in a studio.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}/streaming-session-backups", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "items": "streamingSessionBackups" - }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.nimble#ListStreamingSessionBackupsRequest": { - "type": "structure", - "members": { - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
", - "smithy.api#httpQuery": "nextToken" - } - }, - "ownedBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The user ID of the user that owns the streaming session.
", - "smithy.api#httpQuery": "ownedBy" - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#ListStreamingSessionBackupsResponse": { - "type": "structure", - "members": { - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
" - } - }, - "streamingSessionBackups": { - "target": "com.amazonaws.nimble#StreamingSessionBackupList", - "traits": { - "smithy.api#documentation": "Information about the streaming session backups.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#ListStreamingSessions": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#ListStreamingSessionsRequest" - }, - "output": { - "target": "com.amazonaws.nimble#ListStreamingSessionsResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to list streaming sessions", - "aws.iam#conditionKeys": [ - "nimble:createdBy", - "nimble:ownedBy", - "nimble:requesterPrincipalId" - ], - "smithy.api#documentation": "Lists the streaming sessions in a studio.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios/{studioId}/streaming-sessions", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "items": "sessions" - }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.nimble#ListStreamingSessionsRequest": { - "type": "structure", - "members": { - "createdBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "Filters the request to streaming sessions created by the given user.
", - "smithy.api#httpQuery": "createdBy" - } - }, - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
", - "smithy.api#httpQuery": "nextToken" - } - }, - "ownedBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "Filters the request to streaming session owned by the given user
", - "smithy.api#httpQuery": "ownedBy" - } - }, - "sessionIds": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "Filters the request to only the provided session IDs.
", - "smithy.api#httpQuery": "sessionIds" - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#ListStreamingSessionsResponse": { - "type": "structure", - "members": { - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
" - } - }, - "sessions": { - "target": "com.amazonaws.nimble#StreamingSessionList", - "traits": { - "smithy.api#documentation": "A collection of streaming sessions.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#ListStudioComponents": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#ListStudioComponentsRequest" - }, - "output": { - "target": "com.amazonaws.nimble#ListStudioComponentsResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to list studio components", - "smithy.api#documentation": "Lists the StudioComponents
in a studio.
The max number of results to return in the response.
", - "smithy.api#httpQuery": "maxResults" - } - }, - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
", - "smithy.api#httpQuery": "nextToken" - } - }, - "states": { - "target": "com.amazonaws.nimble#StudioComponentStateList", - "traits": { - "smithy.api#documentation": "Filters the request to studio components that are in one of the given states.
", - "smithy.api#httpQuery": "states" - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "types": { - "target": "com.amazonaws.nimble#StudioComponentTypeList", - "traits": { - "smithy.api#documentation": "Filters the request to studio components that are of one of the given types.
", - "smithy.api#httpQuery": "types" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#ListStudioComponentsResponse": { - "type": "structure", - "members": { - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
" - } - }, - "studioComponents": { - "target": "com.amazonaws.nimble#StudioComponentList", - "traits": { - "smithy.api#documentation": "A collection of studio components.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#ListStudioMembers": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#ListStudioMembersRequest" - }, - "output": { - "target": "com.amazonaws.nimble#ListStudioMembersResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to list studio members", - "smithy.api#documentation": "Get all users in a given studio membership.
\n\n ListStudioMembers
only returns admin members.
The max number of results to return in the response.
", - "smithy.api#httpQuery": "maxResults" - } - }, - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
", - "smithy.api#httpQuery": "nextToken" - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#ListStudioMembersResponse": { - "type": "structure", - "members": { - "members": { - "target": "com.amazonaws.nimble#StudioMembershipList", - "traits": { - "smithy.api#documentation": "A list of admin members.
" - } - }, - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#ListStudios": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#ListStudiosRequest" - }, - "output": { - "target": "com.amazonaws.nimble#ListStudiosResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to list studios", - "smithy.api#documentation": "List studios in your Amazon Web Services accounts in the requested Amazon Web Services Region.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/studios", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "items": "studios" - }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.nimble#ListStudiosRequest": { - "type": "structure", - "members": { - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
", - "smithy.api#httpQuery": "nextToken" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#ListStudiosResponse": { - "type": "structure", - "members": { - "nextToken": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The token for the next set of results, or null if there are no more results.
" - } - }, - "studios": { - "target": "com.amazonaws.nimble#StudioList", - "traits": { - "smithy.api#documentation": "A collection of studios.
", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#ListTagsForResource": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#ListTagsForResourceRequest" - }, - "output": { - "target": "com.amazonaws.nimble#ListTagsForResourceResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to list all tags on a Nimble Studio resource", - "smithy.api#documentation": "Gets the tags for a resource, given its Amazon Resource Names (ARN).
\nThis operation supports ARNs for all resource types in Nimble Studio that support\n tags, including studio, studio component, launch profile, streaming image, and streaming\n session. All resources that can be tagged will contain an ARN property, so you do not\n have to create this ARN yourself.
", - "smithy.api#http": { - "method": "GET", - "uri": "/2020-08-01/tags/{resourceArn}", - "code": 200 - }, - "smithy.api#readonly": {} - } - }, - "com.amazonaws.nimble#ListTagsForResourceRequest": { - "type": "structure", - "members": { - "resourceArn": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the resource for which you want to list tags.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {}, - "smithy.api#references": [ - { - "resource": "com.amazonaws.nimble#StudioResource", - "ids": { - "studioId": "resourceArn" - } - }, - { - "resource": "com.amazonaws.nimble#StudioComponentResource", - "ids": { - "studioComponentId": "resourceArn" - } - }, - { - "resource": "com.amazonaws.nimble#LaunchProfileResource", - "ids": { - "launchProfileId": "resourceArn" - } - }, - { - "resource": "com.amazonaws.nimble#StreamingSessionResource", - "ids": { - "sessionId": "resourceArn" - } - }, - { - "resource": "com.amazonaws.nimble#StreamingImageResource", - "ids": { - "streamingImageId": "resourceArn" - } - } - ] - } - }, - "com.amazonaws.nimble#ListTagsForResourceResponse": { - "type": "structure", - "members": { - "tags": { - "target": "com.amazonaws.nimble#Tags", - "traits": { - "smithy.api#documentation": "A collection of labels, in the form of key-value pairs, that apply to this\n resource.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#MaxResults": { - "type": "integer", - "traits": { - "smithy.api#default": 100, - "smithy.api#range": { - "min": 1, - "max": 100 - } - } - }, - "com.amazonaws.nimble#NewLaunchProfileMember": { - "type": "structure", - "members": { - "persona": { - "target": "com.amazonaws.nimble#LaunchProfilePersona", - "traits": { - "smithy.api#documentation": "The persona.
", - "smithy.api#required": {} - } - }, - "principalId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The principal ID.
", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "A new member that is added to a launch profile.
" - } - }, - "com.amazonaws.nimble#NewLaunchProfileMemberList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#NewLaunchProfileMember" - }, - "traits": { - "smithy.api#length": { - "min": 1, - "max": 20 - } - } - }, - "com.amazonaws.nimble#NewStudioMember": { - "type": "structure", - "members": { - "persona": { - "target": "com.amazonaws.nimble#StudioPersona", - "traits": { - "smithy.api#documentation": "The persona.
", - "smithy.api#required": {} - } - }, - "principalId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The principal ID.
", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "A new studio user's membership.
" - } - }, - "com.amazonaws.nimble#NewStudioMemberList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#NewStudioMember" - }, - "traits": { - "smithy.api#length": { - "min": 1, - "max": 20 - } - } - }, - "com.amazonaws.nimble#PutLaunchProfileMembers": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#PutLaunchProfileMembersRequest" - }, - "output": { - "target": "com.amazonaws.nimble#PutLaunchProfileMembersResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to add/update launch profile members", - "aws.iam#requiredActions": [ - "sso-directory:DescribeUsers" - ], - "smithy.api#documentation": "Add/update users with given persona to launch profile membership.
", - "smithy.api#http": { - "method": "POST", - "uri": "/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/membership", - "code": 200 - } - } - }, - "com.amazonaws.nimble#PutLaunchProfileMembersRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "identityStoreId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the identity store.
", - "smithy.api#required": {} - } - }, - "launchProfileId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the launch profile used to control access from the streaming session.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "members": { - "target": "com.amazonaws.nimble#NewLaunchProfileMemberList", - "traits": { - "smithy.api#documentation": "A list of members.
", - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#PutLaunchProfileMembersResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#PutStudioMembers": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#PutStudioMembersRequest" - }, - "output": { - "target": "com.amazonaws.nimble#PutStudioMembersResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to add/update studio members", - "aws.iam#requiredActions": [ - "sso-directory:DescribeUsers" - ], - "smithy.api#documentation": "Add/update users with given persona to studio membership.
", - "smithy.api#http": { - "method": "POST", - "uri": "/2020-08-01/studios/{studioId}/membership", - "code": 200 - } - } - }, - "com.amazonaws.nimble#PutStudioMembersRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "identityStoreId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the identity store.
", - "smithy.api#required": {} - } - }, - "members": { - "target": "com.amazonaws.nimble#NewStudioMemberList", - "traits": { - "smithy.api#documentation": "A list of members.
", - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#PutStudioMembersResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#Region": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 50 - }, - "smithy.api#pattern": "[a-z]{2}-?(iso|gov)?-{1}[a-z]*-{1}[0-9]" - } - }, - "com.amazonaws.nimble#ResourceNotFoundException": { - "type": "structure", - "members": { - "code": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "A more specific error code.
" - } - }, - "context": { - "target": "com.amazonaws.nimble#ExceptionContext", - "traits": { - "smithy.api#documentation": "The exception context.
" - } - }, - "message": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "A human-readable description of the error.
" - } - } - }, - "traits": { - "smithy.api#documentation": "The specified resource could not be found.
", - "smithy.api#error": "client", - "smithy.api#httpError": 404 - } - }, - "com.amazonaws.nimble#RoleArn": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 2048 - } - } - }, - "com.amazonaws.nimble#ScriptParameterKey": { - "type": "string", - "traits": { - "smithy.api#documentation": "A script parameter key.
", - "smithy.api#length": { - "min": 1, - "max": 64 - }, - "smithy.api#pattern": "^[a-zA-Z_][a-zA-Z0-9_]+$" - } - }, - "com.amazonaws.nimble#ScriptParameterKeyValue": { - "type": "structure", - "members": { - "key": { - "target": "com.amazonaws.nimble#ScriptParameterKey", - "traits": { - "smithy.api#documentation": "A script parameter key.
" - } - }, - "value": { - "target": "com.amazonaws.nimble#ScriptParameterValue", - "traits": { - "smithy.api#documentation": "A script parameter value.
" - } - } - }, - "traits": { - "smithy.api#documentation": "A parameter for a studio component script, in the form of a key-value pair.
" - } - }, - "com.amazonaws.nimble#ScriptParameterValue": { - "type": "string", - "traits": { - "smithy.api#documentation": "A script parameter value.
", - "smithy.api#length": { - "min": 1, - "max": 256 - } - } - }, - "com.amazonaws.nimble#SecurityGroupId": { - "type": "string" - }, - "com.amazonaws.nimble#SensitiveString": { - "type": "string", - "traits": { - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.nimble#ServiceQuotaExceededException": { - "type": "structure", - "members": { - "code": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "A more specific error code.
" - } - }, - "context": { - "target": "com.amazonaws.nimble#ExceptionContext", - "traits": { - "smithy.api#documentation": "The exception context.
" - } - }, - "message": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "A human-readable description of the error.
" - } - } - }, - "traits": { - "smithy.api#documentation": "Your current quota does not allow you to perform the request action. You can request\n increases for some quotas, and other quotas cannot be increased.
\nPlease use Amazon Web Services Service Quotas to request an increase.
", - "smithy.api#error": "client", - "smithy.api#httpError": 402 - } - }, - "com.amazonaws.nimble#SessionBackupMode": { - "type": "enum", - "members": { - "AUTOMATIC": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "AUTOMATIC" - } - }, - "DEACTIVATED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DEACTIVATED" - } - } - } - }, - "com.amazonaws.nimble#SessionPersistenceMode": { - "type": "enum", - "members": { - "DEACTIVATED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DEACTIVATED" - } - }, - "ACTIVATED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ACTIVATED" - } - } - } - }, - "com.amazonaws.nimble#SharedFileSystemConfiguration": { - "type": "structure", - "members": { - "endpoint": { - "target": "com.amazonaws.nimble#SensitiveString", - "traits": { - "smithy.api#documentation": "The endpoint of the shared file system that is accessed by the studio component\n resource.
" - } - }, - "fileSystemId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The unique identifier for a file system.
" - } - }, - "linuxMountPoint": { - "target": "com.amazonaws.nimble#LinuxMountPoint", - "traits": { - "smithy.api#documentation": "The mount location for a shared file system on a Linux virtual workstation.
" - } - }, - "shareName": { - "target": "com.amazonaws.nimble#SensitiveString", - "traits": { - "smithy.api#documentation": "The name of the file share.
" - } - }, - "windowsMountDrive": { - "target": "com.amazonaws.nimble#WindowsMountDrive", - "traits": { - "smithy.api#documentation": "The mount location for a shared file system on a Windows virtual workstation.
" - } - } - }, - "traits": { - "smithy.api#documentation": "The configuration for a shared file storage system that is associated with a studio\n resource.
" - } - }, - "com.amazonaws.nimble#StartStreamingSession": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#StartStreamingSessionRequest" - }, - "output": { - "target": "com.amazonaws.nimble#StartStreamingSessionResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to start a streaming session", - "aws.iam#conditionKeys": [ - "nimble:requesterPrincipalId" - ], - "aws.iam#requiredActions": [ - "nimble:GetLaunchProfile", - "nimble:GetLaunchProfileMember" - ], - "smithy.api#documentation": "Transitions sessions from the STOPPED
state into the READY
\n state. The START_IN_PROGRESS
state is the intermediate state between the\n STOPPED
and READY
states.
Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "sessionId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The streaming session ID for the StartStreamingSessionRequest
.
The studio ID for the StartStreamingSessionRequest.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "backupId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the backup.
" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#StartStreamingSessionResponse": { - "type": "structure", - "members": { - "session": { - "target": "com.amazonaws.nimble#StreamingSession" - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#StartStudioSSOConfigurationRepair": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#StartStudioSSOConfigurationRepairRequest" - }, - "output": { - "target": "com.amazonaws.nimble#StartStudioSSOConfigurationRepairResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to repair the studio's AWS SSO configuration", - "aws.iam#requiredActions": [ - "sso:CreateManagedApplicationInstance", - "sso:GetManagedApplicationInstance" - ], - "smithy.api#documentation": "Repairs the IAM Identity Center configuration for a given studio.
\nIf the studio has a valid IAM Identity Center configuration currently associated with\n it, this operation will fail with a validation error.
\nIf the studio does not have a valid IAM Identity Center configuration currently\n associated with it, then a new IAM Identity Center application is created for the studio\n and the studio is changed to the READY
state.
After the IAM Identity Center application is repaired, you must use the Amazon Nimble Studio console to add administrators and users to your studio.
", - "smithy.api#http": { - "method": "PUT", - "uri": "/2020-08-01/studios/{studioId}/sso-configuration", - "code": 200 - }, - "smithy.api#idempotent": {} - } - }, - "com.amazonaws.nimble#StartStudioSSOConfigurationRepairRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#StartStudioSSOConfigurationRepairResponse": { - "type": "structure", - "members": { - "studio": { - "target": "com.amazonaws.nimble#Studio", - "traits": { - "smithy.api#documentation": "Information about a studio.
", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#StopStreamingSession": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#StopStreamingSessionRequest" - }, - "output": { - "target": "com.amazonaws.nimble#StopStreamingSessionResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to stop a streaming session", - "aws.iam#conditionKeys": [ - "nimble:requesterPrincipalId" - ], - "aws.iam#requiredActions": [ - "nimble:GetLaunchProfile" - ], - "smithy.api#documentation": "Transitions sessions from the READY
state into the STOPPED
\n state. The STOP_IN_PROGRESS
state is the intermediate state between the\n READY
and STOPPED
states.
Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "sessionId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The streaming session ID for the StopStreamingSessionRequest
.
The studioId for the StopStreamingSessionRequest.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "volumeRetentionMode": { - "target": "com.amazonaws.nimble#VolumeRetentionMode", - "traits": { - "smithy.api#documentation": "Adds additional instructions to a streaming session stop action to either retain the\n EBS volumes or delete the EBS volumes.
" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#StopStreamingSessionResponse": { - "type": "structure", - "members": { - "session": { - "target": "com.amazonaws.nimble#StreamingSession" - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#StreamConfiguration": { - "type": "structure", - "members": { - "clipboardMode": { - "target": "com.amazonaws.nimble#StreamingClipboardMode", - "traits": { - "smithy.api#documentation": "Allows or deactivates the use of the system clipboard to copy and paste between the\n streaming session and streaming client.
", - "smithy.api#required": {} - } - }, - "ec2InstanceTypes": { - "target": "com.amazonaws.nimble#StreamingInstanceTypeList", - "traits": { - "smithy.api#documentation": "The EC2 instance types that users can select from when launching a streaming session\n with this launch profile.
", - "smithy.api#required": {} - } - }, - "maxSessionLengthInMinutes": { - "target": "com.amazonaws.nimble#StreamConfigurationMaxSessionLengthInMinutes", - "traits": { - "smithy.api#default": 690, - "smithy.api#documentation": "The length of time, in minutes, that a streaming session can be active before it is\n stopped or terminated. After this point, Nimble Studio automatically terminates or\n stops the session. The default length of time is 690 minutes, and the maximum length of\n time is 30 days.
" - } - }, - "streamingImageIds": { - "target": "com.amazonaws.nimble#StreamingImageIdList", - "traits": { - "smithy.api#documentation": "The streaming images that users can select from when launching a streaming session\n with this launch profile.
", - "smithy.api#required": {} - } - }, - "maxStoppedSessionLengthInMinutes": { - "target": "com.amazonaws.nimble#StreamConfigurationMaxStoppedSessionLengthInMinutes", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "Integer that determines if you can start and stop your sessions and how long a session\n can stay in the STOPPED
state. The default value is 0. The maximum value is\n 5760.
This field is allowed only when sessionPersistenceMode
is\n ACTIVATED
and automaticTerminationMode
is\n ACTIVATED
.
If the value is set to 0, your sessions can’t be STOPPED
. If you then\n call StopStreamingSession
, the session fails. If the time that a session\n stays in the READY
state exceeds the maxSessionLengthInMinutes
\n value, the session will automatically be terminated (instead of\n STOPPED
).
If the value is set to a positive number, the session can be stopped. You can call\n StopStreamingSession
to stop sessions in the READY
state.\n If the time that a session stays in the READY
state exceeds the\n maxSessionLengthInMinutes
value, the session will automatically be\n stopped (instead of terminated).
The upload storage for a streaming session.
" - } - }, - "sessionBackup": { - "target": "com.amazonaws.nimble#StreamConfigurationSessionBackup", - "traits": { - "smithy.api#documentation": "Information about the streaming session backup.
" - } - }, - "sessionPersistenceMode": { - "target": "com.amazonaws.nimble#SessionPersistenceMode", - "traits": { - "smithy.api#documentation": "Determine if a streaming session created from this launch profile can configure\n persistent storage. This means that volumeConfiguration
and\n automaticTerminationMode
are configured.
Custom volume configuration for the root volumes that are attached to streaming\n sessions.
\nThis parameter is only allowed when sessionPersistenceMode
is\n ACTIVATED
.
Indicates if a streaming session created from this launch profile should be terminated\n automatically or retained without termination after being in a STOPPED
\n state.
When ACTIVATED
, the streaming session is scheduled for\n termination after being in the STOPPED
state for the time specified\n in maxStoppedSessionLengthInMinutes
.
When DEACTIVATED
, the streaming session can remain in the\n STOPPED
state indefinitely.
This parameter is only allowed when sessionPersistenceMode
is\n ACTIVATED
. When allowed, the default value for this parameter is\n DEACTIVATED
.
A configuration for a streaming session.
" - } - }, - "com.amazonaws.nimble#StreamConfigurationCreate": { - "type": "structure", - "members": { - "clipboardMode": { - "target": "com.amazonaws.nimble#StreamingClipboardMode", - "traits": { - "smithy.api#documentation": "Allows or deactivates the use of the system clipboard to copy and paste between the\n streaming session and streaming client.
", - "smithy.api#required": {} - } - }, - "ec2InstanceTypes": { - "target": "com.amazonaws.nimble#StreamingInstanceTypeList", - "traits": { - "smithy.api#documentation": "The EC2 instance types that users can select from when launching a streaming session\n with this launch profile.
", - "smithy.api#required": {} - } - }, - "maxSessionLengthInMinutes": { - "target": "com.amazonaws.nimble#StreamConfigurationMaxSessionLengthInMinutes", - "traits": { - "smithy.api#default": 690, - "smithy.api#documentation": "The length of time, in minutes, that a streaming session can be active before it is\n stopped or terminated. After this point, Nimble Studio automatically terminates or\n stops the session. The default length of time is 690 minutes, and the maximum length of\n time is 30 days.
" - } - }, - "streamingImageIds": { - "target": "com.amazonaws.nimble#StreamingImageIdList", - "traits": { - "smithy.api#documentation": "The streaming images that users can select from when launching a streaming session\n with this launch profile.
", - "smithy.api#required": {} - } - }, - "maxStoppedSessionLengthInMinutes": { - "target": "com.amazonaws.nimble#StreamConfigurationMaxStoppedSessionLengthInMinutes", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "Integer that determines if you can start and stop your sessions and how long a session\n can stay in the STOPPED
state. The default value is 0. The maximum value is\n 5760.
This field is allowed only when sessionPersistenceMode
is\n ACTIVATED
and automaticTerminationMode
is\n ACTIVATED
.
If the value is set to 0, your sessions can’t be STOPPED
. If you then\n call StopStreamingSession
, the session fails. If the time that a session\n stays in the READY
state exceeds the maxSessionLengthInMinutes
\n value, the session will automatically be terminated (instead of\n STOPPED
).
If the value is set to a positive number, the session can be stopped. You can call\n StopStreamingSession
to stop sessions in the READY
state.\n If the time that a session stays in the READY
state exceeds the\n maxSessionLengthInMinutes
value, the session will automatically be\n stopped (instead of terminated).
The upload storage for a streaming workstation that is created using this launch\n profile.
" - } - }, - "sessionBackup": { - "target": "com.amazonaws.nimble#StreamConfigurationSessionBackup", - "traits": { - "smithy.api#documentation": "Configures how streaming sessions are backed up when launched from this launch\n profile.
" - } - }, - "sessionPersistenceMode": { - "target": "com.amazonaws.nimble#SessionPersistenceMode", - "traits": { - "smithy.api#documentation": "Determine if a streaming session created from this launch profile can configure\n persistent storage. This means that volumeConfiguration
and\n automaticTerminationMode
are configured.
Custom volume configuration for the root volumes that are attached to streaming\n sessions.
\nThis parameter is only allowed when sessionPersistenceMode
is\n ACTIVATED
.
Indicates if a streaming session created from this launch profile should be terminated\n automatically or retained without termination after being in a STOPPED
\n state.
When ACTIVATED
, the streaming session is scheduled for\n termination after being in the STOPPED
state for the time specified\n in maxStoppedSessionLengthInMinutes
.
When DEACTIVATED
, the streaming session can remain in the\n STOPPED
state indefinitely.
This parameter is only allowed when sessionPersistenceMode
is\n ACTIVATED
. When allowed, the default value for this parameter is\n DEACTIVATED
.
Configuration for streaming workstations created using this launch profile.
" - } - }, - "com.amazonaws.nimble#StreamConfigurationMaxBackupsToRetain": { - "type": "integer", - "traits": { - "smithy.api#default": 0, - "smithy.api#range": { - "min": 0, - "max": 10 - } - } - }, - "com.amazonaws.nimble#StreamConfigurationMaxSessionLengthInMinutes": { - "type": "integer", - "traits": { - "smithy.api#default": 690, - "smithy.api#range": { - "min": 1, - "max": 43200 - } - } - }, - "com.amazonaws.nimble#StreamConfigurationMaxStoppedSessionLengthInMinutes": { - "type": "integer", - "traits": { - "smithy.api#default": 0, - "smithy.api#range": { - "min": 0, - "max": 5760 - } - } - }, - "com.amazonaws.nimble#StreamConfigurationSessionBackup": { - "type": "structure", - "members": { - "mode": { - "target": "com.amazonaws.nimble#SessionBackupMode", - "traits": { - "smithy.api#documentation": "Specifies how artists sessions are backed up.
\nConfigures backups for streaming sessions launched with this launch profile. The\n default value is DEACTIVATED
, which means that backups are deactivated. To\n allow backups, set this value to AUTOMATIC
.
The maximum number of backups that each streaming session created from this launch\n profile can have.
" - } - } - }, - "traits": { - "smithy.api#documentation": "Configures how streaming sessions are backed up when launched from this launch\n profile.
" - } - }, - "com.amazonaws.nimble#StreamConfigurationSessionStorage": { - "type": "structure", - "members": { - "root": { - "target": "com.amazonaws.nimble#StreamingSessionStorageRoot", - "traits": { - "smithy.api#documentation": "The configuration for the upload storage root of the streaming session.
" - } - }, - "mode": { - "target": "com.amazonaws.nimble#StreamingSessionStorageModeList", - "traits": { - "smithy.api#documentation": "Allows artists to upload files to their workstations. The only valid option is\n UPLOAD
.
The configuration for a streaming session’s upload storage.
" - } - }, - "com.amazonaws.nimble#StreamingClipboardMode": { - "type": "enum", - "members": { - "ENABLED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ENABLED" - } - }, - "DISABLED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DISABLED" - } - } - } - }, - "com.amazonaws.nimble#StreamingImage": { - "type": "structure", - "members": { - "arn": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The Amazon Resource Name (ARN) that is assigned to a studio resource and uniquely\n identifies it. ARNs are unique across all Regions.
" - } - }, - "description": { - "target": "com.amazonaws.nimble#StreamingImageDescription", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "A human-readable description of the streaming image.
" - } - }, - "ec2ImageId": { - "target": "com.amazonaws.nimble#EC2ImageId", - "traits": { - "aws.cloudformation#cfnMutability": "create-and-read", - "smithy.api#documentation": "The ID of an EC2 machine image with which to create the streaming image.
" - } - }, - "encryptionConfiguration": { - "target": "com.amazonaws.nimble#StreamingImageEncryptionConfiguration", - "traits": { - "aws.cloudformation#cfnMutability": "read", - "smithy.api#documentation": "The encryption configuration.
" - } - }, - "eulaIds": { - "target": "com.amazonaws.nimble#EulaIdList", - "traits": { - "aws.cloudformation#cfnMutability": "read", - "smithy.api#documentation": "The list of EULAs that must be accepted before a Streaming Session can be started\n using this streaming image.
" - } - }, - "name": { - "target": "com.amazonaws.nimble#StreamingImageName", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "A friendly name for a streaming image resource.
" - } - }, - "owner": { - "target": "com.amazonaws.nimble#StreamingImageOwner", - "traits": { - "aws.cloudformation#cfnMutability": "read", - "smithy.api#documentation": "The owner of the streaming image, either the studioId
that contains the\n streaming image, or amazon
for images that are provided by Amazon Nimble Studio.
The platform of the streaming image, either Windows or Linux.
" - } - }, - "state": { - "target": "com.amazonaws.nimble#StreamingImageState", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The current state.
" - } - }, - "statusCode": { - "target": "com.amazonaws.nimble#StreamingImageStatusCode", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The status code.
" - } - }, - "statusMessage": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The status message for the streaming image.
" - } - }, - "streamingImageId": { - "target": "com.amazonaws.nimble#StreamingImageId", - "traits": { - "aws.cloudformation#cfnMutability": "read", - "smithy.api#documentation": "The ID of the streaming image.
" - } - }, - "tags": { - "target": "com.amazonaws.nimble#Tags", - "traits": { - "smithy.api#documentation": "A collection of labels, in the form of key-value pairs, that apply to this\n resource.
" - } - } - }, - "traits": { - "smithy.api#documentation": "Represents a streaming image resource.
\nStreaming images are used by studio users to select which operating system and\n software they want to use in a Nimble Studio streaming session.
\nAmazon provides a number of streaming images that include popular 3rd-party\n software.
\nYou can create your own streaming images using an Amazon EC2 machine image\n that you create for this purpose. You can also include software that your users\n require.
" - } - }, - "com.amazonaws.nimble#StreamingImageDescription": { - "type": "string", - "traits": { - "smithy.api#documentation": "The description.
", - "smithy.api#length": { - "min": 0, - "max": 256 - }, - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.nimble#StreamingImageEncryptionConfiguration": { - "type": "structure", - "members": { - "keyArn": { - "target": "com.amazonaws.nimble#StreamingImageEncryptionConfigurationKeyArn", - "traits": { - "smithy.api#documentation": "The ARN for a KMS key that is used to encrypt studio data.
" - } - }, - "keyType": { - "target": "com.amazonaws.nimble#StreamingImageEncryptionConfigurationKeyType", - "traits": { - "smithy.api#documentation": "The type of KMS key that is used to encrypt studio data.
", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "Specifies how a streaming image is encrypted.
" - } - }, - "com.amazonaws.nimble#StreamingImageEncryptionConfigurationKeyArn": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 4 - }, - "smithy.api#pattern": "^arn:.*" - } - }, - "com.amazonaws.nimble#StreamingImageEncryptionConfigurationKeyType": { - "type": "enum", - "members": { - "CUSTOMER_MANAGED_KEY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CUSTOMER_MANAGED_KEY" - } - } - } - }, - "com.amazonaws.nimble#StreamingImageId": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 22 - }, - "smithy.api#pattern": "^[a-zA-Z0-9-_]*$" - } - }, - "com.amazonaws.nimble#StreamingImageIdList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#StreamingImageId" - }, - "traits": { - "smithy.api#documentation": "A list of streaming image IDs that users can select from when launching a streaming\n session with this launch profile.
", - "smithy.api#length": { - "min": 1, - "max": 20 - } - } - }, - "com.amazonaws.nimble#StreamingImageList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#StreamingImage" - } - }, - "com.amazonaws.nimble#StreamingImageName": { - "type": "string", - "traits": { - "smithy.api#documentation": "A friendly name for a streaming image resource.
", - "smithy.api#length": { - "min": 0, - "max": 64 - }, - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.nimble#StreamingImageOwner": { - "type": "string", - "traits": { - "smithy.api#documentation": "StreamingImageOwner is the owner of a particular streaming image.
\nThis string is either the studioId that contains the streaming image, or the word\n AMAZON
for images provided by Nimble Studio.
The platform of this streaming image, either Windows or Linux.
", - "smithy.api#pattern": "^[a-zA-Z]*$" - } - }, - "com.amazonaws.nimble#StreamingImageResource": { - "type": "resource", - "identifiers": { - "streamingImageId": { - "target": "com.amazonaws.nimble#String" - } - }, - "create": { - "target": "com.amazonaws.nimble#CreateStreamingImage" - }, - "read": { - "target": "com.amazonaws.nimble#GetStreamingImage" - }, - "update": { - "target": "com.amazonaws.nimble#UpdateStreamingImage" - }, - "delete": { - "target": "com.amazonaws.nimble#DeleteStreamingImage" - }, - "list": { - "target": "com.amazonaws.nimble#ListStreamingImages" - }, - "traits": { - "aws.api#arn": { - "template": "streaming-image/{streamingImageId}" - }, - "aws.cloudformation#cfnResource": { - "name": "StreamingImage", - "additionalSchemas": [ - "com.amazonaws.nimble#StreamingImage" - ] - }, - "aws.iam#conditionKeys": [ - "aws:ResourceTag/${TagKey}", - "aws:RequestTag/${TagKey}", - "aws:TagKeys", - "nimble:studioId" - ], - "aws.iam#disableConditionKeyInference": {}, - "aws.iam#iamResource": { - "name": "streaming-image" - }, - "smithy.api#documentation": "Represents a streaming session machine image that can be used to launch a streaming session", - "smithy.api#externalDocumentation": { - "CFNSourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-nimblestudio" - } - } - }, - "com.amazonaws.nimble#StreamingImageState": { - "type": "enum", - "members": { - "CREATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CREATE_IN_PROGRESS" - } - }, - "READY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "READY" - } - }, - "DELETE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETE_IN_PROGRESS" - } - }, - "DELETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETED" - } - }, - "UPDATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "UPDATE_IN_PROGRESS" - } - }, - "UPDATE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "UPDATE_FAILED" - } - }, - "CREATE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CREATE_FAILED" - } - }, - "DELETE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETE_FAILED" - } - } - } - }, - "com.amazonaws.nimble#StreamingImageStatusCode": { - "type": "enum", - "members": { - "STREAMING_IMAGE_CREATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAMING_IMAGE_CREATE_IN_PROGRESS" - } - }, - "STREAMING_IMAGE_READY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAMING_IMAGE_READY" - } - }, - "STREAMING_IMAGE_DELETE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAMING_IMAGE_DELETE_IN_PROGRESS" - } - }, - "STREAMING_IMAGE_DELETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAMING_IMAGE_DELETED" - } - }, - "STREAMING_IMAGE_UPDATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAMING_IMAGE_UPDATE_IN_PROGRESS" - } - }, - "INTERNAL_ERROR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INTERNAL_ERROR" - } - }, - "ACCESS_DENIED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ACCESS_DENIED" - } - } - }, - "traits": { - "smithy.api#documentation": "The status code.
" - } - }, - "com.amazonaws.nimble#StreamingInstanceType": { - "type": "enum", - "members": { - "g4dn_xlarge": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "g4dn.xlarge" - } - }, - "g4dn_2xlarge": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "g4dn.2xlarge" - } - }, - "g4dn_4xlarge": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "g4dn.4xlarge" - } - }, - "g4dn_8xlarge": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "g4dn.8xlarge" - } - }, - "g4dn_12xlarge": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "g4dn.12xlarge" - } - }, - "g4dn_16xlarge": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "g4dn.16xlarge" - } - }, - "g3_4xlarge": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "g3.4xlarge" - } - }, - "g3s_xlarge": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "g3s.xlarge" - } - }, - "g5_xlarge": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "g5.xlarge" - } - }, - "g5_2xlarge": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "g5.2xlarge" - } - }, - "g5_4xlarge": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "g5.4xlarge" - } - }, - "g5_8xlarge": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "g5.8xlarge" - } - }, - "g5_16xlarge": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "g5.16xlarge" - } - } - } - }, - "com.amazonaws.nimble#StreamingInstanceTypeList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#StreamingInstanceType" - }, - "traits": { - "smithy.api#documentation": "The EC2 instance types that users can select from when launching a streaming session\n with this launch profile.
", - "smithy.api#length": { - "min": 1, - "max": 30 - } - } - }, - "com.amazonaws.nimble#StreamingSession": { - "type": "structure", - "members": { - "arn": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) that is assigned to a studio resource and uniquely\n identifies it. ARNs are unique across all Regions.
" - } - }, - "createdAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "smithy.api#documentation": "The ISO timestamp in seconds for when the resource was created.
" - } - }, - "createdBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The user ID of the user that created the streaming session.
" - } - }, - "ec2InstanceType": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The EC2 Instance type used for the streaming session.
" - } - }, - "launchProfileId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the launch profile used to control access from the streaming session.
" - } - }, - "ownedBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The user ID of the user that owns the streaming session. The user that owns the\n session will be logging into the session and interacting with the virtual\n workstation.
" - } - }, - "sessionId": { - "target": "com.amazonaws.nimble#StreamingSessionId", - "traits": { - "smithy.api#documentation": "The session ID.
" - } - }, - "state": { - "target": "com.amazonaws.nimble#StreamingSessionState", - "traits": { - "smithy.api#documentation": "The current state.
" - } - }, - "statusCode": { - "target": "com.amazonaws.nimble#StreamingSessionStatusCode", - "traits": { - "smithy.api#documentation": "The status code.
" - } - }, - "statusMessage": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The status message for the streaming session.
" - } - }, - "streamingImageId": { - "target": "com.amazonaws.nimble#StreamingImageId", - "traits": { - "smithy.api#documentation": "The ID of the streaming image.
" - } - }, - "tags": { - "target": "com.amazonaws.nimble#Tags", - "traits": { - "smithy.api#documentation": "A collection of labels, in the form of key-value pairs, that apply to this\n resource.
" - } - }, - "terminateAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "smithy.api#documentation": "The time the streaming session will automatically terminate if not terminated by the\n user.
" - } - }, - "updatedAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "smithy.api#documentation": "The ISO timestamp in seconds for when the resource was updated.
" - } - }, - "updatedBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The user ID of the user that most recently updated the resource.
" - } - }, - "stoppedAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "smithy.api#documentation": "The time the session entered STOP_IN_PROGRESS
state.
The user ID of the user that stopped the streaming session.
" - } - }, - "startedAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "smithy.api#documentation": "The time the session entered START_IN_PROGRESS
state.
The user ID of the user that started the streaming session.
" - } - }, - "stopAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "smithy.api#documentation": "The time the streaming session will automatically be stopped if the user doesn’t stop\n the session themselves.
" - } - }, - "startedFromBackupId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The backup ID used to restore a streaming session.
" - } - }, - "backupMode": { - "target": "com.amazonaws.nimble#SessionBackupMode", - "traits": { - "smithy.api#documentation": "Shows the current backup setting of the session.
" - } - }, - "maxBackupsToRetain": { - "target": "com.amazonaws.nimble#StreamConfigurationMaxBackupsToRetain", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "The maximum number of backups of a streaming session that you can have. When the\n maximum number of backups is reached, the oldest backup is deleted.
" - } - }, - "volumeRetentionMode": { - "target": "com.amazonaws.nimble#VolumeRetentionMode", - "traits": { - "smithy.api#documentation": "Determine if an EBS volume created from this streaming session will be backed\n up.
" - } - }, - "sessionPersistenceMode": { - "target": "com.amazonaws.nimble#SessionPersistenceMode", - "traits": { - "smithy.api#documentation": "Determine if a streaming session created from this launch profile can configure\n persistent storage. This means that volumeConfiguration
and\n automaticTerminationMode
are configured.
Custom volume configuration for the root volumes that are attached to streaming\n sessions.
\nThis parameter is only allowed when sessionPersistenceMode
is\n ACTIVATED
.
Indicates if a streaming session created from this launch profile should be terminated\n automatically or retained without termination after being in a STOPPED
\n state.
When ACTIVATED
, the streaming session is scheduled for\n termination after being in the STOPPED
state for the time specified\n in maxStoppedSessionLengthInMinutes
.
When DEACTIVATED
, the streaming session can remain in the\n STOPPED
state indefinitely.
This parameter is only allowed when sessionPersistenceMode
is\n ACTIVATED
. When allowed, the default value for this parameter is\n DEACTIVATED
.
A streaming session is a virtual workstation created using a particular launch\n profile.
" - } - }, - "com.amazonaws.nimble#StreamingSessionBackup": { - "type": "structure", - "members": { - "arn": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) that is assigned to a studio resource and uniquely\n identifies it. ARNs are unique across all Regions.
" - } - }, - "createdAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "smithy.api#documentation": "The ISO timestamp in for when the resource was created.
" - } - }, - "launchProfileId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the launch profile which allowed the backups for the streaming\n session.
" - } - }, - "ownedBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The user ID of the user that owns the streaming session.
" - } - }, - "sessionId": { - "target": "com.amazonaws.nimble#StreamingSessionId", - "traits": { - "smithy.api#documentation": "The streaming session ID for the StreamingSessionBackup
.
The status code.
" - } - }, - "statusMessage": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The status message for the streaming session backup.
" - } - }, - "backupId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the backup.
" - } - }, - "tags": { - "target": "com.amazonaws.nimble#Tags", - "traits": { - "smithy.api#documentation": "A collection of labels, in the form of key-value pairs, that apply to this\n resource.
" - } - } - }, - "traits": { - "smithy.api#documentation": "Information about the streaming session backup.
" - } - }, - "com.amazonaws.nimble#StreamingSessionBackupList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#StreamingSessionBackup" - } - }, - "com.amazonaws.nimble#StreamingSessionBackupResource": { - "type": "resource", - "identifiers": { - "backupId": { - "target": "com.amazonaws.nimble#String" - } - }, - "read": { - "target": "com.amazonaws.nimble#GetStreamingSessionBackup" - }, - "list": { - "target": "com.amazonaws.nimble#ListStreamingSessionBackups" - }, - "traits": { - "aws.api#arn": { - "template": "streaming-session-backup/{backupId}" - }, - "aws.iam#conditionKeys": [ - "aws:ResourceTag/${TagKey}", - "nimble:ownedBy" - ], - "aws.iam#disableConditionKeyInference": {}, - "smithy.api#documentation": "Represents a streaming session backup originated from a studio user launched streaming session" - } - }, - "com.amazonaws.nimble#StreamingSessionId": { - "type": "string" - }, - "com.amazonaws.nimble#StreamingSessionList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#StreamingSession" - } - }, - "com.amazonaws.nimble#StreamingSessionResource": { - "type": "resource", - "identifiers": { - "sessionId": { - "target": "com.amazonaws.nimble#String" - } - }, - "create": { - "target": "com.amazonaws.nimble#CreateStreamingSession" - }, - "read": { - "target": "com.amazonaws.nimble#GetStreamingSession" - }, - "delete": { - "target": "com.amazonaws.nimble#DeleteStreamingSession" - }, - "list": { - "target": "com.amazonaws.nimble#ListStreamingSessions" - }, - "operations": [ - { - "target": "com.amazonaws.nimble#CreateStreamingSessionStream" - }, - { - "target": "com.amazonaws.nimble#GetStreamingSessionStream" - }, - { - "target": "com.amazonaws.nimble#StartStreamingSession" - }, - { - "target": "com.amazonaws.nimble#StopStreamingSession" - } - ], - "traits": { - "aws.api#arn": { - "template": "streaming-session/{sessionId}" - }, - "aws.iam#conditionKeys": [ - "aws:ResourceTag/${TagKey}", - "aws:RequestTag/${TagKey}", - "nimble:createdBy", - "nimble:ownedBy" - ], - "aws.iam#disableConditionKeyInference": {}, - "aws.iam#iamResource": { - "name": "streaming-session" - }, - "smithy.api#documentation": "Represents a streaming session that a studio user launches applications and connects to studio components within a studio" - } - }, - "com.amazonaws.nimble#StreamingSessionState": { - "type": "enum", - "members": { - "CREATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CREATE_IN_PROGRESS" - } - }, - "DELETE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETE_IN_PROGRESS" - } - }, - "READY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "READY" - } - }, - "DELETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETED" - } - }, - "CREATE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CREATE_FAILED" - } - }, - "DELETE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETE_FAILED" - } - }, - "STOP_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STOP_IN_PROGRESS" - } - }, - "START_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "START_IN_PROGRESS" - } - }, - "STOPPED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STOPPED" - } - }, - "STOP_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STOP_FAILED" - } - }, - "START_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "START_FAILED" - } - } - }, - "traits": { - "smithy.api#documentation": "The streaming session state.
" - } - }, - "com.amazonaws.nimble#StreamingSessionStatusCode": { - "type": "enum", - "members": { - "STREAMING_SESSION_READY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAMING_SESSION_READY" - } - }, - "STREAMING_SESSION_DELETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAMING_SESSION_DELETED" - } - }, - "STREAMING_SESSION_CREATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAMING_SESSION_CREATE_IN_PROGRESS" - } - }, - "STREAMING_SESSION_DELETE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAMING_SESSION_DELETE_IN_PROGRESS" - } - }, - "INTERNAL_ERROR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INTERNAL_ERROR" - } - }, - "INSUFFICIENT_CAPACITY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INSUFFICIENT_CAPACITY" - } - }, - "ACTIVE_DIRECTORY_DOMAIN_JOIN_ERROR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ACTIVE_DIRECTORY_DOMAIN_JOIN_ERROR" - } - }, - "NETWORK_CONNECTION_ERROR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "NETWORK_CONNECTION_ERROR" - } - }, - "INITIALIZATION_SCRIPT_ERROR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INITIALIZATION_SCRIPT_ERROR" - } - }, - "DECRYPT_STREAMING_IMAGE_ERROR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DECRYPT_STREAMING_IMAGE_ERROR" - } - }, - "NETWORK_INTERFACE_ERROR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "NETWORK_INTERFACE_ERROR" - } - }, - "STREAMING_SESSION_STOPPED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAMING_SESSION_STOPPED" - } - }, - "STREAMING_SESSION_STARTED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAMING_SESSION_STARTED" - } - }, - "STREAMING_SESSION_STOP_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAMING_SESSION_STOP_IN_PROGRESS" - } - }, - "STREAMING_SESSION_START_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAMING_SESSION_START_IN_PROGRESS" - } - }, - "AMI_VALIDATION_ERROR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "AMI_VALIDATION_ERROR" - } - } - } - }, - "com.amazonaws.nimble#StreamingSessionStorageMode": { - "type": "enum", - "members": { - "UPLOAD": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "UPLOAD" - } - } - } - }, - "com.amazonaws.nimble#StreamingSessionStorageModeList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#StreamingSessionStorageMode" - }, - "traits": { - "smithy.api#length": { - "min": 1 - } - } - }, - "com.amazonaws.nimble#StreamingSessionStorageRoot": { - "type": "structure", - "members": { - "linux": { - "target": "com.amazonaws.nimble#StreamingSessionStorageRootPathLinux", - "traits": { - "smithy.api#documentation": "The folder path in Linux workstations where files are uploaded.
" - } - }, - "windows": { - "target": "com.amazonaws.nimble#StreamingSessionStorageRootPathWindows", - "traits": { - "smithy.api#documentation": "The folder path in Windows workstations where files are uploaded.
" - } - } - }, - "traits": { - "smithy.api#documentation": "The upload storage root location (folder) on streaming workstations where files are\n uploaded.
" - } - }, - "com.amazonaws.nimble#StreamingSessionStorageRootPathLinux": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 128 - }, - "smithy.api#pattern": "^(\\$HOME|/)[/]?([A-Za-z0-9-_]+/)*([A-Za-z0-9_-]+)$", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.nimble#StreamingSessionStorageRootPathWindows": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 128 - }, - "smithy.api#pattern": "^((\\%HOMEPATH\\%)|[a-zA-Z]:)[\\\\/](?:[a-zA-Z0-9_-]+[\\\\/])*[a-zA-Z0-9_-]+$", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.nimble#StreamingSessionStream": { - "type": "structure", - "members": { - "createdAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "smithy.api#documentation": "The ISO timestamp in seconds for when the resource was created.
" - } - }, - "createdBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The user ID of the user that created the streaming session stream.
" - } - }, - "expiresAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "smithy.api#documentation": "The ISO timestamp in seconds for when the resource expires.
" - } - }, - "ownedBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The user ID of the user that owns the streaming session. The user that owns the\n session will be logging into the session and interacting with the virtual\n workstation.
" - } - }, - "state": { - "target": "com.amazonaws.nimble#StreamingSessionStreamState", - "traits": { - "smithy.api#documentation": "The current state.
" - } - }, - "statusCode": { - "target": "com.amazonaws.nimble#StreamingSessionStreamStatusCode", - "traits": { - "smithy.api#documentation": "The streaming session stream status code.
" - } - }, - "streamId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The stream ID.
" - } - }, - "url": { - "target": "com.amazonaws.nimble#SensitiveString", - "traits": { - "smithy.api#documentation": "The URL to connect to this stream using the DCV client.
" - } - } - }, - "traits": { - "smithy.api#documentation": "A stream is an active connection to a streaming session, enabling a studio user to\n control the streaming session using a compatible client. Streaming session streams are\n compatible with the NICE DCV web client, included in the Nimble Studio portal, or\n the NICE DCV desktop client.
" - } - }, - "com.amazonaws.nimble#StreamingSessionStreamExpirationInSeconds": { - "type": "integer", - "traits": { - "smithy.api#default": 120, - "smithy.api#range": { - "min": 60, - "max": 3600 - } - } - }, - "com.amazonaws.nimble#StreamingSessionStreamState": { - "type": "enum", - "members": { - "READY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "READY" - } - }, - "CREATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CREATE_IN_PROGRESS" - } - }, - "DELETE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETE_IN_PROGRESS" - } - }, - "DELETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETED" - } - }, - "CREATE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CREATE_FAILED" - } - }, - "DELETE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETE_FAILED" - } - } - } - }, - "com.amazonaws.nimble#StreamingSessionStreamStatusCode": { - "type": "enum", - "members": { - "STREAM_CREATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAM_CREATE_IN_PROGRESS" - } - }, - "STREAM_READY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAM_READY" - } - }, - "STREAM_DELETE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAM_DELETE_IN_PROGRESS" - } - }, - "STREAM_DELETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STREAM_DELETED" - } - }, - "INTERNAL_ERROR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INTERNAL_ERROR" - } - }, - "NETWORK_CONNECTION_ERROR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "NETWORK_CONNECTION_ERROR" - } - } - } - }, - "com.amazonaws.nimble#String": { - "type": "string" - }, - "com.amazonaws.nimble#StringList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#String" - } - }, - "com.amazonaws.nimble#Studio": { - "type": "structure", - "members": { - "adminRoleArn": { - "target": "com.amazonaws.nimble#RoleArn", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "The IAM role that studio admins assume when logging in to the Nimble Studio portal.
" - } - }, - "arn": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The Amazon Resource Name (ARN) that is assigned to a studio resource and uniquely\n identifies it. ARNs are unique across all Regions.
" - } - }, - "createdAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The ISO timestamp in seconds for when the resource was created.
" - } - }, - "displayName": { - "target": "com.amazonaws.nimble#StudioDisplayName", - "traits": { - "smithy.api#documentation": "A friendly name for the studio.
" - } - }, - "homeRegion": { - "target": "com.amazonaws.nimble#Region", - "traits": { - "aws.cloudformation#cfnMutability": "read", - "smithy.api#documentation": "The Amazon Web Services Region where the studio resource is located.
" - } - }, - "ssoClientId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnMutability": "read", - "smithy.api#documentation": "The IAM Identity Center application client ID used to integrate with IAM Identity Center. This ID allows IAM Identity Center users to log in to Nimble Studio\n portal.
" - } - }, - "state": { - "target": "com.amazonaws.nimble#StudioState", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The current state of the studio resource.
" - } - }, - "statusCode": { - "target": "com.amazonaws.nimble#StudioStatusCode", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "Status codes that provide additional detail on the studio state.
" - } - }, - "statusMessage": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "Additional detail on the studio state.
" - } - }, - "studioEncryptionConfiguration": { - "target": "com.amazonaws.nimble#StudioEncryptionConfiguration", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "Configuration of the encryption method that is used for the studio.
" - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The unique identifier for a studio resource. In Nimble Studio, all other\n resources are contained in a studio resource.
" - } - }, - "studioName": { - "target": "com.amazonaws.nimble#StudioName", - "traits": { - "smithy.api#documentation": "The name of the studio, as included in the URL when accessing it in the Nimble Studio portal.
" - } - }, - "studioUrl": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnMutability": "read", - "smithy.api#documentation": "The address of the web page for the studio.
" - } - }, - "tags": { - "target": "com.amazonaws.nimble#Tags", - "traits": { - "aws.cloudformation#cfnMutability": "create-and-read", - "smithy.api#documentation": "A collection of labels, in the form of key-value pairs, that apply to this\n resource.
" - } - }, - "updatedAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The ISO timestamp in seconds for when the resource was updated.
" - } - }, - "userRoleArn": { - "target": "com.amazonaws.nimble#RoleArn", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "The IAM role that studio users assume when logging in to the Nimble Studio portal.
" - } - } - }, - "traits": { - "smithy.api#documentation": "Represents a studio resource.
\nA studio is the core resource used with Nimble Studio. You must create a studio\n first, before any other resource type can be created. All other resources you create and\n manage in Nimble Studio are contained within a studio.
\nWhen creating a studio, you must provides two IAM roles for use with\n the Nimble Studio portal. These roles are assumed by your users when they log in to\n the Nimble Studio portal via IAM Identity Center and your identity source.
\nThe user role must have the AmazonNimbleStudio-StudioUser
managed policy\n attached for the portal to function properly.
The admin role must have the AmazonNimbleStudio-StudioAdmin
managed\n policy attached for the portal to function properly.
Your studio roles must trust the identity.nimble.amazonaws.com
service\n principal to function properly.
The Amazon Resource Name (ARN) that is assigned to a studio resource and uniquely\n identifies it. ARNs are unique across all Regions.
" - } - }, - "configuration": { - "target": "com.amazonaws.nimble#StudioComponentConfiguration", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "The configuration of the studio component, based on component type.
" - } - }, - "createdAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The ISO timestamp in seconds for when the resource was created.
" - } - }, - "createdBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The user ID of the user that created the studio component.
" - } - }, - "description": { - "target": "com.amazonaws.nimble#StudioComponentDescription", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "A human-readable description for the studio component resource.
" - } - }, - "ec2SecurityGroupIds": { - "target": "com.amazonaws.nimble#StudioComponentSecurityGroupIdList", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "The EC2 security groups that control access to the studio component.
" - } - }, - "initializationScripts": { - "target": "com.amazonaws.nimble#StudioComponentInitializationScriptList", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "Initialization scripts for studio components.
" - } - }, - "name": { - "target": "com.amazonaws.nimble#StudioComponentName", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "A friendly name for the studio component resource.
" - } - }, - "scriptParameters": { - "target": "com.amazonaws.nimble#StudioComponentScriptParameterKeyValueList", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "Parameters for the studio component scripts.
" - } - }, - "state": { - "target": "com.amazonaws.nimble#StudioComponentState", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The current state.
" - } - }, - "statusCode": { - "target": "com.amazonaws.nimble#StudioComponentStatusCode", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The status code.
" - } - }, - "statusMessage": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The status message for the studio component.
" - } - }, - "studioComponentId": { - "target": "com.amazonaws.nimble#StudioComponentId", - "traits": { - "smithy.api#documentation": "The unique identifier for a studio component resource.
" - } - }, - "subtype": { - "target": "com.amazonaws.nimble#StudioComponentSubtype", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "The specific subtype of a studio component.
" - } - }, - "tags": { - "target": "com.amazonaws.nimble#Tags", - "traits": { - "smithy.api#documentation": "A collection of labels, in the form of key-value pairs, that apply to this\n resource.
" - } - }, - "type": { - "target": "com.amazonaws.nimble#StudioComponentType", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "The type of the studio component.
" - } - }, - "updatedAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The ISO timestamp in seconds for when the resource was updated.
" - } - }, - "updatedBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "The user ID of the user that most recently updated the resource.
" - } - }, - "secureInitializationRoleArn": { - "target": "com.amazonaws.nimble#RoleArn", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "An IAM role attached to Studio Component when the system initialization\n script runs which give the studio component access to Amazon Web Services resources when\n the system initialization script runs.
" - } - }, - "runtimeRoleArn": { - "target": "com.amazonaws.nimble#RoleArn", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "An IAM role attached to a Studio Component that gives the studio\n component access to Amazon Web Services resources at anytime while the instance is\n running.
" - } - } - }, - "traits": { - "smithy.api#documentation": "A studio component represents a network resource to be used by a studio's users and\n workflows. A typical studio contains studio components for each of the following: render\n farm, Active Directory, licensing, and file system.
\nAccess to a studio component is managed by specifying security groups for the\n resource, as well as its endpoint.
\nA studio component also has a set of initialization scripts that are returned by\n GetLaunchProfileInitialization
. These initialization scripts run on\n streaming sessions when they start. They provide users with flexibility in controlling\n how the studio resources are configured on a streaming session.
The configuration for a Directory Service for Microsoft Active Directory studio resource.
" - } - }, - "computeFarmConfiguration": { - "target": "com.amazonaws.nimble#ComputeFarmConfiguration", - "traits": { - "smithy.api#documentation": "The configuration for a render farm that is associated with a studio resource.
" - } - }, - "licenseServiceConfiguration": { - "target": "com.amazonaws.nimble#LicenseServiceConfiguration", - "traits": { - "smithy.api#documentation": "The configuration for a license service that is associated with a studio\n resource.
" - } - }, - "sharedFileSystemConfiguration": { - "target": "com.amazonaws.nimble#SharedFileSystemConfiguration", - "traits": { - "smithy.api#documentation": "The configuration for a shared file storage system that is associated with a studio\n resource.
" - } - } - }, - "traits": { - "smithy.api#documentation": "The configuration of the studio component, based on component type.
" - } - }, - "com.amazonaws.nimble#StudioComponentDescription": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 256 - }, - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.nimble#StudioComponentId": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 22 - }, - "smithy.api#pattern": "^[a-zA-Z0-9-_]*$" - } - }, - "com.amazonaws.nimble#StudioComponentInitializationScript": { - "type": "structure", - "members": { - "launchProfileProtocolVersion": { - "target": "com.amazonaws.nimble#LaunchProfileProtocolVersion", - "traits": { - "smithy.api#documentation": "The version number of the protocol that is used by the launch profile. The only valid\n version is \"2021-03-31\".
" - } - }, - "platform": { - "target": "com.amazonaws.nimble#LaunchProfilePlatform", - "traits": { - "smithy.api#documentation": "The platform of the initialization script, either Windows or Linux.
" - } - }, - "runContext": { - "target": "com.amazonaws.nimble#StudioComponentInitializationScriptRunContext", - "traits": { - "smithy.api#documentation": "The method to use when running the initialization script.
" - } - }, - "script": { - "target": "com.amazonaws.nimble#StudioComponentInitializationScriptContent", - "traits": { - "smithy.api#documentation": "The initialization script.
" - } - } - }, - "traits": { - "smithy.api#documentation": "Initialization scripts for studio components.
" - } - }, - "com.amazonaws.nimble#StudioComponentInitializationScriptContent": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 5120 - }, - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.nimble#StudioComponentInitializationScriptList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#StudioComponentInitializationScript" - } - }, - "com.amazonaws.nimble#StudioComponentInitializationScriptRunContext": { - "type": "enum", - "members": { - "SYSTEM_INITIALIZATION": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SYSTEM_INITIALIZATION" - } - }, - "USER_INITIALIZATION": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "USER_INITIALIZATION" - } - } - } - }, - "com.amazonaws.nimble#StudioComponentList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#StudioComponent" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 50 - } - } - }, - "com.amazonaws.nimble#StudioComponentName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 64 - }, - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.nimble#StudioComponentResource": { - "type": "resource", - "identifiers": { - "studioComponentId": { - "target": "com.amazonaws.nimble#String" - } - }, - "create": { - "target": "com.amazonaws.nimble#CreateStudioComponent" - }, - "read": { - "target": "com.amazonaws.nimble#GetStudioComponent" - }, - "update": { - "target": "com.amazonaws.nimble#UpdateStudioComponent" - }, - "delete": { - "target": "com.amazonaws.nimble#DeleteStudioComponent" - }, - "list": { - "target": "com.amazonaws.nimble#ListStudioComponents" - }, - "traits": { - "aws.api#arn": { - "template": "studio-component/{studioComponentId}" - }, - "aws.cloudformation#cfnResource": { - "name": "StudioComponent", - "additionalSchemas": [ - "com.amazonaws.nimble#StudioComponent" - ] - }, - "aws.iam#conditionKeys": [ - "aws:ResourceTag/${TagKey}", - "aws:RequestTag/${TagKey}", - "aws:TagKeys", - "nimble:studioId" - ], - "aws.iam#disableConditionKeyInference": {}, - "aws.iam#iamResource": { - "name": "studio-component" - }, - "smithy.api#documentation": "Represents a studio component that connects a non-Nimble Studio resource in your account to your studio", - "smithy.api#externalDocumentation": { - "CFNSourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-nimblestudio" - } - } - }, - "com.amazonaws.nimble#StudioComponentScriptParameterKeyValueList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#ScriptParameterKeyValue" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 30 - }, - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.nimble#StudioComponentSecurityGroupIdList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#SecurityGroupId" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 30 - } - } - }, - "com.amazonaws.nimble#StudioComponentState": { - "type": "enum", - "members": { - "CREATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CREATE_IN_PROGRESS" - } - }, - "READY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "READY" - } - }, - "UPDATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "UPDATE_IN_PROGRESS" - } - }, - "DELETE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETE_IN_PROGRESS" - } - }, - "DELETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETED" - } - }, - "DELETE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETE_FAILED" - } - }, - "CREATE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CREATE_FAILED" - } - }, - "UPDATE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "UPDATE_FAILED" - } - } - }, - "traits": { - "smithy.api#documentation": "The current state of the studio component resource.
\nWhile a studio component is being created, modified, or deleted, its state will be\n CREATE_IN_PROGRESS
, UPDATE_IN_PROGRESS
, or\n DELETE_IN_PROGRESS
.
These are called transition states.
\nNo modifications may be made to the studio component while it is in a transition\n state.
\nIf creation of the resource fails, the state will change to\n CREATE_FAILED
. The resource StatusCode
and\n StatusMessage
will provide more information of why creation failed. The\n resource in this state will automatically be deleted from your account after a period of\n time.
If updating the resource fails, the state will change to UPDATE_FAILED
.\n The resource StatusCode
and StatusMessage
will provide more\n information of why the update failed. The resource will be returned to the state it was\n in when the update request was invoked.
If deleting the resource fails, the state will change to DELETE_FAILED
.\n The resource StatusCode
and StatusMessage
will provide more\n information of why the update failed. The resource will be returned to the state it was\n in when the update request was invoked. After the resource is deleted successfully, it\n will change to the DELETED
state. The resource will no longer count against\n service quotas and cannot be used or acted upon any futher. It will be removed from your\n account after a period of time.
The current status of the studio component resource.
\nWhen the resource is in the READY
state, the status code signals what the\n last mutation made to the resource was.
When the resource is in a CREATE_FAILED
, UPDATE_FAILED
, or\n DELETE_FAILED
state, the status code signals what went wrong and why\n the mutation failed.
The ISO timestamp in seconds for when the resource was created.
" - } - }, - "createdBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The user ID of the user that created the studio component.
" - } - }, - "description": { - "target": "com.amazonaws.nimble#StudioComponentDescription", - "traits": { - "smithy.api#documentation": "The description.
" - } - }, - "name": { - "target": "com.amazonaws.nimble#StudioComponentName", - "traits": { - "smithy.api#documentation": "The name for the studio component.
" - } - }, - "studioComponentId": { - "target": "com.amazonaws.nimble#StudioComponentId", - "traits": { - "smithy.api#documentation": "The unique identifier for a studio component resource.
" - } - }, - "subtype": { - "target": "com.amazonaws.nimble#StudioComponentSubtype", - "traits": { - "smithy.api#documentation": "The specific subtype of a studio component.
" - } - }, - "type": { - "target": "com.amazonaws.nimble#StudioComponentType", - "traits": { - "smithy.api#documentation": "The type of the studio component.
" - } - }, - "updatedAt": { - "target": "com.amazonaws.nimble#Timestamp", - "traits": { - "smithy.api#documentation": "The ISO timestamp in seconds for when the resource was updated.
" - } - }, - "updatedBy": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The user ID of the user that most recently updated the resource.
" - } - } - }, - "traits": { - "smithy.api#documentation": "The studio component's summary.
" - } - }, - "com.amazonaws.nimble#StudioComponentSummaryList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#StudioComponentSummary" - } - }, - "com.amazonaws.nimble#StudioComponentType": { - "type": "enum", - "members": { - "ACTIVE_DIRECTORY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ACTIVE_DIRECTORY" - } - }, - "SHARED_FILE_SYSTEM": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SHARED_FILE_SYSTEM" - } - }, - "COMPUTE_FARM": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "COMPUTE_FARM" - } - }, - "LICENSE_SERVICE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "LICENSE_SERVICE" - } - }, - "CUSTOM": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CUSTOM" - } - } - } - }, - "com.amazonaws.nimble#StudioComponentTypeList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#StudioComponentType" - } - }, - "com.amazonaws.nimble#StudioDisplayName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 64 - }, - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.nimble#StudioEncryptionConfiguration": { - "type": "structure", - "members": { - "keyArn": { - "target": "com.amazonaws.nimble#StudioEncryptionConfigurationKeyArn", - "traits": { - "smithy.api#documentation": "The ARN for a KMS key that is used to encrypt studio data.
" - } - }, - "keyType": { - "target": "com.amazonaws.nimble#StudioEncryptionConfigurationKeyType", - "traits": { - "smithy.api#documentation": "The type of KMS key that is used to encrypt studio data.
", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "Configuration of the encryption method that is used for the studio.
" - } - }, - "com.amazonaws.nimble#StudioEncryptionConfigurationKeyArn": { - "type": "string", - "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) for a KMS key that is used to encrypt studio\n data.
", - "smithy.api#length": { - "min": 4 - }, - "smithy.api#pattern": "^arn:.*" - } - }, - "com.amazonaws.nimble#StudioEncryptionConfigurationKeyType": { - "type": "enum", - "members": { - "AWS_OWNED_KEY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "AWS_OWNED_KEY" - } - }, - "CUSTOMER_MANAGED_KEY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CUSTOMER_MANAGED_KEY" - } - } - }, - "traits": { - "smithy.api#documentation": "The type of KMS key that is used to encrypt studio data.
" - } - }, - "com.amazonaws.nimble#StudioList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#Studio" - } - }, - "com.amazonaws.nimble#StudioMembership": { - "type": "structure", - "members": { - "identityStoreId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the identity store.
" - } - }, - "persona": { - "target": "com.amazonaws.nimble#StudioPersona", - "traits": { - "smithy.api#documentation": "The persona.
" - } - }, - "principalId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The principal ID.
" - } - }, - "sid": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The Active Directory Security Identifier for this user, if available.
" - } - } - }, - "traits": { - "smithy.api#documentation": "A studio member is an association of a user from your studio identity source to\n elevated permissions that they are granted in the studio.
\nWhen you add a user to your studio using the Nimble Studio console, they are\n given access to the studio's IAM Identity Center application and are given access to log\n in to the Nimble Studio portal. These users have the permissions provided by the\n studio's user IAM role and do not appear in the studio membership\n collection. Only studio admins appear in studio membership.
\nWhen you add a user to studio membership with the ADMIN persona, upon logging in to\n the Nimble Studio portal, they are granted permissions specified by the Studio's\n Admin IAM role.
" - } - }, - "com.amazonaws.nimble#StudioMembershipList": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#StudioMembership" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 20 - } - } - }, - "com.amazonaws.nimble#StudioName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 3, - "max": 64 - }, - "smithy.api#pattern": "^[a-z0-9]*$" - } - }, - "com.amazonaws.nimble#StudioPersona": { - "type": "enum", - "members": { - "ADMINISTRATOR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ADMINISTRATOR" - } - } - } - }, - "com.amazonaws.nimble#StudioResource": { - "type": "resource", - "identifiers": { - "studioId": { - "target": "com.amazonaws.nimble#String" - } - }, - "create": { - "target": "com.amazonaws.nimble#CreateStudio" - }, - "read": { - "target": "com.amazonaws.nimble#GetStudio" - }, - "update": { - "target": "com.amazonaws.nimble#UpdateStudio" - }, - "delete": { - "target": "com.amazonaws.nimble#DeleteStudio" - }, - "list": { - "target": "com.amazonaws.nimble#ListStudios" - }, - "operations": [ - { - "target": "com.amazonaws.nimble#DeleteStudioMember" - }, - { - "target": "com.amazonaws.nimble#GetStudioMember" - }, - { - "target": "com.amazonaws.nimble#ListStudioMembers" - }, - { - "target": "com.amazonaws.nimble#PutStudioMembers" - }, - { - "target": "com.amazonaws.nimble#StartStudioSSOConfigurationRepair" - } - ], - "traits": { - "aws.api#arn": { - "template": "studio/{studioId}" - }, - "aws.cloudformation#cfnResource": { - "name": "Studio", - "additionalSchemas": [ - "com.amazonaws.nimble#Studio" - ] - }, - "aws.iam#conditionKeys": [ - "aws:ResourceTag/${TagKey}", - "aws:RequestTag/${TagKey}", - "aws:TagKeys", - "nimble:studioId" - ], - "aws.iam#disableConditionKeyInference": {}, - "aws.iam#iamResource": { - "name": "studio" - }, - "smithy.api#documentation": "Represents a studio that contains other Nimble Studio resources", - "smithy.api#externalDocumentation": { - "CFNSourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-nimblestudio" - } - } - }, - "com.amazonaws.nimble#StudioState": { - "type": "enum", - "members": { - "CREATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CREATE_IN_PROGRESS" - } - }, - "READY": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "READY" - } - }, - "UPDATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "UPDATE_IN_PROGRESS" - } - }, - "DELETE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETE_IN_PROGRESS" - } - }, - "DELETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETED" - } - }, - "DELETE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELETE_FAILED" - } - }, - "CREATE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CREATE_FAILED" - } - }, - "UPDATE_FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "UPDATE_FAILED" - } - } - } - }, - "com.amazonaws.nimble#StudioStatusCode": { - "type": "enum", - "members": { - "STUDIO_CREATED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STUDIO_CREATED" - } - }, - "STUDIO_DELETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STUDIO_DELETED" - } - }, - "STUDIO_UPDATED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STUDIO_UPDATED" - } - }, - "STUDIO_CREATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STUDIO_CREATE_IN_PROGRESS" - } - }, - "STUDIO_UPDATE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STUDIO_UPDATE_IN_PROGRESS" - } - }, - "STUDIO_DELETE_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STUDIO_DELETE_IN_PROGRESS" - } - }, - "STUDIO_WITH_LAUNCH_PROFILES_NOT_DELETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STUDIO_WITH_LAUNCH_PROFILES_NOT_DELETED" - } - }, - "STUDIO_WITH_STUDIO_COMPONENTS_NOT_DELETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STUDIO_WITH_STUDIO_COMPONENTS_NOT_DELETED" - } - }, - "STUDIO_WITH_STREAMING_IMAGES_NOT_DELETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "STUDIO_WITH_STREAMING_IMAGES_NOT_DELETED" - } - }, - "AWS_SSO_NOT_ENABLED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "AWS_SSO_NOT_ENABLED" - } - }, - "AWS_SSO_ACCESS_DENIED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "AWS_SSO_ACCESS_DENIED" - } - }, - "ROLE_NOT_OWNED_BY_STUDIO_OWNER": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ROLE_NOT_OWNED_BY_STUDIO_OWNER" - } - }, - "ROLE_COULD_NOT_BE_ASSUMED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ROLE_COULD_NOT_BE_ASSUMED" - } - }, - "INTERNAL_ERROR": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INTERNAL_ERROR" - } - }, - "ENCRYPTION_KEY_NOT_FOUND": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ENCRYPTION_KEY_NOT_FOUND" - } - }, - "ENCRYPTION_KEY_ACCESS_DENIED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ENCRYPTION_KEY_ACCESS_DENIED" - } - }, - "AWS_SSO_CONFIGURATION_REPAIRED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "AWS_SSO_CONFIGURATION_REPAIRED" - } - }, - "AWS_SSO_CONFIGURATION_REPAIR_IN_PROGRESS": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "AWS_SSO_CONFIGURATION_REPAIR_IN_PROGRESS" - } - }, - "AWS_STS_REGION_DISABLED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "AWS_STS_REGION_DISABLED" - } - } - }, - "traits": { - "smithy.api#documentation": "The status code.
" - } - }, - "com.amazonaws.nimble#TagResource": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#TagResourceRequest" - }, - "output": { - "target": "com.amazonaws.nimble#TagResourceResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to add or overwrite one or more tags for the specified Nimble Studio resource", - "smithy.api#documentation": "Creates tags for a resource, given its ARN.
", - "smithy.api#http": { - "method": "POST", - "uri": "/2020-08-01/tags/{resourceArn}", - "code": 204 - } - } - }, - "com.amazonaws.nimble#TagResourceRequest": { - "type": "structure", - "members": { - "resourceArn": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The Amazon Resource Name (ARN) of the resource you want to add tags to.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tags": { - "target": "com.amazonaws.nimble#Tags", - "traits": { - "smithy.api#documentation": "A collection of labels, in the form of key-value pairs, that apply to this\n resource.
" - } - } - }, - "traits": { - "smithy.api#input": {}, - "smithy.api#references": [ - { - "resource": "com.amazonaws.nimble#StudioResource", - "ids": { - "studioId": "resourceArn" - } - }, - { - "resource": "com.amazonaws.nimble#StudioComponentResource", - "ids": { - "studioComponentId": "resourceArn" - } - }, - { - "resource": "com.amazonaws.nimble#LaunchProfileResource", - "ids": { - "launchProfileId": "resourceArn" - } - }, - { - "resource": "com.amazonaws.nimble#StreamingSessionResource", - "ids": { - "sessionId": "resourceArn" - } - }, - { - "resource": "com.amazonaws.nimble#StreamingImageResource", - "ids": { - "streamingImageId": "resourceArn" - } - } - ] - } - }, - "com.amazonaws.nimble#TagResourceResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#Tags": { - "type": "map", - "key": { - "target": "com.amazonaws.nimble#String" - }, - "value": { - "target": "com.amazonaws.nimble#String" - } - }, - "com.amazonaws.nimble#ThrottlingException": { - "type": "structure", - "members": { - "code": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "A more specific error code.
" - } - }, - "context": { - "target": "com.amazonaws.nimble#ExceptionContext", - "traits": { - "smithy.api#documentation": "The exception context.
" - } - }, - "message": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "A human-readable description of the error.
" - } - } - }, - "traits": { - "smithy.api#documentation": "The request throughput limit was exceeded.
", - "smithy.api#error": "client", - "smithy.api#httpError": 429, - "smithy.api#retryable": {} - } - }, - "com.amazonaws.nimble#Timestamp": { - "type": "timestamp", - "traits": { - "smithy.api#timestampFormat": "date-time" - } - }, - "com.amazonaws.nimble#UntagResource": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#UntagResourceRequest" - }, - "output": { - "target": "com.amazonaws.nimble#UntagResourceResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to disassociate one or more tags from the specified Nimble Studio resource", - "smithy.api#documentation": "Deletes the tags for a resource.
", - "smithy.api#http": { - "method": "DELETE", - "uri": "/2020-08-01/tags/{resourceArn}", - "code": 204 - }, - "smithy.api#idempotent": {} - } - }, - "com.amazonaws.nimble#UntagResourceRequest": { - "type": "structure", - "members": { - "resourceArn": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "Identifies the Amazon Resource Name(ARN) key from which you are removing tags.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tagKeys": { - "target": "com.amazonaws.nimble#StringList", - "traits": { - "smithy.api#documentation": "One or more tag keys. Specify only the tag keys, not the tag values.
", - "smithy.api#httpQuery": "tagKeys", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {}, - "smithy.api#references": [ - { - "resource": "com.amazonaws.nimble#StudioResource", - "ids": { - "studioId": "resourceArn" - } - }, - { - "resource": "com.amazonaws.nimble#StudioComponentResource", - "ids": { - "studioComponentId": "resourceArn" - } - }, - { - "resource": "com.amazonaws.nimble#LaunchProfileResource", - "ids": { - "launchProfileId": "resourceArn" - } - }, - { - "resource": "com.amazonaws.nimble#StreamingSessionResource", - "ids": { - "sessionId": "resourceArn" - } - }, - { - "resource": "com.amazonaws.nimble#StreamingImageResource", - "ids": { - "streamingImageId": "resourceArn" - } - } - ] - } - }, - "com.amazonaws.nimble#UntagResourceResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#UpdateLaunchProfile": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#UpdateLaunchProfileRequest" - }, - "output": { - "target": "com.amazonaws.nimble#UpdateLaunchProfileResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to update a launch profile", - "aws.iam#requiredActions": [ - "ec2:DescribeSubnets", - "ec2:DescribeRouteTables", - "ec2:DescribeNetworkAcls", - "ec2:DescribeVpcEndpoints", - "ec2:DescribeNatGateways" - ], - "smithy.api#documentation": "Update a launch profile.
", - "smithy.api#http": { - "method": "PATCH", - "uri": "/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}", - "code": 200 - } - } - }, - "com.amazonaws.nimble#UpdateLaunchProfileMember": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#UpdateLaunchProfileMemberRequest" - }, - "output": { - "target": "com.amazonaws.nimble#UpdateLaunchProfileMemberResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to update a launch profile member", - "smithy.api#documentation": "Update a user persona in launch profile membership.
", - "smithy.api#http": { - "method": "PATCH", - "uri": "/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/membership/{principalId}", - "code": 200 - } - } - }, - "com.amazonaws.nimble#UpdateLaunchProfileMemberRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "launchProfileId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the launch profile used to control access from the streaming session.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "persona": { - "target": "com.amazonaws.nimble#LaunchProfilePersona", - "traits": { - "smithy.api#documentation": "The persona.
", - "smithy.api#required": {} - } - }, - "principalId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The principal ID. This currently supports a IAM Identity Center UserId.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#UpdateLaunchProfileMemberResponse": { - "type": "structure", - "members": { - "member": { - "target": "com.amazonaws.nimble#LaunchProfileMembership", - "traits": { - "smithy.api#documentation": "The updated member.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#UpdateLaunchProfileRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "description": { - "target": "com.amazonaws.nimble#LaunchProfileDescription", - "traits": { - "smithy.api#documentation": "The description.
" - } - }, - "launchProfileId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The ID of the launch profile used to control access from the streaming session.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "launchProfileProtocolVersions": { - "target": "com.amazonaws.nimble#LaunchProfileProtocolVersionList", - "traits": { - "smithy.api#documentation": "The version number of the protocol that is used by the launch profile. The only valid\n version is \"2021-03-31\".
" - } - }, - "name": { - "target": "com.amazonaws.nimble#LaunchProfileName", - "traits": { - "smithy.api#documentation": "The name for the launch profile.
" - } - }, - "streamConfiguration": { - "target": "com.amazonaws.nimble#StreamConfigurationCreate", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "A configuration for a streaming session.
" - } - }, - "studioComponentIds": { - "target": "com.amazonaws.nimble#LaunchProfileStudioComponentIdList", - "traits": { - "smithy.api#documentation": "Unique identifiers for a collection of studio components that can be used with this\n launch profile.
" - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#UpdateLaunchProfileResponse": { - "type": "structure", - "members": { - "launchProfile": { - "target": "com.amazonaws.nimble#LaunchProfile", - "traits": { - "smithy.api#documentation": "The launch profile.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#UpdateStreamingImage": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#UpdateStreamingImageRequest" - }, - "output": { - "target": "com.amazonaws.nimble#UpdateStreamingImageResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to update a streaming image", - "smithy.api#documentation": "Update streaming image.
", - "smithy.api#http": { - "method": "PATCH", - "uri": "/2020-08-01/studios/{studioId}/streaming-images/{streamingImageId}", - "code": 200 - } - } - }, - "com.amazonaws.nimble#UpdateStreamingImageRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "description": { - "target": "com.amazonaws.nimble#StreamingImageDescription", - "traits": { - "smithy.api#documentation": "The description.
" - } - }, - "name": { - "target": "com.amazonaws.nimble#StreamingImageName", - "traits": { - "smithy.api#documentation": "The name for the streaming image.
" - } - }, - "streamingImageId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The streaming image ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#UpdateStreamingImageResponse": { - "type": "structure", - "members": { - "streamingImage": { - "target": "com.amazonaws.nimble#StreamingImage" - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#UpdateStudio": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#UpdateStudioRequest" - }, - "output": { - "target": "com.amazonaws.nimble#UpdateStudioResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to update a studio", - "aws.iam#requiredActions": [ - "iam:PassRole" - ], - "smithy.api#documentation": "Update a Studio resource.
\nCurrently, this operation only supports updating the displayName of your\n studio.
", - "smithy.api#http": { - "method": "PATCH", - "uri": "/2020-08-01/studios/{studioId}", - "code": 200 - } - } - }, - "com.amazonaws.nimble#UpdateStudioComponent": { - "type": "operation", - "input": { - "target": "com.amazonaws.nimble#UpdateStudioComponentRequest" - }, - "output": { - "target": "com.amazonaws.nimble#UpdateStudioComponentResponse" - }, - "errors": [ - { - "target": "com.amazonaws.nimble#AccessDeniedException" - }, - { - "target": "com.amazonaws.nimble#ConflictException" - }, - { - "target": "com.amazonaws.nimble#InternalServerErrorException" - }, - { - "target": "com.amazonaws.nimble#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.nimble#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.nimble#ThrottlingException" - }, - { - "target": "com.amazonaws.nimble#ValidationException" - } - ], - "traits": { - "aws.iam#actionPermissionDescription": "Grants permission to update a studio component", - "aws.iam#requiredActions": [ - "ec2:DescribeSecurityGroups", - "fsx:DescribeFileSystems", - "ds:DescribeDirectories", - "iam:PassRole" - ], - "smithy.api#documentation": "Updates a studio component resource.
", - "smithy.api#http": { - "method": "PATCH", - "uri": "/2020-08-01/studios/{studioId}/studio-components/{studioComponentId}", - "code": 200 - } - } - }, - "com.amazonaws.nimble#UpdateStudioComponentRequest": { - "type": "structure", - "members": { - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "configuration": { - "target": "com.amazonaws.nimble#StudioComponentConfiguration", - "traits": { - "smithy.api#documentation": "The configuration of the studio component, based on component type.
" - } - }, - "description": { - "target": "com.amazonaws.nimble#StudioComponentDescription", - "traits": { - "smithy.api#documentation": "The description.
" - } - }, - "ec2SecurityGroupIds": { - "target": "com.amazonaws.nimble#StudioComponentSecurityGroupIdList", - "traits": { - "smithy.api#documentation": "The EC2 security groups that control access to the studio component.
" - } - }, - "initializationScripts": { - "target": "com.amazonaws.nimble#StudioComponentInitializationScriptList", - "traits": { - "smithy.api#documentation": "Initialization scripts for studio components.
" - } - }, - "name": { - "target": "com.amazonaws.nimble#StudioComponentName", - "traits": { - "smithy.api#documentation": "The name for the studio component.
" - } - }, - "scriptParameters": { - "target": "com.amazonaws.nimble#StudioComponentScriptParameterKeyValueList", - "traits": { - "smithy.api#documentation": "Parameters for the studio component scripts.
" - } - }, - "studioComponentId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio component ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "subtype": { - "target": "com.amazonaws.nimble#StudioComponentSubtype", - "traits": { - "smithy.api#documentation": "The specific subtype of a studio component.
" - } - }, - "type": { - "target": "com.amazonaws.nimble#StudioComponentType", - "traits": { - "smithy.api#documentation": "The type of the studio component.
" - } - }, - "secureInitializationRoleArn": { - "target": "com.amazonaws.nimble#RoleArn", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "An IAM role attached to Studio Component when the system initialization\n script runs which give the studio component access to Amazon Web Services resources when\n the system initialization script runs.
" - } - }, - "runtimeRoleArn": { - "target": "com.amazonaws.nimble#RoleArn", - "traits": { - "aws.cloudformation#cfnMutability": "full", - "smithy.api#documentation": "An IAM role attached to a Studio Component that gives the studio\n component access to Amazon Web Services resources at anytime while the instance is\n running.
" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#UpdateStudioComponentResponse": { - "type": "structure", - "members": { - "studioComponent": { - "target": "com.amazonaws.nimble#StudioComponent", - "traits": { - "smithy.api#documentation": "Information about the studio component.
" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#UpdateStudioRequest": { - "type": "structure", - "members": { - "adminRoleArn": { - "target": "com.amazonaws.nimble#RoleArn", - "traits": { - "smithy.api#documentation": "The IAM role that Studio Admins will assume when logging in to the\n Nimble Studio portal.
" - } - }, - "clientToken": { - "target": "com.amazonaws.nimble#ClientToken", - "traits": { - "aws.cloudformation#cfnExcludeProperty": {}, - "smithy.api#documentation": "Unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If you don’t specify a client token, the Amazon Web Services SDK automatically\n generates a client token and uses it for the request to ensure idempotency.
", - "smithy.api#httpHeader": "X-Amz-Client-Token", - "smithy.api#idempotencyToken": {} - } - }, - "displayName": { - "target": "com.amazonaws.nimble#StudioDisplayName", - "traits": { - "smithy.api#documentation": "A friendly name for the studio.
" - } - }, - "studioId": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "The studio ID.
", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "userRoleArn": { - "target": "com.amazonaws.nimble#RoleArn", - "traits": { - "smithy.api#documentation": "The IAM role that Studio Users will assume when logging in to the\n Nimble Studio portal.
" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.nimble#UpdateStudioResponse": { - "type": "structure", - "members": { - "studio": { - "target": "com.amazonaws.nimble#Studio", - "traits": { - "smithy.api#documentation": "Information about a studio.
", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.nimble#ValidationException": { - "type": "structure", - "members": { - "code": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "A more specific error code.
" - } - }, - "context": { - "target": "com.amazonaws.nimble#ExceptionContext", - "traits": { - "smithy.api#documentation": "The exception context.
" - } - }, - "message": { - "target": "com.amazonaws.nimble#String", - "traits": { - "smithy.api#documentation": "A human-readable description of the error.
" - } - } - }, - "traits": { - "smithy.api#documentation": "One of the parameters in the request is invalid.
", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.nimble#ValidationResult": { - "type": "structure", - "members": { - "type": { - "target": "com.amazonaws.nimble#LaunchProfileValidationType", - "traits": { - "smithy.api#documentation": "The type of the validation result.
", - "smithy.api#required": {} - } - }, - "state": { - "target": "com.amazonaws.nimble#LaunchProfileValidationState", - "traits": { - "smithy.api#documentation": "The current state.
", - "smithy.api#required": {} - } - }, - "statusCode": { - "target": "com.amazonaws.nimble#LaunchProfileValidationStatusCode", - "traits": { - "smithy.api#documentation": "The status code. This will contain the failure reason if the state is\n VALIDATION_FAILED
.
The status message for the validation result.
", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "The launch profile validation result.
" - } - }, - "com.amazonaws.nimble#ValidationResults": { - "type": "list", - "member": { - "target": "com.amazonaws.nimble#ValidationResult" - } - }, - "com.amazonaws.nimble#VolumeConfiguration": { - "type": "structure", - "members": { - "size": { - "target": "com.amazonaws.nimble#VolumeSizeInGiB", - "traits": { - "smithy.api#default": 500, - "smithy.api#documentation": "The size of the root volume that is attached to the streaming session. The root volume\n size is measured in GiBs.
" - } - }, - "throughput": { - "target": "com.amazonaws.nimble#VolumeThroughputInMiBs", - "traits": { - "smithy.api#default": 125, - "smithy.api#documentation": "The throughput to provision for the root volume that is attached to the streaming\n session. The throughput is measured in MiB/s.
" - } - }, - "iops": { - "target": "com.amazonaws.nimble#VolumeIops", - "traits": { - "smithy.api#default": 3000, - "smithy.api#documentation": "The number of I/O operations per second for the root volume that is attached to\n streaming session.
" - } - } - }, - "traits": { - "smithy.api#documentation": "Custom volume configuration for the root volumes that are attached to streaming\n sessions.
\nThis parameter is only allowed when sessionPersistenceMode
is\n ACTIVATED
.
Welcome to the Amazon Nimble Studio API reference. This API reference provides\n methods, schema, resources, parameters, and more to help you get the most out of Nimble\n Studio.
\nNimble Studio is a virtual studio that empowers visual effects, animation, and\n interactive content teams to create content securely within a scalable, private cloud\n service.
", - "smithy.api#title": "AmazonNimbleStudio", - "smithy.rules#endpointRuleSet": { - "version": "1.0", - "parameters": { - "Region": { - "builtIn": "AWS::Region", - "required": false, - "documentation": "The AWS region used to dispatch the request.", - "type": "String" - }, - "UseDualStack": { - "builtIn": "AWS::UseDualStack", - "required": true, - "default": false, - "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", - "type": "Boolean" - }, - "UseFIPS": { - "builtIn": "AWS::UseFIPS", - "required": true, - "default": false, - "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", - "type": "Boolean" - }, - "Endpoint": { - "builtIn": "SDK::Endpoint", - "required": false, - "documentation": "Override the endpoint used to send this request", - "type": "String" - } - }, - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "error": "Invalid Configuration: FIPS and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" - }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Region" - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://nimble-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://nimble-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://nimble.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ] - }, - { - "conditions": [], - "endpoint": { - "url": "https://nimble.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" - } - ] - }, - "smithy.rules#endpointTests": { - "testCases": [ - { - "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://nimble.ap-northeast-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-northeast-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://nimble.ap-southeast-2.amazonaws.com" - } - }, - "params": { - "Region": "ap-southeast-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://nimble.ca-central-1.amazonaws.com" - } - }, - "params": { - "Region": "ca-central-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://nimble.eu-west-2.amazonaws.com" - } - }, - "params": { - "Region": "eu-west-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://nimble.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://nimble.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://nimble-fips.us-east-1.api.aws" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://nimble-fips.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://nimble.us-east-1.api.aws" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://nimble-fips.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://nimble-fips.cn-north-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://nimble.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://nimble.cn-north-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://nimble-fips.us-gov-east-1.api.aws" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://nimble-fips.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://nimble.us-gov-east-1.api.aws" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://nimble.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://nimble-fips.us-iso-east-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://nimble.us-iso-east-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://nimble-fips.us-isob-east-1.sc2s.sgov.gov" - } - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://nimble.us-isob-east-1.sc2s.sgov.gov" - } - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", - "expect": { - "endpoint": { - "url": "https://example.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", - "expect": { - "endpoint": { - "url": "https://example.com" - } - }, - "params": { - "UseFIPS": false, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with fips enabled and dualstack disabled", - "expect": { - "error": "Invalid Configuration: FIPS and custom endpoint are not supported" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with fips disabled and dualstack enabled", - "expect": { - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "Missing region", - "expect": { - "error": "Invalid Configuration: Missing Region" - } - } - ], - "version": "1.0" - } - } - } - } -} \ No newline at end of file diff --git a/service/nimble/CHANGELOG.md b/service/nimble/CHANGELOG.md deleted file mode 100644 index ff12e2baab5..00000000000 --- a/service/nimble/CHANGELOG.md +++ /dev/null @@ -1,518 +0,0 @@ -# v1.29.0 (2024-10-25) - -* **Feature**: Mark service/nimble as deprecated. This service is no longer available for use. See https://aws.amazon.com/nimble-studio/faqs/. - -# v1.28.3 (2024-10-24) - -* No change notes available for this release. - -# v1.28.2 (2024-10-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.1 (2024-10-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.0 (2024-10-04) - -* **Feature**: Add support for HTTP client metrics. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.4 (2024-10-03) - -* No change notes available for this release. - -# v1.27.3 (2024-09-27) - -* No change notes available for this release. - -# v1.27.2 (2024-09-25) - -* No change notes available for this release. - -# v1.27.1 (2024-09-23) - -* No change notes available for this release. - -# v1.27.0 (2024-09-20) - -* **Feature**: Add tracing and metrics support to service clients. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.7 (2024-09-17) - -* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. - -# v1.26.6 (2024-09-04) - -* No change notes available for this release. - -# v1.26.5 (2024-09-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.4 (2024-08-15) - -* **Dependency Update**: Bump minimum Go version to 1.21. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.3 (2024-07-10.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.2 (2024-07-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.1 (2024-06-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.0 (2024-06-26) - -* **Feature**: Support list-of-string endpoint parameter. - -# v1.25.1 (2024-06-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.0 (2024-06-18) - -* **Feature**: Track usage of various AWS SDK features in user-agent string. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.11 (2024-06-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.10 (2024-06-07) - -* **Bug Fix**: Add clock skew correction on all service clients -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.9 (2024-06-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.8 (2024-05-23) - -* No change notes available for this release. - -# v1.24.7 (2024-05-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.6 (2024-05-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.5 (2024-05-08) - -* **Bug Fix**: GoDoc improvement - -# v1.24.4 (2024-03-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.3 (2024-03-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.2 (2024-03-07) - -* **Bug Fix**: Remove dependency on go-cmp. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.1 (2024-02-23) - -* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.0 (2024-02-22) - -* **Feature**: Add middleware stack snapshot tests. - -# v1.23.2 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.1 (2024-02-20) - -* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure. - -# v1.23.0 (2024-02-16) - -* **Feature**: Add new ClientOptions field to waiter config which allows you to extend the config for operation calls made by waiters. - -# v1.22.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.6 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.5 (2023-12-08) - -* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. - -# v1.21.4 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.3 (2023-12-06) - -* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. - -# v1.21.2 (2023-12-01) - -* **Bug Fix**: Correct wrapping of errors in authentication workflow. -* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.1 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.0 (2023-11-29) - -* **Feature**: Expose Options() accessor on service clients. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.5 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.4 (2023-11-28) - -* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. - -# v1.20.3 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.2 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.1 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.0 (2023-11-01) - -* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.2 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.1 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.0 (2023-09-18) - -* **Announcement**: [BREAKFIX] Change in MaxResults datatype from value to pointer type in cognito-sync service. -* **Feature**: Adds several endpoint ruleset changes across all models: smaller rulesets, removed non-unique regional endpoints, fixes FIPS and DualStack endpoints, and make region not required in SDK::Endpoint. Additional breakfix to cognito-sync field. - -# v1.17.5 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.4 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.3 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.2 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.1 (2023-08-01) - -* No change notes available for this release. - -# v1.17.0 (2023-07-31) - -* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.15 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.14 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.13 (2023-06-20) - -* No change notes available for this release. - -# v1.16.12 (2023-06-15) - -* No change notes available for this release. - -# v1.16.11 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.10 (2023-05-04) - -* No change notes available for this release. - -# v1.16.9 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.8 (2023-04-10) - -* No change notes available for this release. - -# v1.16.7 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.6 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.5 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.4 (2023-02-22) - -* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. - -# v1.16.3 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.2 (2023-02-15) - -* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910. -* **Bug Fix**: Correct error type parsing for restJson services. - -# v1.16.1 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.0 (2023-01-05) - -* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). - -# v1.15.0 (2022-12-20) - -* **Feature**: Amazon Nimble Studio now supports configuring session storage volumes and persistence, as well as backup and restore sessions through launch profiles. - -# v1.14.4 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.3 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.2 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.1 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.0 (2022-09-23) - -* **Feature**: Amazon Nimble Studio adds support for on-demand Amazon Elastic Compute Cloud (EC2) G3 and G5 instances, allowing customers to utilize additional GPU instance types for their creative projects. - -# v1.13.9 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.8 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.7 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.6 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.5 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.4 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.3 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.2 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.1 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.0 (2022-07-14) - -* **Feature**: Amazon Nimble Studio adds support for IAM-based access to AWS resources for Nimble Studio components and custom studio components. Studio Component scripts use these roles on Nimble Studio workstation to mount filesystems, access S3 buckets, or other configured resources in the Studio's AWS account - -# v1.12.9 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.8 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.7 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.6 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.5 (2022-05-02) - -* No change notes available for this release. - -# v1.12.4 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.3 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.2 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.1 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.0 (2022-02-24) - -* **Feature**: API client updated -* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.0 (2022-01-14) - -* **Feature**: Updated API models -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.0 (2022-01-07) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.0 (2021-12-21) - -* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens. -* **Feature**: API client updated - -# v1.7.3 (2021-12-03) - -* **Bug Fix**: Fixed an issue that prevent auto-filling of an API's idempotency parameters when not explictly provided by the caller. - -# v1.7.2 (2021-12-02) - -* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514)) -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.0 (2021-11-12) - -* **Feature**: Waiters now have a `WaitForOutput` method, which can be used to retrieve the output of the successful wait operation. Thank you to [Andrew Haines](https://github.com/haines) for contributing this feature. - -# v1.6.0 (2021-11-06) - -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Feature**: Updated service to latest API model. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.0 (2021-10-21) - -* **Feature**: Updated to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.2 (2021-10-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.1 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.0 (2021-08-27) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.1 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.0 (2021-08-12) - -* **Feature**: API client updated - -# v1.2.2 (2021-08-04) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.1 (2021-07-15) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.0 (2021-06-25) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.1 (2021-05-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/service/nimble/LICENSE.txt b/service/nimble/LICENSE.txt deleted file mode 100644 index d6456956733..00000000000 --- a/service/nimble/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/service/nimble/api_client.go b/service/nimble/api_client.go deleted file mode 100644 index 4e81be1d55f..00000000000 --- a/service/nimble/api_client.go +++ /dev/null @@ -1,928 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - cryptorand "crypto/rand" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/aws/defaults" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/retry" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" - internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - smithydocument "github.com/aws/smithy-go/document" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - smithyrand "github.com/aws/smithy-go/rand" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net" - "net/http" - "sync/atomic" - "time" -) - -const ServiceID = "nimble" -const ServiceAPIVersion = "2020-08-01" - -type operationMetrics struct { - Duration metrics.Float64Histogram - SerializeDuration metrics.Float64Histogram - ResolveIdentityDuration metrics.Float64Histogram - ResolveEndpointDuration metrics.Float64Histogram - SignRequestDuration metrics.Float64Histogram - DeserializeDuration metrics.Float64Histogram -} - -func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { - switch name { - case "client.call.duration": - return m.Duration - case "client.call.serialization_duration": - return m.SerializeDuration - case "client.call.resolve_identity_duration": - return m.ResolveIdentityDuration - case "client.call.resolve_endpoint_duration": - return m.ResolveEndpointDuration - case "client.call.signing_duration": - return m.SignRequestDuration - case "client.call.deserialization_duration": - return m.DeserializeDuration - default: - panic("unrecognized operation metric") - } -} - -func timeOperationMetric[T any]( - ctx context.Context, metric string, fn func() (T, error), - opts ...metrics.RecordMetricOption, -) (T, error) { - instr := getOperationMetrics(ctx).histogramFor(metric) - opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) - - start := time.Now() - v, err := fn() - end := time.Now() - - elapsed := end.Sub(start) - instr.Record(ctx, float64(elapsed)/1e9, opts...) - return v, err -} - -func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { - instr := getOperationMetrics(ctx).histogramFor(metric) - opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) - - var ended bool - start := time.Now() - return func() { - if ended { - return - } - ended = true - - end := time.Now() - - elapsed := end.Sub(start) - instr.Record(ctx, float64(elapsed)/1e9, opts...) - } -} - -func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { - return func(o *metrics.RecordMetricOptions) { - o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) - o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) - } -} - -type operationMetricsKey struct{} - -func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { - meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/nimble") - om := &operationMetrics{} - - var err error - - om.Duration, err = operationMetricTimer(meter, "client.call.duration", - "Overall call duration (including retries and time to send or receive request and response body)") - if err != nil { - return nil, err - } - om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", - "The time it takes to serialize a message body") - if err != nil { - return nil, err - } - om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", - "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") - if err != nil { - return nil, err - } - om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", - "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") - if err != nil { - return nil, err - } - om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", - "The time it takes to sign a request") - if err != nil { - return nil, err - } - om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", - "The time it takes to deserialize a message body") - if err != nil { - return nil, err - } - - return context.WithValue(parent, operationMetricsKey{}, om), nil -} - -func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { - return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { - o.UnitLabel = "s" - o.Description = desc - }) -} - -func getOperationMetrics(ctx context.Context) *operationMetrics { - return ctx.Value(operationMetricsKey{}).(*operationMetrics) -} - -func operationTracer(p tracing.TracerProvider) tracing.Tracer { - return p.Tracer("github.com/aws/aws-sdk-go-v2/service/nimble") -} - -// Client provides the API client to make operations call for AmazonNimbleStudio. -type Client struct { - options Options - - // Difference between the time reported by the server and the client - timeOffset *atomic.Int64 -} - -// New returns an initialized Client based on the functional options. Provide -// additional functional options to further configure the behavior of the client, -// such as changing the client's endpoint or adding custom middleware behavior. -func New(options Options, optFns ...func(*Options)) *Client { - options = options.Copy() - - resolveDefaultLogger(&options) - - setResolvedDefaultsMode(&options) - - resolveRetryer(&options) - - resolveHTTPClient(&options) - - resolveHTTPSignerV4(&options) - - resolveIdempotencyTokenProvider(&options) - - resolveEndpointResolverV2(&options) - - resolveTracerProvider(&options) - - resolveMeterProvider(&options) - - resolveAuthSchemeResolver(&options) - - for _, fn := range optFns { - fn(&options) - } - - finalizeRetryMaxAttempts(&options) - - ignoreAnonymousAuth(&options) - - wrapWithAnonymousAuth(&options) - - resolveAuthSchemes(&options) - - client := &Client{ - options: options, - } - - initializeTimeOffsetResolver(client) - - return client -} - -// Options returns a copy of the client configuration. -// -// Callers SHOULD NOT perform mutations on any inner structures within client -// config. Config overrides should instead be made on a per-operation basis through -// functional options. -func (c *Client) Options() Options { - return c.options.Copy() -} - -func (c *Client) invokeOperation( - ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, -) ( - result interface{}, metadata middleware.Metadata, err error, -) { - ctx = middleware.ClearStackValues(ctx) - ctx = middleware.WithServiceID(ctx, ServiceID) - ctx = middleware.WithOperationName(ctx, opID) - - stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) - options := c.options.Copy() - - for _, fn := range optFns { - fn(&options) - } - - finalizeOperationRetryMaxAttempts(&options, *c) - - finalizeClientEndpointResolverOptions(&options) - - for _, fn := range stackFns { - if err := fn(stack, options); err != nil { - return nil, metadata, err - } - } - - for _, fn := range options.APIOptions { - if err := fn(stack); err != nil { - return nil, metadata, err - } - } - - ctx, err = withOperationMetrics(ctx, options.MeterProvider) - if err != nil { - return nil, metadata, err - } - - tracer := operationTracer(options.TracerProvider) - spanName := fmt.Sprintf("%s.%s", ServiceID, opID) - - ctx = tracing.WithOperationTracer(ctx, tracer) - - ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { - o.Kind = tracing.SpanKindClient - o.Properties.Set("rpc.system", "aws-api") - o.Properties.Set("rpc.method", opID) - o.Properties.Set("rpc.service", ServiceID) - }) - endTimer := startMetricTimer(ctx, "client.call.duration") - defer endTimer() - defer span.End() - - handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { - o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/nimble") - }) - decorated := middleware.DecorateHandler(handler, stack) - result, metadata, err = decorated.Handle(ctx, params) - if err != nil { - span.SetProperty("exception.type", fmt.Sprintf("%T", err)) - span.SetProperty("exception.message", err.Error()) - - var aerr smithy.APIError - if errors.As(err, &aerr) { - span.SetProperty("api.error_code", aerr.ErrorCode()) - span.SetProperty("api.error_message", aerr.ErrorMessage()) - span.SetProperty("api.error_fault", aerr.ErrorFault().String()) - } - - err = &smithy.OperationError{ - ServiceID: ServiceID, - OperationName: opID, - Err: err, - } - } - - span.SetProperty("error", err != nil) - if err == nil { - span.SetStatus(tracing.SpanStatusOK) - } else { - span.SetStatus(tracing.SpanStatusError) - } - - return result, metadata, err -} - -type operationInputKey struct{} - -func setOperationInput(ctx context.Context, input interface{}) context.Context { - return middleware.WithStackValue(ctx, operationInputKey{}, input) -} - -func getOperationInput(ctx context.Context) interface{} { - return middleware.GetStackValue(ctx, operationInputKey{}) -} - -type setOperationInputMiddleware struct { -} - -func (*setOperationInputMiddleware) ID() string { - return "setOperationInput" -} - -func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - ctx = setOperationInput(ctx, in.Parameters) - return next.HandleSerialize(ctx, in) -} - -func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { - if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { - return fmt.Errorf("add ResolveAuthScheme: %w", err) - } - if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { - return fmt.Errorf("add GetIdentity: %v", err) - } - if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { - return fmt.Errorf("add ResolveEndpointV2: %v", err) - } - if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { - return fmt.Errorf("add Signing: %w", err) - } - return nil -} -func resolveAuthSchemeResolver(options *Options) { - if options.AuthSchemeResolver == nil { - options.AuthSchemeResolver = &defaultAuthSchemeResolver{} - } -} - -func resolveAuthSchemes(options *Options) { - if options.AuthSchemes == nil { - options.AuthSchemes = []smithyhttp.AuthScheme{ - internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ - Signer: options.HTTPSignerV4, - Logger: options.Logger, - LogSigning: options.ClientLogMode.IsSigning(), - }), - } - } -} - -type noSmithyDocumentSerde = smithydocument.NoSerde - -type legacyEndpointContextSetter struct { - LegacyResolver EndpointResolver -} - -func (*legacyEndpointContextSetter) ID() string { - return "legacyEndpointContextSetter" -} - -func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.LegacyResolver != nil { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) - } - - return next.HandleInitialize(ctx, in) - -} -func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { - return stack.Initialize.Add(&legacyEndpointContextSetter{ - LegacyResolver: o.EndpointResolver, - }, middleware.Before) -} - -func resolveDefaultLogger(o *Options) { - if o.Logger != nil { - return - } - o.Logger = logging.Nop{} -} - -func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { - return middleware.AddSetLoggerMiddleware(stack, o.Logger) -} - -func setResolvedDefaultsMode(o *Options) { - if len(o.resolvedDefaultsMode) > 0 { - return - } - - var mode aws.DefaultsMode - mode.SetFromString(string(o.DefaultsMode)) - - if mode == aws.DefaultsModeAuto { - mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) - } - - o.resolvedDefaultsMode = mode -} - -// NewFromConfig returns a new client from the provided config. -func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { - opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - } - resolveAWSRetryerProvider(cfg, &opts) - resolveAWSRetryMaxAttempts(cfg, &opts) - resolveAWSRetryMode(cfg, &opts) - resolveAWSEndpointResolver(cfg, &opts) - resolveUseDualStackEndpoint(cfg, &opts) - resolveUseFIPSEndpoint(cfg, &opts) - resolveBaseEndpoint(cfg, &opts) - return New(opts, optFns...) -} - -func resolveHTTPClient(o *Options) { - var buildable *awshttp.BuildableClient - - if o.HTTPClient != nil { - var ok bool - buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) - if !ok { - return - } - } else { - buildable = awshttp.NewBuildableClient() - } - - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { - if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { - dialer.Timeout = dialerTimeout - } - }) - - buildable = buildable.WithTransportOptions(func(transport *http.Transport) { - if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { - transport.TLSHandshakeTimeout = tlsHandshakeTimeout - } - }) - } - - o.HTTPClient = buildable -} - -func resolveRetryer(o *Options) { - if o.Retryer != nil { - return - } - - if len(o.RetryMode) == 0 { - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - o.RetryMode = modeConfig.RetryMode - } - } - if len(o.RetryMode) == 0 { - o.RetryMode = aws.RetryModeStandard - } - - var standardOptions []func(*retry.StandardOptions) - if v := o.RetryMaxAttempts; v != 0 { - standardOptions = append(standardOptions, func(so *retry.StandardOptions) { - so.MaxAttempts = v - }) - } - - switch o.RetryMode { - case aws.RetryModeAdaptive: - var adaptiveOptions []func(*retry.AdaptiveModeOptions) - if len(standardOptions) != 0 { - adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { - ao.StandardOptions = append(ao.StandardOptions, standardOptions...) - }) - } - o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) - - default: - o.Retryer = retry.NewStandard(standardOptions...) - } -} - -func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { - if cfg.Retryer == nil { - return - } - o.Retryer = cfg.Retryer() -} - -func resolveAWSRetryMode(cfg aws.Config, o *Options) { - if len(cfg.RetryMode) == 0 { - return - } - o.RetryMode = cfg.RetryMode -} -func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { - if cfg.RetryMaxAttempts == 0 { - return - } - o.RetryMaxAttempts = cfg.RetryMaxAttempts -} - -func finalizeRetryMaxAttempts(o *Options) { - if o.RetryMaxAttempts == 0 { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func finalizeOperationRetryMaxAttempts(o *Options, client Client) { - if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { - if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { - return - } - o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) -} - -func addClientUserAgent(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "nimble", goModuleVersion) - if len(options.AppID) > 0 { - ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) - } - - return nil -} - -func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { - id := (*awsmiddleware.RequestUserAgent)(nil).ID() - mw, ok := stack.Build.Get(id) - if !ok { - mw = awsmiddleware.NewRequestUserAgent() - if err := stack.Build.Add(mw, middleware.After); err != nil { - return nil, err - } - } - - ua, ok := mw.(*awsmiddleware.RequestUserAgent) - if !ok { - return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) - } - - return ua, nil -} - -type HTTPSignerV4 interface { - SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error -} - -func resolveHTTPSignerV4(o *Options) { - if o.HTTPSignerV4 != nil { - return - } - o.HTTPSignerV4 = newDefaultV4Signer(*o) -} - -func newDefaultV4Signer(o Options) *v4.Signer { - return v4.NewSigner(func(so *v4.SignerOptions) { - so.Logger = o.Logger - so.LogSigning = o.ClientLogMode.IsSigning() - }) -} - -func addClientRequestID(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) -} - -func addComputeContentLength(stack *middleware.Stack) error { - return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) -} - -func addRawResponseToMetadata(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) -} - -func addRecordResponseTiming(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) -} - -func addSpanRetryLoop(stack *middleware.Stack, options Options) error { - return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) -} - -type spanRetryLoop struct { - options Options -} - -func (*spanRetryLoop) ID() string { - return "spanRetryLoop" -} - -func (m *spanRetryLoop) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - middleware.FinalizeOutput, middleware.Metadata, error, -) { - tracer := operationTracer(m.options.TracerProvider) - ctx, span := tracer.StartSpan(ctx, "RetryLoop") - defer span.End() - - return next.HandleFinalize(ctx, in) -} -func addStreamingEventsPayload(stack *middleware.Stack) error { - return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) -} - -func addUnsignedPayload(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) -} - -func addComputePayloadSHA256(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) -} - -func addContentSHA256Header(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) -} - -func addIsWaiterUserAgent(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) - return nil - }) -} - -func addIsPaginatorUserAgent(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) - return nil - }) -} - -func resolveIdempotencyTokenProvider(o *Options) { - if o.IdempotencyTokenProvider != nil { - return - } - o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) -} - -func addRetry(stack *middleware.Stack, o Options) error { - attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { - m.LogAttempts = o.ClientLogMode.IsRetries() - m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/nimble") - }) - if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { - return err - } - if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { - return err - } - return nil -} - -// resolves dual-stack endpoint configuration -func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseDualStackEndpoint = value - } - return nil -} - -// resolves FIPS endpoint configuration -func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseFIPSEndpoint = value - } - return nil -} - -func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { - if mode == aws.AccountIDEndpointModeDisabled { - return nil - } - - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { - return aws.String(ca.Credentials.AccountID) - } - - return nil -} - -func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { - mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} - if err := stack.Build.Add(&mw, middleware.After); err != nil { - return err - } - return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) -} -func initializeTimeOffsetResolver(c *Client) { - c.timeOffset = new(atomic.Int64) -} - -func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - switch options.Retryer.(type) { - case *retry.Standard: - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) - case *retry.AdaptiveMode: - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) - } - return nil -} - -func resolveTracerProvider(options *Options) { - if options.TracerProvider == nil { - options.TracerProvider = &tracing.NopTracerProvider{} - } -} - -func resolveMeterProvider(options *Options) { - if options.MeterProvider == nil { - options.MeterProvider = metrics.NopMeterProvider{} - } -} - -// IdempotencyTokenProvider interface for providing idempotency token -type IdempotencyTokenProvider interface { - GetIdempotencyToken() (string, error) -} - -func addRecursionDetection(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) -} - -func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) - -} - -func addResponseErrorMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) - -} - -func addRequestResponseLogging(stack *middleware.Stack, o Options) error { - return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ - LogRequest: o.ClientLogMode.IsRequest(), - LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), - LogResponse: o.ClientLogMode.IsResponse(), - LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), - }, middleware.After) -} - -type disableHTTPSMiddleware struct { - DisableHTTPS bool -} - -func (*disableHTTPSMiddleware) ID() string { - return "disableHTTPS" -} - -func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { - req.URL.Scheme = "http" - } - - return next.HandleFinalize(ctx, in) -} - -func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { - return stack.Finalize.Insert(&disableHTTPSMiddleware{ - DisableHTTPS: o.EndpointOptions.DisableHTTPS, - }, "ResolveEndpointV2", middleware.After) -} - -type spanInitializeStart struct { -} - -func (*spanInitializeStart) ID() string { - return "spanInitializeStart" -} - -func (m *spanInitializeStart) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) ( - middleware.InitializeOutput, middleware.Metadata, error, -) { - ctx, _ = tracing.StartSpan(ctx, "Initialize") - - return next.HandleInitialize(ctx, in) -} - -type spanInitializeEnd struct { -} - -func (*spanInitializeEnd) ID() string { - return "spanInitializeEnd" -} - -func (m *spanInitializeEnd) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) ( - middleware.InitializeOutput, middleware.Metadata, error, -) { - ctx, span := tracing.PopSpan(ctx) - span.End() - - return next.HandleInitialize(ctx, in) -} - -type spanBuildRequestStart struct { -} - -func (*spanBuildRequestStart) ID() string { - return "spanBuildRequestStart" -} - -func (m *spanBuildRequestStart) HandleSerialize( - ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, -) ( - middleware.SerializeOutput, middleware.Metadata, error, -) { - ctx, _ = tracing.StartSpan(ctx, "BuildRequest") - - return next.HandleSerialize(ctx, in) -} - -type spanBuildRequestEnd struct { -} - -func (*spanBuildRequestEnd) ID() string { - return "spanBuildRequestEnd" -} - -func (m *spanBuildRequestEnd) HandleBuild( - ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, -) ( - middleware.BuildOutput, middleware.Metadata, error, -) { - ctx, span := tracing.PopSpan(ctx) - span.End() - - return next.HandleBuild(ctx, in) -} - -func addSpanInitializeStart(stack *middleware.Stack) error { - return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) -} - -func addSpanInitializeEnd(stack *middleware.Stack) error { - return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) -} - -func addSpanBuildRequestStart(stack *middleware.Stack) error { - return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) -} - -func addSpanBuildRequestEnd(stack *middleware.Stack) error { - return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) -} diff --git a/service/nimble/api_client_test.go b/service/nimble/api_client_test.go deleted file mode 100644 index 0d9387c6dbe..00000000000 --- a/service/nimble/api_client_test.go +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "io/ioutil" - "net/http" - "strings" - "testing" -) - -func TestClient_resolveRetryOptions(t *testing.T) { - nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: 200, - Header: http.Header{}, - Body: ioutil.NopCloser(strings.NewReader("")), - }, nil - }) - - cases := map[string]struct { - defaultsMode aws.DefaultsMode - retryer aws.Retryer - retryMaxAttempts int - opRetryMaxAttempts *int - retryMode aws.RetryMode - expectClientRetryMode aws.RetryMode - expectClientMaxAttempts int - expectOpMaxAttempts int - }{ - "defaults": { - defaultsMode: aws.DefaultsModeStandard, - expectClientRetryMode: aws.RetryModeStandard, - expectClientMaxAttempts: 3, - expectOpMaxAttempts: 3, - }, - "custom default retry": { - retryMode: aws.RetryModeAdaptive, - retryMaxAttempts: 10, - expectClientRetryMode: aws.RetryModeAdaptive, - expectClientMaxAttempts: 10, - expectOpMaxAttempts: 10, - }, - "custom op max attempts": { - retryMode: aws.RetryModeAdaptive, - retryMaxAttempts: 10, - opRetryMaxAttempts: aws.Int(2), - expectClientRetryMode: aws.RetryModeAdaptive, - expectClientMaxAttempts: 10, - expectOpMaxAttempts: 2, - }, - "custom op no change max attempts": { - retryMode: aws.RetryModeAdaptive, - retryMaxAttempts: 10, - opRetryMaxAttempts: aws.Int(10), - expectClientRetryMode: aws.RetryModeAdaptive, - expectClientMaxAttempts: 10, - expectOpMaxAttempts: 10, - }, - "custom op 0 max attempts": { - retryMode: aws.RetryModeAdaptive, - retryMaxAttempts: 10, - opRetryMaxAttempts: aws.Int(0), - expectClientRetryMode: aws.RetryModeAdaptive, - expectClientMaxAttempts: 10, - expectOpMaxAttempts: 10, - }, - } - - for name, c := range cases { - t.Run(name, func(t *testing.T) { - client := NewFromConfig(aws.Config{ - DefaultsMode: c.defaultsMode, - Retryer: func() func() aws.Retryer { - if c.retryer == nil { - return nil - } - - return func() aws.Retryer { return c.retryer } - }(), - HTTPClient: nopClient, - RetryMaxAttempts: c.retryMaxAttempts, - RetryMode: c.retryMode, - }, func(o *Options) { - if o.Retryer == nil { - t.Errorf("retryer must not be nil in functional options") - } - }) - - if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { - t.Errorf("expect %v retry mode, got %v", e, a) - } - if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { - t.Errorf("expect %v max attempts, got %v", e, a) - } - - _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, - []func(*Options){ - func(o *Options) { - if c.opRetryMaxAttempts == nil { - return - } - o.RetryMaxAttempts = *c.opRetryMaxAttempts - }, - }, - func(s *middleware.Stack, o Options) error { - s.Initialize.Clear() - s.Serialize.Clear() - s.Build.Clear() - s.Finalize.Clear() - s.Deserialize.Clear() - - if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { - t.Errorf("expect %v op max attempts, got %v", e, a) - } - return nil - }) - if err != nil { - t.Fatalf("expect no operation error, got %v", err) - } - }) - } -} diff --git a/service/nimble/api_op_AcceptEulas.go b/service/nimble/api_op_AcceptEulas.go deleted file mode 100644 index aa58281e71c..00000000000 --- a/service/nimble/api_op_AcceptEulas.go +++ /dev/null @@ -1,212 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Accept EULAs. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) AcceptEulas(ctx context.Context, params *AcceptEulasInput, optFns ...func(*Options)) (*AcceptEulasOutput, error) { - if params == nil { - params = &AcceptEulasInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AcceptEulas", params, optFns, c.addOperationAcceptEulasMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AcceptEulasOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AcceptEulasInput struct { - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - // The EULA ID. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - EulaIds []string - - noSmithyDocumentSerde -} - -type AcceptEulasOutput struct { - - // A collection of EULA acceptances. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - EulaAcceptances []types.EulaAcceptance - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAcceptEulasMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpAcceptEulas{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAcceptEulas{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AcceptEulas"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opAcceptEulasMiddleware(stack, options); err != nil { - return err - } - if err = addOpAcceptEulasValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptEulas(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpAcceptEulas struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpAcceptEulas) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpAcceptEulas) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*AcceptEulasInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *AcceptEulasInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opAcceptEulasMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpAcceptEulas{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opAcceptEulas(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AcceptEulas", - } -} diff --git a/service/nimble/api_op_CreateLaunchProfile.go b/service/nimble/api_op_CreateLaunchProfile.go deleted file mode 100644 index 2fdf76c4d3d..00000000000 --- a/service/nimble/api_op_CreateLaunchProfile.go +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Create a launch profile. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) CreateLaunchProfile(ctx context.Context, params *CreateLaunchProfileInput, optFns ...func(*Options)) (*CreateLaunchProfileOutput, error) { - if params == nil { - params = &CreateLaunchProfileInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateLaunchProfile", params, optFns, c.addOperationCreateLaunchProfileMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateLaunchProfileOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateLaunchProfileInput struct { - - // Specifies the IDs of the EC2 subnets where streaming sessions will be - // accessible from. These subnets must support the specified instance types. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Ec2SubnetIds []string - - // The version number of the protocol that is used by the launch profile. The only - // valid version is "2021-03-31". - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileProtocolVersions []string - - // The name for the launch profile. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Name *string - - // A configuration for a streaming session. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamConfiguration *types.StreamConfigurationCreate - - // Unique identifiers for a collection of studio components that can be used with - // this launch profile. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponentIds []string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - // The description. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Description *string - - // A collection of labels, in the form of key-value pairs, that apply to this - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Tags map[string]string - - noSmithyDocumentSerde -} - -type CreateLaunchProfileOutput struct { - - // The launch profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfile *types.LaunchProfile - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateLaunchProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateLaunchProfile{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateLaunchProfile{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateLaunchProfile"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opCreateLaunchProfileMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateLaunchProfileValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLaunchProfile(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateLaunchProfile struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateLaunchProfile) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateLaunchProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateLaunchProfileInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateLaunchProfileInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateLaunchProfileMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateLaunchProfile{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateLaunchProfile(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateLaunchProfile", - } -} diff --git a/service/nimble/api_op_CreateStreamingImage.go b/service/nimble/api_op_CreateStreamingImage.go deleted file mode 100644 index c3a6896d455..00000000000 --- a/service/nimble/api_op_CreateStreamingImage.go +++ /dev/null @@ -1,232 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a streaming image resource in a studio. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) CreateStreamingImage(ctx context.Context, params *CreateStreamingImageInput, optFns ...func(*Options)) (*CreateStreamingImageOutput, error) { - if params == nil { - params = &CreateStreamingImageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateStreamingImage", params, optFns, c.addOperationCreateStreamingImageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateStreamingImageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateStreamingImageInput struct { - - // The ID of an EC2 machine image with which to create this streaming image. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Ec2ImageId *string - - // A friendly name for a streaming image resource. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Name *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - // A human-readable description of the streaming image. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Description *string - - // A collection of labels, in the form of key-value pairs, that apply to this - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Tags map[string]string - - noSmithyDocumentSerde -} - -type CreateStreamingImageOutput struct { - - // The streaming image. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingImage *types.StreamingImage - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateStreamingImageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateStreamingImage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateStreamingImage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateStreamingImage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opCreateStreamingImageMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateStreamingImageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateStreamingImage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateStreamingImage struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateStreamingImage) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateStreamingImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateStreamingImageInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateStreamingImageInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateStreamingImageMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateStreamingImage{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateStreamingImage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateStreamingImage", - } -} diff --git a/service/nimble/api_op_CreateStreamingSession.go b/service/nimble/api_op_CreateStreamingSession.go deleted file mode 100644 index d15b0174c3b..00000000000 --- a/service/nimble/api_op_CreateStreamingSession.go +++ /dev/null @@ -1,240 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a streaming session in a studio. -// -// After invoking this operation, you must poll GetStreamingSession until the -// streaming session is in the READY state. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) CreateStreamingSession(ctx context.Context, params *CreateStreamingSessionInput, optFns ...func(*Options)) (*CreateStreamingSessionOutput, error) { - if params == nil { - params = &CreateStreamingSessionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateStreamingSession", params, optFns, c.addOperationCreateStreamingSessionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateStreamingSessionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateStreamingSessionInput struct { - - // The ID of the launch profile used to control access from the streaming session. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - // The EC2 Instance type used for the streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Ec2InstanceType types.StreamingInstanceType - - // The user ID of the user that owns the streaming session. The user that owns the - // session will be logging into the session and interacting with the virtual - // workstation. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - OwnedBy *string - - // The ID of the streaming image. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingImageId *string - - // A collection of labels, in the form of key-value pairs, that apply to this - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Tags map[string]string - - noSmithyDocumentSerde -} - -type CreateStreamingSessionOutput struct { - - // The session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Session *types.StreamingSession - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateStreamingSessionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateStreamingSession{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateStreamingSession{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateStreamingSession"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opCreateStreamingSessionMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateStreamingSessionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateStreamingSession(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateStreamingSession struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateStreamingSession) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateStreamingSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateStreamingSessionInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateStreamingSessionInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateStreamingSessionMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateStreamingSession{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateStreamingSession(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateStreamingSession", - } -} diff --git a/service/nimble/api_op_CreateStreamingSessionStream.go b/service/nimble/api_op_CreateStreamingSessionStream.go deleted file mode 100644 index efb99d31ea2..00000000000 --- a/service/nimble/api_op_CreateStreamingSessionStream.go +++ /dev/null @@ -1,222 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a streaming session stream for a streaming session. -// -// After invoking this API, invoke GetStreamingSessionStream with the returned -// streamId to poll the resource until it is in the READY state. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) CreateStreamingSessionStream(ctx context.Context, params *CreateStreamingSessionStreamInput, optFns ...func(*Options)) (*CreateStreamingSessionStreamOutput, error) { - if params == nil { - params = &CreateStreamingSessionStreamInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateStreamingSessionStream", params, optFns, c.addOperationCreateStreamingSessionStreamMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateStreamingSessionStreamOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateStreamingSessionStreamInput struct { - - // The streaming session ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - // The expiration time in seconds. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ExpirationInSeconds *int32 - - noSmithyDocumentSerde -} - -type CreateStreamingSessionStreamOutput struct { - - // The stream. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Stream *types.StreamingSessionStream - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateStreamingSessionStreamMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateStreamingSessionStream{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateStreamingSessionStream{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateStreamingSessionStream"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opCreateStreamingSessionStreamMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateStreamingSessionStreamValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateStreamingSessionStream(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateStreamingSessionStream struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateStreamingSessionStream) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateStreamingSessionStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateStreamingSessionStreamInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateStreamingSessionStreamInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateStreamingSessionStreamMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateStreamingSessionStream{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateStreamingSessionStream(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateStreamingSessionStream", - } -} diff --git a/service/nimble/api_op_CreateStudio.go b/service/nimble/api_op_CreateStudio.go deleted file mode 100644 index 43959c7a0e8..00000000000 --- a/service/nimble/api_op_CreateStudio.go +++ /dev/null @@ -1,269 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Create a new studio. -// -// When creating a studio, two IAM roles must be provided: the admin role and the -// user role. These roles are assumed by your users when they log in to the Nimble -// Studio portal. -// -// The user role must have the AmazonNimbleStudio-StudioUser managed policy -// attached for the portal to function properly. -// -// The admin role must have the AmazonNimbleStudio-StudioAdmin managed policy -// attached for the portal to function properly. -// -// You may optionally specify a KMS key in the StudioEncryptionConfiguration . -// -// In Nimble Studio, resource names, descriptions, initialization scripts, and -// other data you provide are always encrypted at rest using an KMS key. By -// default, this key is owned by Amazon Web Services and managed on your behalf. -// You may provide your own KMS key when calling CreateStudio to encrypt this data -// using a key you own and manage. -// -// When providing an KMS key during studio creation, Nimble Studio creates KMS -// grants in your account to provide your studio user and admin roles access to -// these KMS keys. -// -// If you delete this grant, the studio will no longer be accessible to your -// portal users. -// -// If you delete the studio KMS key, your studio will no longer be accessible. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) CreateStudio(ctx context.Context, params *CreateStudioInput, optFns ...func(*Options)) (*CreateStudioOutput, error) { - if params == nil { - params = &CreateStudioInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateStudio", params, optFns, c.addOperationCreateStudioMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateStudioOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateStudioInput struct { - - // The IAM role that studio admins will assume when logging in to the Nimble - // Studio portal. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - AdminRoleArn *string - - // A friendly name for the studio. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - DisplayName *string - - // The studio name that is used in the URL of the Nimble Studio portal when - // accessed by Nimble Studio users. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioName *string - - // The IAM role that studio users will assume when logging in to the Nimble Studio - // portal. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - UserRoleArn *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - // The studio encryption configuration. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioEncryptionConfiguration *types.StudioEncryptionConfiguration - - // A collection of labels, in the form of key-value pairs, that apply to this - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Tags map[string]string - - noSmithyDocumentSerde -} - -type CreateStudioOutput struct { - - // Information about a studio. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Studio *types.Studio - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateStudioMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateStudio{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateStudio{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateStudio"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opCreateStudioMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateStudioValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateStudio(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateStudio struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateStudio) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateStudio) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateStudioInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateStudioInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateStudioMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateStudio{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateStudio(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateStudio", - } -} diff --git a/service/nimble/api_op_CreateStudioComponent.go b/service/nimble/api_op_CreateStudioComponent.go deleted file mode 100644 index ca1e412e4e2..00000000000 --- a/service/nimble/api_op_CreateStudioComponent.go +++ /dev/null @@ -1,271 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a studio component resource. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) CreateStudioComponent(ctx context.Context, params *CreateStudioComponentInput, optFns ...func(*Options)) (*CreateStudioComponentOutput, error) { - if params == nil { - params = &CreateStudioComponentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateStudioComponent", params, optFns, c.addOperationCreateStudioComponentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateStudioComponentOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateStudioComponentInput struct { - - // The name for the studio component. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Name *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // The type of the studio component. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Type types.StudioComponentType - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - // The configuration of the studio component, based on component type. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Configuration *types.StudioComponentConfiguration - - // The description. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Description *string - - // The EC2 security groups that control access to the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Ec2SecurityGroupIds []string - - // Initialization scripts for studio components. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - InitializationScripts []types.StudioComponentInitializationScript - - // An IAM role attached to a Studio Component that gives the studio component - // access to Amazon Web Services resources at anytime while the instance is - // running. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - RuntimeRoleArn *string - - // Parameters for the studio component scripts. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ScriptParameters []types.ScriptParameterKeyValue - - // An IAM role attached to Studio Component when the system initialization script - // runs which give the studio component access to Amazon Web Services resources - // when the system initialization script runs. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SecureInitializationRoleArn *string - - // The specific subtype of a studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Subtype types.StudioComponentSubtype - - // A collection of labels, in the form of key-value pairs, that apply to this - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Tags map[string]string - - noSmithyDocumentSerde -} - -type CreateStudioComponentOutput struct { - - // Information about the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponent *types.StudioComponent - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateStudioComponentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateStudioComponent{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateStudioComponent{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateStudioComponent"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opCreateStudioComponentMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateStudioComponentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateStudioComponent(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateStudioComponent struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateStudioComponent) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateStudioComponent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateStudioComponentInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateStudioComponentInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateStudioComponentMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateStudioComponent{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateStudioComponent(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateStudioComponent", - } -} diff --git a/service/nimble/api_op_DeleteLaunchProfile.go b/service/nimble/api_op_DeleteLaunchProfile.go deleted file mode 100644 index 5224a0017ed..00000000000 --- a/service/nimble/api_op_DeleteLaunchProfile.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Permanently delete a launch profile. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) DeleteLaunchProfile(ctx context.Context, params *DeleteLaunchProfileInput, optFns ...func(*Options)) (*DeleteLaunchProfileOutput, error) { - if params == nil { - params = &DeleteLaunchProfileInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteLaunchProfile", params, optFns, c.addOperationDeleteLaunchProfileMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteLaunchProfileOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteLaunchProfileInput struct { - - // The ID of the launch profile used to control access from the streaming session. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - noSmithyDocumentSerde -} - -type DeleteLaunchProfileOutput struct { - - // The launch profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfile *types.LaunchProfile - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteLaunchProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteLaunchProfile{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteLaunchProfile{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLaunchProfile"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opDeleteLaunchProfileMiddleware(stack, options); err != nil { - return err - } - if err = addOpDeleteLaunchProfileValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLaunchProfile(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpDeleteLaunchProfile struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteLaunchProfile) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteLaunchProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*DeleteLaunchProfileInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteLaunchProfileInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opDeleteLaunchProfileMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteLaunchProfile{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opDeleteLaunchProfile(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteLaunchProfile", - } -} diff --git a/service/nimble/api_op_DeleteLaunchProfileMember.go b/service/nimble/api_op_DeleteLaunchProfileMember.go deleted file mode 100644 index 430536dc442..00000000000 --- a/service/nimble/api_op_DeleteLaunchProfileMember.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Delete a user from launch profile membership. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) DeleteLaunchProfileMember(ctx context.Context, params *DeleteLaunchProfileMemberInput, optFns ...func(*Options)) (*DeleteLaunchProfileMemberOutput, error) { - if params == nil { - params = &DeleteLaunchProfileMemberInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteLaunchProfileMember", params, optFns, c.addOperationDeleteLaunchProfileMemberMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteLaunchProfileMemberOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteLaunchProfileMemberInput struct { - - // The ID of the launch profile used to control access from the streaming session. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileId *string - - // The principal ID. This currently supports a IAM Identity Center UserId. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - PrincipalId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - noSmithyDocumentSerde -} - -type DeleteLaunchProfileMemberOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteLaunchProfileMemberMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteLaunchProfileMember{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteLaunchProfileMember{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLaunchProfileMember"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opDeleteLaunchProfileMemberMiddleware(stack, options); err != nil { - return err - } - if err = addOpDeleteLaunchProfileMemberValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLaunchProfileMember(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpDeleteLaunchProfileMember struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteLaunchProfileMember) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteLaunchProfileMember) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*DeleteLaunchProfileMemberInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteLaunchProfileMemberInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opDeleteLaunchProfileMemberMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteLaunchProfileMember{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opDeleteLaunchProfileMember(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteLaunchProfileMember", - } -} diff --git a/service/nimble/api_op_DeleteStreamingImage.go b/service/nimble/api_op_DeleteStreamingImage.go deleted file mode 100644 index 79f5a7ee81b..00000000000 --- a/service/nimble/api_op_DeleteStreamingImage.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Delete streaming image. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) DeleteStreamingImage(ctx context.Context, params *DeleteStreamingImageInput, optFns ...func(*Options)) (*DeleteStreamingImageOutput, error) { - if params == nil { - params = &DeleteStreamingImageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteStreamingImage", params, optFns, c.addOperationDeleteStreamingImageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteStreamingImageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteStreamingImageInput struct { - - // The streaming image ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingImageId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - noSmithyDocumentSerde -} - -type DeleteStreamingImageOutput struct { - - // The streaming image. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingImage *types.StreamingImage - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteStreamingImageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteStreamingImage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteStreamingImage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteStreamingImage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opDeleteStreamingImageMiddleware(stack, options); err != nil { - return err - } - if err = addOpDeleteStreamingImageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteStreamingImage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpDeleteStreamingImage struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteStreamingImage) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteStreamingImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*DeleteStreamingImageInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteStreamingImageInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opDeleteStreamingImageMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteStreamingImage{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opDeleteStreamingImage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteStreamingImage", - } -} diff --git a/service/nimble/api_op_DeleteStreamingSession.go b/service/nimble/api_op_DeleteStreamingSession.go deleted file mode 100644 index 5578a7c7fb9..00000000000 --- a/service/nimble/api_op_DeleteStreamingSession.go +++ /dev/null @@ -1,220 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes streaming session resource. -// -// After invoking this operation, use GetStreamingSession to poll the resource -// until it transitions to a DELETED state. -// -// A streaming session will count against your streaming session quota until it is -// marked DELETED . -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) DeleteStreamingSession(ctx context.Context, params *DeleteStreamingSessionInput, optFns ...func(*Options)) (*DeleteStreamingSessionOutput, error) { - if params == nil { - params = &DeleteStreamingSessionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteStreamingSession", params, optFns, c.addOperationDeleteStreamingSessionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteStreamingSessionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteStreamingSessionInput struct { - - // The streaming session ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - noSmithyDocumentSerde -} - -type DeleteStreamingSessionOutput struct { - - // The session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Session *types.StreamingSession - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteStreamingSessionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteStreamingSession{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteStreamingSession{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteStreamingSession"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opDeleteStreamingSessionMiddleware(stack, options); err != nil { - return err - } - if err = addOpDeleteStreamingSessionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteStreamingSession(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpDeleteStreamingSession struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteStreamingSession) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteStreamingSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*DeleteStreamingSessionInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteStreamingSessionInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opDeleteStreamingSessionMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteStreamingSession{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opDeleteStreamingSession(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteStreamingSession", - } -} diff --git a/service/nimble/api_op_DeleteStudio.go b/service/nimble/api_op_DeleteStudio.go deleted file mode 100644 index f75913fc4c1..00000000000 --- a/service/nimble/api_op_DeleteStudio.go +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Delete a studio resource. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) DeleteStudio(ctx context.Context, params *DeleteStudioInput, optFns ...func(*Options)) (*DeleteStudioOutput, error) { - if params == nil { - params = &DeleteStudioInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteStudio", params, optFns, c.addOperationDeleteStudioMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteStudioOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteStudioInput struct { - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - noSmithyDocumentSerde -} - -type DeleteStudioOutput struct { - - // Information about a studio. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Studio *types.Studio - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteStudioMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteStudio{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteStudio{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteStudio"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opDeleteStudioMiddleware(stack, options); err != nil { - return err - } - if err = addOpDeleteStudioValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteStudio(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpDeleteStudio struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteStudio) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteStudio) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*DeleteStudioInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteStudioInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opDeleteStudioMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteStudio{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opDeleteStudio(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteStudio", - } -} diff --git a/service/nimble/api_op_DeleteStudioComponent.go b/service/nimble/api_op_DeleteStudioComponent.go deleted file mode 100644 index 94a2c6a10c2..00000000000 --- a/service/nimble/api_op_DeleteStudioComponent.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a studio component resource. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) DeleteStudioComponent(ctx context.Context, params *DeleteStudioComponentInput, optFns ...func(*Options)) (*DeleteStudioComponentOutput, error) { - if params == nil { - params = &DeleteStudioComponentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteStudioComponent", params, optFns, c.addOperationDeleteStudioComponentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteStudioComponentOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteStudioComponentInput struct { - - // The studio component ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponentId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - noSmithyDocumentSerde -} - -type DeleteStudioComponentOutput struct { - - // Information about the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponent *types.StudioComponent - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteStudioComponentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteStudioComponent{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteStudioComponent{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteStudioComponent"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opDeleteStudioComponentMiddleware(stack, options); err != nil { - return err - } - if err = addOpDeleteStudioComponentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteStudioComponent(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpDeleteStudioComponent struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteStudioComponent) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteStudioComponent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*DeleteStudioComponentInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteStudioComponentInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opDeleteStudioComponentMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteStudioComponent{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opDeleteStudioComponent(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteStudioComponent", - } -} diff --git a/service/nimble/api_op_DeleteStudioMember.go b/service/nimble/api_op_DeleteStudioMember.go deleted file mode 100644 index 91f753cac50..00000000000 --- a/service/nimble/api_op_DeleteStudioMember.go +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Delete a user from studio membership. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) DeleteStudioMember(ctx context.Context, params *DeleteStudioMemberInput, optFns ...func(*Options)) (*DeleteStudioMemberOutput, error) { - if params == nil { - params = &DeleteStudioMemberInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteStudioMember", params, optFns, c.addOperationDeleteStudioMemberMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteStudioMemberOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteStudioMemberInput struct { - - // The principal ID. This currently supports a IAM Identity Center UserId. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - PrincipalId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - noSmithyDocumentSerde -} - -type DeleteStudioMemberOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteStudioMemberMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteStudioMember{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteStudioMember{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteStudioMember"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opDeleteStudioMemberMiddleware(stack, options); err != nil { - return err - } - if err = addOpDeleteStudioMemberValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteStudioMember(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpDeleteStudioMember struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteStudioMember) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteStudioMember) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*DeleteStudioMemberInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteStudioMemberInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opDeleteStudioMemberMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteStudioMember{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opDeleteStudioMember(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteStudioMember", - } -} diff --git a/service/nimble/api_op_GetEula.go b/service/nimble/api_op_GetEula.go deleted file mode 100644 index 90af9b84896..00000000000 --- a/service/nimble/api_op_GetEula.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Get EULA. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) GetEula(ctx context.Context, params *GetEulaInput, optFns ...func(*Options)) (*GetEulaOutput, error) { - if params == nil { - params = &GetEulaInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetEula", params, optFns, c.addOperationGetEulaMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetEulaOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetEulaInput struct { - - // The EULA ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - EulaId *string - - noSmithyDocumentSerde -} - -type GetEulaOutput struct { - - // The EULA. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Eula *types.Eula - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetEulaMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetEula{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetEula{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetEula"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetEulaValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEula(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetEula(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetEula", - } -} diff --git a/service/nimble/api_op_GetLaunchProfile.go b/service/nimble/api_op_GetLaunchProfile.go deleted file mode 100644 index a9e537aca4b..00000000000 --- a/service/nimble/api_op_GetLaunchProfile.go +++ /dev/null @@ -1,593 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" - "time" -) - -// Get a launch profile. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) GetLaunchProfile(ctx context.Context, params *GetLaunchProfileInput, optFns ...func(*Options)) (*GetLaunchProfileOutput, error) { - if params == nil { - params = &GetLaunchProfileInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetLaunchProfile", params, optFns, c.addOperationGetLaunchProfileMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetLaunchProfileOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetLaunchProfileInput struct { - - // The ID of the launch profile used to control access from the streaming session. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - noSmithyDocumentSerde -} - -type GetLaunchProfileOutput struct { - - // The launch profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfile *types.LaunchProfile - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetLaunchProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetLaunchProfile{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetLaunchProfile{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetLaunchProfile"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetLaunchProfileValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLaunchProfile(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// LaunchProfileReadyWaiterOptions are waiter options for LaunchProfileReadyWaiter -type LaunchProfileReadyWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // LaunchProfileReadyWaiter will use default minimum delay of 5 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, LaunchProfileReadyWaiter will use default max delay of 750 seconds. - // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. - // - // By default service-modeled logic will populate this option. This option can - // thus be used to define a custom waiter state with fall-back to service-modeled - // waiter state mutators.The function returns an error in case of a failure state. - // In case of retry state, this function returns a bool value of true and nil - // error, while in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *GetLaunchProfileInput, *GetLaunchProfileOutput, error) (bool, error) -} - -// LaunchProfileReadyWaiter defines the waiters for LaunchProfileReady -type LaunchProfileReadyWaiter struct { - client GetLaunchProfileAPIClient - - options LaunchProfileReadyWaiterOptions -} - -// NewLaunchProfileReadyWaiter constructs a LaunchProfileReadyWaiter. -func NewLaunchProfileReadyWaiter(client GetLaunchProfileAPIClient, optFns ...func(*LaunchProfileReadyWaiterOptions)) *LaunchProfileReadyWaiter { - options := LaunchProfileReadyWaiterOptions{} - options.MinDelay = 5 * time.Second - options.MaxDelay = 750 * time.Second - options.Retryable = launchProfileReadyStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &LaunchProfileReadyWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for LaunchProfileReady waiter. The maxWaitDur is -// the maximum wait duration the waiter will wait. The maxWaitDur is required and -// must be greater than zero. -func (w *LaunchProfileReadyWaiter) Wait(ctx context.Context, params *GetLaunchProfileInput, maxWaitDur time.Duration, optFns ...func(*LaunchProfileReadyWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for LaunchProfileReady waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *LaunchProfileReadyWaiter) WaitForOutput(ctx context.Context, params *GetLaunchProfileInput, maxWaitDur time.Duration, optFns ...func(*LaunchProfileReadyWaiterOptions)) (*GetLaunchProfileOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 750 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.GetLaunchProfile(ctx, params, func(o *Options) { - baseOpts := []func(*Options){ - addIsWaiterUserAgent, - } - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range baseOpts { - opt(o) - } - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for LaunchProfileReady waiter") -} - -func launchProfileReadyStateRetryable(ctx context.Context, input *GetLaunchProfileInput, output *GetLaunchProfileOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("launchProfile.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "READY" - value, ok := pathValue.(types.LaunchProfileState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.LaunchProfileState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("launchProfile.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "CREATE_FAILED" - value, ok := pathValue.(types.LaunchProfileState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.LaunchProfileState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - if err == nil { - pathValue, err := jmespath.Search("launchProfile.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "UPDATE_FAILED" - value, ok := pathValue.(types.LaunchProfileState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.LaunchProfileState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - return true, nil -} - -// LaunchProfileDeletedWaiterOptions are waiter options for -// LaunchProfileDeletedWaiter -type LaunchProfileDeletedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // LaunchProfileDeletedWaiter will use default minimum delay of 5 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, LaunchProfileDeletedWaiter will use default max delay of 750 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. - // - // By default service-modeled logic will populate this option. This option can - // thus be used to define a custom waiter state with fall-back to service-modeled - // waiter state mutators.The function returns an error in case of a failure state. - // In case of retry state, this function returns a bool value of true and nil - // error, while in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *GetLaunchProfileInput, *GetLaunchProfileOutput, error) (bool, error) -} - -// LaunchProfileDeletedWaiter defines the waiters for LaunchProfileDeleted -type LaunchProfileDeletedWaiter struct { - client GetLaunchProfileAPIClient - - options LaunchProfileDeletedWaiterOptions -} - -// NewLaunchProfileDeletedWaiter constructs a LaunchProfileDeletedWaiter. -func NewLaunchProfileDeletedWaiter(client GetLaunchProfileAPIClient, optFns ...func(*LaunchProfileDeletedWaiterOptions)) *LaunchProfileDeletedWaiter { - options := LaunchProfileDeletedWaiterOptions{} - options.MinDelay = 5 * time.Second - options.MaxDelay = 750 * time.Second - options.Retryable = launchProfileDeletedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &LaunchProfileDeletedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for LaunchProfileDeleted waiter. The maxWaitDur -// is the maximum wait duration the waiter will wait. The maxWaitDur is required -// and must be greater than zero. -func (w *LaunchProfileDeletedWaiter) Wait(ctx context.Context, params *GetLaunchProfileInput, maxWaitDur time.Duration, optFns ...func(*LaunchProfileDeletedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for LaunchProfileDeleted waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *LaunchProfileDeletedWaiter) WaitForOutput(ctx context.Context, params *GetLaunchProfileInput, maxWaitDur time.Duration, optFns ...func(*LaunchProfileDeletedWaiterOptions)) (*GetLaunchProfileOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 750 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.GetLaunchProfile(ctx, params, func(o *Options) { - baseOpts := []func(*Options){ - addIsWaiterUserAgent, - } - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range baseOpts { - opt(o) - } - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for LaunchProfileDeleted waiter") -} - -func launchProfileDeletedStateRetryable(ctx context.Context, input *GetLaunchProfileInput, output *GetLaunchProfileOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("launchProfile.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "DELETED" - value, ok := pathValue.(types.LaunchProfileState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.LaunchProfileState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("launchProfile.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "DELETE_FAILED" - value, ok := pathValue.(types.LaunchProfileState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.LaunchProfileState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - return true, nil -} - -// GetLaunchProfileAPIClient is a client that implements the GetLaunchProfile -// operation. -type GetLaunchProfileAPIClient interface { - GetLaunchProfile(context.Context, *GetLaunchProfileInput, ...func(*Options)) (*GetLaunchProfileOutput, error) -} - -var _ GetLaunchProfileAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opGetLaunchProfile(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetLaunchProfile", - } -} diff --git a/service/nimble/api_op_GetLaunchProfileDetails.go b/service/nimble/api_op_GetLaunchProfileDetails.go deleted file mode 100644 index 5de2c398726..00000000000 --- a/service/nimble/api_op_GetLaunchProfileDetails.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Launch profile details include the launch profile resource and summary -// information of resources that are used by, or available to, the launch profile. -// This includes the name and description of all studio components used by the -// launch profiles, and the name and description of streaming images that can be -// used with this launch profile. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) GetLaunchProfileDetails(ctx context.Context, params *GetLaunchProfileDetailsInput, optFns ...func(*Options)) (*GetLaunchProfileDetailsOutput, error) { - if params == nil { - params = &GetLaunchProfileDetailsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetLaunchProfileDetails", params, optFns, c.addOperationGetLaunchProfileDetailsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetLaunchProfileDetailsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetLaunchProfileDetailsInput struct { - - // The ID of the launch profile used to control access from the streaming session. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - noSmithyDocumentSerde -} - -type GetLaunchProfileDetailsOutput struct { - - // The launch profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfile *types.LaunchProfile - - // A collection of streaming images. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingImages []types.StreamingImage - - // A collection of studio component summaries. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponentSummaries []types.StudioComponentSummary - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetLaunchProfileDetailsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetLaunchProfileDetails{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetLaunchProfileDetails{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetLaunchProfileDetails"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetLaunchProfileDetailsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLaunchProfileDetails(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetLaunchProfileDetails(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetLaunchProfileDetails", - } -} diff --git a/service/nimble/api_op_GetLaunchProfileInitialization.go b/service/nimble/api_op_GetLaunchProfileInitialization.go deleted file mode 100644 index e6cbc088b76..00000000000 --- a/service/nimble/api_op_GetLaunchProfileInitialization.go +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Get a launch profile initialization. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) GetLaunchProfileInitialization(ctx context.Context, params *GetLaunchProfileInitializationInput, optFns ...func(*Options)) (*GetLaunchProfileInitializationOutput, error) { - if params == nil { - params = &GetLaunchProfileInitializationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetLaunchProfileInitialization", params, optFns, c.addOperationGetLaunchProfileInitializationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetLaunchProfileInitializationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetLaunchProfileInitializationInput struct { - - // The ID of the launch profile used to control access from the streaming session. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileId *string - - // The launch profile protocol versions supported by the client. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileProtocolVersions []string - - // The launch purpose. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchPurpose *string - - // The platform where this Launch Profile will be used, either Windows or Linux. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Platform *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - noSmithyDocumentSerde -} - -type GetLaunchProfileInitializationOutput struct { - - // The launch profile initialization. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileInitialization *types.LaunchProfileInitialization - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetLaunchProfileInitializationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetLaunchProfileInitialization{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetLaunchProfileInitialization{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetLaunchProfileInitialization"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetLaunchProfileInitializationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLaunchProfileInitialization(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetLaunchProfileInitialization(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetLaunchProfileInitialization", - } -} diff --git a/service/nimble/api_op_GetLaunchProfileMember.go b/service/nimble/api_op_GetLaunchProfileMember.go deleted file mode 100644 index e9b2e50bd17..00000000000 --- a/service/nimble/api_op_GetLaunchProfileMember.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Get a user persona in launch profile membership. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) GetLaunchProfileMember(ctx context.Context, params *GetLaunchProfileMemberInput, optFns ...func(*Options)) (*GetLaunchProfileMemberOutput, error) { - if params == nil { - params = &GetLaunchProfileMemberInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetLaunchProfileMember", params, optFns, c.addOperationGetLaunchProfileMemberMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetLaunchProfileMemberOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetLaunchProfileMemberInput struct { - - // The ID of the launch profile used to control access from the streaming session. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileId *string - - // The principal ID. This currently supports a IAM Identity Center UserId. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - PrincipalId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - noSmithyDocumentSerde -} - -type GetLaunchProfileMemberOutput struct { - - // The member. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Member *types.LaunchProfileMembership - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetLaunchProfileMemberMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetLaunchProfileMember{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetLaunchProfileMember{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetLaunchProfileMember"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetLaunchProfileMemberValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLaunchProfileMember(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetLaunchProfileMember(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetLaunchProfileMember", - } -} diff --git a/service/nimble/api_op_GetStreamingImage.go b/service/nimble/api_op_GetStreamingImage.go deleted file mode 100644 index edb80ca76e8..00000000000 --- a/service/nimble/api_op_GetStreamingImage.go +++ /dev/null @@ -1,595 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" - "time" -) - -// Get streaming image. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) GetStreamingImage(ctx context.Context, params *GetStreamingImageInput, optFns ...func(*Options)) (*GetStreamingImageOutput, error) { - if params == nil { - params = &GetStreamingImageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetStreamingImage", params, optFns, c.addOperationGetStreamingImageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetStreamingImageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetStreamingImageInput struct { - - // The streaming image ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingImageId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - noSmithyDocumentSerde -} - -type GetStreamingImageOutput struct { - - // The streaming image. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingImage *types.StreamingImage - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetStreamingImageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetStreamingImage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetStreamingImage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetStreamingImage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetStreamingImageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetStreamingImage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// StreamingImageReadyWaiterOptions are waiter options for -// StreamingImageReadyWaiter -type StreamingImageReadyWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // StreamingImageReadyWaiter will use default minimum delay of 2 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, StreamingImageReadyWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. - // - // By default service-modeled logic will populate this option. This option can - // thus be used to define a custom waiter state with fall-back to service-modeled - // waiter state mutators.The function returns an error in case of a failure state. - // In case of retry state, this function returns a bool value of true and nil - // error, while in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *GetStreamingImageInput, *GetStreamingImageOutput, error) (bool, error) -} - -// StreamingImageReadyWaiter defines the waiters for StreamingImageReady -type StreamingImageReadyWaiter struct { - client GetStreamingImageAPIClient - - options StreamingImageReadyWaiterOptions -} - -// NewStreamingImageReadyWaiter constructs a StreamingImageReadyWaiter. -func NewStreamingImageReadyWaiter(client GetStreamingImageAPIClient, optFns ...func(*StreamingImageReadyWaiterOptions)) *StreamingImageReadyWaiter { - options := StreamingImageReadyWaiterOptions{} - options.MinDelay = 2 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = streamingImageReadyStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &StreamingImageReadyWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for StreamingImageReady waiter. The maxWaitDur -// is the maximum wait duration the waiter will wait. The maxWaitDur is required -// and must be greater than zero. -func (w *StreamingImageReadyWaiter) Wait(ctx context.Context, params *GetStreamingImageInput, maxWaitDur time.Duration, optFns ...func(*StreamingImageReadyWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for StreamingImageReady waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *StreamingImageReadyWaiter) WaitForOutput(ctx context.Context, params *GetStreamingImageInput, maxWaitDur time.Duration, optFns ...func(*StreamingImageReadyWaiterOptions)) (*GetStreamingImageOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.GetStreamingImage(ctx, params, func(o *Options) { - baseOpts := []func(*Options){ - addIsWaiterUserAgent, - } - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range baseOpts { - opt(o) - } - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for StreamingImageReady waiter") -} - -func streamingImageReadyStateRetryable(ctx context.Context, input *GetStreamingImageInput, output *GetStreamingImageOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("streamingImage.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "READY" - value, ok := pathValue.(types.StreamingImageState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StreamingImageState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("streamingImage.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "CREATE_FAILED" - value, ok := pathValue.(types.StreamingImageState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StreamingImageState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - if err == nil { - pathValue, err := jmespath.Search("streamingImage.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "UPDATE_FAILED" - value, ok := pathValue.(types.StreamingImageState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StreamingImageState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - return true, nil -} - -// StreamingImageDeletedWaiterOptions are waiter options for -// StreamingImageDeletedWaiter -type StreamingImageDeletedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // StreamingImageDeletedWaiter will use default minimum delay of 2 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, StreamingImageDeletedWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. - // - // By default service-modeled logic will populate this option. This option can - // thus be used to define a custom waiter state with fall-back to service-modeled - // waiter state mutators.The function returns an error in case of a failure state. - // In case of retry state, this function returns a bool value of true and nil - // error, while in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *GetStreamingImageInput, *GetStreamingImageOutput, error) (bool, error) -} - -// StreamingImageDeletedWaiter defines the waiters for StreamingImageDeleted -type StreamingImageDeletedWaiter struct { - client GetStreamingImageAPIClient - - options StreamingImageDeletedWaiterOptions -} - -// NewStreamingImageDeletedWaiter constructs a StreamingImageDeletedWaiter. -func NewStreamingImageDeletedWaiter(client GetStreamingImageAPIClient, optFns ...func(*StreamingImageDeletedWaiterOptions)) *StreamingImageDeletedWaiter { - options := StreamingImageDeletedWaiterOptions{} - options.MinDelay = 2 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = streamingImageDeletedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &StreamingImageDeletedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for StreamingImageDeleted waiter. The maxWaitDur -// is the maximum wait duration the waiter will wait. The maxWaitDur is required -// and must be greater than zero. -func (w *StreamingImageDeletedWaiter) Wait(ctx context.Context, params *GetStreamingImageInput, maxWaitDur time.Duration, optFns ...func(*StreamingImageDeletedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for StreamingImageDeleted waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *StreamingImageDeletedWaiter) WaitForOutput(ctx context.Context, params *GetStreamingImageInput, maxWaitDur time.Duration, optFns ...func(*StreamingImageDeletedWaiterOptions)) (*GetStreamingImageOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.GetStreamingImage(ctx, params, func(o *Options) { - baseOpts := []func(*Options){ - addIsWaiterUserAgent, - } - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range baseOpts { - opt(o) - } - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for StreamingImageDeleted waiter") -} - -func streamingImageDeletedStateRetryable(ctx context.Context, input *GetStreamingImageInput, output *GetStreamingImageOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("streamingImage.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "DELETED" - value, ok := pathValue.(types.StreamingImageState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StreamingImageState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("streamingImage.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "DELETE_FAILED" - value, ok := pathValue.(types.StreamingImageState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StreamingImageState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - return true, nil -} - -// GetStreamingImageAPIClient is a client that implements the GetStreamingImage -// operation. -type GetStreamingImageAPIClient interface { - GetStreamingImage(context.Context, *GetStreamingImageInput, ...func(*Options)) (*GetStreamingImageOutput, error) -} - -var _ GetStreamingImageAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opGetStreamingImage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetStreamingImage", - } -} diff --git a/service/nimble/api_op_GetStreamingSession.go b/service/nimble/api_op_GetStreamingSession.go deleted file mode 100644 index 06067903c89..00000000000 --- a/service/nimble/api_op_GetStreamingSession.go +++ /dev/null @@ -1,796 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" - "time" -) - -// Gets StreamingSession resource. -// -// Invoke this operation to poll for a streaming session state while creating or -// deleting a session. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) GetStreamingSession(ctx context.Context, params *GetStreamingSessionInput, optFns ...func(*Options)) (*GetStreamingSessionOutput, error) { - if params == nil { - params = &GetStreamingSessionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetStreamingSession", params, optFns, c.addOperationGetStreamingSessionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetStreamingSessionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetStreamingSessionInput struct { - - // The streaming session ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - noSmithyDocumentSerde -} - -type GetStreamingSessionOutput struct { - - // The session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Session *types.StreamingSession - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetStreamingSessionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetStreamingSession{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetStreamingSession{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetStreamingSession"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetStreamingSessionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetStreamingSession(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// StreamingSessionReadyWaiterOptions are waiter options for -// StreamingSessionReadyWaiter -type StreamingSessionReadyWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // StreamingSessionReadyWaiter will use default minimum delay of 10 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, StreamingSessionReadyWaiter will use default max delay of 1800 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. - // - // By default service-modeled logic will populate this option. This option can - // thus be used to define a custom waiter state with fall-back to service-modeled - // waiter state mutators.The function returns an error in case of a failure state. - // In case of retry state, this function returns a bool value of true and nil - // error, while in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *GetStreamingSessionInput, *GetStreamingSessionOutput, error) (bool, error) -} - -// StreamingSessionReadyWaiter defines the waiters for StreamingSessionReady -type StreamingSessionReadyWaiter struct { - client GetStreamingSessionAPIClient - - options StreamingSessionReadyWaiterOptions -} - -// NewStreamingSessionReadyWaiter constructs a StreamingSessionReadyWaiter. -func NewStreamingSessionReadyWaiter(client GetStreamingSessionAPIClient, optFns ...func(*StreamingSessionReadyWaiterOptions)) *StreamingSessionReadyWaiter { - options := StreamingSessionReadyWaiterOptions{} - options.MinDelay = 10 * time.Second - options.MaxDelay = 1800 * time.Second - options.Retryable = streamingSessionReadyStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &StreamingSessionReadyWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for StreamingSessionReady waiter. The maxWaitDur -// is the maximum wait duration the waiter will wait. The maxWaitDur is required -// and must be greater than zero. -func (w *StreamingSessionReadyWaiter) Wait(ctx context.Context, params *GetStreamingSessionInput, maxWaitDur time.Duration, optFns ...func(*StreamingSessionReadyWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for StreamingSessionReady waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *StreamingSessionReadyWaiter) WaitForOutput(ctx context.Context, params *GetStreamingSessionInput, maxWaitDur time.Duration, optFns ...func(*StreamingSessionReadyWaiterOptions)) (*GetStreamingSessionOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 1800 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.GetStreamingSession(ctx, params, func(o *Options) { - baseOpts := []func(*Options){ - addIsWaiterUserAgent, - } - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range baseOpts { - opt(o) - } - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for StreamingSessionReady waiter") -} - -func streamingSessionReadyStateRetryable(ctx context.Context, input *GetStreamingSessionInput, output *GetStreamingSessionOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("session.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "READY" - value, ok := pathValue.(types.StreamingSessionState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StreamingSessionState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("session.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "CREATE_FAILED" - value, ok := pathValue.(types.StreamingSessionState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StreamingSessionState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - if err == nil { - pathValue, err := jmespath.Search("session.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "START_FAILED" - value, ok := pathValue.(types.StreamingSessionState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StreamingSessionState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - return true, nil -} - -// StreamingSessionStoppedWaiterOptions are waiter options for -// StreamingSessionStoppedWaiter -type StreamingSessionStoppedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // StreamingSessionStoppedWaiter will use default minimum delay of 5 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, StreamingSessionStoppedWaiter will use default max delay of 900 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. - // - // By default service-modeled logic will populate this option. This option can - // thus be used to define a custom waiter state with fall-back to service-modeled - // waiter state mutators.The function returns an error in case of a failure state. - // In case of retry state, this function returns a bool value of true and nil - // error, while in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *GetStreamingSessionInput, *GetStreamingSessionOutput, error) (bool, error) -} - -// StreamingSessionStoppedWaiter defines the waiters for StreamingSessionStopped -type StreamingSessionStoppedWaiter struct { - client GetStreamingSessionAPIClient - - options StreamingSessionStoppedWaiterOptions -} - -// NewStreamingSessionStoppedWaiter constructs a StreamingSessionStoppedWaiter. -func NewStreamingSessionStoppedWaiter(client GetStreamingSessionAPIClient, optFns ...func(*StreamingSessionStoppedWaiterOptions)) *StreamingSessionStoppedWaiter { - options := StreamingSessionStoppedWaiterOptions{} - options.MinDelay = 5 * time.Second - options.MaxDelay = 900 * time.Second - options.Retryable = streamingSessionStoppedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &StreamingSessionStoppedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for StreamingSessionStopped waiter. The -// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is -// required and must be greater than zero. -func (w *StreamingSessionStoppedWaiter) Wait(ctx context.Context, params *GetStreamingSessionInput, maxWaitDur time.Duration, optFns ...func(*StreamingSessionStoppedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for StreamingSessionStopped waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *StreamingSessionStoppedWaiter) WaitForOutput(ctx context.Context, params *GetStreamingSessionInput, maxWaitDur time.Duration, optFns ...func(*StreamingSessionStoppedWaiterOptions)) (*GetStreamingSessionOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 900 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.GetStreamingSession(ctx, params, func(o *Options) { - baseOpts := []func(*Options){ - addIsWaiterUserAgent, - } - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range baseOpts { - opt(o) - } - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for StreamingSessionStopped waiter") -} - -func streamingSessionStoppedStateRetryable(ctx context.Context, input *GetStreamingSessionInput, output *GetStreamingSessionOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("session.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "STOPPED" - value, ok := pathValue.(types.StreamingSessionState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StreamingSessionState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("session.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "STOP_FAILED" - value, ok := pathValue.(types.StreamingSessionState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StreamingSessionState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - return true, nil -} - -// StreamingSessionDeletedWaiterOptions are waiter options for -// StreamingSessionDeletedWaiter -type StreamingSessionDeletedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // StreamingSessionDeletedWaiter will use default minimum delay of 5 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, StreamingSessionDeletedWaiter will use default max delay of 900 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. - // - // By default service-modeled logic will populate this option. This option can - // thus be used to define a custom waiter state with fall-back to service-modeled - // waiter state mutators.The function returns an error in case of a failure state. - // In case of retry state, this function returns a bool value of true and nil - // error, while in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *GetStreamingSessionInput, *GetStreamingSessionOutput, error) (bool, error) -} - -// StreamingSessionDeletedWaiter defines the waiters for StreamingSessionDeleted -type StreamingSessionDeletedWaiter struct { - client GetStreamingSessionAPIClient - - options StreamingSessionDeletedWaiterOptions -} - -// NewStreamingSessionDeletedWaiter constructs a StreamingSessionDeletedWaiter. -func NewStreamingSessionDeletedWaiter(client GetStreamingSessionAPIClient, optFns ...func(*StreamingSessionDeletedWaiterOptions)) *StreamingSessionDeletedWaiter { - options := StreamingSessionDeletedWaiterOptions{} - options.MinDelay = 5 * time.Second - options.MaxDelay = 900 * time.Second - options.Retryable = streamingSessionDeletedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &StreamingSessionDeletedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for StreamingSessionDeleted waiter. The -// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is -// required and must be greater than zero. -func (w *StreamingSessionDeletedWaiter) Wait(ctx context.Context, params *GetStreamingSessionInput, maxWaitDur time.Duration, optFns ...func(*StreamingSessionDeletedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for StreamingSessionDeleted waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *StreamingSessionDeletedWaiter) WaitForOutput(ctx context.Context, params *GetStreamingSessionInput, maxWaitDur time.Duration, optFns ...func(*StreamingSessionDeletedWaiterOptions)) (*GetStreamingSessionOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 900 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.GetStreamingSession(ctx, params, func(o *Options) { - baseOpts := []func(*Options){ - addIsWaiterUserAgent, - } - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range baseOpts { - opt(o) - } - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for StreamingSessionDeleted waiter") -} - -func streamingSessionDeletedStateRetryable(ctx context.Context, input *GetStreamingSessionInput, output *GetStreamingSessionOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("session.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "DELETED" - value, ok := pathValue.(types.StreamingSessionState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StreamingSessionState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("session.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "DELETE_FAILED" - value, ok := pathValue.(types.StreamingSessionState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StreamingSessionState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - return true, nil -} - -// GetStreamingSessionAPIClient is a client that implements the -// GetStreamingSession operation. -type GetStreamingSessionAPIClient interface { - GetStreamingSession(context.Context, *GetStreamingSessionInput, ...func(*Options)) (*GetStreamingSessionOutput, error) -} - -var _ GetStreamingSessionAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opGetStreamingSession(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetStreamingSession", - } -} diff --git a/service/nimble/api_op_GetStreamingSessionBackup.go b/service/nimble/api_op_GetStreamingSessionBackup.go deleted file mode 100644 index 3575aaad522..00000000000 --- a/service/nimble/api_op_GetStreamingSessionBackup.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets StreamingSessionBackup resource. -// -// Invoke this operation to poll for a streaming session backup while stopping a -// streaming session. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) GetStreamingSessionBackup(ctx context.Context, params *GetStreamingSessionBackupInput, optFns ...func(*Options)) (*GetStreamingSessionBackupOutput, error) { - if params == nil { - params = &GetStreamingSessionBackupInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetStreamingSessionBackup", params, optFns, c.addOperationGetStreamingSessionBackupMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetStreamingSessionBackupOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetStreamingSessionBackupInput struct { - - // The ID of the backup. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - BackupId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - noSmithyDocumentSerde -} - -type GetStreamingSessionBackupOutput struct { - - // Information about the streaming session backup. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingSessionBackup *types.StreamingSessionBackup - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetStreamingSessionBackupMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetStreamingSessionBackup{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetStreamingSessionBackup{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetStreamingSessionBackup"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetStreamingSessionBackupValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetStreamingSessionBackup(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetStreamingSessionBackup(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetStreamingSessionBackup", - } -} diff --git a/service/nimble/api_op_GetStreamingSessionStream.go b/service/nimble/api_op_GetStreamingSessionStream.go deleted file mode 100644 index d6587e6ca68..00000000000 --- a/service/nimble/api_op_GetStreamingSessionStream.go +++ /dev/null @@ -1,395 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" - "time" -) - -// Gets a StreamingSessionStream for a streaming session. -// -// Invoke this operation to poll the resource after invoking -// CreateStreamingSessionStream . -// -// After the StreamingSessionStream changes to the READY state, the url property -// will contain a stream to be used with the DCV streaming client. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) GetStreamingSessionStream(ctx context.Context, params *GetStreamingSessionStreamInput, optFns ...func(*Options)) (*GetStreamingSessionStreamOutput, error) { - if params == nil { - params = &GetStreamingSessionStreamInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetStreamingSessionStream", params, optFns, c.addOperationGetStreamingSessionStreamMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetStreamingSessionStreamOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetStreamingSessionStreamInput struct { - - // The streaming session ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionId *string - - // The streaming session stream ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - noSmithyDocumentSerde -} - -type GetStreamingSessionStreamOutput struct { - - // The stream. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Stream *types.StreamingSessionStream - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetStreamingSessionStreamMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetStreamingSessionStream{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetStreamingSessionStream{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetStreamingSessionStream"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetStreamingSessionStreamValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetStreamingSessionStream(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// StreamingSessionStreamReadyWaiterOptions are waiter options for -// StreamingSessionStreamReadyWaiter -type StreamingSessionStreamReadyWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // StreamingSessionStreamReadyWaiter will use default minimum delay of 5 seconds. - // Note that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, StreamingSessionStreamReadyWaiter will use default max delay of 150 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. - // - // By default service-modeled logic will populate this option. This option can - // thus be used to define a custom waiter state with fall-back to service-modeled - // waiter state mutators.The function returns an error in case of a failure state. - // In case of retry state, this function returns a bool value of true and nil - // error, while in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *GetStreamingSessionStreamInput, *GetStreamingSessionStreamOutput, error) (bool, error) -} - -// StreamingSessionStreamReadyWaiter defines the waiters for -// StreamingSessionStreamReady -type StreamingSessionStreamReadyWaiter struct { - client GetStreamingSessionStreamAPIClient - - options StreamingSessionStreamReadyWaiterOptions -} - -// NewStreamingSessionStreamReadyWaiter constructs a -// StreamingSessionStreamReadyWaiter. -func NewStreamingSessionStreamReadyWaiter(client GetStreamingSessionStreamAPIClient, optFns ...func(*StreamingSessionStreamReadyWaiterOptions)) *StreamingSessionStreamReadyWaiter { - options := StreamingSessionStreamReadyWaiterOptions{} - options.MinDelay = 5 * time.Second - options.MaxDelay = 150 * time.Second - options.Retryable = streamingSessionStreamReadyStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &StreamingSessionStreamReadyWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for StreamingSessionStreamReady waiter. The -// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is -// required and must be greater than zero. -func (w *StreamingSessionStreamReadyWaiter) Wait(ctx context.Context, params *GetStreamingSessionStreamInput, maxWaitDur time.Duration, optFns ...func(*StreamingSessionStreamReadyWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for StreamingSessionStreamReady waiter -// and returns the output of the successful operation. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *StreamingSessionStreamReadyWaiter) WaitForOutput(ctx context.Context, params *GetStreamingSessionStreamInput, maxWaitDur time.Duration, optFns ...func(*StreamingSessionStreamReadyWaiterOptions)) (*GetStreamingSessionStreamOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 150 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.GetStreamingSessionStream(ctx, params, func(o *Options) { - baseOpts := []func(*Options){ - addIsWaiterUserAgent, - } - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range baseOpts { - opt(o) - } - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for StreamingSessionStreamReady waiter") -} - -func streamingSessionStreamReadyStateRetryable(ctx context.Context, input *GetStreamingSessionStreamInput, output *GetStreamingSessionStreamOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("stream.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "READY" - value, ok := pathValue.(types.StreamingSessionStreamState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StreamingSessionStreamState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("stream.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "CREATE_FAILED" - value, ok := pathValue.(types.StreamingSessionStreamState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StreamingSessionStreamState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - return true, nil -} - -// GetStreamingSessionStreamAPIClient is a client that implements the -// GetStreamingSessionStream operation. -type GetStreamingSessionStreamAPIClient interface { - GetStreamingSessionStream(context.Context, *GetStreamingSessionStreamInput, ...func(*Options)) (*GetStreamingSessionStreamOutput, error) -} - -var _ GetStreamingSessionStreamAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opGetStreamingSessionStream(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetStreamingSessionStream", - } -} diff --git a/service/nimble/api_op_GetStudio.go b/service/nimble/api_op_GetStudio.go deleted file mode 100644 index 54a51c3f637..00000000000 --- a/service/nimble/api_op_GetStudio.go +++ /dev/null @@ -1,584 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" - "time" -) - -// Get a studio resource. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) GetStudio(ctx context.Context, params *GetStudioInput, optFns ...func(*Options)) (*GetStudioOutput, error) { - if params == nil { - params = &GetStudioInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetStudio", params, optFns, c.addOperationGetStudioMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetStudioOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetStudioInput struct { - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - noSmithyDocumentSerde -} - -type GetStudioOutput struct { - - // Information about a studio. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Studio *types.Studio - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetStudioMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetStudio{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetStudio{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetStudio"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetStudioValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetStudio(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// StudioReadyWaiterOptions are waiter options for StudioReadyWaiter -type StudioReadyWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // StudioReadyWaiter will use default minimum delay of 2 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, StudioReadyWaiter will use default max delay of 120 seconds. Note - // that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. - // - // By default service-modeled logic will populate this option. This option can - // thus be used to define a custom waiter state with fall-back to service-modeled - // waiter state mutators.The function returns an error in case of a failure state. - // In case of retry state, this function returns a bool value of true and nil - // error, while in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *GetStudioInput, *GetStudioOutput, error) (bool, error) -} - -// StudioReadyWaiter defines the waiters for StudioReady -type StudioReadyWaiter struct { - client GetStudioAPIClient - - options StudioReadyWaiterOptions -} - -// NewStudioReadyWaiter constructs a StudioReadyWaiter. -func NewStudioReadyWaiter(client GetStudioAPIClient, optFns ...func(*StudioReadyWaiterOptions)) *StudioReadyWaiter { - options := StudioReadyWaiterOptions{} - options.MinDelay = 2 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = studioReadyStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &StudioReadyWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for StudioReady waiter. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *StudioReadyWaiter) Wait(ctx context.Context, params *GetStudioInput, maxWaitDur time.Duration, optFns ...func(*StudioReadyWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for StudioReady waiter and returns the -// output of the successful operation. The maxWaitDur is the maximum wait duration -// the waiter will wait. The maxWaitDur is required and must be greater than zero. -func (w *StudioReadyWaiter) WaitForOutput(ctx context.Context, params *GetStudioInput, maxWaitDur time.Duration, optFns ...func(*StudioReadyWaiterOptions)) (*GetStudioOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.GetStudio(ctx, params, func(o *Options) { - baseOpts := []func(*Options){ - addIsWaiterUserAgent, - } - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range baseOpts { - opt(o) - } - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for StudioReady waiter") -} - -func studioReadyStateRetryable(ctx context.Context, input *GetStudioInput, output *GetStudioOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("studio.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "READY" - value, ok := pathValue.(types.StudioState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StudioState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("studio.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "CREATE_FAILED" - value, ok := pathValue.(types.StudioState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StudioState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - if err == nil { - pathValue, err := jmespath.Search("studio.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "UPDATE_FAILED" - value, ok := pathValue.(types.StudioState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StudioState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - return true, nil -} - -// StudioDeletedWaiterOptions are waiter options for StudioDeletedWaiter -type StudioDeletedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // StudioDeletedWaiter will use default minimum delay of 2 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, StudioDeletedWaiter will use default max delay of 120 seconds. Note - // that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. - // - // By default service-modeled logic will populate this option. This option can - // thus be used to define a custom waiter state with fall-back to service-modeled - // waiter state mutators.The function returns an error in case of a failure state. - // In case of retry state, this function returns a bool value of true and nil - // error, while in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *GetStudioInput, *GetStudioOutput, error) (bool, error) -} - -// StudioDeletedWaiter defines the waiters for StudioDeleted -type StudioDeletedWaiter struct { - client GetStudioAPIClient - - options StudioDeletedWaiterOptions -} - -// NewStudioDeletedWaiter constructs a StudioDeletedWaiter. -func NewStudioDeletedWaiter(client GetStudioAPIClient, optFns ...func(*StudioDeletedWaiterOptions)) *StudioDeletedWaiter { - options := StudioDeletedWaiterOptions{} - options.MinDelay = 2 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = studioDeletedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &StudioDeletedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for StudioDeleted waiter. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *StudioDeletedWaiter) Wait(ctx context.Context, params *GetStudioInput, maxWaitDur time.Duration, optFns ...func(*StudioDeletedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for StudioDeleted waiter and returns -// the output of the successful operation. The maxWaitDur is the maximum wait -// duration the waiter will wait. The maxWaitDur is required and must be greater -// than zero. -func (w *StudioDeletedWaiter) WaitForOutput(ctx context.Context, params *GetStudioInput, maxWaitDur time.Duration, optFns ...func(*StudioDeletedWaiterOptions)) (*GetStudioOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.GetStudio(ctx, params, func(o *Options) { - baseOpts := []func(*Options){ - addIsWaiterUserAgent, - } - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range baseOpts { - opt(o) - } - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for StudioDeleted waiter") -} - -func studioDeletedStateRetryable(ctx context.Context, input *GetStudioInput, output *GetStudioOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("studio.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "DELETED" - value, ok := pathValue.(types.StudioState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StudioState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("studio.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "DELETE_FAILED" - value, ok := pathValue.(types.StudioState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StudioState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - return true, nil -} - -// GetStudioAPIClient is a client that implements the GetStudio operation. -type GetStudioAPIClient interface { - GetStudio(context.Context, *GetStudioInput, ...func(*Options)) (*GetStudioOutput, error) -} - -var _ GetStudioAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opGetStudio(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetStudio", - } -} diff --git a/service/nimble/api_op_GetStudioComponent.go b/service/nimble/api_op_GetStudioComponent.go deleted file mode 100644 index 1e7e143b4c0..00000000000 --- a/service/nimble/api_op_GetStudioComponent.go +++ /dev/null @@ -1,595 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - jmespath "github.com/jmespath/go-jmespath" - "time" -) - -// Gets a studio component resource. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) GetStudioComponent(ctx context.Context, params *GetStudioComponentInput, optFns ...func(*Options)) (*GetStudioComponentOutput, error) { - if params == nil { - params = &GetStudioComponentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetStudioComponent", params, optFns, c.addOperationGetStudioComponentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetStudioComponentOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetStudioComponentInput struct { - - // The studio component ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponentId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - noSmithyDocumentSerde -} - -type GetStudioComponentOutput struct { - - // Information about the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponent *types.StudioComponent - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetStudioComponentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetStudioComponent{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetStudioComponent{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetStudioComponent"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetStudioComponentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetStudioComponent(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// StudioComponentReadyWaiterOptions are waiter options for -// StudioComponentReadyWaiter -type StudioComponentReadyWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // StudioComponentReadyWaiter will use default minimum delay of 2 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, StudioComponentReadyWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. - // - // By default service-modeled logic will populate this option. This option can - // thus be used to define a custom waiter state with fall-back to service-modeled - // waiter state mutators.The function returns an error in case of a failure state. - // In case of retry state, this function returns a bool value of true and nil - // error, while in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *GetStudioComponentInput, *GetStudioComponentOutput, error) (bool, error) -} - -// StudioComponentReadyWaiter defines the waiters for StudioComponentReady -type StudioComponentReadyWaiter struct { - client GetStudioComponentAPIClient - - options StudioComponentReadyWaiterOptions -} - -// NewStudioComponentReadyWaiter constructs a StudioComponentReadyWaiter. -func NewStudioComponentReadyWaiter(client GetStudioComponentAPIClient, optFns ...func(*StudioComponentReadyWaiterOptions)) *StudioComponentReadyWaiter { - options := StudioComponentReadyWaiterOptions{} - options.MinDelay = 2 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = studioComponentReadyStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &StudioComponentReadyWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for StudioComponentReady waiter. The maxWaitDur -// is the maximum wait duration the waiter will wait. The maxWaitDur is required -// and must be greater than zero. -func (w *StudioComponentReadyWaiter) Wait(ctx context.Context, params *GetStudioComponentInput, maxWaitDur time.Duration, optFns ...func(*StudioComponentReadyWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for StudioComponentReady waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *StudioComponentReadyWaiter) WaitForOutput(ctx context.Context, params *GetStudioComponentInput, maxWaitDur time.Duration, optFns ...func(*StudioComponentReadyWaiterOptions)) (*GetStudioComponentOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.GetStudioComponent(ctx, params, func(o *Options) { - baseOpts := []func(*Options){ - addIsWaiterUserAgent, - } - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range baseOpts { - opt(o) - } - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for StudioComponentReady waiter") -} - -func studioComponentReadyStateRetryable(ctx context.Context, input *GetStudioComponentInput, output *GetStudioComponentOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("studioComponent.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "READY" - value, ok := pathValue.(types.StudioComponentState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StudioComponentState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("studioComponent.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "CREATE_FAILED" - value, ok := pathValue.(types.StudioComponentState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StudioComponentState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - if err == nil { - pathValue, err := jmespath.Search("studioComponent.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "UPDATE_FAILED" - value, ok := pathValue.(types.StudioComponentState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StudioComponentState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - return true, nil -} - -// StudioComponentDeletedWaiterOptions are waiter options for -// StudioComponentDeletedWaiter -type StudioComponentDeletedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // StudioComponentDeletedWaiter will use default minimum delay of 1 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, StudioComponentDeletedWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. - // - // By default service-modeled logic will populate this option. This option can - // thus be used to define a custom waiter state with fall-back to service-modeled - // waiter state mutators.The function returns an error in case of a failure state. - // In case of retry state, this function returns a bool value of true and nil - // error, while in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *GetStudioComponentInput, *GetStudioComponentOutput, error) (bool, error) -} - -// StudioComponentDeletedWaiter defines the waiters for StudioComponentDeleted -type StudioComponentDeletedWaiter struct { - client GetStudioComponentAPIClient - - options StudioComponentDeletedWaiterOptions -} - -// NewStudioComponentDeletedWaiter constructs a StudioComponentDeletedWaiter. -func NewStudioComponentDeletedWaiter(client GetStudioComponentAPIClient, optFns ...func(*StudioComponentDeletedWaiterOptions)) *StudioComponentDeletedWaiter { - options := StudioComponentDeletedWaiterOptions{} - options.MinDelay = 1 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = studioComponentDeletedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &StudioComponentDeletedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for StudioComponentDeleted waiter. The -// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is -// required and must be greater than zero. -func (w *StudioComponentDeletedWaiter) Wait(ctx context.Context, params *GetStudioComponentInput, maxWaitDur time.Duration, optFns ...func(*StudioComponentDeletedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for StudioComponentDeleted waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *StudioComponentDeletedWaiter) WaitForOutput(ctx context.Context, params *GetStudioComponentInput, maxWaitDur time.Duration, optFns ...func(*StudioComponentDeletedWaiterOptions)) (*GetStudioComponentOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.GetStudioComponent(ctx, params, func(o *Options) { - baseOpts := []func(*Options){ - addIsWaiterUserAgent, - } - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range baseOpts { - opt(o) - } - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for StudioComponentDeleted waiter") -} - -func studioComponentDeletedStateRetryable(ctx context.Context, input *GetStudioComponentInput, output *GetStudioComponentOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("studioComponent.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "DELETED" - value, ok := pathValue.(types.StudioComponentState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StudioComponentState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("studioComponent.state", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "DELETE_FAILED" - value, ok := pathValue.(types.StudioComponentState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.StudioComponentState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - return true, nil -} - -// GetStudioComponentAPIClient is a client that implements the GetStudioComponent -// operation. -type GetStudioComponentAPIClient interface { - GetStudioComponent(context.Context, *GetStudioComponentInput, ...func(*Options)) (*GetStudioComponentOutput, error) -} - -var _ GetStudioComponentAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opGetStudioComponent(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetStudioComponent", - } -} diff --git a/service/nimble/api_op_GetStudioMember.go b/service/nimble/api_op_GetStudioMember.go deleted file mode 100644 index ec7d873a908..00000000000 --- a/service/nimble/api_op_GetStudioMember.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Get a user's membership in a studio. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) GetStudioMember(ctx context.Context, params *GetStudioMemberInput, optFns ...func(*Options)) (*GetStudioMemberOutput, error) { - if params == nil { - params = &GetStudioMemberInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetStudioMember", params, optFns, c.addOperationGetStudioMemberMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetStudioMemberOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetStudioMemberInput struct { - - // The principal ID. This currently supports a IAM Identity Center UserId. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - PrincipalId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - noSmithyDocumentSerde -} - -type GetStudioMemberOutput struct { - - // The member. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Member *types.StudioMembership - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetStudioMemberMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetStudioMember{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetStudioMember{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetStudioMember"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetStudioMemberValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetStudioMember(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetStudioMember(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetStudioMember", - } -} diff --git a/service/nimble/api_op_ListEulaAcceptances.go b/service/nimble/api_op_ListEulaAcceptances.go deleted file mode 100644 index 37c2a38884a..00000000000 --- a/service/nimble/api_op_ListEulaAcceptances.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// List EULA acceptances. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) ListEulaAcceptances(ctx context.Context, params *ListEulaAcceptancesInput, optFns ...func(*Options)) (*ListEulaAcceptancesOutput, error) { - if params == nil { - params = &ListEulaAcceptancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListEulaAcceptances", params, optFns, c.addOperationListEulaAcceptancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListEulaAcceptancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListEulaAcceptancesInput struct { - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // The list of EULA IDs that have been previously accepted. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - EulaIds []string - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - noSmithyDocumentSerde -} - -type ListEulaAcceptancesOutput struct { - - // A collection of EULA acceptances. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - EulaAcceptances []types.EulaAcceptance - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListEulaAcceptancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListEulaAcceptances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListEulaAcceptances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListEulaAcceptances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListEulaAcceptancesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEulaAcceptances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListEulaAcceptancesPaginatorOptions is the paginator options for -// ListEulaAcceptances -type ListEulaAcceptancesPaginatorOptions struct { - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListEulaAcceptancesPaginator is a paginator for ListEulaAcceptances -type ListEulaAcceptancesPaginator struct { - options ListEulaAcceptancesPaginatorOptions - client ListEulaAcceptancesAPIClient - params *ListEulaAcceptancesInput - nextToken *string - firstPage bool -} - -// NewListEulaAcceptancesPaginator returns a new ListEulaAcceptancesPaginator -func NewListEulaAcceptancesPaginator(client ListEulaAcceptancesAPIClient, params *ListEulaAcceptancesInput, optFns ...func(*ListEulaAcceptancesPaginatorOptions)) *ListEulaAcceptancesPaginator { - if params == nil { - params = &ListEulaAcceptancesInput{} - } - - options := ListEulaAcceptancesPaginatorOptions{} - - for _, fn := range optFns { - fn(&options) - } - - return &ListEulaAcceptancesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListEulaAcceptancesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListEulaAcceptances page. -func (p *ListEulaAcceptancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEulaAcceptancesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListEulaAcceptances(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListEulaAcceptancesAPIClient is a client that implements the -// ListEulaAcceptances operation. -type ListEulaAcceptancesAPIClient interface { - ListEulaAcceptances(context.Context, *ListEulaAcceptancesInput, ...func(*Options)) (*ListEulaAcceptancesOutput, error) -} - -var _ ListEulaAcceptancesAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListEulaAcceptances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListEulaAcceptances", - } -} diff --git a/service/nimble/api_op_ListEulas.go b/service/nimble/api_op_ListEulas.go deleted file mode 100644 index ac9b53ef6ea..00000000000 --- a/service/nimble/api_op_ListEulas.go +++ /dev/null @@ -1,248 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// List EULAs. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) ListEulas(ctx context.Context, params *ListEulasInput, optFns ...func(*Options)) (*ListEulasOutput, error) { - if params == nil { - params = &ListEulasInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListEulas", params, optFns, c.addOperationListEulasMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListEulasOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListEulasInput struct { - - // The list of EULA IDs that should be returned - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - EulaIds []string - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - noSmithyDocumentSerde -} - -type ListEulasOutput struct { - - // A collection of EULA resources. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Eulas []types.Eula - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListEulasMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListEulas{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListEulas{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListEulas"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEulas(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListEulasPaginatorOptions is the paginator options for ListEulas -type ListEulasPaginatorOptions struct { - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListEulasPaginator is a paginator for ListEulas -type ListEulasPaginator struct { - options ListEulasPaginatorOptions - client ListEulasAPIClient - params *ListEulasInput - nextToken *string - firstPage bool -} - -// NewListEulasPaginator returns a new ListEulasPaginator -func NewListEulasPaginator(client ListEulasAPIClient, params *ListEulasInput, optFns ...func(*ListEulasPaginatorOptions)) *ListEulasPaginator { - if params == nil { - params = &ListEulasInput{} - } - - options := ListEulasPaginatorOptions{} - - for _, fn := range optFns { - fn(&options) - } - - return &ListEulasPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListEulasPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListEulas page. -func (p *ListEulasPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEulasOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListEulas(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListEulasAPIClient is a client that implements the ListEulas operation. -type ListEulasAPIClient interface { - ListEulas(context.Context, *ListEulasInput, ...func(*Options)) (*ListEulasOutput, error) -} - -var _ ListEulasAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListEulas(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListEulas", - } -} diff --git a/service/nimble/api_op_ListLaunchProfileMembers.go b/service/nimble/api_op_ListLaunchProfileMembers.go deleted file mode 100644 index d26fb6d0a57..00000000000 --- a/service/nimble/api_op_ListLaunchProfileMembers.go +++ /dev/null @@ -1,280 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Get all users in a given launch profile membership. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) ListLaunchProfileMembers(ctx context.Context, params *ListLaunchProfileMembersInput, optFns ...func(*Options)) (*ListLaunchProfileMembersOutput, error) { - if params == nil { - params = &ListLaunchProfileMembersInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListLaunchProfileMembers", params, optFns, c.addOperationListLaunchProfileMembersMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListLaunchProfileMembersOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListLaunchProfileMembersInput struct { - - // The ID of the launch profile used to control access from the streaming session. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // The max number of results to return in the response. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - MaxResults *int32 - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - noSmithyDocumentSerde -} - -type ListLaunchProfileMembersOutput struct { - - // A list of members. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Members []types.LaunchProfileMembership - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListLaunchProfileMembersMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListLaunchProfileMembers{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListLaunchProfileMembers{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListLaunchProfileMembers"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListLaunchProfileMembersValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLaunchProfileMembers(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListLaunchProfileMembersPaginatorOptions is the paginator options for -// ListLaunchProfileMembers -type ListLaunchProfileMembersPaginatorOptions struct { - // The max number of results to return in the response. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListLaunchProfileMembersPaginator is a paginator for ListLaunchProfileMembers -type ListLaunchProfileMembersPaginator struct { - options ListLaunchProfileMembersPaginatorOptions - client ListLaunchProfileMembersAPIClient - params *ListLaunchProfileMembersInput - nextToken *string - firstPage bool -} - -// NewListLaunchProfileMembersPaginator returns a new -// ListLaunchProfileMembersPaginator -func NewListLaunchProfileMembersPaginator(client ListLaunchProfileMembersAPIClient, params *ListLaunchProfileMembersInput, optFns ...func(*ListLaunchProfileMembersPaginatorOptions)) *ListLaunchProfileMembersPaginator { - if params == nil { - params = &ListLaunchProfileMembersInput{} - } - - options := ListLaunchProfileMembersPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListLaunchProfileMembersPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListLaunchProfileMembersPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListLaunchProfileMembers page. -func (p *ListLaunchProfileMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLaunchProfileMembersOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListLaunchProfileMembers(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListLaunchProfileMembersAPIClient is a client that implements the -// ListLaunchProfileMembers operation. -type ListLaunchProfileMembersAPIClient interface { - ListLaunchProfileMembers(context.Context, *ListLaunchProfileMembersInput, ...func(*Options)) (*ListLaunchProfileMembersOutput, error) -} - -var _ ListLaunchProfileMembersAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListLaunchProfileMembers(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListLaunchProfileMembers", - } -} diff --git a/service/nimble/api_op_ListLaunchProfiles.go b/service/nimble/api_op_ListLaunchProfiles.go deleted file mode 100644 index 8e40326d0ac..00000000000 --- a/service/nimble/api_op_ListLaunchProfiles.go +++ /dev/null @@ -1,282 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// List all the launch profiles a studio. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) ListLaunchProfiles(ctx context.Context, params *ListLaunchProfilesInput, optFns ...func(*Options)) (*ListLaunchProfilesOutput, error) { - if params == nil { - params = &ListLaunchProfilesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListLaunchProfiles", params, optFns, c.addOperationListLaunchProfilesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListLaunchProfilesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListLaunchProfilesInput struct { - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // The max number of results to return in the response. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - MaxResults *int32 - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - // The principal ID. This currently supports a IAM Identity Center UserId. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - PrincipalId *string - - // Filter this request to launch profiles in any of the given states. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - States []types.LaunchProfileState - - noSmithyDocumentSerde -} - -type ListLaunchProfilesOutput struct { - - // A collection of launch profiles. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfiles []types.LaunchProfile - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListLaunchProfilesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListLaunchProfiles{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListLaunchProfiles{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListLaunchProfiles"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListLaunchProfilesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLaunchProfiles(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListLaunchProfilesPaginatorOptions is the paginator options for -// ListLaunchProfiles -type ListLaunchProfilesPaginatorOptions struct { - // The max number of results to return in the response. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListLaunchProfilesPaginator is a paginator for ListLaunchProfiles -type ListLaunchProfilesPaginator struct { - options ListLaunchProfilesPaginatorOptions - client ListLaunchProfilesAPIClient - params *ListLaunchProfilesInput - nextToken *string - firstPage bool -} - -// NewListLaunchProfilesPaginator returns a new ListLaunchProfilesPaginator -func NewListLaunchProfilesPaginator(client ListLaunchProfilesAPIClient, params *ListLaunchProfilesInput, optFns ...func(*ListLaunchProfilesPaginatorOptions)) *ListLaunchProfilesPaginator { - if params == nil { - params = &ListLaunchProfilesInput{} - } - - options := ListLaunchProfilesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListLaunchProfilesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListLaunchProfilesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListLaunchProfiles page. -func (p *ListLaunchProfilesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLaunchProfilesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListLaunchProfiles(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListLaunchProfilesAPIClient is a client that implements the ListLaunchProfiles -// operation. -type ListLaunchProfilesAPIClient interface { - ListLaunchProfiles(context.Context, *ListLaunchProfilesInput, ...func(*Options)) (*ListLaunchProfilesOutput, error) -} - -var _ ListLaunchProfilesAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListLaunchProfiles(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListLaunchProfiles", - } -} diff --git a/service/nimble/api_op_ListStreamingImages.go b/service/nimble/api_op_ListStreamingImages.go deleted file mode 100644 index e28f63769f8..00000000000 --- a/service/nimble/api_op_ListStreamingImages.go +++ /dev/null @@ -1,263 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// List the streaming image resources available to this studio. -// -// This list will contain both images provided by Amazon Web Services, as well as -// streaming images that you have created in your studio. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) ListStreamingImages(ctx context.Context, params *ListStreamingImagesInput, optFns ...func(*Options)) (*ListStreamingImagesOutput, error) { - if params == nil { - params = &ListStreamingImagesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListStreamingImages", params, optFns, c.addOperationListStreamingImagesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListStreamingImagesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListStreamingImagesInput struct { - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - // Filter this request to streaming images with the given owner - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Owner *string - - noSmithyDocumentSerde -} - -type ListStreamingImagesOutput struct { - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - // A collection of streaming images. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingImages []types.StreamingImage - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListStreamingImagesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListStreamingImages{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListStreamingImages{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListStreamingImages"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListStreamingImagesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStreamingImages(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListStreamingImagesPaginatorOptions is the paginator options for -// ListStreamingImages -type ListStreamingImagesPaginatorOptions struct { - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListStreamingImagesPaginator is a paginator for ListStreamingImages -type ListStreamingImagesPaginator struct { - options ListStreamingImagesPaginatorOptions - client ListStreamingImagesAPIClient - params *ListStreamingImagesInput - nextToken *string - firstPage bool -} - -// NewListStreamingImagesPaginator returns a new ListStreamingImagesPaginator -func NewListStreamingImagesPaginator(client ListStreamingImagesAPIClient, params *ListStreamingImagesInput, optFns ...func(*ListStreamingImagesPaginatorOptions)) *ListStreamingImagesPaginator { - if params == nil { - params = &ListStreamingImagesInput{} - } - - options := ListStreamingImagesPaginatorOptions{} - - for _, fn := range optFns { - fn(&options) - } - - return &ListStreamingImagesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListStreamingImagesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListStreamingImages page. -func (p *ListStreamingImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListStreamingImagesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListStreamingImages(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListStreamingImagesAPIClient is a client that implements the -// ListStreamingImages operation. -type ListStreamingImagesAPIClient interface { - ListStreamingImages(context.Context, *ListStreamingImagesInput, ...func(*Options)) (*ListStreamingImagesOutput, error) -} - -var _ ListStreamingImagesAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListStreamingImages(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListStreamingImages", - } -} diff --git a/service/nimble/api_op_ListStreamingSessionBackups.go b/service/nimble/api_op_ListStreamingSessionBackups.go deleted file mode 100644 index e94a3224d7f..00000000000 --- a/service/nimble/api_op_ListStreamingSessionBackups.go +++ /dev/null @@ -1,262 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the backups of a streaming session in a studio. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) ListStreamingSessionBackups(ctx context.Context, params *ListStreamingSessionBackupsInput, optFns ...func(*Options)) (*ListStreamingSessionBackupsOutput, error) { - if params == nil { - params = &ListStreamingSessionBackupsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListStreamingSessionBackups", params, optFns, c.addOperationListStreamingSessionBackupsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListStreamingSessionBackupsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListStreamingSessionBackupsInput struct { - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - // The user ID of the user that owns the streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - OwnedBy *string - - noSmithyDocumentSerde -} - -type ListStreamingSessionBackupsOutput struct { - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - // Information about the streaming session backups. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingSessionBackups []types.StreamingSessionBackup - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListStreamingSessionBackupsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListStreamingSessionBackups{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListStreamingSessionBackups{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListStreamingSessionBackups"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListStreamingSessionBackupsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStreamingSessionBackups(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListStreamingSessionBackupsPaginatorOptions is the paginator options for -// ListStreamingSessionBackups -type ListStreamingSessionBackupsPaginatorOptions struct { - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListStreamingSessionBackupsPaginator is a paginator for -// ListStreamingSessionBackups -type ListStreamingSessionBackupsPaginator struct { - options ListStreamingSessionBackupsPaginatorOptions - client ListStreamingSessionBackupsAPIClient - params *ListStreamingSessionBackupsInput - nextToken *string - firstPage bool -} - -// NewListStreamingSessionBackupsPaginator returns a new -// ListStreamingSessionBackupsPaginator -func NewListStreamingSessionBackupsPaginator(client ListStreamingSessionBackupsAPIClient, params *ListStreamingSessionBackupsInput, optFns ...func(*ListStreamingSessionBackupsPaginatorOptions)) *ListStreamingSessionBackupsPaginator { - if params == nil { - params = &ListStreamingSessionBackupsInput{} - } - - options := ListStreamingSessionBackupsPaginatorOptions{} - - for _, fn := range optFns { - fn(&options) - } - - return &ListStreamingSessionBackupsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListStreamingSessionBackupsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListStreamingSessionBackups page. -func (p *ListStreamingSessionBackupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListStreamingSessionBackupsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListStreamingSessionBackups(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListStreamingSessionBackupsAPIClient is a client that implements the -// ListStreamingSessionBackups operation. -type ListStreamingSessionBackupsAPIClient interface { - ListStreamingSessionBackups(context.Context, *ListStreamingSessionBackupsInput, ...func(*Options)) (*ListStreamingSessionBackupsOutput, error) -} - -var _ ListStreamingSessionBackupsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListStreamingSessionBackups(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListStreamingSessionBackups", - } -} diff --git a/service/nimble/api_op_ListStreamingSessions.go b/service/nimble/api_op_ListStreamingSessions.go deleted file mode 100644 index ecb5110ad69..00000000000 --- a/service/nimble/api_op_ListStreamingSessions.go +++ /dev/null @@ -1,270 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the streaming sessions in a studio. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) ListStreamingSessions(ctx context.Context, params *ListStreamingSessionsInput, optFns ...func(*Options)) (*ListStreamingSessionsOutput, error) { - if params == nil { - params = &ListStreamingSessionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListStreamingSessions", params, optFns, c.addOperationListStreamingSessionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListStreamingSessionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListStreamingSessionsInput struct { - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Filters the request to streaming sessions created by the given user. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - CreatedBy *string - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - // Filters the request to streaming session owned by the given user - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - OwnedBy *string - - // Filters the request to only the provided session IDs. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionIds *string - - noSmithyDocumentSerde -} - -type ListStreamingSessionsOutput struct { - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - // A collection of streaming sessions. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Sessions []types.StreamingSession - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListStreamingSessionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListStreamingSessions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListStreamingSessions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListStreamingSessions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListStreamingSessionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStreamingSessions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListStreamingSessionsPaginatorOptions is the paginator options for -// ListStreamingSessions -type ListStreamingSessionsPaginatorOptions struct { - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListStreamingSessionsPaginator is a paginator for ListStreamingSessions -type ListStreamingSessionsPaginator struct { - options ListStreamingSessionsPaginatorOptions - client ListStreamingSessionsAPIClient - params *ListStreamingSessionsInput - nextToken *string - firstPage bool -} - -// NewListStreamingSessionsPaginator returns a new ListStreamingSessionsPaginator -func NewListStreamingSessionsPaginator(client ListStreamingSessionsAPIClient, params *ListStreamingSessionsInput, optFns ...func(*ListStreamingSessionsPaginatorOptions)) *ListStreamingSessionsPaginator { - if params == nil { - params = &ListStreamingSessionsInput{} - } - - options := ListStreamingSessionsPaginatorOptions{} - - for _, fn := range optFns { - fn(&options) - } - - return &ListStreamingSessionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListStreamingSessionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListStreamingSessions page. -func (p *ListStreamingSessionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListStreamingSessionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListStreamingSessions(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListStreamingSessionsAPIClient is a client that implements the -// ListStreamingSessions operation. -type ListStreamingSessionsAPIClient interface { - ListStreamingSessions(context.Context, *ListStreamingSessionsInput, ...func(*Options)) (*ListStreamingSessionsOutput, error) -} - -var _ ListStreamingSessionsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListStreamingSessions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListStreamingSessions", - } -} diff --git a/service/nimble/api_op_ListStudioComponents.go b/service/nimble/api_op_ListStudioComponents.go deleted file mode 100644 index 4a1b9940ccd..00000000000 --- a/service/nimble/api_op_ListStudioComponents.go +++ /dev/null @@ -1,282 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the StudioComponents in a studio. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) ListStudioComponents(ctx context.Context, params *ListStudioComponentsInput, optFns ...func(*Options)) (*ListStudioComponentsOutput, error) { - if params == nil { - params = &ListStudioComponentsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListStudioComponents", params, optFns, c.addOperationListStudioComponentsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListStudioComponentsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListStudioComponentsInput struct { - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // The max number of results to return in the response. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - MaxResults *int32 - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - // Filters the request to studio components that are in one of the given states. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - States []types.StudioComponentState - - // Filters the request to studio components that are of one of the given types. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Types []types.StudioComponentType - - noSmithyDocumentSerde -} - -type ListStudioComponentsOutput struct { - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - // A collection of studio components. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponents []types.StudioComponent - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListStudioComponentsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListStudioComponents{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListStudioComponents{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListStudioComponents"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListStudioComponentsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStudioComponents(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListStudioComponentsPaginatorOptions is the paginator options for -// ListStudioComponents -type ListStudioComponentsPaginatorOptions struct { - // The max number of results to return in the response. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListStudioComponentsPaginator is a paginator for ListStudioComponents -type ListStudioComponentsPaginator struct { - options ListStudioComponentsPaginatorOptions - client ListStudioComponentsAPIClient - params *ListStudioComponentsInput - nextToken *string - firstPage bool -} - -// NewListStudioComponentsPaginator returns a new ListStudioComponentsPaginator -func NewListStudioComponentsPaginator(client ListStudioComponentsAPIClient, params *ListStudioComponentsInput, optFns ...func(*ListStudioComponentsPaginatorOptions)) *ListStudioComponentsPaginator { - if params == nil { - params = &ListStudioComponentsInput{} - } - - options := ListStudioComponentsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListStudioComponentsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListStudioComponentsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListStudioComponents page. -func (p *ListStudioComponentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListStudioComponentsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListStudioComponents(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListStudioComponentsAPIClient is a client that implements the -// ListStudioComponents operation. -type ListStudioComponentsAPIClient interface { - ListStudioComponents(context.Context, *ListStudioComponentsInput, ...func(*Options)) (*ListStudioComponentsOutput, error) -} - -var _ ListStudioComponentsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListStudioComponents(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListStudioComponents", - } -} diff --git a/service/nimble/api_op_ListStudioMembers.go b/service/nimble/api_op_ListStudioMembers.go deleted file mode 100644 index 6174b6897fa..00000000000 --- a/service/nimble/api_op_ListStudioMembers.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Get all users in a given studio membership. -// -// ListStudioMembers only returns admin members. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) ListStudioMembers(ctx context.Context, params *ListStudioMembersInput, optFns ...func(*Options)) (*ListStudioMembersOutput, error) { - if params == nil { - params = &ListStudioMembersInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListStudioMembers", params, optFns, c.addOperationListStudioMembersMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListStudioMembersOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListStudioMembersInput struct { - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // The max number of results to return in the response. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - MaxResults *int32 - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - noSmithyDocumentSerde -} - -type ListStudioMembersOutput struct { - - // A list of admin members. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Members []types.StudioMembership - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListStudioMembersMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListStudioMembers{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListStudioMembers{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListStudioMembers"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListStudioMembersValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStudioMembers(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListStudioMembersPaginatorOptions is the paginator options for ListStudioMembers -type ListStudioMembersPaginatorOptions struct { - // The max number of results to return in the response. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListStudioMembersPaginator is a paginator for ListStudioMembers -type ListStudioMembersPaginator struct { - options ListStudioMembersPaginatorOptions - client ListStudioMembersAPIClient - params *ListStudioMembersInput - nextToken *string - firstPage bool -} - -// NewListStudioMembersPaginator returns a new ListStudioMembersPaginator -func NewListStudioMembersPaginator(client ListStudioMembersAPIClient, params *ListStudioMembersInput, optFns ...func(*ListStudioMembersPaginatorOptions)) *ListStudioMembersPaginator { - if params == nil { - params = &ListStudioMembersInput{} - } - - options := ListStudioMembersPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListStudioMembersPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListStudioMembersPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListStudioMembers page. -func (p *ListStudioMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListStudioMembersOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListStudioMembers(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListStudioMembersAPIClient is a client that implements the ListStudioMembers -// operation. -type ListStudioMembersAPIClient interface { - ListStudioMembers(context.Context, *ListStudioMembersInput, ...func(*Options)) (*ListStudioMembersOutput, error) -} - -var _ ListStudioMembersAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListStudioMembers(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListStudioMembers", - } -} diff --git a/service/nimble/api_op_ListStudios.go b/service/nimble/api_op_ListStudios.go deleted file mode 100644 index d23b632ca31..00000000000 --- a/service/nimble/api_op_ListStudios.go +++ /dev/null @@ -1,246 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// List studios in your Amazon Web Services accounts in the requested Amazon Web -// Services Region. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) ListStudios(ctx context.Context, params *ListStudiosInput, optFns ...func(*Options)) (*ListStudiosOutput, error) { - if params == nil { - params = &ListStudiosInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListStudios", params, optFns, c.addOperationListStudiosMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListStudiosOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListStudiosInput struct { - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - noSmithyDocumentSerde -} - -type ListStudiosOutput struct { - - // A collection of studios. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Studios []types.Studio - - // The token for the next set of results, or null if there are no more results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListStudiosMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListStudios{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListStudios{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListStudios"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStudios(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListStudiosPaginatorOptions is the paginator options for ListStudios -type ListStudiosPaginatorOptions struct { - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListStudiosPaginator is a paginator for ListStudios -type ListStudiosPaginator struct { - options ListStudiosPaginatorOptions - client ListStudiosAPIClient - params *ListStudiosInput - nextToken *string - firstPage bool -} - -// NewListStudiosPaginator returns a new ListStudiosPaginator -func NewListStudiosPaginator(client ListStudiosAPIClient, params *ListStudiosInput, optFns ...func(*ListStudiosPaginatorOptions)) *ListStudiosPaginator { - if params == nil { - params = &ListStudiosInput{} - } - - options := ListStudiosPaginatorOptions{} - - for _, fn := range optFns { - fn(&options) - } - - return &ListStudiosPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListStudiosPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListStudios page. -func (p *ListStudiosPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListStudiosOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListStudios(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListStudiosAPIClient is a client that implements the ListStudios operation. -type ListStudiosAPIClient interface { - ListStudios(context.Context, *ListStudiosInput, ...func(*Options)) (*ListStudiosOutput, error) -} - -var _ ListStudiosAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListStudios(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListStudios", - } -} diff --git a/service/nimble/api_op_ListTagsForResource.go b/service/nimble/api_op_ListTagsForResource.go deleted file mode 100644 index 5b94fbff3eb..00000000000 --- a/service/nimble/api_op_ListTagsForResource.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the tags for a resource, given its Amazon Resource Names (ARN). -// -// This operation supports ARNs for all resource types in Nimble Studio that -// support tags, including studio, studio component, launch profile, streaming -// image, and streaming session. All resources that can be tagged will contain an -// ARN property, so you do not have to create this ARN yourself. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { - if params == nil { - params = &ListTagsForResourceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListTagsForResourceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListTagsForResourceInput struct { - - // The Amazon Resource Name (ARN) of the resource for which you want to list tags. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ResourceArn *string - - noSmithyDocumentSerde -} - -type ListTagsForResourceOutput struct { - - // A collection of labels, in the form of key-value pairs, that apply to this - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Tags map[string]string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListTagsForResource"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListTagsForResource", - } -} diff --git a/service/nimble/api_op_PutLaunchProfileMembers.go b/service/nimble/api_op_PutLaunchProfileMembers.go deleted file mode 100644 index efd5701bbb1..00000000000 --- a/service/nimble/api_op_PutLaunchProfileMembers.go +++ /dev/null @@ -1,222 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Add/update users with given persona to launch profile membership. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) PutLaunchProfileMembers(ctx context.Context, params *PutLaunchProfileMembersInput, optFns ...func(*Options)) (*PutLaunchProfileMembersOutput, error) { - if params == nil { - params = &PutLaunchProfileMembersInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PutLaunchProfileMembers", params, optFns, c.addOperationPutLaunchProfileMembersMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PutLaunchProfileMembersOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PutLaunchProfileMembersInput struct { - - // The ID of the identity store. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - IdentityStoreId *string - - // The ID of the launch profile used to control access from the streaming session. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileId *string - - // A list of members. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Members []types.NewLaunchProfileMember - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - noSmithyDocumentSerde -} - -type PutLaunchProfileMembersOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPutLaunchProfileMembersMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpPutLaunchProfileMembers{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutLaunchProfileMembers{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutLaunchProfileMembers"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opPutLaunchProfileMembersMiddleware(stack, options); err != nil { - return err - } - if err = addOpPutLaunchProfileMembersValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutLaunchProfileMembers(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpPutLaunchProfileMembers struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpPutLaunchProfileMembers) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpPutLaunchProfileMembers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*PutLaunchProfileMembersInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *PutLaunchProfileMembersInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opPutLaunchProfileMembersMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpPutLaunchProfileMembers{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opPutLaunchProfileMembers(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutLaunchProfileMembers", - } -} diff --git a/service/nimble/api_op_PutStudioMembers.go b/service/nimble/api_op_PutStudioMembers.go deleted file mode 100644 index bfb60e0c780..00000000000 --- a/service/nimble/api_op_PutStudioMembers.go +++ /dev/null @@ -1,215 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Add/update users with given persona to studio membership. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) PutStudioMembers(ctx context.Context, params *PutStudioMembersInput, optFns ...func(*Options)) (*PutStudioMembersOutput, error) { - if params == nil { - params = &PutStudioMembersInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PutStudioMembers", params, optFns, c.addOperationPutStudioMembersMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PutStudioMembersOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PutStudioMembersInput struct { - - // The ID of the identity store. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - IdentityStoreId *string - - // A list of members. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Members []types.NewStudioMember - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - noSmithyDocumentSerde -} - -type PutStudioMembersOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPutStudioMembersMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpPutStudioMembers{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutStudioMembers{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutStudioMembers"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opPutStudioMembersMiddleware(stack, options); err != nil { - return err - } - if err = addOpPutStudioMembersValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutStudioMembers(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpPutStudioMembers struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpPutStudioMembers) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpPutStudioMembers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*PutStudioMembersInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *PutStudioMembersInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opPutStudioMembersMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpPutStudioMembers{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opPutStudioMembers(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutStudioMembers", - } -} diff --git a/service/nimble/api_op_StartStreamingSession.go b/service/nimble/api_op_StartStreamingSession.go deleted file mode 100644 index 2fa0e17e81f..00000000000 --- a/service/nimble/api_op_StartStreamingSession.go +++ /dev/null @@ -1,222 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Transitions sessions from the STOPPED state into the READY state. The -// START_IN_PROGRESS state is the intermediate state between the STOPPED and READY -// states. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) StartStreamingSession(ctx context.Context, params *StartStreamingSessionInput, optFns ...func(*Options)) (*StartStreamingSessionOutput, error) { - if params == nil { - params = &StartStreamingSessionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "StartStreamingSession", params, optFns, c.addOperationStartStreamingSessionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*StartStreamingSessionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type StartStreamingSessionInput struct { - - // The streaming session ID for the StartStreamingSessionRequest . - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionId *string - - // The studio ID for the StartStreamingSessionRequest. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // The ID of the backup. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - BackupId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - noSmithyDocumentSerde -} - -type StartStreamingSessionOutput struct { - - // A streaming session is a virtual workstation created using a particular launch - // profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Session *types.StreamingSession - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationStartStreamingSessionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpStartStreamingSession{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartStreamingSession{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "StartStreamingSession"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opStartStreamingSessionMiddleware(stack, options); err != nil { - return err - } - if err = addOpStartStreamingSessionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartStreamingSession(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpStartStreamingSession struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpStartStreamingSession) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpStartStreamingSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*StartStreamingSessionInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *StartStreamingSessionInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opStartStreamingSessionMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpStartStreamingSession{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opStartStreamingSession(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "StartStreamingSession", - } -} diff --git a/service/nimble/api_op_StartStudioSSOConfigurationRepair.go b/service/nimble/api_op_StartStudioSSOConfigurationRepair.go deleted file mode 100644 index e0e73168299..00000000000 --- a/service/nimble/api_op_StartStudioSSOConfigurationRepair.go +++ /dev/null @@ -1,219 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Repairs the IAM Identity Center configuration for a given studio. -// -// If the studio has a valid IAM Identity Center configuration currently -// associated with it, this operation will fail with a validation error. -// -// If the studio does not have a valid IAM Identity Center configuration currently -// associated with it, then a new IAM Identity Center application is created for -// the studio and the studio is changed to the READY state. -// -// After the IAM Identity Center application is repaired, you must use the Amazon -// Nimble Studio console to add administrators and users to your studio. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) StartStudioSSOConfigurationRepair(ctx context.Context, params *StartStudioSSOConfigurationRepairInput, optFns ...func(*Options)) (*StartStudioSSOConfigurationRepairOutput, error) { - if params == nil { - params = &StartStudioSSOConfigurationRepairInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "StartStudioSSOConfigurationRepair", params, optFns, c.addOperationStartStudioSSOConfigurationRepairMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*StartStudioSSOConfigurationRepairOutput) - out.ResultMetadata = metadata - return out, nil -} - -type StartStudioSSOConfigurationRepairInput struct { - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - noSmithyDocumentSerde -} - -type StartStudioSSOConfigurationRepairOutput struct { - - // Information about a studio. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Studio *types.Studio - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationStartStudioSSOConfigurationRepairMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpStartStudioSSOConfigurationRepair{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartStudioSSOConfigurationRepair{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "StartStudioSSOConfigurationRepair"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opStartStudioSSOConfigurationRepairMiddleware(stack, options); err != nil { - return err - } - if err = addOpStartStudioSSOConfigurationRepairValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartStudioSSOConfigurationRepair(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpStartStudioSSOConfigurationRepair struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpStartStudioSSOConfigurationRepair) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpStartStudioSSOConfigurationRepair) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*StartStudioSSOConfigurationRepairInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *StartStudioSSOConfigurationRepairInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opStartStudioSSOConfigurationRepairMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpStartStudioSSOConfigurationRepair{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opStartStudioSSOConfigurationRepair(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "StartStudioSSOConfigurationRepair", - } -} diff --git a/service/nimble/api_op_StopStreamingSession.go b/service/nimble/api_op_StopStreamingSession.go deleted file mode 100644 index 0e6d2580dbc..00000000000 --- a/service/nimble/api_op_StopStreamingSession.go +++ /dev/null @@ -1,223 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Transitions sessions from the READY state into the STOPPED state. The -// STOP_IN_PROGRESS state is the intermediate state between the READY and STOPPED -// states. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) StopStreamingSession(ctx context.Context, params *StopStreamingSessionInput, optFns ...func(*Options)) (*StopStreamingSessionOutput, error) { - if params == nil { - params = &StopStreamingSessionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "StopStreamingSession", params, optFns, c.addOperationStopStreamingSessionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*StopStreamingSessionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type StopStreamingSessionInput struct { - - // The streaming session ID for the StopStreamingSessionRequest . - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionId *string - - // The studioId for the StopStreamingSessionRequest. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - // Adds additional instructions to a streaming session stop action to either - // retain the EBS volumes or delete the EBS volumes. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - VolumeRetentionMode types.VolumeRetentionMode - - noSmithyDocumentSerde -} - -type StopStreamingSessionOutput struct { - - // A streaming session is a virtual workstation created using a particular launch - // profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Session *types.StreamingSession - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationStopStreamingSessionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpStopStreamingSession{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStopStreamingSession{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "StopStreamingSession"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opStopStreamingSessionMiddleware(stack, options); err != nil { - return err - } - if err = addOpStopStreamingSessionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopStreamingSession(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpStopStreamingSession struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpStopStreamingSession) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpStopStreamingSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*StopStreamingSessionInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *StopStreamingSessionInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opStopStreamingSessionMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpStopStreamingSession{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opStopStreamingSession(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "StopStreamingSession", - } -} diff --git a/service/nimble/api_op_TagResource.go b/service/nimble/api_op_TagResource.go deleted file mode 100644 index 001a5cc652b..00000000000 --- a/service/nimble/api_op_TagResource.go +++ /dev/null @@ -1,162 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates tags for a resource, given its ARN. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { - if params == nil { - params = &TagResourceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*TagResourceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type TagResourceInput struct { - - // The Amazon Resource Name (ARN) of the resource you want to add tags to. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ResourceArn *string - - // A collection of labels, in the form of key-value pairs, that apply to this - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Tags map[string]string - - noSmithyDocumentSerde -} - -type TagResourceOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "TagResource"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpTagResourceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "TagResource", - } -} diff --git a/service/nimble/api_op_UntagResource.go b/service/nimble/api_op_UntagResource.go deleted file mode 100644 index b0db7242416..00000000000 --- a/service/nimble/api_op_UntagResource.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the tags for a resource. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { - if params == nil { - params = &UntagResourceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UntagResourceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UntagResourceInput struct { - - // Identifies the Amazon Resource Name(ARN) key from which you are removing tags. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ResourceArn *string - - // One or more tag keys. Specify only the tag keys, not the tag values. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - TagKeys []string - - noSmithyDocumentSerde -} - -type UntagResourceOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UntagResource"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpUntagResourceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UntagResource", - } -} diff --git a/service/nimble/api_op_UpdateLaunchProfile.go b/service/nimble/api_op_UpdateLaunchProfile.go deleted file mode 100644 index b2d1ce286fa..00000000000 --- a/service/nimble/api_op_UpdateLaunchProfile.go +++ /dev/null @@ -1,241 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Update a launch profile. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) UpdateLaunchProfile(ctx context.Context, params *UpdateLaunchProfileInput, optFns ...func(*Options)) (*UpdateLaunchProfileOutput, error) { - if params == nil { - params = &UpdateLaunchProfileInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateLaunchProfile", params, optFns, c.addOperationUpdateLaunchProfileMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateLaunchProfileOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateLaunchProfileInput struct { - - // The ID of the launch profile used to control access from the streaming session. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - // The description. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Description *string - - // The version number of the protocol that is used by the launch profile. The only - // valid version is "2021-03-31". - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileProtocolVersions []string - - // The name for the launch profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Name *string - - // A configuration for a streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamConfiguration *types.StreamConfigurationCreate - - // Unique identifiers for a collection of studio components that can be used with - // this launch profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponentIds []string - - noSmithyDocumentSerde -} - -type UpdateLaunchProfileOutput struct { - - // The launch profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfile *types.LaunchProfile - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateLaunchProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateLaunchProfile{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateLaunchProfile{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateLaunchProfile"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opUpdateLaunchProfileMiddleware(stack, options); err != nil { - return err - } - if err = addOpUpdateLaunchProfileValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLaunchProfile(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpUpdateLaunchProfile struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpUpdateLaunchProfile) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpUpdateLaunchProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*UpdateLaunchProfileInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateLaunchProfileInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opUpdateLaunchProfileMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateLaunchProfile{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opUpdateLaunchProfile(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateLaunchProfile", - } -} diff --git a/service/nimble/api_op_UpdateLaunchProfileMember.go b/service/nimble/api_op_UpdateLaunchProfileMember.go deleted file mode 100644 index dfc9efc8fe0..00000000000 --- a/service/nimble/api_op_UpdateLaunchProfileMember.go +++ /dev/null @@ -1,228 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Update a user persona in launch profile membership. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) UpdateLaunchProfileMember(ctx context.Context, params *UpdateLaunchProfileMemberInput, optFns ...func(*Options)) (*UpdateLaunchProfileMemberOutput, error) { - if params == nil { - params = &UpdateLaunchProfileMemberInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateLaunchProfileMember", params, optFns, c.addOperationUpdateLaunchProfileMemberMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateLaunchProfileMemberOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateLaunchProfileMemberInput struct { - - // The ID of the launch profile used to control access from the streaming session. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileId *string - - // The persona. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Persona types.LaunchProfilePersona - - // The principal ID. This currently supports a IAM Identity Center UserId. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - PrincipalId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - noSmithyDocumentSerde -} - -type UpdateLaunchProfileMemberOutput struct { - - // The updated member. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Member *types.LaunchProfileMembership - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateLaunchProfileMemberMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateLaunchProfileMember{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateLaunchProfileMember{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateLaunchProfileMember"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opUpdateLaunchProfileMemberMiddleware(stack, options); err != nil { - return err - } - if err = addOpUpdateLaunchProfileMemberValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLaunchProfileMember(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpUpdateLaunchProfileMember struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpUpdateLaunchProfileMember) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpUpdateLaunchProfileMember) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*UpdateLaunchProfileMemberInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateLaunchProfileMemberInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opUpdateLaunchProfileMemberMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateLaunchProfileMember{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opUpdateLaunchProfileMember(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateLaunchProfileMember", - } -} diff --git a/service/nimble/api_op_UpdateStreamingImage.go b/service/nimble/api_op_UpdateStreamingImage.go deleted file mode 100644 index d03d8fbea9f..00000000000 --- a/service/nimble/api_op_UpdateStreamingImage.go +++ /dev/null @@ -1,234 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Update streaming image. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) UpdateStreamingImage(ctx context.Context, params *UpdateStreamingImageInput, optFns ...func(*Options)) (*UpdateStreamingImageOutput, error) { - if params == nil { - params = &UpdateStreamingImageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateStreamingImage", params, optFns, c.addOperationUpdateStreamingImageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateStreamingImageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateStreamingImageInput struct { - - // The streaming image ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingImageId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - // The description. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Description *string - - // The name for the streaming image. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Name *string - - noSmithyDocumentSerde -} - -type UpdateStreamingImageOutput struct { - - // Represents a streaming image resource. - // - // Streaming images are used by studio users to select which operating system and - // software they want to use in a Nimble Studio streaming session. - // - // Amazon provides a number of streaming images that include popular 3rd-party - // software. - // - // You can create your own streaming images using an Amazon EC2 machine image that - // you create for this purpose. You can also include software that your users - // require. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingImage *types.StreamingImage - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateStreamingImageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateStreamingImage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateStreamingImage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateStreamingImage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opUpdateStreamingImageMiddleware(stack, options); err != nil { - return err - } - if err = addOpUpdateStreamingImageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateStreamingImage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpUpdateStreamingImage struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpUpdateStreamingImage) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpUpdateStreamingImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*UpdateStreamingImageInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateStreamingImageInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opUpdateStreamingImageMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateStreamingImage{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opUpdateStreamingImage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateStreamingImage", - } -} diff --git a/service/nimble/api_op_UpdateStudio.go b/service/nimble/api_op_UpdateStudio.go deleted file mode 100644 index d2dba360eb9..00000000000 --- a/service/nimble/api_op_UpdateStudio.go +++ /dev/null @@ -1,228 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Update a Studio resource. -// -// Currently, this operation only supports updating the displayName of your studio. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) UpdateStudio(ctx context.Context, params *UpdateStudioInput, optFns ...func(*Options)) (*UpdateStudioOutput, error) { - if params == nil { - params = &UpdateStudioInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateStudio", params, optFns, c.addOperationUpdateStudioMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateStudioOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateStudioInput struct { - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // The IAM role that Studio Admins will assume when logging in to the Nimble - // Studio portal. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - AdminRoleArn *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - // A friendly name for the studio. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - DisplayName *string - - // The IAM role that Studio Users will assume when logging in to the Nimble Studio - // portal. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - UserRoleArn *string - - noSmithyDocumentSerde -} - -type UpdateStudioOutput struct { - - // Information about a studio. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Studio *types.Studio - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateStudioMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateStudio{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateStudio{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateStudio"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opUpdateStudioMiddleware(stack, options); err != nil { - return err - } - if err = addOpUpdateStudioValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateStudio(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpUpdateStudio struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpUpdateStudio) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpUpdateStudio) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*UpdateStudioInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateStudioInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opUpdateStudioMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateStudio{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opUpdateStudio(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateStudio", - } -} diff --git a/service/nimble/api_op_UpdateStudioComponent.go b/service/nimble/api_op_UpdateStudioComponent.go deleted file mode 100644 index 55f7704d614..00000000000 --- a/service/nimble/api_op_UpdateStudioComponent.go +++ /dev/null @@ -1,268 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates a studio component resource. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -func (c *Client) UpdateStudioComponent(ctx context.Context, params *UpdateStudioComponentInput, optFns ...func(*Options)) (*UpdateStudioComponentOutput, error) { - if params == nil { - params = &UpdateStudioComponentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateStudioComponent", params, optFns, c.addOperationUpdateStudioComponentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateStudioComponentOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateStudioComponentInput struct { - - // The studio component ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponentId *string - - // The studio ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. If you don’t specify a client token, the Amazon Web Services SDK - // automatically generates a client token and uses it for the request to ensure - // idempotency. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClientToken *string - - // The configuration of the studio component, based on component type. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Configuration *types.StudioComponentConfiguration - - // The description. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Description *string - - // The EC2 security groups that control access to the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Ec2SecurityGroupIds []string - - // Initialization scripts for studio components. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - InitializationScripts []types.StudioComponentInitializationScript - - // The name for the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Name *string - - // An IAM role attached to a Studio Component that gives the studio component - // access to Amazon Web Services resources at anytime while the instance is - // running. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - RuntimeRoleArn *string - - // Parameters for the studio component scripts. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ScriptParameters []types.ScriptParameterKeyValue - - // An IAM role attached to Studio Component when the system initialization script - // runs which give the studio component access to Amazon Web Services resources - // when the system initialization script runs. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SecureInitializationRoleArn *string - - // The specific subtype of a studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Subtype types.StudioComponentSubtype - - // The type of the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Type types.StudioComponentType - - noSmithyDocumentSerde -} - -type UpdateStudioComponentOutput struct { - - // Information about the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponent *types.StudioComponent - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateStudioComponentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateStudioComponent{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateStudioComponent{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateStudioComponent"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opUpdateStudioComponentMiddleware(stack, options); err != nil { - return err - } - if err = addOpUpdateStudioComponentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateStudioComponent(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); 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 - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpUpdateStudioComponent struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpUpdateStudioComponent) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpUpdateStudioComponent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*UpdateStudioComponentInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateStudioComponentInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opUpdateStudioComponentMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateStudioComponent{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opUpdateStudioComponent(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateStudioComponent", - } -} diff --git a/service/nimble/auth.go b/service/nimble/auth.go deleted file mode 100644 index 70c6f2ceb0a..00000000000 --- a/service/nimble/auth.go +++ /dev/null @@ -1,313 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { - params.Region = options.Region -} - -type setLegacyContextSigningOptionsMiddleware struct { -} - -func (*setLegacyContextSigningOptionsMiddleware) ID() string { - return "setLegacyContextSigningOptions" -} - -func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - rscheme := getResolvedAuthScheme(ctx) - schemeID := rscheme.Scheme.SchemeID() - - if sn := awsmiddleware.GetSigningName(ctx); sn != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) - } - } - - if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) - } - } - - return next.HandleFinalize(ctx, in) -} - -func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) -} - -type withAnonymous struct { - resolver AuthSchemeResolver -} - -var _ AuthSchemeResolver = (*withAnonymous)(nil) - -func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - opts, err := v.resolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return nil, err - } - - opts = append(opts, &smithyauth.Option{ - SchemeID: smithyauth.SchemeIDAnonymous, - }) - return opts, nil -} - -func wrapWithAnonymousAuth(options *Options) { - if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { - return - } - - options.AuthSchemeResolver = &withAnonymous{ - resolver: options.AuthSchemeResolver, - } -} - -// AuthResolverParameters contains the set of inputs necessary for auth scheme -// resolution. -type AuthResolverParameters struct { - // The name of the operation being invoked. - Operation string - - // The region in which the operation is being invoked. - Region string -} - -func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { - params := &AuthResolverParameters{ - Operation: operation, - } - - bindAuthParamsRegion(ctx, params, input, options) - - return params -} - -// AuthSchemeResolver returns a set of possible authentication options for an -// operation. -type AuthSchemeResolver interface { - ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) -} - -type defaultAuthSchemeResolver struct{} - -var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) - -func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - if overrides, ok := operationAuthOptions[params.Operation]; ok { - return overrides(params), nil - } - return serviceAuthOptions(params), nil -} - -var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{} - -func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - { - SchemeID: smithyauth.SchemeIDSigV4, - SignerProperties: func() smithy.Properties { - var props smithy.Properties - smithyhttp.SetSigV4SigningName(&props, "nimble") - smithyhttp.SetSigV4SigningRegion(&props, params.Region) - return props - }(), - }, - } -} - -type resolveAuthSchemeMiddleware struct { - operation string - options Options -} - -func (*resolveAuthSchemeMiddleware) ID() string { - return "ResolveAuthScheme" -} - -func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") - defer span.End() - - params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) - options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) - } - - scheme, ok := m.selectScheme(options) - if !ok { - return out, metadata, fmt.Errorf("could not select an auth scheme") - } - - ctx = setResolvedAuthScheme(ctx, scheme) - - span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) - span.End() - return next.HandleFinalize(ctx, in) -} - -func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { - for _, option := range options { - if option.SchemeID == smithyauth.SchemeIDAnonymous { - return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true - } - - for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { - continue - } - - if scheme.IdentityResolver(m.options) != nil { - return newResolvedAuthScheme(scheme, option), true - } - } - } - - return nil, false -} - -type resolvedAuthSchemeKey struct{} - -type resolvedAuthScheme struct { - Scheme smithyhttp.AuthScheme - IdentityProperties smithy.Properties - SignerProperties smithy.Properties -} - -func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { - return &resolvedAuthScheme{ - Scheme: scheme, - IdentityProperties: option.IdentityProperties, - SignerProperties: option.SignerProperties, - } -} - -func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { - return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) -} - -func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { - v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) - return v -} - -type getIdentityMiddleware struct { - options Options -} - -func (*getIdentityMiddleware) ID() string { - return "GetIdentity" -} - -func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") - defer span.End() - - rscheme := getResolvedAuthScheme(innerCtx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - resolver := rscheme.Scheme.IdentityResolver(m.options) - if resolver == nil { - return out, metadata, fmt.Errorf("no identity resolver") - } - - identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", - func() (smithyauth.Identity, error) { - return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) - }, - func(o *metrics.RecordMetricOptions) { - o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) - }) - if err != nil { - return out, metadata, fmt.Errorf("get identity: %w", err) - } - - ctx = setIdentity(ctx, identity) - - span.End() - return next.HandleFinalize(ctx, in) -} - -type identityKey struct{} - -func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { - return middleware.WithStackValue(ctx, identityKey{}, identity) -} - -func getIdentity(ctx context.Context) smithyauth.Identity { - v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) - return v -} - -type signRequestMiddleware struct { - options Options -} - -func (*signRequestMiddleware) ID() string { - return "Signing" -} - -func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "SignRequest") - defer span.End() - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - identity := getIdentity(ctx) - if identity == nil { - return out, metadata, fmt.Errorf("no identity") - } - - signer := rscheme.Scheme.Signer() - if signer == nil { - return out, metadata, fmt.Errorf("no signer") - } - - _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { - return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) - }, func(o *metrics.RecordMetricOptions) { - o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) - }) - if err != nil { - return out, metadata, fmt.Errorf("sign request: %w", err) - } - - span.End() - return next.HandleFinalize(ctx, in) -} diff --git a/service/nimble/deserializers.go b/service/nimble/deserializers.go deleted file mode 100644 index 792fa66dc6e..00000000000 --- a/service/nimble/deserializers.go +++ /dev/null @@ -1,12478 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - smithy "github.com/aws/smithy-go" - smithyio "github.com/aws/smithy-go/io" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - smithytime "github.com/aws/smithy-go/time" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "io" - "strings" - "time" -) - -func deserializeS3Expires(v string) (*time.Time, error) { - t, err := smithytime.ParseHTTPDate(v) - if err != nil { - return nil, nil - } - return &t, nil -} - -type awsRestjson1_deserializeOpAcceptEulas struct { -} - -func (*awsRestjson1_deserializeOpAcceptEulas) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpAcceptEulas) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorAcceptEulas(response, &metadata) - } - output := &AcceptEulasOutput{} - 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_deserializeOpDocumentAcceptEulasOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorAcceptEulas(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentAcceptEulasOutput(v **AcceptEulasOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *AcceptEulasOutput - if *v == nil { - sv = &AcceptEulasOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "eulaAcceptances": - if err := awsRestjson1_deserializeDocumentEulaAcceptanceList(&sv.EulaAcceptances, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpCreateLaunchProfile struct { -} - -func (*awsRestjson1_deserializeOpCreateLaunchProfile) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpCreateLaunchProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorCreateLaunchProfile(response, &metadata) - } - output := &CreateLaunchProfileOutput{} - 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_deserializeOpDocumentCreateLaunchProfileOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorCreateLaunchProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentCreateLaunchProfileOutput(v **CreateLaunchProfileOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateLaunchProfileOutput - if *v == nil { - sv = &CreateLaunchProfileOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "launchProfile": - if err := awsRestjson1_deserializeDocumentLaunchProfile(&sv.LaunchProfile, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpCreateStreamingImage struct { -} - -func (*awsRestjson1_deserializeOpCreateStreamingImage) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpCreateStreamingImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorCreateStreamingImage(response, &metadata) - } - output := &CreateStreamingImageOutput{} - 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_deserializeOpDocumentCreateStreamingImageOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorCreateStreamingImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentCreateStreamingImageOutput(v **CreateStreamingImageOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateStreamingImageOutput - if *v == nil { - sv = &CreateStreamingImageOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "streamingImage": - if err := awsRestjson1_deserializeDocumentStreamingImage(&sv.StreamingImage, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpCreateStreamingSession struct { -} - -func (*awsRestjson1_deserializeOpCreateStreamingSession) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpCreateStreamingSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorCreateStreamingSession(response, &metadata) - } - output := &CreateStreamingSessionOutput{} - 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_deserializeOpDocumentCreateStreamingSessionOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorCreateStreamingSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentCreateStreamingSessionOutput(v **CreateStreamingSessionOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateStreamingSessionOutput - if *v == nil { - sv = &CreateStreamingSessionOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "session": - if err := awsRestjson1_deserializeDocumentStreamingSession(&sv.Session, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpCreateStreamingSessionStream struct { -} - -func (*awsRestjson1_deserializeOpCreateStreamingSessionStream) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpCreateStreamingSessionStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorCreateStreamingSessionStream(response, &metadata) - } - output := &CreateStreamingSessionStreamOutput{} - 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_deserializeOpDocumentCreateStreamingSessionStreamOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorCreateStreamingSessionStream(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentCreateStreamingSessionStreamOutput(v **CreateStreamingSessionStreamOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateStreamingSessionStreamOutput - if *v == nil { - sv = &CreateStreamingSessionStreamOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "stream": - if err := awsRestjson1_deserializeDocumentStreamingSessionStream(&sv.Stream, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpCreateStudio struct { -} - -func (*awsRestjson1_deserializeOpCreateStudio) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpCreateStudio) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorCreateStudio(response, &metadata) - } - output := &CreateStudioOutput{} - 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_deserializeOpDocumentCreateStudioOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorCreateStudio(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentCreateStudioOutput(v **CreateStudioOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateStudioOutput - if *v == nil { - sv = &CreateStudioOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "studio": - if err := awsRestjson1_deserializeDocumentStudio(&sv.Studio, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpCreateStudioComponent struct { -} - -func (*awsRestjson1_deserializeOpCreateStudioComponent) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpCreateStudioComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorCreateStudioComponent(response, &metadata) - } - output := &CreateStudioComponentOutput{} - 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_deserializeOpDocumentCreateStudioComponentOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorCreateStudioComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentCreateStudioComponentOutput(v **CreateStudioComponentOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateStudioComponentOutput - if *v == nil { - sv = &CreateStudioComponentOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "studioComponent": - if err := awsRestjson1_deserializeDocumentStudioComponent(&sv.StudioComponent, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDeleteLaunchProfile struct { -} - -func (*awsRestjson1_deserializeOpDeleteLaunchProfile) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDeleteLaunchProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorDeleteLaunchProfile(response, &metadata) - } - output := &DeleteLaunchProfileOutput{} - 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_deserializeOpDocumentDeleteLaunchProfileOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDeleteLaunchProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentDeleteLaunchProfileOutput(v **DeleteLaunchProfileOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DeleteLaunchProfileOutput - if *v == nil { - sv = &DeleteLaunchProfileOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "launchProfile": - if err := awsRestjson1_deserializeDocumentLaunchProfile(&sv.LaunchProfile, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDeleteLaunchProfileMember struct { -} - -func (*awsRestjson1_deserializeOpDeleteLaunchProfileMember) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDeleteLaunchProfileMember) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorDeleteLaunchProfileMember(response, &metadata) - } - output := &DeleteLaunchProfileMemberOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDeleteLaunchProfileMember(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpDeleteStreamingImage struct { -} - -func (*awsRestjson1_deserializeOpDeleteStreamingImage) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDeleteStreamingImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorDeleteStreamingImage(response, &metadata) - } - output := &DeleteStreamingImageOutput{} - 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_deserializeOpDocumentDeleteStreamingImageOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDeleteStreamingImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentDeleteStreamingImageOutput(v **DeleteStreamingImageOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DeleteStreamingImageOutput - if *v == nil { - sv = &DeleteStreamingImageOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "streamingImage": - if err := awsRestjson1_deserializeDocumentStreamingImage(&sv.StreamingImage, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDeleteStreamingSession struct { -} - -func (*awsRestjson1_deserializeOpDeleteStreamingSession) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDeleteStreamingSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorDeleteStreamingSession(response, &metadata) - } - output := &DeleteStreamingSessionOutput{} - 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_deserializeOpDocumentDeleteStreamingSessionOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDeleteStreamingSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentDeleteStreamingSessionOutput(v **DeleteStreamingSessionOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DeleteStreamingSessionOutput - if *v == nil { - sv = &DeleteStreamingSessionOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "session": - if err := awsRestjson1_deserializeDocumentStreamingSession(&sv.Session, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDeleteStudio struct { -} - -func (*awsRestjson1_deserializeOpDeleteStudio) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDeleteStudio) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorDeleteStudio(response, &metadata) - } - output := &DeleteStudioOutput{} - 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_deserializeOpDocumentDeleteStudioOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDeleteStudio(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentDeleteStudioOutput(v **DeleteStudioOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DeleteStudioOutput - if *v == nil { - sv = &DeleteStudioOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "studio": - if err := awsRestjson1_deserializeDocumentStudio(&sv.Studio, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDeleteStudioComponent struct { -} - -func (*awsRestjson1_deserializeOpDeleteStudioComponent) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDeleteStudioComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorDeleteStudioComponent(response, &metadata) - } - output := &DeleteStudioComponentOutput{} - 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_deserializeOpDocumentDeleteStudioComponentOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDeleteStudioComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentDeleteStudioComponentOutput(v **DeleteStudioComponentOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DeleteStudioComponentOutput - if *v == nil { - sv = &DeleteStudioComponentOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "studioComponent": - if err := awsRestjson1_deserializeDocumentStudioComponent(&sv.StudioComponent, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDeleteStudioMember struct { -} - -func (*awsRestjson1_deserializeOpDeleteStudioMember) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDeleteStudioMember) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorDeleteStudioMember(response, &metadata) - } - output := &DeleteStudioMemberOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDeleteStudioMember(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpGetEula struct { -} - -func (*awsRestjson1_deserializeOpGetEula) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetEula) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorGetEula(response, &metadata) - } - output := &GetEulaOutput{} - 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_deserializeOpDocumentGetEulaOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetEula(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetEulaOutput(v **GetEulaOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetEulaOutput - if *v == nil { - sv = &GetEulaOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "eula": - if err := awsRestjson1_deserializeDocumentEula(&sv.Eula, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetLaunchProfile struct { -} - -func (*awsRestjson1_deserializeOpGetLaunchProfile) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetLaunchProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorGetLaunchProfile(response, &metadata) - } - output := &GetLaunchProfileOutput{} - 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_deserializeOpDocumentGetLaunchProfileOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetLaunchProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetLaunchProfileOutput(v **GetLaunchProfileOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetLaunchProfileOutput - if *v == nil { - sv = &GetLaunchProfileOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "launchProfile": - if err := awsRestjson1_deserializeDocumentLaunchProfile(&sv.LaunchProfile, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetLaunchProfileDetails struct { -} - -func (*awsRestjson1_deserializeOpGetLaunchProfileDetails) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetLaunchProfileDetails) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorGetLaunchProfileDetails(response, &metadata) - } - output := &GetLaunchProfileDetailsOutput{} - 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_deserializeOpDocumentGetLaunchProfileDetailsOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetLaunchProfileDetails(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetLaunchProfileDetailsOutput(v **GetLaunchProfileDetailsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetLaunchProfileDetailsOutput - if *v == nil { - sv = &GetLaunchProfileDetailsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "launchProfile": - if err := awsRestjson1_deserializeDocumentLaunchProfile(&sv.LaunchProfile, value); err != nil { - return err - } - - case "streamingImages": - if err := awsRestjson1_deserializeDocumentStreamingImageList(&sv.StreamingImages, value); err != nil { - return err - } - - case "studioComponentSummaries": - if err := awsRestjson1_deserializeDocumentStudioComponentSummaryList(&sv.StudioComponentSummaries, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetLaunchProfileInitialization struct { -} - -func (*awsRestjson1_deserializeOpGetLaunchProfileInitialization) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetLaunchProfileInitialization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorGetLaunchProfileInitialization(response, &metadata) - } - output := &GetLaunchProfileInitializationOutput{} - 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_deserializeOpDocumentGetLaunchProfileInitializationOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetLaunchProfileInitialization(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetLaunchProfileInitializationOutput(v **GetLaunchProfileInitializationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetLaunchProfileInitializationOutput - if *v == nil { - sv = &GetLaunchProfileInitializationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "launchProfileInitialization": - if err := awsRestjson1_deserializeDocumentLaunchProfileInitialization(&sv.LaunchProfileInitialization, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetLaunchProfileMember struct { -} - -func (*awsRestjson1_deserializeOpGetLaunchProfileMember) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetLaunchProfileMember) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorGetLaunchProfileMember(response, &metadata) - } - output := &GetLaunchProfileMemberOutput{} - 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_deserializeOpDocumentGetLaunchProfileMemberOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetLaunchProfileMember(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetLaunchProfileMemberOutput(v **GetLaunchProfileMemberOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetLaunchProfileMemberOutput - if *v == nil { - sv = &GetLaunchProfileMemberOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "member": - if err := awsRestjson1_deserializeDocumentLaunchProfileMembership(&sv.Member, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetStreamingImage struct { -} - -func (*awsRestjson1_deserializeOpGetStreamingImage) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetStreamingImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorGetStreamingImage(response, &metadata) - } - output := &GetStreamingImageOutput{} - 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_deserializeOpDocumentGetStreamingImageOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetStreamingImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetStreamingImageOutput(v **GetStreamingImageOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetStreamingImageOutput - if *v == nil { - sv = &GetStreamingImageOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "streamingImage": - if err := awsRestjson1_deserializeDocumentStreamingImage(&sv.StreamingImage, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetStreamingSession struct { -} - -func (*awsRestjson1_deserializeOpGetStreamingSession) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetStreamingSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorGetStreamingSession(response, &metadata) - } - output := &GetStreamingSessionOutput{} - 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_deserializeOpDocumentGetStreamingSessionOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetStreamingSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetStreamingSessionOutput(v **GetStreamingSessionOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetStreamingSessionOutput - if *v == nil { - sv = &GetStreamingSessionOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "session": - if err := awsRestjson1_deserializeDocumentStreamingSession(&sv.Session, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetStreamingSessionBackup struct { -} - -func (*awsRestjson1_deserializeOpGetStreamingSessionBackup) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetStreamingSessionBackup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorGetStreamingSessionBackup(response, &metadata) - } - output := &GetStreamingSessionBackupOutput{} - 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_deserializeOpDocumentGetStreamingSessionBackupOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetStreamingSessionBackup(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetStreamingSessionBackupOutput(v **GetStreamingSessionBackupOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetStreamingSessionBackupOutput - if *v == nil { - sv = &GetStreamingSessionBackupOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "streamingSessionBackup": - if err := awsRestjson1_deserializeDocumentStreamingSessionBackup(&sv.StreamingSessionBackup, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetStreamingSessionStream struct { -} - -func (*awsRestjson1_deserializeOpGetStreamingSessionStream) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetStreamingSessionStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorGetStreamingSessionStream(response, &metadata) - } - output := &GetStreamingSessionStreamOutput{} - 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_deserializeOpDocumentGetStreamingSessionStreamOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetStreamingSessionStream(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetStreamingSessionStreamOutput(v **GetStreamingSessionStreamOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetStreamingSessionStreamOutput - if *v == nil { - sv = &GetStreamingSessionStreamOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "stream": - if err := awsRestjson1_deserializeDocumentStreamingSessionStream(&sv.Stream, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetStudio struct { -} - -func (*awsRestjson1_deserializeOpGetStudio) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetStudio) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorGetStudio(response, &metadata) - } - output := &GetStudioOutput{} - 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_deserializeOpDocumentGetStudioOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetStudio(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetStudioOutput(v **GetStudioOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetStudioOutput - if *v == nil { - sv = &GetStudioOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "studio": - if err := awsRestjson1_deserializeDocumentStudio(&sv.Studio, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetStudioComponent struct { -} - -func (*awsRestjson1_deserializeOpGetStudioComponent) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetStudioComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorGetStudioComponent(response, &metadata) - } - output := &GetStudioComponentOutput{} - 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_deserializeOpDocumentGetStudioComponentOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetStudioComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetStudioComponentOutput(v **GetStudioComponentOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetStudioComponentOutput - if *v == nil { - sv = &GetStudioComponentOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "studioComponent": - if err := awsRestjson1_deserializeDocumentStudioComponent(&sv.StudioComponent, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetStudioMember struct { -} - -func (*awsRestjson1_deserializeOpGetStudioMember) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetStudioMember) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorGetStudioMember(response, &metadata) - } - output := &GetStudioMemberOutput{} - 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_deserializeOpDocumentGetStudioMemberOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetStudioMember(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetStudioMemberOutput(v **GetStudioMemberOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetStudioMemberOutput - if *v == nil { - sv = &GetStudioMemberOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "member": - if err := awsRestjson1_deserializeDocumentStudioMembership(&sv.Member, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListEulaAcceptances struct { -} - -func (*awsRestjson1_deserializeOpListEulaAcceptances) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListEulaAcceptances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorListEulaAcceptances(response, &metadata) - } - output := &ListEulaAcceptancesOutput{} - 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_deserializeOpDocumentListEulaAcceptancesOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListEulaAcceptances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListEulaAcceptancesOutput(v **ListEulaAcceptancesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListEulaAcceptancesOutput - if *v == nil { - sv = &ListEulaAcceptancesOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "eulaAcceptances": - if err := awsRestjson1_deserializeDocumentEulaAcceptanceList(&sv.EulaAcceptances, value); err != nil { - return err - } - - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListEulas struct { -} - -func (*awsRestjson1_deserializeOpListEulas) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListEulas) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorListEulas(response, &metadata) - } - output := &ListEulasOutput{} - 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_deserializeOpDocumentListEulasOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListEulas(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListEulasOutput(v **ListEulasOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListEulasOutput - if *v == nil { - sv = &ListEulasOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "eulas": - if err := awsRestjson1_deserializeDocumentEulaList(&sv.Eulas, value); err != nil { - return err - } - - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListLaunchProfileMembers struct { -} - -func (*awsRestjson1_deserializeOpListLaunchProfileMembers) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListLaunchProfileMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorListLaunchProfileMembers(response, &metadata) - } - output := &ListLaunchProfileMembersOutput{} - 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_deserializeOpDocumentListLaunchProfileMembersOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListLaunchProfileMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListLaunchProfileMembersOutput(v **ListLaunchProfileMembersOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListLaunchProfileMembersOutput - if *v == nil { - sv = &ListLaunchProfileMembersOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "members": - if err := awsRestjson1_deserializeDocumentLaunchProfileMembershipList(&sv.Members, value); err != nil { - return err - } - - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListLaunchProfiles struct { -} - -func (*awsRestjson1_deserializeOpListLaunchProfiles) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListLaunchProfiles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorListLaunchProfiles(response, &metadata) - } - output := &ListLaunchProfilesOutput{} - 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_deserializeOpDocumentListLaunchProfilesOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListLaunchProfiles(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListLaunchProfilesOutput(v **ListLaunchProfilesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListLaunchProfilesOutput - if *v == nil { - sv = &ListLaunchProfilesOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "launchProfiles": - if err := awsRestjson1_deserializeDocumentLaunchProfileList(&sv.LaunchProfiles, value); err != nil { - return err - } - - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListStreamingImages struct { -} - -func (*awsRestjson1_deserializeOpListStreamingImages) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListStreamingImages) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorListStreamingImages(response, &metadata) - } - output := &ListStreamingImagesOutput{} - 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_deserializeOpDocumentListStreamingImagesOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListStreamingImages(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListStreamingImagesOutput(v **ListStreamingImagesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListStreamingImagesOutput - if *v == nil { - sv = &ListStreamingImagesOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "streamingImages": - if err := awsRestjson1_deserializeDocumentStreamingImageList(&sv.StreamingImages, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListStreamingSessionBackups struct { -} - -func (*awsRestjson1_deserializeOpListStreamingSessionBackups) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListStreamingSessionBackups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorListStreamingSessionBackups(response, &metadata) - } - output := &ListStreamingSessionBackupsOutput{} - 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_deserializeOpDocumentListStreamingSessionBackupsOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListStreamingSessionBackups(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListStreamingSessionBackupsOutput(v **ListStreamingSessionBackupsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListStreamingSessionBackupsOutput - if *v == nil { - sv = &ListStreamingSessionBackupsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "streamingSessionBackups": - if err := awsRestjson1_deserializeDocumentStreamingSessionBackupList(&sv.StreamingSessionBackups, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListStreamingSessions struct { -} - -func (*awsRestjson1_deserializeOpListStreamingSessions) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListStreamingSessions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorListStreamingSessions(response, &metadata) - } - output := &ListStreamingSessionsOutput{} - 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_deserializeOpDocumentListStreamingSessionsOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListStreamingSessions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListStreamingSessionsOutput(v **ListStreamingSessionsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListStreamingSessionsOutput - if *v == nil { - sv = &ListStreamingSessionsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "sessions": - if err := awsRestjson1_deserializeDocumentStreamingSessionList(&sv.Sessions, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListStudioComponents struct { -} - -func (*awsRestjson1_deserializeOpListStudioComponents) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListStudioComponents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorListStudioComponents(response, &metadata) - } - output := &ListStudioComponentsOutput{} - 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_deserializeOpDocumentListStudioComponentsOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListStudioComponents(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListStudioComponentsOutput(v **ListStudioComponentsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListStudioComponentsOutput - if *v == nil { - sv = &ListStudioComponentsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "studioComponents": - if err := awsRestjson1_deserializeDocumentStudioComponentList(&sv.StudioComponents, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListStudioMembers struct { -} - -func (*awsRestjson1_deserializeOpListStudioMembers) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListStudioMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorListStudioMembers(response, &metadata) - } - output := &ListStudioMembersOutput{} - 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_deserializeOpDocumentListStudioMembersOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListStudioMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListStudioMembersOutput(v **ListStudioMembersOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListStudioMembersOutput - if *v == nil { - sv = &ListStudioMembersOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "members": - if err := awsRestjson1_deserializeDocumentStudioMembershipList(&sv.Members, value); err != nil { - return err - } - - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListStudios struct { -} - -func (*awsRestjson1_deserializeOpListStudios) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListStudios) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorListStudios(response, &metadata) - } - output := &ListStudiosOutput{} - 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_deserializeOpDocumentListStudiosOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListStudios(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListStudiosOutput(v **ListStudiosOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListStudiosOutput - if *v == nil { - sv = &ListStudiosOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "studios": - if err := awsRestjson1_deserializeDocumentStudioList(&sv.Studios, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListTagsForResource struct { -} - -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorListTagsForResource(response, &metadata) - } - output := &ListTagsForResourceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListTagsForResourceOutput - if *v == nil { - sv = &ListTagsForResourceOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpPutLaunchProfileMembers struct { -} - -func (*awsRestjson1_deserializeOpPutLaunchProfileMembers) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutLaunchProfileMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorPutLaunchProfileMembers(response, &metadata) - } - output := &PutLaunchProfileMembersOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorPutLaunchProfileMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpPutStudioMembers struct { -} - -func (*awsRestjson1_deserializeOpPutStudioMembers) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutStudioMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorPutStudioMembers(response, &metadata) - } - output := &PutStudioMembersOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorPutStudioMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpStartStreamingSession struct { -} - -func (*awsRestjson1_deserializeOpStartStreamingSession) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpStartStreamingSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorStartStreamingSession(response, &metadata) - } - output := &StartStreamingSessionOutput{} - 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_deserializeOpDocumentStartStreamingSessionOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorStartStreamingSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentStartStreamingSessionOutput(v **StartStreamingSessionOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *StartStreamingSessionOutput - if *v == nil { - sv = &StartStreamingSessionOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "session": - if err := awsRestjson1_deserializeDocumentStreamingSession(&sv.Session, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpStartStudioSSOConfigurationRepair struct { -} - -func (*awsRestjson1_deserializeOpStartStudioSSOConfigurationRepair) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpStartStudioSSOConfigurationRepair) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorStartStudioSSOConfigurationRepair(response, &metadata) - } - output := &StartStudioSSOConfigurationRepairOutput{} - 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_deserializeOpDocumentStartStudioSSOConfigurationRepairOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorStartStudioSSOConfigurationRepair(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentStartStudioSSOConfigurationRepairOutput(v **StartStudioSSOConfigurationRepairOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *StartStudioSSOConfigurationRepairOutput - if *v == nil { - sv = &StartStudioSSOConfigurationRepairOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "studio": - if err := awsRestjson1_deserializeDocumentStudio(&sv.Studio, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpStopStreamingSession struct { -} - -func (*awsRestjson1_deserializeOpStopStreamingSession) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpStopStreamingSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorStopStreamingSession(response, &metadata) - } - output := &StopStreamingSessionOutput{} - 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_deserializeOpDocumentStopStreamingSessionOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorStopStreamingSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentStopStreamingSessionOutput(v **StopStreamingSessionOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *StopStreamingSessionOutput - if *v == nil { - sv = &StopStreamingSessionOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "session": - if err := awsRestjson1_deserializeDocumentStreamingSession(&sv.Session, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpTagResource struct { -} - -func (*awsRestjson1_deserializeOpTagResource) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorTagResource(response, &metadata) - } - output := &TagResourceOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpUntagResource struct { -} - -func (*awsRestjson1_deserializeOpUntagResource) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorUntagResource(response, &metadata) - } - output := &UntagResourceOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpUpdateLaunchProfile struct { -} - -func (*awsRestjson1_deserializeOpUpdateLaunchProfile) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateLaunchProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorUpdateLaunchProfile(response, &metadata) - } - output := &UpdateLaunchProfileOutput{} - 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_deserializeOpDocumentUpdateLaunchProfileOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateLaunchProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateLaunchProfileOutput(v **UpdateLaunchProfileOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateLaunchProfileOutput - if *v == nil { - sv = &UpdateLaunchProfileOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "launchProfile": - if err := awsRestjson1_deserializeDocumentLaunchProfile(&sv.LaunchProfile, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateLaunchProfileMember struct { -} - -func (*awsRestjson1_deserializeOpUpdateLaunchProfileMember) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateLaunchProfileMember) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorUpdateLaunchProfileMember(response, &metadata) - } - output := &UpdateLaunchProfileMemberOutput{} - 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_deserializeOpDocumentUpdateLaunchProfileMemberOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateLaunchProfileMember(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateLaunchProfileMemberOutput(v **UpdateLaunchProfileMemberOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateLaunchProfileMemberOutput - if *v == nil { - sv = &UpdateLaunchProfileMemberOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "member": - if err := awsRestjson1_deserializeDocumentLaunchProfileMembership(&sv.Member, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateStreamingImage struct { -} - -func (*awsRestjson1_deserializeOpUpdateStreamingImage) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateStreamingImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorUpdateStreamingImage(response, &metadata) - } - output := &UpdateStreamingImageOutput{} - 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_deserializeOpDocumentUpdateStreamingImageOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateStreamingImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateStreamingImageOutput(v **UpdateStreamingImageOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateStreamingImageOutput - if *v == nil { - sv = &UpdateStreamingImageOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "streamingImage": - if err := awsRestjson1_deserializeDocumentStreamingImage(&sv.StreamingImage, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateStudio struct { -} - -func (*awsRestjson1_deserializeOpUpdateStudio) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateStudio) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorUpdateStudio(response, &metadata) - } - output := &UpdateStudioOutput{} - 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_deserializeOpDocumentUpdateStudioOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateStudio(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateStudioOutput(v **UpdateStudioOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateStudioOutput - if *v == nil { - sv = &UpdateStudioOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "studio": - if err := awsRestjson1_deserializeDocumentStudio(&sv.Studio, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateStudioComponent struct { -} - -func (*awsRestjson1_deserializeOpUpdateStudioComponent) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateStudioComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - 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_deserializeOpErrorUpdateStudioComponent(response, &metadata) - } - output := &UpdateStudioComponentOutput{} - 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_deserializeOpDocumentUpdateStudioComponentOutput(&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(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateStudioComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - - 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, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateStudioComponentOutput(v **UpdateStudioComponentOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateStudioComponentOutput - if *v == nil { - sv = &UpdateStudioComponentOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "studioComponent": - if err := awsRestjson1_deserializeDocumentStudioComponent(&sv.StudioComponent, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ConflictException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentConflictException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorInternalServerErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServerErrorException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentInternalServerErrorException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceNotFoundException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ServiceQuotaExceededException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ThrottlingException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ValidationException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentValidationException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AccessDeniedException - if *v == nil { - sv = &types.AccessDeniedException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "code": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Code = ptr.String(jtv) - } - - case "context": - if err := awsRestjson1_deserializeDocumentExceptionContext(&sv.Context, value); err != nil { - return err - } - - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentActiveDirectoryComputerAttribute(v **types.ActiveDirectoryComputerAttribute, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ActiveDirectoryComputerAttribute - if *v == nil { - sv = &types.ActiveDirectoryComputerAttribute{} - } 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 ActiveDirectoryComputerAttributeName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "value": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ActiveDirectoryComputerAttributeValue to be of type string, got %T instead", value) - } - sv.Value = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentActiveDirectoryComputerAttributeList(v *[]types.ActiveDirectoryComputerAttribute, 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.ActiveDirectoryComputerAttribute - if *v == nil { - cv = []types.ActiveDirectoryComputerAttribute{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ActiveDirectoryComputerAttribute - destAddr := &col - if err := awsRestjson1_deserializeDocumentActiveDirectoryComputerAttribute(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentActiveDirectoryConfiguration(v **types.ActiveDirectoryConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ActiveDirectoryConfiguration - if *v == nil { - sv = &types.ActiveDirectoryConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "computerAttributes": - if err := awsRestjson1_deserializeDocumentActiveDirectoryComputerAttributeList(&sv.ComputerAttributes, value); err != nil { - return err - } - - case "directoryId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DirectoryId to be of type string, got %T instead", value) - } - sv.DirectoryId = ptr.String(jtv) - } - - case "organizationalUnitDistinguishedName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ActiveDirectoryOrganizationalUnitDistinguishedName to be of type string, got %T instead", value) - } - sv.OrganizationalUnitDistinguishedName = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentActiveDirectoryDnsIpAddressList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ActiveDirectoryDnsIpAddress to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentComputeFarmConfiguration(v **types.ComputeFarmConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ComputeFarmConfiguration - if *v == nil { - sv = &types.ComputeFarmConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "activeDirectoryUser": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ActiveDirectoryUser = ptr.String(jtv) - } - - case "endpoint": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - sv.Endpoint = ptr.String(jtv) - } - - 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) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ConflictException - if *v == nil { - sv = &types.ConflictException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "code": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Code = ptr.String(jtv) - } - - case "context": - if err := awsRestjson1_deserializeDocumentExceptionContext(&sv.Context, value); err != nil { - return err - } - - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentEC2SubnetIdList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EC2SubnetId to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentEula(v **types.Eula, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Eula - if *v == nil { - sv = &types.Eula{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "content": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Content = ptr.String(jtv) - } - - case "createdAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(t) - } - - case "eulaId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EulaId to be of type string, got %T instead", value) - } - sv.EulaId = ptr.String(jtv) - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EulaName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "updatedAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.UpdatedAt = ptr.Time(t) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentEulaAcceptance(v **types.EulaAcceptance, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.EulaAcceptance - if *v == nil { - sv = &types.EulaAcceptance{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "acceptedAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.AcceptedAt = ptr.Time(t) - } - - case "acceptedBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.AcceptedBy = ptr.String(jtv) - } - - case "accepteeId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.AccepteeId = ptr.String(jtv) - } - - case "eulaAcceptanceId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EulaAcceptanceId to be of type string, got %T instead", value) - } - sv.EulaAcceptanceId = ptr.String(jtv) - } - - case "eulaId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EulaId to be of type string, got %T instead", value) - } - sv.EulaId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentEulaAcceptanceList(v *[]types.EulaAcceptance, 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.EulaAcceptance - if *v == nil { - cv = []types.EulaAcceptance{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.EulaAcceptance - destAddr := &col - if err := awsRestjson1_deserializeDocumentEulaAcceptance(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentEulaIdList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentEulaList(v *[]types.Eula, 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.Eula - if *v == nil { - cv = []types.Eula{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.Eula - destAddr := &col - if err := awsRestjson1_deserializeDocumentEula(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentExceptionContext(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_deserializeDocumentInternalServerErrorException(v **types.InternalServerErrorException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InternalServerErrorException - if *v == nil { - sv = &types.InternalServerErrorException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "code": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Code = ptr.String(jtv) - } - - case "context": - if err := awsRestjson1_deserializeDocumentExceptionContext(&sv.Context, value); err != nil { - return err - } - - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentLaunchProfile(v **types.LaunchProfile, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.LaunchProfile - if *v == nil { - sv = &types.LaunchProfile{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "createdAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(t) - } - - case "createdBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.CreatedBy = ptr.String(jtv) - } - - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfileDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "ec2SubnetIds": - if err := awsRestjson1_deserializeDocumentEC2SubnetIdList(&sv.Ec2SubnetIds, value); err != nil { - return err - } - - case "launchProfileId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfileId to be of type string, got %T instead", value) - } - sv.LaunchProfileId = ptr.String(jtv) - } - - case "launchProfileProtocolVersions": - if err := awsRestjson1_deserializeDocumentLaunchProfileProtocolVersionList(&sv.LaunchProfileProtocolVersions, value); err != nil { - return err - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfileName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfileState to be of type string, got %T instead", value) - } - sv.State = types.LaunchProfileState(jtv) - } - - case "statusCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfileStatusCode to be of type string, got %T instead", value) - } - sv.StatusCode = types.LaunchProfileStatusCode(jtv) - } - - case "statusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.StatusMessage = ptr.String(jtv) - } - - case "streamConfiguration": - if err := awsRestjson1_deserializeDocumentStreamConfiguration(&sv.StreamConfiguration, value); err != nil { - return err - } - - case "studioComponentIds": - if err := awsRestjson1_deserializeDocumentLaunchProfileStudioComponentIdList(&sv.StudioComponentIds, value); err != nil { - return err - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err - } - - case "updatedAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.UpdatedAt = ptr.Time(t) - } - - case "updatedBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.UpdatedBy = ptr.String(jtv) - } - - case "validationResults": - if err := awsRestjson1_deserializeDocumentValidationResults(&sv.ValidationResults, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentLaunchProfileInitialization(v **types.LaunchProfileInitialization, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.LaunchProfileInitialization - if *v == nil { - sv = &types.LaunchProfileInitialization{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "activeDirectory": - if err := awsRestjson1_deserializeDocumentLaunchProfileInitializationActiveDirectory(&sv.ActiveDirectory, value); err != nil { - return err - } - - case "ec2SecurityGroupIds": - if err := awsRestjson1_deserializeDocumentLaunchProfileSecurityGroupIdList(&sv.Ec2SecurityGroupIds, value); err != nil { - return err - } - - case "launchProfileId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfileId to be of type string, got %T instead", value) - } - sv.LaunchProfileId = ptr.String(jtv) - } - - case "launchProfileProtocolVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfileProtocolVersion to be of type string, got %T instead", value) - } - sv.LaunchProfileProtocolVersion = ptr.String(jtv) - } - - case "launchPurpose": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchPurpose to be of type string, got %T instead", value) - } - sv.LaunchPurpose = ptr.String(jtv) - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfileName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "platform": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfilePlatform to be of type string, got %T instead", value) - } - sv.Platform = types.LaunchProfilePlatform(jtv) - } - - case "systemInitializationScripts": - if err := awsRestjson1_deserializeDocumentLaunchProfileInitializationScriptList(&sv.SystemInitializationScripts, value); err != nil { - return err - } - - case "userInitializationScripts": - if err := awsRestjson1_deserializeDocumentLaunchProfileInitializationScriptList(&sv.UserInitializationScripts, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentLaunchProfileInitializationActiveDirectory(v **types.LaunchProfileInitializationActiveDirectory, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.LaunchProfileInitializationActiveDirectory - if *v == nil { - sv = &types.LaunchProfileInitializationActiveDirectory{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "computerAttributes": - if err := awsRestjson1_deserializeDocumentActiveDirectoryComputerAttributeList(&sv.ComputerAttributes, value); err != nil { - return err - } - - case "directoryId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DirectoryId to be of type string, got %T instead", value) - } - sv.DirectoryId = ptr.String(jtv) - } - - case "directoryName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.DirectoryName = ptr.String(jtv) - } - - case "dnsIpAddresses": - if err := awsRestjson1_deserializeDocumentActiveDirectoryDnsIpAddressList(&sv.DnsIpAddresses, value); err != nil { - return err - } - - case "organizationalUnitDistinguishedName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ActiveDirectoryOrganizationalUnitDistinguishedName to be of type string, got %T instead", value) - } - sv.OrganizationalUnitDistinguishedName = ptr.String(jtv) - } - - case "studioComponentId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentId to be of type string, got %T instead", value) - } - sv.StudioComponentId = ptr.String(jtv) - } - - case "studioComponentName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentName to be of type string, got %T instead", value) - } - sv.StudioComponentName = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentLaunchProfileInitializationScript(v **types.LaunchProfileInitializationScript, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.LaunchProfileInitializationScript - if *v == nil { - sv = &types.LaunchProfileInitializationScript{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "runtimeRoleArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) - } - sv.RuntimeRoleArn = ptr.String(jtv) - } - - case "script": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentInitializationScriptContent to be of type string, got %T instead", value) - } - sv.Script = ptr.String(jtv) - } - - case "secureInitializationRoleArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) - } - sv.SecureInitializationRoleArn = ptr.String(jtv) - } - - case "studioComponentId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentId to be of type string, got %T instead", value) - } - sv.StudioComponentId = ptr.String(jtv) - } - - case "studioComponentName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentName to be of type string, got %T instead", value) - } - sv.StudioComponentName = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentLaunchProfileInitializationScriptList(v *[]types.LaunchProfileInitializationScript, 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.LaunchProfileInitializationScript - if *v == nil { - cv = []types.LaunchProfileInitializationScript{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.LaunchProfileInitializationScript - destAddr := &col - if err := awsRestjson1_deserializeDocumentLaunchProfileInitializationScript(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentLaunchProfileList(v *[]types.LaunchProfile, 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.LaunchProfile - if *v == nil { - cv = []types.LaunchProfile{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.LaunchProfile - destAddr := &col - if err := awsRestjson1_deserializeDocumentLaunchProfile(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentLaunchProfileMembership(v **types.LaunchProfileMembership, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.LaunchProfileMembership - if *v == nil { - sv = &types.LaunchProfileMembership{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "identityStoreId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.IdentityStoreId = ptr.String(jtv) - } - - case "persona": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfilePersona to be of type string, got %T instead", value) - } - sv.Persona = types.LaunchProfilePersona(jtv) - } - - case "principalId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.PrincipalId = ptr.String(jtv) - } - - case "sid": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Sid = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentLaunchProfileMembershipList(v *[]types.LaunchProfileMembership, 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.LaunchProfileMembership - if *v == nil { - cv = []types.LaunchProfileMembership{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.LaunchProfileMembership - destAddr := &col - if err := awsRestjson1_deserializeDocumentLaunchProfileMembership(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentLaunchProfileProtocolVersionList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfileProtocolVersion to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentLaunchProfileSecurityGroupIdList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecurityGroupId to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentLaunchProfileStudioComponentIdList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentLicenseServiceConfiguration(v **types.LicenseServiceConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.LicenseServiceConfiguration - if *v == nil { - sv = &types.LicenseServiceConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "endpoint": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - sv.Endpoint = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ResourceNotFoundException - if *v == nil { - sv = &types.ResourceNotFoundException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "code": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Code = ptr.String(jtv) - } - - case "context": - if err := awsRestjson1_deserializeDocumentExceptionContext(&sv.Context, value); err != nil { - return err - } - - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentScriptParameterKeyValue(v **types.ScriptParameterKeyValue, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ScriptParameterKeyValue - if *v == nil { - sv = &types.ScriptParameterKeyValue{} - } 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 ScriptParameterKey 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 ScriptParameterValue to be of type string, got %T instead", value) - } - sv.Value = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ServiceQuotaExceededException - if *v == nil { - sv = &types.ServiceQuotaExceededException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "code": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Code = ptr.String(jtv) - } - - case "context": - if err := awsRestjson1_deserializeDocumentExceptionContext(&sv.Context, value); err != nil { - return err - } - - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentSharedFileSystemConfiguration(v **types.SharedFileSystemConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.SharedFileSystemConfiguration - if *v == nil { - sv = &types.SharedFileSystemConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "endpoint": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - sv.Endpoint = ptr.String(jtv) - } - - case "fileSystemId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.FileSystemId = ptr.String(jtv) - } - - case "linuxMountPoint": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LinuxMountPoint to be of type string, got %T instead", value) - } - sv.LinuxMountPoint = ptr.String(jtv) - } - - case "shareName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - sv.ShareName = ptr.String(jtv) - } - - case "windowsMountDrive": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected WindowsMountDrive to be of type string, got %T instead", value) - } - sv.WindowsMountDrive = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStreamConfiguration(v **types.StreamConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StreamConfiguration - if *v == nil { - sv = &types.StreamConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "automaticTerminationMode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AutomaticTerminationMode to be of type string, got %T instead", value) - } - sv.AutomaticTerminationMode = types.AutomaticTerminationMode(jtv) - } - - case "clipboardMode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingClipboardMode to be of type string, got %T instead", value) - } - sv.ClipboardMode = types.StreamingClipboardMode(jtv) - } - - case "ec2InstanceTypes": - if err := awsRestjson1_deserializeDocumentStreamingInstanceTypeList(&sv.Ec2InstanceTypes, value); err != nil { - return err - } - - case "maxSessionLengthInMinutes": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected StreamConfigurationMaxSessionLengthInMinutes to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.MaxSessionLengthInMinutes = ptr.Int32(int32(i64)) - } - - case "maxStoppedSessionLengthInMinutes": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected StreamConfigurationMaxStoppedSessionLengthInMinutes to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.MaxStoppedSessionLengthInMinutes = int32(i64) - } - - case "sessionBackup": - if err := awsRestjson1_deserializeDocumentStreamConfigurationSessionBackup(&sv.SessionBackup, value); err != nil { - return err - } - - case "sessionPersistenceMode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SessionPersistenceMode to be of type string, got %T instead", value) - } - sv.SessionPersistenceMode = types.SessionPersistenceMode(jtv) - } - - case "sessionStorage": - if err := awsRestjson1_deserializeDocumentStreamConfigurationSessionStorage(&sv.SessionStorage, value); err != nil { - return err - } - - case "streamingImageIds": - if err := awsRestjson1_deserializeDocumentStreamingImageIdList(&sv.StreamingImageIds, value); err != nil { - return err - } - - case "volumeConfiguration": - if err := awsRestjson1_deserializeDocumentVolumeConfiguration(&sv.VolumeConfiguration, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStreamConfigurationSessionBackup(v **types.StreamConfigurationSessionBackup, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StreamConfigurationSessionBackup - if *v == nil { - sv = &types.StreamConfigurationSessionBackup{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "maxBackupsToRetain": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected StreamConfigurationMaxBackupsToRetain to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.MaxBackupsToRetain = int32(i64) - } - - case "mode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SessionBackupMode to be of type string, got %T instead", value) - } - sv.Mode = types.SessionBackupMode(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStreamConfigurationSessionStorage(v **types.StreamConfigurationSessionStorage, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StreamConfigurationSessionStorage - if *v == nil { - sv = &types.StreamConfigurationSessionStorage{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "mode": - if err := awsRestjson1_deserializeDocumentStreamingSessionStorageModeList(&sv.Mode, value); err != nil { - return err - } - - case "root": - if err := awsRestjson1_deserializeDocumentStreamingSessionStorageRoot(&sv.Root, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStreamingImage(v **types.StreamingImage, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StreamingImage - if *v == nil { - sv = &types.StreamingImage{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingImageDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "ec2ImageId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EC2ImageId to be of type string, got %T instead", value) - } - sv.Ec2ImageId = ptr.String(jtv) - } - - case "encryptionConfiguration": - if err := awsRestjson1_deserializeDocumentStreamingImageEncryptionConfiguration(&sv.EncryptionConfiguration, value); err != nil { - return err - } - - case "eulaIds": - if err := awsRestjson1_deserializeDocumentEulaIdList(&sv.EulaIds, value); err != nil { - return err - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingImageName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "owner": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingImageOwner to be of type string, got %T instead", value) - } - sv.Owner = ptr.String(jtv) - } - - case "platform": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingImagePlatform to be of type string, got %T instead", value) - } - sv.Platform = ptr.String(jtv) - } - - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingImageState to be of type string, got %T instead", value) - } - sv.State = types.StreamingImageState(jtv) - } - - case "statusCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingImageStatusCode to be of type string, got %T instead", value) - } - sv.StatusCode = types.StreamingImageStatusCode(jtv) - } - - case "statusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.StatusMessage = ptr.String(jtv) - } - - case "streamingImageId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingImageId to be of type string, got %T instead", value) - } - sv.StreamingImageId = ptr.String(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStreamingImageEncryptionConfiguration(v **types.StreamingImageEncryptionConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StreamingImageEncryptionConfiguration - if *v == nil { - sv = &types.StreamingImageEncryptionConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "keyArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingImageEncryptionConfigurationKeyArn to be of type string, got %T instead", value) - } - sv.KeyArn = ptr.String(jtv) - } - - case "keyType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingImageEncryptionConfigurationKeyType to be of type string, got %T instead", value) - } - sv.KeyType = types.StreamingImageEncryptionConfigurationKeyType(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStreamingImageIdList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingImageId to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentStreamingImageList(v *[]types.StreamingImage, 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.StreamingImage - if *v == nil { - cv = []types.StreamingImage{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.StreamingImage - destAddr := &col - if err := awsRestjson1_deserializeDocumentStreamingImage(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentStreamingInstanceTypeList(v *[]types.StreamingInstanceType, 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.StreamingInstanceType - if *v == nil { - cv = []types.StreamingInstanceType{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.StreamingInstanceType - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingInstanceType to be of type string, got %T instead", value) - } - col = types.StreamingInstanceType(jtv) - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentStreamingSession(v **types.StreamingSession, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StreamingSession - if *v == nil { - sv = &types.StreamingSession{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "automaticTerminationMode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AutomaticTerminationMode to be of type string, got %T instead", value) - } - sv.AutomaticTerminationMode = types.AutomaticTerminationMode(jtv) - } - - case "backupMode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SessionBackupMode to be of type string, got %T instead", value) - } - sv.BackupMode = types.SessionBackupMode(jtv) - } - - case "createdAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(t) - } - - case "createdBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.CreatedBy = ptr.String(jtv) - } - - case "ec2InstanceType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Ec2InstanceType = ptr.String(jtv) - } - - case "launchProfileId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.LaunchProfileId = ptr.String(jtv) - } - - case "maxBackupsToRetain": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected StreamConfigurationMaxBackupsToRetain to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.MaxBackupsToRetain = int32(i64) - } - - case "ownedBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.OwnedBy = ptr.String(jtv) - } - - case "sessionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingSessionId to be of type string, got %T instead", value) - } - sv.SessionId = ptr.String(jtv) - } - - case "sessionPersistenceMode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SessionPersistenceMode to be of type string, got %T instead", value) - } - sv.SessionPersistenceMode = types.SessionPersistenceMode(jtv) - } - - case "startedAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.StartedAt = ptr.Time(t) - } - - case "startedBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.StartedBy = ptr.String(jtv) - } - - case "startedFromBackupId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.StartedFromBackupId = ptr.String(jtv) - } - - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingSessionState to be of type string, got %T instead", value) - } - sv.State = types.StreamingSessionState(jtv) - } - - case "statusCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingSessionStatusCode to be of type string, got %T instead", value) - } - sv.StatusCode = types.StreamingSessionStatusCode(jtv) - } - - case "statusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.StatusMessage = ptr.String(jtv) - } - - case "stopAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.StopAt = ptr.Time(t) - } - - case "stoppedAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.StoppedAt = ptr.Time(t) - } - - case "stoppedBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.StoppedBy = ptr.String(jtv) - } - - case "streamingImageId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingImageId to be of type string, got %T instead", value) - } - sv.StreamingImageId = ptr.String(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err - } - - case "terminateAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.TerminateAt = ptr.Time(t) - } - - case "updatedAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.UpdatedAt = ptr.Time(t) - } - - case "updatedBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.UpdatedBy = ptr.String(jtv) - } - - case "volumeConfiguration": - if err := awsRestjson1_deserializeDocumentVolumeConfiguration(&sv.VolumeConfiguration, value); err != nil { - return err - } - - case "volumeRetentionMode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected VolumeRetentionMode to be of type string, got %T instead", value) - } - sv.VolumeRetentionMode = types.VolumeRetentionMode(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStreamingSessionBackup(v **types.StreamingSessionBackup, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StreamingSessionBackup - if *v == nil { - sv = &types.StreamingSessionBackup{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "backupId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.BackupId = ptr.String(jtv) - } - - case "createdAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(t) - } - - case "launchProfileId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.LaunchProfileId = ptr.String(jtv) - } - - case "ownedBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.OwnedBy = ptr.String(jtv) - } - - case "sessionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingSessionId to be of type string, got %T instead", value) - } - sv.SessionId = ptr.String(jtv) - } - - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingSessionState to be of type string, got %T instead", value) - } - sv.State = types.StreamingSessionState(jtv) - } - - case "statusCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingSessionStatusCode to be of type string, got %T instead", value) - } - sv.StatusCode = types.StreamingSessionStatusCode(jtv) - } - - case "statusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.StatusMessage = ptr.String(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStreamingSessionBackupList(v *[]types.StreamingSessionBackup, 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.StreamingSessionBackup - if *v == nil { - cv = []types.StreamingSessionBackup{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.StreamingSessionBackup - destAddr := &col - if err := awsRestjson1_deserializeDocumentStreamingSessionBackup(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentStreamingSessionList(v *[]types.StreamingSession, 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.StreamingSession - if *v == nil { - cv = []types.StreamingSession{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.StreamingSession - destAddr := &col - if err := awsRestjson1_deserializeDocumentStreamingSession(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentStreamingSessionStorageModeList(v *[]types.StreamingSessionStorageMode, 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.StreamingSessionStorageMode - if *v == nil { - cv = []types.StreamingSessionStorageMode{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.StreamingSessionStorageMode - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingSessionStorageMode to be of type string, got %T instead", value) - } - col = types.StreamingSessionStorageMode(jtv) - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentStreamingSessionStorageRoot(v **types.StreamingSessionStorageRoot, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StreamingSessionStorageRoot - if *v == nil { - sv = &types.StreamingSessionStorageRoot{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "linux": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingSessionStorageRootPathLinux to be of type string, got %T instead", value) - } - sv.Linux = ptr.String(jtv) - } - - case "windows": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingSessionStorageRootPathWindows to be of type string, got %T instead", value) - } - sv.Windows = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStreamingSessionStream(v **types.StreamingSessionStream, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StreamingSessionStream - if *v == nil { - sv = &types.StreamingSessionStream{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "createdAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(t) - } - - case "createdBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.CreatedBy = ptr.String(jtv) - } - - case "expiresAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.ExpiresAt = ptr.Time(t) - } - - case "ownedBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.OwnedBy = ptr.String(jtv) - } - - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingSessionStreamState to be of type string, got %T instead", value) - } - sv.State = types.StreamingSessionStreamState(jtv) - } - - case "statusCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StreamingSessionStreamStatusCode to be of type string, got %T instead", value) - } - sv.StatusCode = types.StreamingSessionStreamStatusCode(jtv) - } - - case "streamId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.StreamId = ptr.String(jtv) - } - - case "url": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - sv.Url = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStudio(v **types.Studio, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Studio - if *v == nil { - sv = &types.Studio{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "adminRoleArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) - } - sv.AdminRoleArn = ptr.String(jtv) - } - - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "createdAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(t) - } - - case "displayName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioDisplayName to be of type string, got %T instead", value) - } - sv.DisplayName = ptr.String(jtv) - } - - case "homeRegion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Region to be of type string, got %T instead", value) - } - sv.HomeRegion = ptr.String(jtv) - } - - case "ssoClientId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.SsoClientId = ptr.String(jtv) - } - - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioState to be of type string, got %T instead", value) - } - sv.State = types.StudioState(jtv) - } - - case "statusCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioStatusCode to be of type string, got %T instead", value) - } - sv.StatusCode = types.StudioStatusCode(jtv) - } - - case "statusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.StatusMessage = ptr.String(jtv) - } - - case "studioEncryptionConfiguration": - if err := awsRestjson1_deserializeDocumentStudioEncryptionConfiguration(&sv.StudioEncryptionConfiguration, value); err != nil { - return err - } - - case "studioId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.StudioId = ptr.String(jtv) - } - - case "studioName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioName to be of type string, got %T instead", value) - } - sv.StudioName = ptr.String(jtv) - } - - case "studioUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.StudioUrl = ptr.String(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err - } - - case "updatedAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.UpdatedAt = ptr.Time(t) - } - - case "userRoleArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) - } - sv.UserRoleArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStudioComponent(v **types.StudioComponent, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StudioComponent - if *v == nil { - sv = &types.StudioComponent{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "configuration": - if err := awsRestjson1_deserializeDocumentStudioComponentConfiguration(&sv.Configuration, value); err != nil { - return err - } - - case "createdAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(t) - } - - case "createdBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.CreatedBy = ptr.String(jtv) - } - - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "ec2SecurityGroupIds": - if err := awsRestjson1_deserializeDocumentStudioComponentSecurityGroupIdList(&sv.Ec2SecurityGroupIds, value); err != nil { - return err - } - - case "initializationScripts": - if err := awsRestjson1_deserializeDocumentStudioComponentInitializationScriptList(&sv.InitializationScripts, value); err != nil { - return err - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "runtimeRoleArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) - } - sv.RuntimeRoleArn = ptr.String(jtv) - } - - case "scriptParameters": - if err := awsRestjson1_deserializeDocumentStudioComponentScriptParameterKeyValueList(&sv.ScriptParameters, value); err != nil { - return err - } - - case "secureInitializationRoleArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) - } - sv.SecureInitializationRoleArn = ptr.String(jtv) - } - - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentState to be of type string, got %T instead", value) - } - sv.State = types.StudioComponentState(jtv) - } - - case "statusCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentStatusCode to be of type string, got %T instead", value) - } - sv.StatusCode = types.StudioComponentStatusCode(jtv) - } - - case "statusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.StatusMessage = ptr.String(jtv) - } - - case "studioComponentId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentId to be of type string, got %T instead", value) - } - sv.StudioComponentId = ptr.String(jtv) - } - - case "subtype": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentSubtype to be of type string, got %T instead", value) - } - sv.Subtype = types.StudioComponentSubtype(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err - } - - case "type": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentType to be of type string, got %T instead", value) - } - sv.Type = types.StudioComponentType(jtv) - } - - case "updatedAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.UpdatedAt = ptr.Time(t) - } - - case "updatedBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.UpdatedBy = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStudioComponentConfiguration(v **types.StudioComponentConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StudioComponentConfiguration - if *v == nil { - sv = &types.StudioComponentConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "activeDirectoryConfiguration": - if err := awsRestjson1_deserializeDocumentActiveDirectoryConfiguration(&sv.ActiveDirectoryConfiguration, value); err != nil { - return err - } - - case "computeFarmConfiguration": - if err := awsRestjson1_deserializeDocumentComputeFarmConfiguration(&sv.ComputeFarmConfiguration, value); err != nil { - return err - } - - case "licenseServiceConfiguration": - if err := awsRestjson1_deserializeDocumentLicenseServiceConfiguration(&sv.LicenseServiceConfiguration, value); err != nil { - return err - } - - case "sharedFileSystemConfiguration": - if err := awsRestjson1_deserializeDocumentSharedFileSystemConfiguration(&sv.SharedFileSystemConfiguration, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStudioComponentInitializationScript(v **types.StudioComponentInitializationScript, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StudioComponentInitializationScript - if *v == nil { - sv = &types.StudioComponentInitializationScript{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "launchProfileProtocolVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfileProtocolVersion to be of type string, got %T instead", value) - } - sv.LaunchProfileProtocolVersion = ptr.String(jtv) - } - - case "platform": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfilePlatform to be of type string, got %T instead", value) - } - sv.Platform = types.LaunchProfilePlatform(jtv) - } - - case "runContext": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentInitializationScriptRunContext to be of type string, got %T instead", value) - } - sv.RunContext = types.StudioComponentInitializationScriptRunContext(jtv) - } - - case "script": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentInitializationScriptContent to be of type string, got %T instead", value) - } - sv.Script = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStudioComponentInitializationScriptList(v *[]types.StudioComponentInitializationScript, 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.StudioComponentInitializationScript - if *v == nil { - cv = []types.StudioComponentInitializationScript{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.StudioComponentInitializationScript - destAddr := &col - if err := awsRestjson1_deserializeDocumentStudioComponentInitializationScript(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentStudioComponentList(v *[]types.StudioComponent, 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.StudioComponent - if *v == nil { - cv = []types.StudioComponent{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.StudioComponent - destAddr := &col - if err := awsRestjson1_deserializeDocumentStudioComponent(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentStudioComponentScriptParameterKeyValueList(v *[]types.ScriptParameterKeyValue, 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.ScriptParameterKeyValue - if *v == nil { - cv = []types.ScriptParameterKeyValue{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ScriptParameterKeyValue - destAddr := &col - if err := awsRestjson1_deserializeDocumentScriptParameterKeyValue(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentStudioComponentSecurityGroupIdList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecurityGroupId to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentStudioComponentSummary(v **types.StudioComponentSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StudioComponentSummary - if *v == nil { - sv = &types.StudioComponentSummary{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "createdAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(t) - } - - case "createdBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.CreatedBy = ptr.String(jtv) - } - - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "studioComponentId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentId to be of type string, got %T instead", value) - } - sv.StudioComponentId = ptr.String(jtv) - } - - case "subtype": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentSubtype to be of type string, got %T instead", value) - } - sv.Subtype = types.StudioComponentSubtype(jtv) - } - - case "type": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioComponentType to be of type string, got %T instead", value) - } - sv.Type = types.StudioComponentType(jtv) - } - - case "updatedAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.UpdatedAt = ptr.Time(t) - } - - case "updatedBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.UpdatedBy = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStudioComponentSummaryList(v *[]types.StudioComponentSummary, 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.StudioComponentSummary - if *v == nil { - cv = []types.StudioComponentSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.StudioComponentSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentStudioComponentSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentStudioEncryptionConfiguration(v **types.StudioEncryptionConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StudioEncryptionConfiguration - if *v == nil { - sv = &types.StudioEncryptionConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "keyArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioEncryptionConfigurationKeyArn to be of type string, got %T instead", value) - } - sv.KeyArn = ptr.String(jtv) - } - - case "keyType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioEncryptionConfigurationKeyType to be of type string, got %T instead", value) - } - sv.KeyType = types.StudioEncryptionConfigurationKeyType(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStudioList(v *[]types.Studio, 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.Studio - if *v == nil { - cv = []types.Studio{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.Studio - destAddr := &col - if err := awsRestjson1_deserializeDocumentStudio(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentStudioMembership(v **types.StudioMembership, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StudioMembership - if *v == nil { - sv = &types.StudioMembership{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "identityStoreId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.IdentityStoreId = ptr.String(jtv) - } - - case "persona": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StudioPersona to be of type string, got %T instead", value) - } - sv.Persona = types.StudioPersona(jtv) - } - - case "principalId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.PrincipalId = ptr.String(jtv) - } - - case "sid": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Sid = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStudioMembershipList(v *[]types.StudioMembership, 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.StudioMembership - if *v == nil { - cv = []types.StudioMembership{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.StudioMembership - destAddr := &col - if err := awsRestjson1_deserializeDocumentStudioMembership(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentTags(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_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ThrottlingException - if *v == nil { - sv = &types.ThrottlingException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "code": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Code = ptr.String(jtv) - } - - case "context": - if err := awsRestjson1_deserializeDocumentExceptionContext(&sv.Context, value); err != nil { - return err - } - - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ValidationException - if *v == nil { - sv = &types.ValidationException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "code": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Code = ptr.String(jtv) - } - - case "context": - if err := awsRestjson1_deserializeDocumentExceptionContext(&sv.Context, value); err != nil { - return err - } - - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentValidationResult(v **types.ValidationResult, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ValidationResult - if *v == nil { - sv = &types.ValidationResult{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfileValidationState to be of type string, got %T instead", value) - } - sv.State = types.LaunchProfileValidationState(jtv) - } - - case "statusCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfileValidationStatusCode to be of type string, got %T instead", value) - } - sv.StatusCode = types.LaunchProfileValidationStatusCode(jtv) - } - - case "statusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfileValidationStatusMessage to be of type string, got %T instead", value) - } - sv.StatusMessage = ptr.String(jtv) - } - - case "type": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchProfileValidationType to be of type string, got %T instead", value) - } - sv.Type = types.LaunchProfileValidationType(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentValidationResults(v *[]types.ValidationResult, 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.ValidationResult - if *v == nil { - cv = []types.ValidationResult{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ValidationResult - destAddr := &col - if err := awsRestjson1_deserializeDocumentValidationResult(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentVolumeConfiguration(v **types.VolumeConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.VolumeConfiguration - if *v == nil { - sv = &types.VolumeConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "iops": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected VolumeIops to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Iops = ptr.Int32(int32(i64)) - } - - case "size": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected VolumeSizeInGiB to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Size = ptr.Int32(int32(i64)) - } - - case "throughput": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected VolumeThroughputInMiBs to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Throughput = ptr.Int32(int32(i64)) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} diff --git a/service/nimble/doc.go b/service/nimble/doc.go deleted file mode 100644 index 2bfbd110366..00000000000 --- a/service/nimble/doc.go +++ /dev/null @@ -1,15 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -// Package nimble provides the API client, operations, and parameter types for -// AmazonNimbleStudio. -// -// Welcome to the Amazon Nimble Studio API reference. This API reference provides -// methods, schema, resources, parameters, and more to help you get the most out of -// Nimble Studio. -// -// Nimble Studio is a virtual studio that empowers visual effects, animation, and -// interactive content teams to create content securely within a scalable, private -// cloud service. -// -// Deprecated: AWS has deprecated this service. It is no longer available for use. -package nimble diff --git a/service/nimble/endpoints.go b/service/nimble/endpoints.go deleted file mode 100644 index e803f3ee422..00000000000 --- a/service/nimble/endpoints.go +++ /dev/null @@ -1,537 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - "github.com/aws/aws-sdk-go-v2/internal/endpoints" - "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" - internalendpoints "github.com/aws/aws-sdk-go-v2/service/nimble/internal/endpoints" - smithyauth "github.com/aws/smithy-go/auth" - smithyendpoints "github.com/aws/smithy-go/endpoints" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" - "net/url" - "os" - "strings" -) - -// EndpointResolverOptions is the service endpoint resolver options -type EndpointResolverOptions = internalendpoints.Options - -// EndpointResolver interface for resolving service endpoints. -type EndpointResolver interface { - ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) -} - -var _ EndpointResolver = &internalendpoints.Resolver{} - -// NewDefaultEndpointResolver constructs a new service endpoint resolver -func NewDefaultEndpointResolver() *internalendpoints.Resolver { - return internalendpoints.New() -} - -// EndpointResolverFunc is a helper utility that wraps a function so it satisfies -// the EndpointResolver interface. This is useful when you want to add additional -// endpoint resolving logic, or stub out specific endpoints with custom values. -type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) - -func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return fn(region, options) -} - -// EndpointResolverFromURL returns an EndpointResolver configured using the -// provided endpoint url. By default, the resolved endpoint resolver uses the -// client region as signing region, and the endpoint source is set to -// EndpointSourceCustom.You can provide functional options to configure endpoint -// values for the resolved endpoint. -func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { - e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} - for _, fn := range optFns { - fn(&e) - } - - return EndpointResolverFunc( - func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { - if len(e.SigningRegion) == 0 { - e.SigningRegion = region - } - return e, nil - }, - ) -} - -type ResolveEndpoint struct { - Resolver EndpointResolver - Options EndpointResolverOptions -} - -func (*ResolveEndpoint) ID() string { - return "ResolveEndpoint" -} - -func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleSerialize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.Resolver == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - eo := m.Options - eo.Logger = middleware.GetLogger(ctx) - - var endpoint aws.Endpoint - endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) - if err != nil { - nf := (&aws.EndpointNotFoundError{}) - if errors.As(err, &nf) { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) - return next.HandleSerialize(ctx, in) - } - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - req.URL, err = url.Parse(endpoint.URL) - if err != nil { - return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) - } - - if len(awsmiddleware.GetSigningName(ctx)) == 0 { - signingName := endpoint.SigningName - if len(signingName) == 0 { - signingName = "nimble" - } - ctx = awsmiddleware.SetSigningName(ctx, signingName) - } - ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) - ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) - ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) - ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) - return next.HandleSerialize(ctx, in) -} -func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { - return stack.Serialize.Insert(&ResolveEndpoint{ - Resolver: o.EndpointResolver, - Options: o.EndpointOptions, - }, "OperationSerializer", middleware.Before) -} - -func removeResolveEndpointMiddleware(stack *middleware.Stack) error { - _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) - return err -} - -type wrappedEndpointResolver struct { - awsResolver aws.EndpointResolverWithOptions -} - -func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return w.awsResolver.ResolveEndpoint(ServiceID, region, options) -} - -type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) - -func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { - return a(service, region) -} - -var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) - -// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. -// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, -// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked -// via its middleware. -// -// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. -func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { - var resolver aws.EndpointResolverWithOptions - - if awsResolverWithOptions != nil { - resolver = awsResolverWithOptions - } else if awsResolver != nil { - resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) - } - - return &wrappedEndpointResolver{ - awsResolver: resolver, - } -} - -func finalizeClientEndpointResolverOptions(options *Options) { - options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() - - if len(options.EndpointOptions.ResolvedRegion) == 0 { - const fipsInfix = "-fips-" - const fipsPrefix = "fips-" - const fipsSuffix = "-fips" - - if strings.Contains(options.Region, fipsInfix) || - strings.Contains(options.Region, fipsPrefix) || - strings.Contains(options.Region, fipsSuffix) { - options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( - options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") - options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled - } - } - -} - -func resolveEndpointResolverV2(options *Options) { - if options.EndpointResolverV2 == nil { - options.EndpointResolverV2 = NewDefaultEndpointResolverV2() - } -} - -func resolveBaseEndpoint(cfg aws.Config, o *Options) { - if cfg.BaseEndpoint != nil { - o.BaseEndpoint = cfg.BaseEndpoint - } - - _, g := os.LookupEnv("AWS_ENDPOINT_URL") - _, s := os.LookupEnv("AWS_ENDPOINT_URL_NIMBLE") - - if g && !s { - return - } - - value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "nimble", cfg.ConfigSources) - if found && err == nil { - o.BaseEndpoint = &value - } -} - -func bindRegion(region string) *string { - if region == "" { - return nil - } - return aws.String(endpoints.MapFIPSRegion(region)) -} - -// EndpointParameters provides the parameters that influence how endpoints are -// resolved. -type EndpointParameters struct { - // The AWS region used to dispatch the request. - // - // Parameter is - // required. - // - // AWS::Region - Region *string - - // When true, use the dual-stack endpoint. If the configured endpoint does not - // support dual-stack, dispatching the request MAY return an error. - // - // Defaults to - // false if no value is provided. - // - // AWS::UseDualStack - UseDualStack *bool - - // When true, send this request to the FIPS-compliant regional endpoint. If the - // configured endpoint does not have a FIPS compliant endpoint, dispatching the - // request will return an error. - // - // Defaults to false if no value is - // provided. - // - // AWS::UseFIPS - UseFIPS *bool - - // Override the endpoint used to send this request - // - // Parameter is - // required. - // - // SDK::Endpoint - Endpoint *string -} - -// ValidateRequired validates required parameters are set. -func (p EndpointParameters) ValidateRequired() error { - if p.UseDualStack == nil { - return fmt.Errorf("parameter UseDualStack is required") - } - - if p.UseFIPS == nil { - return fmt.Errorf("parameter UseFIPS is required") - } - - return nil -} - -// WithDefaults returns a shallow copy of EndpointParameterswith default values -// applied to members where applicable. -func (p EndpointParameters) WithDefaults() EndpointParameters { - if p.UseDualStack == nil { - p.UseDualStack = ptr.Bool(false) - } - - if p.UseFIPS == nil { - p.UseFIPS = ptr.Bool(false) - } - return p -} - -type stringSlice []string - -func (s stringSlice) Get(i int) *string { - if i < 0 || i >= len(s) { - return nil - } - - v := s[i] - return &v -} - -// EndpointResolverV2 provides the interface for resolving service endpoints. -type EndpointResolverV2 interface { - // ResolveEndpoint attempts to resolve the endpoint with the provided options, - // returning the endpoint if found. Otherwise an error is returned. - ResolveEndpoint(ctx context.Context, params EndpointParameters) ( - smithyendpoints.Endpoint, error, - ) -} - -// resolver provides the implementation for resolving endpoints. -type resolver struct{} - -func NewDefaultEndpointResolverV2() EndpointResolverV2 { - return &resolver{} -} - -// ResolveEndpoint attempts to resolve the endpoint with the provided options, -// returning the endpoint if found. Otherwise an error is returned. -func (r *resolver) ResolveEndpoint( - ctx context.Context, params EndpointParameters, -) ( - endpoint smithyendpoints.Endpoint, err error, -) { - params = params.WithDefaults() - if err = params.ValidateRequired(); err != nil { - return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) - } - _UseDualStack := *params.UseDualStack - _UseFIPS := *params.UseFIPS - - if exprVal := params.Endpoint; exprVal != nil { - _Endpoint := *exprVal - _ = _Endpoint - if _UseFIPS == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") - } - if _UseDualStack == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") - } - uriString := _Endpoint - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if exprVal := params.Region; exprVal != nil { - _Region := *exprVal - _ = _Region - if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { - _PartitionResult := *exprVal - _ = _PartitionResult - if _UseFIPS == true { - if _UseDualStack == true { - if true == _PartitionResult.SupportsFIPS { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://nimble-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - } - } - if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { - uriString := func() string { - var out strings.Builder - out.WriteString("https://nimble-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") - } - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://nimble.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://nimble.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") -} - -type endpointParamsBinder interface { - bindEndpointParams(*EndpointParameters) -} - -func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { - params := &EndpointParameters{} - - params.Region = bindRegion(options.Region) - params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) - params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) - params.Endpoint = options.BaseEndpoint - - if b, ok := input.(endpointParamsBinder); ok { - b.bindEndpointParams(params) - } - - return params -} - -type resolveEndpointV2Middleware struct { - options Options -} - -func (*resolveEndpointV2Middleware) ID() string { - return "ResolveEndpointV2" -} - -func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "ResolveEndpoint") - defer span.End() - - if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.options.EndpointResolverV2 == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", - func() (smithyendpoints.Endpoint, error) { - return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) - }) - if err != nil { - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) - - if endpt.URI.RawPath == "" && req.URL.RawPath != "" { - endpt.URI.RawPath = endpt.URI.Path - } - req.URL.Scheme = endpt.URI.Scheme - req.URL.Host = endpt.URI.Host - req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) - req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) - for k := range endpt.Headers { - req.Header.Set(k, endpt.Headers.Get(k)) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) - for _, o := range opts { - rscheme.SignerProperties.SetAll(&o.SignerProperties) - } - - span.End() - return next.HandleFinalize(ctx, in) -} diff --git a/service/nimble/endpoints_config_test.go b/service/nimble/endpoints_config_test.go deleted file mode 100644 index 8c280477725..00000000000 --- a/service/nimble/endpoints_config_test.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - "os" - "reflect" - "testing" -) - -type mockConfigSource struct { - global string - service string - ignore bool -} - -// GetIgnoreConfiguredEndpoints is used in knowing when to disable configured -// endpoints feature. -func (m mockConfigSource) GetIgnoreConfiguredEndpoints(context.Context) (bool, bool, error) { - return m.ignore, m.ignore, nil -} - -// GetServiceBaseEndpoint is used to retrieve a normalized SDK ID for use -// with configured endpoints. -func (m mockConfigSource) GetServiceBaseEndpoint(ctx context.Context, sdkID string) (string, bool, error) { - if m.service != "" { - return m.service, true, nil - } - return "", false, nil -} - -func TestResolveBaseEndpoint(t *testing.T) { - cases := map[string]struct { - envGlobal string - envService string - envIgnore bool - configGlobal string - configService string - configIgnore bool - clientEndpoint *string - expectURL *string - }{ - "env ignore": { - envGlobal: "https://env-global.dev", - envService: "https://env-nimble.dev", - envIgnore: true, - configGlobal: "http://config-global.dev", - configService: "http://config-nimble.dev", - expectURL: nil, - }, - "env global": { - envGlobal: "https://env-global.dev", - configGlobal: "http://config-global.dev", - configService: "http://config-nimble.dev", - expectURL: aws.String("https://env-global.dev"), - }, - "env service": { - envGlobal: "https://env-global.dev", - envService: "https://env-nimble.dev", - configGlobal: "http://config-global.dev", - configService: "http://config-nimble.dev", - expectURL: aws.String("https://env-nimble.dev"), - }, - "config ignore": { - envGlobal: "https://env-global.dev", - envService: "https://env-nimble.dev", - configGlobal: "http://config-global.dev", - configService: "http://config-nimble.dev", - configIgnore: true, - expectURL: nil, - }, - "config global": { - configGlobal: "http://config-global.dev", - expectURL: aws.String("http://config-global.dev"), - }, - "config service": { - configGlobal: "http://config-global.dev", - configService: "http://config-nimble.dev", - expectURL: aws.String("http://config-nimble.dev"), - }, - "client": { - envGlobal: "https://env-global.dev", - envService: "https://env-nimble.dev", - configGlobal: "http://config-global.dev", - configService: "http://config-nimble.dev", - clientEndpoint: aws.String("https://client-nimble.dev"), - expectURL: aws.String("https://client-nimble.dev"), - }, - } - - for name, c := range cases { - t.Run(name, func(t *testing.T) { - os.Clearenv() - - awsConfig := aws.Config{} - ignore := c.envIgnore || c.configIgnore - - if c.configGlobal != "" && !ignore { - awsConfig.BaseEndpoint = aws.String(c.configGlobal) - } - - if c.envGlobal != "" { - t.Setenv("AWS_ENDPOINT_URL", c.envGlobal) - if !ignore { - awsConfig.BaseEndpoint = aws.String(c.envGlobal) - } - } - - if c.envService != "" { - t.Setenv("AWS_ENDPOINT_URL_NIMBLE", c.envService) - } - - awsConfig.ConfigSources = []interface{}{ - mockConfigSource{ - global: c.envGlobal, - service: c.envService, - ignore: c.envIgnore, - }, - mockConfigSource{ - global: c.configGlobal, - service: c.configService, - ignore: c.configIgnore, - }, - } - - client := NewFromConfig(awsConfig, func(o *Options) { - if c.clientEndpoint != nil { - o.BaseEndpoint = c.clientEndpoint - } - }) - - if e, a := c.expectURL, client.options.BaseEndpoint; !reflect.DeepEqual(e, a) { - t.Errorf("expect endpoint %v , got %v", e, a) - } - }) - } -} diff --git a/service/nimble/endpoints_test.go b/service/nimble/endpoints_test.go deleted file mode 100644 index f3adbce379d..00000000000 --- a/service/nimble/endpoints_test.go +++ /dev/null @@ -1,1005 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - smithy "github.com/aws/smithy-go" - smithyendpoints "github.com/aws/smithy-go/endpoints" - "github.com/aws/smithy-go/ptr" - "net/http" - "net/url" - "reflect" - "strings" - "testing" -) - -// For region ap-northeast-1 with FIPS disabled and DualStack disabled -func TestEndpointCase0(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("ap-northeast-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble.ap-northeast-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region ap-southeast-2 with FIPS disabled and DualStack disabled -func TestEndpointCase1(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("ap-southeast-2"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble.ap-southeast-2.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region ca-central-1 with FIPS disabled and DualStack disabled -func TestEndpointCase2(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("ca-central-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble.ca-central-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region eu-west-2 with FIPS disabled and DualStack disabled -func TestEndpointCase3(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("eu-west-2"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble.eu-west-2.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase4(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble.us-east-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-west-2 with FIPS disabled and DualStack disabled -func TestEndpointCase5(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-west-2"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble.us-west-2.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase6(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble-fips.us-east-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase7(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble-fips.us-east-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase8(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble.us-east-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region cn-north-1 with FIPS enabled and DualStack enabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble-fips.cn-north-1.api.amazonwebservices.com.cn") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region cn-north-1 with FIPS enabled and DualStack disabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble-fips.cn-north-1.amazonaws.com.cn") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region cn-north-1 with FIPS disabled and DualStack enabled -func TestEndpointCase11(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble.cn-north-1.api.amazonwebservices.com.cn") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region cn-north-1 with FIPS disabled and DualStack disabled -func TestEndpointCase12(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble.cn-north-1.amazonaws.com.cn") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-gov-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase13(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble-fips.us-gov-east-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-gov-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble-fips.us-gov-east-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-gov-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase15(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble.us-gov-east-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-gov-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble.us-gov-east-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase17(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase18(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble-fips.us-iso-east-1.c2s.ic.gov") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase19(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble.us-iso-east-1.c2s.ic.gov") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-isob-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase21(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-isob-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-isob-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble-fips.us-isob-east-1.sc2s.sgov.gov") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-isob-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase23(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-isob-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase24(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-isob-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://nimble.us-isob-east-1.sc2s.sgov.gov") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - Endpoint: ptr.String("https://example.com"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://example.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - Endpoint: ptr.String("https://example.com"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://example.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase27(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - Endpoint: ptr.String("https://example.com"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "Invalid Configuration: FIPS and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase28(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - Endpoint: ptr.String("https://example.com"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "Invalid Configuration: Dualstack and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// Missing region -func TestEndpointCase29(t *testing.T) { - var params = EndpointParameters{} - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} diff --git a/service/nimble/generated.json b/service/nimble/generated.json deleted file mode 100644 index 19f26d73d23..00000000000 --- a/service/nimble/generated.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "dependencies": { - "github.com/aws/aws-sdk-go-v2": "v1.4.0", - "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", - "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/smithy-go": "v1.4.0", - "github.com/jmespath/go-jmespath": "v0.4.0" - }, - "files": [ - "api_client.go", - "api_client_test.go", - "api_op_AcceptEulas.go", - "api_op_CreateLaunchProfile.go", - "api_op_CreateStreamingImage.go", - "api_op_CreateStreamingSession.go", - "api_op_CreateStreamingSessionStream.go", - "api_op_CreateStudio.go", - "api_op_CreateStudioComponent.go", - "api_op_DeleteLaunchProfile.go", - "api_op_DeleteLaunchProfileMember.go", - "api_op_DeleteStreamingImage.go", - "api_op_DeleteStreamingSession.go", - "api_op_DeleteStudio.go", - "api_op_DeleteStudioComponent.go", - "api_op_DeleteStudioMember.go", - "api_op_GetEula.go", - "api_op_GetLaunchProfile.go", - "api_op_GetLaunchProfileDetails.go", - "api_op_GetLaunchProfileInitialization.go", - "api_op_GetLaunchProfileMember.go", - "api_op_GetStreamingImage.go", - "api_op_GetStreamingSession.go", - "api_op_GetStreamingSessionBackup.go", - "api_op_GetStreamingSessionStream.go", - "api_op_GetStudio.go", - "api_op_GetStudioComponent.go", - "api_op_GetStudioMember.go", - "api_op_ListEulaAcceptances.go", - "api_op_ListEulas.go", - "api_op_ListLaunchProfileMembers.go", - "api_op_ListLaunchProfiles.go", - "api_op_ListStreamingImages.go", - "api_op_ListStreamingSessionBackups.go", - "api_op_ListStreamingSessions.go", - "api_op_ListStudioComponents.go", - "api_op_ListStudioMembers.go", - "api_op_ListStudios.go", - "api_op_ListTagsForResource.go", - "api_op_PutLaunchProfileMembers.go", - "api_op_PutStudioMembers.go", - "api_op_StartStreamingSession.go", - "api_op_StartStudioSSOConfigurationRepair.go", - "api_op_StopStreamingSession.go", - "api_op_TagResource.go", - "api_op_UntagResource.go", - "api_op_UpdateLaunchProfile.go", - "api_op_UpdateLaunchProfileMember.go", - "api_op_UpdateStreamingImage.go", - "api_op_UpdateStudio.go", - "api_op_UpdateStudioComponent.go", - "auth.go", - "deserializers.go", - "doc.go", - "endpoints.go", - "endpoints_config_test.go", - "endpoints_test.go", - "generated.json", - "internal/endpoints/endpoints.go", - "internal/endpoints/endpoints_test.go", - "options.go", - "protocol_test.go", - "serializers.go", - "snapshot_test.go", - "types/enums.go", - "types/errors.go", - "types/types.go", - "validators.go" - ], - "go": "1.15", - "module": "github.com/aws/aws-sdk-go-v2/service/nimble", - "unstable": false -} diff --git a/service/nimble/go.mod b/service/nimble/go.mod deleted file mode 100644 index 3104410b06c..00000000000 --- a/service/nimble/go.mod +++ /dev/null @@ -1,17 +0,0 @@ -module github.com/aws/aws-sdk-go-v2/service/nimble - -go 1.21 - -require ( - github.com/aws/aws-sdk-go-v2 v1.32.2 - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.21 - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.21 - github.com/aws/smithy-go v1.22.0 - github.com/jmespath/go-jmespath v0.4.0 -) - -replace github.com/aws/aws-sdk-go-v2 => ../../ - -replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../internal/configsources/ - -replace github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => ../../internal/endpoints/v2/ diff --git a/service/nimble/go.sum b/service/nimble/go.sum deleted file mode 100644 index 609e6296b2c..00000000000 --- a/service/nimble/go.sum +++ /dev/null @@ -1,14 +0,0 @@ -github.com/aws/smithy-go v1.22.0 h1:uunKnWlcoL3zO7q+gG2Pk53joueEOsnNB28QdMsmiMM= -github.com/aws/smithy-go v1.22.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/service/nimble/go_module_metadata.go b/service/nimble/go_module_metadata.go deleted file mode 100644 index d0d6f4ddb84..00000000000 --- a/service/nimble/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package nimble - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.29.0" diff --git a/service/nimble/internal/endpoints/endpoints.go b/service/nimble/internal/endpoints/endpoints.go deleted file mode 100644 index 7d3ed72d1d9..00000000000 --- a/service/nimble/internal/endpoints/endpoints.go +++ /dev/null @@ -1,296 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package endpoints - -import ( - "github.com/aws/aws-sdk-go-v2/aws" - endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" - "github.com/aws/smithy-go/logging" - "regexp" -) - -// Options is the endpoint resolver configuration options -type Options struct { - // Logger is a logging implementation that log events should be sent to. - Logger logging.Logger - - // LogDeprecated indicates that deprecated endpoints should be logged to the - // provided logger. - LogDeprecated bool - - // ResolvedRegion is used to override the region to be resolved, rather then the - // using the value passed to the ResolveEndpoint method. This value is used by the - // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative - // name. You must not set this value directly in your application. - ResolvedRegion string - - // DisableHTTPS informs the resolver to return an endpoint that does not use the - // HTTPS scheme. - DisableHTTPS bool - - // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. - UseDualStackEndpoint aws.DualStackEndpointState - - // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. - UseFIPSEndpoint aws.FIPSEndpointState -} - -func (o Options) GetResolvedRegion() string { - return o.ResolvedRegion -} - -func (o Options) GetDisableHTTPS() bool { - return o.DisableHTTPS -} - -func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { - return o.UseDualStackEndpoint -} - -func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { - return o.UseFIPSEndpoint -} - -func transformToSharedOptions(options Options) endpoints.Options { - return endpoints.Options{ - Logger: options.Logger, - LogDeprecated: options.LogDeprecated, - ResolvedRegion: options.ResolvedRegion, - DisableHTTPS: options.DisableHTTPS, - UseDualStackEndpoint: options.UseDualStackEndpoint, - UseFIPSEndpoint: options.UseFIPSEndpoint, - } -} - -// Resolver nimble endpoint resolver -type Resolver struct { - partitions endpoints.Partitions -} - -// ResolveEndpoint resolves the service endpoint for the given region and options -func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { - if len(region) == 0 { - return endpoint, &aws.MissingRegionError{} - } - - opt := transformToSharedOptions(options) - return r.partitions.ResolveEndpoint(region, opt) -} - -// New returns a new Resolver -func New() *Resolver { - return &Resolver{ - partitions: defaultPartitions, - } -} - -var partitionRegexp = struct { - Aws *regexp.Regexp - AwsCn *regexp.Regexp - AwsIso *regexp.Regexp - AwsIsoB *regexp.Regexp - AwsIsoE *regexp.Regexp - AwsIsoF *regexp.Regexp - AwsUsGov *regexp.Regexp -}{ - - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), - AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), - AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), - AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), - AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), - AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), - AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), -} - -var defaultPartitions = endpoints.Partitions{ - { - ID: "aws", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "nimble.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "nimble-fips.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "nimble-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "nimble.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.Aws, - IsRegionalized: true, - }, - { - ID: "aws-cn", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "nimble.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "nimble-fips.{region}.amazonaws.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "nimble-fips.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "nimble.{region}.amazonaws.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsCn, - IsRegionalized: true, - }, - { - ID: "aws-iso", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "nimble-fips.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "nimble.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIso, - IsRegionalized: true, - }, - { - ID: "aws-iso-b", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "nimble-fips.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "nimble.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoB, - IsRegionalized: true, - }, - { - ID: "aws-iso-e", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "nimble-fips.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "nimble.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoE, - IsRegionalized: true, - }, - { - ID: "aws-iso-f", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "nimble-fips.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "nimble.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoF, - IsRegionalized: true, - }, - { - ID: "aws-us-gov", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "nimble.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "nimble-fips.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "nimble-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "nimble.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsUsGov, - IsRegionalized: true, - }, -} diff --git a/service/nimble/internal/endpoints/endpoints_test.go b/service/nimble/internal/endpoints/endpoints_test.go deleted file mode 100644 index 08e5da2d833..00000000000 --- a/service/nimble/internal/endpoints/endpoints_test.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package endpoints - -import ( - "testing" -) - -func TestRegexCompile(t *testing.T) { - _ = defaultPartitions -} diff --git a/service/nimble/options.go b/service/nimble/options.go deleted file mode 100644 index 5a6c5ee77b2..00000000000 --- a/service/nimble/options.go +++ /dev/null @@ -1,236 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" -) - -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -type Options struct { - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - APIOptions []func(*middleware.Stack) error - - // The optional application specific identifier appended to the User-Agent header. - AppID string - - // This endpoint will be given as input to an EndpointResolverV2. It is used for - // providing a custom base endpoint that is subject to modifications by the - // processing EndpointResolverV2. - BaseEndpoint *string - - // Configures the events that will be sent to the configured logger. - ClientLogMode aws.ClientLogMode - - // The credentials object to use when signing requests. - Credentials aws.CredentialsProvider - - // The configuration DefaultsMode that the SDK should use when constructing the - // clients initial default settings. - DefaultsMode aws.DefaultsMode - - // The endpoint options to be used when attempting to resolve an endpoint. - EndpointOptions EndpointResolverOptions - - // The service endpoint resolver. - // - // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a - // value for this field will likely prevent you from using any endpoint-related - // service features released after the introduction of EndpointResolverV2 and - // BaseEndpoint. - // - // To migrate an EndpointResolver implementation that uses a custom endpoint, set - // the client option BaseEndpoint instead. - EndpointResolver EndpointResolver - - // Resolves the endpoint used for a particular service operation. This should be - // used over the deprecated EndpointResolver. - EndpointResolverV2 EndpointResolverV2 - - // Signature Version 4 (SigV4) Signer - HTTPSignerV4 HTTPSignerV4 - - // Provides idempotency tokens values that will be automatically populated into - // idempotent API operations. - IdempotencyTokenProvider IdempotencyTokenProvider - - // The logger writer interface to write logging messages to. - Logger logging.Logger - - // The client meter provider. - MeterProvider metrics.MeterProvider - - // The region to send requests to. (Required) - Region string - - // RetryMaxAttempts specifies the maximum number attempts an API client will call - // an operation that fails with a retryable error. A value of 0 is ignored, and - // will not be used to configure the API client created default retryer, or modify - // per operation call's retry max attempts. - // - // If specified in an operation call's functional options with a value that is - // different than the constructed client's Options, the Client's Retryer will be - // wrapped to use the operation's specific RetryMaxAttempts value. - RetryMaxAttempts int - - // RetryMode specifies the retry mode the API client will be created with, if - // Retryer option is not also specified. - // - // When creating a new API Clients this member will only be used if the Retryer - // Options member is nil. This value will be ignored if Retryer is not nil. - // - // Currently does not support per operation call overrides, may in the future. - RetryMode aws.RetryMode - - // Retryer guides how HTTP requests should be retried in case of recoverable - // failures. When nil the API client will use a default retryer. The kind of - // default retry created by the API client can be changed with the RetryMode - // option. - Retryer aws.Retryer - - // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set - // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You - // should not populate this structure programmatically, or rely on the values here - // within your applications. - RuntimeEnvironment aws.RuntimeEnvironment - - // The client tracer provider. - TracerProvider tracing.TracerProvider - - // The initial DefaultsMode used when the client options were constructed. If the - // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved - // value was at that point in time. - // - // Currently does not support per operation call overrides, may in the future. - resolvedDefaultsMode aws.DefaultsMode - - // The HTTP client to invoke API calls with. Defaults to client's default HTTP - // implementation if nil. - HTTPClient HTTPClient - - // The auth scheme resolver which determines how to authenticate for each - // operation. - AuthSchemeResolver AuthSchemeResolver - - // The list of auth schemes supported by the client. - AuthSchemes []smithyhttp.AuthScheme -} - -// Copy creates a clone where the APIOptions list is deep copied. -func (o Options) Copy() Options { - to := o - to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) - copy(to.APIOptions, o.APIOptions) - - return to -} - -func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { - if schemeID == "aws.auth#sigv4" { - return getSigV4IdentityResolver(o) - } - if schemeID == "smithy.api#noAuth" { - return &smithyauth.AnonymousIdentityResolver{} - } - return nil -} - -// WithAPIOptions returns a functional option for setting the Client's APIOptions -// option. -func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { - return func(o *Options) { - o.APIOptions = append(o.APIOptions, optFns...) - } -} - -// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for -// this field will likely prevent you from using any endpoint-related service -// features released after the introduction of EndpointResolverV2 and BaseEndpoint. -// -// To migrate an EndpointResolver implementation that uses a custom endpoint, set -// the client option BaseEndpoint instead. -func WithEndpointResolver(v EndpointResolver) func(*Options) { - return func(o *Options) { - o.EndpointResolver = v - } -} - -// WithEndpointResolverV2 returns a functional option for setting the Client's -// EndpointResolverV2 option. -func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { - return func(o *Options) { - o.EndpointResolverV2 = v - } -} - -func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { - if o.Credentials != nil { - return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} - } - return nil -} - -// WithSigV4SigningName applies an override to the authentication workflow to -// use the given signing name for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing name from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningName(name string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), - middleware.Before, - ) - }) - } -} - -// WithSigV4SigningRegion applies an override to the authentication workflow to -// use the given signing region for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing region from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningRegion(region string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), - middleware.Before, - ) - }) - } -} - -func ignoreAnonymousAuth(options *Options) { - if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { - options.Credentials = nil - } -} diff --git a/service/nimble/protocol_test.go b/service/nimble/protocol_test.go deleted file mode 100644 index 089be55ac98..00000000000 --- a/service/nimble/protocol_test.go +++ /dev/null @@ -1,3 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble diff --git a/service/nimble/serializers.go b/service/nimble/serializers.go deleted file mode 100644 index 3213c756009..00000000000 --- a/service/nimble/serializers.go +++ /dev/null @@ -1,5190 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "bytes" - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/encoding/httpbinding" - smithyjson "github.com/aws/smithy-go/encoding/json" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -type awsRestjson1_serializeOpAcceptEulas struct { -} - -func (*awsRestjson1_serializeOpAcceptEulas) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpAcceptEulas) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*AcceptEulasInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/eula-acceptances") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsAcceptEulasInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentAcceptEulasInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsAcceptEulasInput(v *AcceptEulasInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentAcceptEulasInput(v *AcceptEulasInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.EulaIds != nil { - ok := object.Key("eulaIds") - if err := awsRestjson1_serializeDocumentEulaIdList(v.EulaIds, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpCreateLaunchProfile struct { -} - -func (*awsRestjson1_serializeOpCreateLaunchProfile) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpCreateLaunchProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*CreateLaunchProfileInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/launch-profiles") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsCreateLaunchProfileInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateLaunchProfileInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsCreateLaunchProfileInput(v *CreateLaunchProfileInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentCreateLaunchProfileInput(v *CreateLaunchProfileInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Description != nil { - ok := object.Key("description") - ok.String(*v.Description) - } - - if v.Ec2SubnetIds != nil { - ok := object.Key("ec2SubnetIds") - if err := awsRestjson1_serializeDocumentEC2SubnetIdList(v.Ec2SubnetIds, ok); err != nil { - return err - } - } - - if v.LaunchProfileProtocolVersions != nil { - ok := object.Key("launchProfileProtocolVersions") - if err := awsRestjson1_serializeDocumentLaunchProfileProtocolVersionList(v.LaunchProfileProtocolVersions, ok); err != nil { - return err - } - } - - if v.Name != nil { - ok := object.Key("name") - ok.String(*v.Name) - } - - if v.StreamConfiguration != nil { - ok := object.Key("streamConfiguration") - if err := awsRestjson1_serializeDocumentStreamConfigurationCreate(v.StreamConfiguration, ok); err != nil { - return err - } - } - - if v.StudioComponentIds != nil { - ok := object.Key("studioComponentIds") - if err := awsRestjson1_serializeDocumentLaunchProfileStudioComponentIdList(v.StudioComponentIds, ok); err != nil { - return err - } - } - - if v.Tags != nil { - ok := object.Key("tags") - if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpCreateStreamingImage struct { -} - -func (*awsRestjson1_serializeOpCreateStreamingImage) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpCreateStreamingImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*CreateStreamingImageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/streaming-images") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsCreateStreamingImageInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateStreamingImageInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsCreateStreamingImageInput(v *CreateStreamingImageInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentCreateStreamingImageInput(v *CreateStreamingImageInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Description != nil { - ok := object.Key("description") - ok.String(*v.Description) - } - - if v.Ec2ImageId != nil { - ok := object.Key("ec2ImageId") - ok.String(*v.Ec2ImageId) - } - - if v.Name != nil { - ok := object.Key("name") - ok.String(*v.Name) - } - - if v.Tags != nil { - ok := object.Key("tags") - if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpCreateStreamingSession struct { -} - -func (*awsRestjson1_serializeOpCreateStreamingSession) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpCreateStreamingSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*CreateStreamingSessionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/streaming-sessions") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsCreateStreamingSessionInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateStreamingSessionInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsCreateStreamingSessionInput(v *CreateStreamingSessionInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentCreateStreamingSessionInput(v *CreateStreamingSessionInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.Ec2InstanceType) > 0 { - ok := object.Key("ec2InstanceType") - ok.String(string(v.Ec2InstanceType)) - } - - if v.LaunchProfileId != nil { - ok := object.Key("launchProfileId") - ok.String(*v.LaunchProfileId) - } - - if v.OwnedBy != nil { - ok := object.Key("ownedBy") - ok.String(*v.OwnedBy) - } - - if v.StreamingImageId != nil { - ok := object.Key("streamingImageId") - ok.String(*v.StreamingImageId) - } - - if v.Tags != nil { - ok := object.Key("tags") - if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpCreateStreamingSessionStream struct { -} - -func (*awsRestjson1_serializeOpCreateStreamingSessionStream) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpCreateStreamingSessionStream) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*CreateStreamingSessionStreamInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/streaming-sessions/{sessionId}/streams") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsCreateStreamingSessionStreamInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateStreamingSessionStreamInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsCreateStreamingSessionStreamInput(v *CreateStreamingSessionStreamInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.SessionId == nil || len(*v.SessionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member sessionId must not be empty")} - } - if v.SessionId != nil { - if err := encoder.SetURI("sessionId").String(*v.SessionId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentCreateStreamingSessionStreamInput(v *CreateStreamingSessionStreamInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ExpirationInSeconds != nil { - ok := object.Key("expirationInSeconds") - ok.Integer(*v.ExpirationInSeconds) - } - - return nil -} - -type awsRestjson1_serializeOpCreateStudio struct { -} - -func (*awsRestjson1_serializeOpCreateStudio) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpCreateStudio) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*CreateStudioInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsCreateStudioInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateStudioInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsCreateStudioInput(v *CreateStudioInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentCreateStudioInput(v *CreateStudioInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AdminRoleArn != nil { - ok := object.Key("adminRoleArn") - ok.String(*v.AdminRoleArn) - } - - if v.DisplayName != nil { - ok := object.Key("displayName") - ok.String(*v.DisplayName) - } - - if v.StudioEncryptionConfiguration != nil { - ok := object.Key("studioEncryptionConfiguration") - if err := awsRestjson1_serializeDocumentStudioEncryptionConfiguration(v.StudioEncryptionConfiguration, ok); err != nil { - return err - } - } - - if v.StudioName != nil { - ok := object.Key("studioName") - ok.String(*v.StudioName) - } - - if v.Tags != nil { - ok := object.Key("tags") - if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { - return err - } - } - - if v.UserRoleArn != nil { - ok := object.Key("userRoleArn") - ok.String(*v.UserRoleArn) - } - - return nil -} - -type awsRestjson1_serializeOpCreateStudioComponent struct { -} - -func (*awsRestjson1_serializeOpCreateStudioComponent) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpCreateStudioComponent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*CreateStudioComponentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/studio-components") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsCreateStudioComponentInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateStudioComponentInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsCreateStudioComponentInput(v *CreateStudioComponentInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentCreateStudioComponentInput(v *CreateStudioComponentInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Configuration != nil { - ok := object.Key("configuration") - if err := awsRestjson1_serializeDocumentStudioComponentConfiguration(v.Configuration, ok); err != nil { - return err - } - } - - if v.Description != nil { - ok := object.Key("description") - ok.String(*v.Description) - } - - if v.Ec2SecurityGroupIds != nil { - ok := object.Key("ec2SecurityGroupIds") - if err := awsRestjson1_serializeDocumentStudioComponentSecurityGroupIdList(v.Ec2SecurityGroupIds, ok); err != nil { - return err - } - } - - if v.InitializationScripts != nil { - ok := object.Key("initializationScripts") - if err := awsRestjson1_serializeDocumentStudioComponentInitializationScriptList(v.InitializationScripts, ok); err != nil { - return err - } - } - - if v.Name != nil { - ok := object.Key("name") - ok.String(*v.Name) - } - - if v.RuntimeRoleArn != nil { - ok := object.Key("runtimeRoleArn") - ok.String(*v.RuntimeRoleArn) - } - - if v.ScriptParameters != nil { - ok := object.Key("scriptParameters") - if err := awsRestjson1_serializeDocumentStudioComponentScriptParameterKeyValueList(v.ScriptParameters, ok); err != nil { - return err - } - } - - if v.SecureInitializationRoleArn != nil { - ok := object.Key("secureInitializationRoleArn") - ok.String(*v.SecureInitializationRoleArn) - } - - if len(v.Subtype) > 0 { - ok := object.Key("subtype") - ok.String(string(v.Subtype)) - } - - if v.Tags != nil { - ok := object.Key("tags") - if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { - return err - } - } - - if len(v.Type) > 0 { - ok := object.Key("type") - ok.String(string(v.Type)) - } - - return nil -} - -type awsRestjson1_serializeOpDeleteLaunchProfile struct { -} - -func (*awsRestjson1_serializeOpDeleteLaunchProfile) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDeleteLaunchProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*DeleteLaunchProfileInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDeleteLaunchProfileInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDeleteLaunchProfileInput(v *DeleteLaunchProfileInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.LaunchProfileId == nil || len(*v.LaunchProfileId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member launchProfileId must not be empty")} - } - if v.LaunchProfileId != nil { - if err := encoder.SetURI("launchProfileId").String(*v.LaunchProfileId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDeleteLaunchProfileMember struct { -} - -func (*awsRestjson1_serializeOpDeleteLaunchProfileMember) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDeleteLaunchProfileMember) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*DeleteLaunchProfileMemberInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/membership/{principalId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDeleteLaunchProfileMemberInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDeleteLaunchProfileMemberInput(v *DeleteLaunchProfileMemberInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.LaunchProfileId == nil || len(*v.LaunchProfileId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member launchProfileId must not be empty")} - } - if v.LaunchProfileId != nil { - if err := encoder.SetURI("launchProfileId").String(*v.LaunchProfileId); err != nil { - return err - } - } - - if v.PrincipalId == nil || len(*v.PrincipalId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member principalId must not be empty")} - } - if v.PrincipalId != nil { - if err := encoder.SetURI("principalId").String(*v.PrincipalId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDeleteStreamingImage struct { -} - -func (*awsRestjson1_serializeOpDeleteStreamingImage) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDeleteStreamingImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*DeleteStreamingImageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/streaming-images/{streamingImageId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDeleteStreamingImageInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDeleteStreamingImageInput(v *DeleteStreamingImageInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.StreamingImageId == nil || len(*v.StreamingImageId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member streamingImageId must not be empty")} - } - if v.StreamingImageId != nil { - if err := encoder.SetURI("streamingImageId").String(*v.StreamingImageId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDeleteStreamingSession struct { -} - -func (*awsRestjson1_serializeOpDeleteStreamingSession) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDeleteStreamingSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*DeleteStreamingSessionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/streaming-sessions/{sessionId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDeleteStreamingSessionInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDeleteStreamingSessionInput(v *DeleteStreamingSessionInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.SessionId == nil || len(*v.SessionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member sessionId must not be empty")} - } - if v.SessionId != nil { - if err := encoder.SetURI("sessionId").String(*v.SessionId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDeleteStudio struct { -} - -func (*awsRestjson1_serializeOpDeleteStudio) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDeleteStudio) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*DeleteStudioInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDeleteStudioInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDeleteStudioInput(v *DeleteStudioInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDeleteStudioComponent struct { -} - -func (*awsRestjson1_serializeOpDeleteStudioComponent) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDeleteStudioComponent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*DeleteStudioComponentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/studio-components/{studioComponentId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDeleteStudioComponentInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDeleteStudioComponentInput(v *DeleteStudioComponentInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.StudioComponentId == nil || len(*v.StudioComponentId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioComponentId must not be empty")} - } - if v.StudioComponentId != nil { - if err := encoder.SetURI("studioComponentId").String(*v.StudioComponentId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDeleteStudioMember struct { -} - -func (*awsRestjson1_serializeOpDeleteStudioMember) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDeleteStudioMember) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*DeleteStudioMemberInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/membership/{principalId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDeleteStudioMemberInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDeleteStudioMemberInput(v *DeleteStudioMemberInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.PrincipalId == nil || len(*v.PrincipalId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member principalId must not be empty")} - } - if v.PrincipalId != nil { - if err := encoder.SetURI("principalId").String(*v.PrincipalId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetEula struct { -} - -func (*awsRestjson1_serializeOpGetEula) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetEula) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*GetEulaInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/eulas/{eulaId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetEulaInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetEulaInput(v *GetEulaInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.EulaId == nil || len(*v.EulaId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member eulaId must not be empty")} - } - if v.EulaId != nil { - if err := encoder.SetURI("eulaId").String(*v.EulaId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetLaunchProfile struct { -} - -func (*awsRestjson1_serializeOpGetLaunchProfile) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetLaunchProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*GetLaunchProfileInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetLaunchProfileInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetLaunchProfileInput(v *GetLaunchProfileInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.LaunchProfileId == nil || len(*v.LaunchProfileId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member launchProfileId must not be empty")} - } - if v.LaunchProfileId != nil { - if err := encoder.SetURI("launchProfileId").String(*v.LaunchProfileId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetLaunchProfileDetails struct { -} - -func (*awsRestjson1_serializeOpGetLaunchProfileDetails) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetLaunchProfileDetails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*GetLaunchProfileDetailsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/details") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetLaunchProfileDetailsInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetLaunchProfileDetailsInput(v *GetLaunchProfileDetailsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.LaunchProfileId == nil || len(*v.LaunchProfileId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member launchProfileId must not be empty")} - } - if v.LaunchProfileId != nil { - if err := encoder.SetURI("launchProfileId").String(*v.LaunchProfileId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetLaunchProfileInitialization struct { -} - -func (*awsRestjson1_serializeOpGetLaunchProfileInitialization) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetLaunchProfileInitialization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*GetLaunchProfileInitializationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/init") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetLaunchProfileInitializationInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetLaunchProfileInitializationInput(v *GetLaunchProfileInitializationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.LaunchProfileId == nil || len(*v.LaunchProfileId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member launchProfileId must not be empty")} - } - if v.LaunchProfileId != nil { - if err := encoder.SetURI("launchProfileId").String(*v.LaunchProfileId); err != nil { - return err - } - } - - if v.LaunchProfileProtocolVersions != nil { - for i := range v.LaunchProfileProtocolVersions { - encoder.AddQuery("launchProfileProtocolVersions").String(v.LaunchProfileProtocolVersions[i]) - } - } - - if v.LaunchPurpose != nil { - encoder.SetQuery("launchPurpose").String(*v.LaunchPurpose) - } - - if v.Platform != nil { - encoder.SetQuery("platform").String(*v.Platform) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetLaunchProfileMember struct { -} - -func (*awsRestjson1_serializeOpGetLaunchProfileMember) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetLaunchProfileMember) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*GetLaunchProfileMemberInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/membership/{principalId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetLaunchProfileMemberInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetLaunchProfileMemberInput(v *GetLaunchProfileMemberInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.LaunchProfileId == nil || len(*v.LaunchProfileId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member launchProfileId must not be empty")} - } - if v.LaunchProfileId != nil { - if err := encoder.SetURI("launchProfileId").String(*v.LaunchProfileId); err != nil { - return err - } - } - - if v.PrincipalId == nil || len(*v.PrincipalId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member principalId must not be empty")} - } - if v.PrincipalId != nil { - if err := encoder.SetURI("principalId").String(*v.PrincipalId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetStreamingImage struct { -} - -func (*awsRestjson1_serializeOpGetStreamingImage) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetStreamingImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*GetStreamingImageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/streaming-images/{streamingImageId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetStreamingImageInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetStreamingImageInput(v *GetStreamingImageInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.StreamingImageId == nil || len(*v.StreamingImageId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member streamingImageId must not be empty")} - } - if v.StreamingImageId != nil { - if err := encoder.SetURI("streamingImageId").String(*v.StreamingImageId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetStreamingSession struct { -} - -func (*awsRestjson1_serializeOpGetStreamingSession) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetStreamingSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*GetStreamingSessionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/streaming-sessions/{sessionId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetStreamingSessionInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetStreamingSessionInput(v *GetStreamingSessionInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.SessionId == nil || len(*v.SessionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member sessionId must not be empty")} - } - if v.SessionId != nil { - if err := encoder.SetURI("sessionId").String(*v.SessionId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetStreamingSessionBackup struct { -} - -func (*awsRestjson1_serializeOpGetStreamingSessionBackup) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetStreamingSessionBackup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*GetStreamingSessionBackupInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/streaming-session-backups/{backupId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetStreamingSessionBackupInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetStreamingSessionBackupInput(v *GetStreamingSessionBackupInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.BackupId == nil || len(*v.BackupId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member backupId must not be empty")} - } - if v.BackupId != nil { - if err := encoder.SetURI("backupId").String(*v.BackupId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetStreamingSessionStream struct { -} - -func (*awsRestjson1_serializeOpGetStreamingSessionStream) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetStreamingSessionStream) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*GetStreamingSessionStreamInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/streaming-sessions/{sessionId}/streams/{streamId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetStreamingSessionStreamInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetStreamingSessionStreamInput(v *GetStreamingSessionStreamInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.SessionId == nil || len(*v.SessionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member sessionId must not be empty")} - } - if v.SessionId != nil { - if err := encoder.SetURI("sessionId").String(*v.SessionId); err != nil { - return err - } - } - - if v.StreamId == nil || len(*v.StreamId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member streamId must not be empty")} - } - if v.StreamId != nil { - if err := encoder.SetURI("streamId").String(*v.StreamId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetStudio struct { -} - -func (*awsRestjson1_serializeOpGetStudio) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetStudio) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*GetStudioInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetStudioInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetStudioInput(v *GetStudioInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetStudioComponent struct { -} - -func (*awsRestjson1_serializeOpGetStudioComponent) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetStudioComponent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*GetStudioComponentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/studio-components/{studioComponentId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetStudioComponentInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetStudioComponentInput(v *GetStudioComponentInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.StudioComponentId == nil || len(*v.StudioComponentId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioComponentId must not be empty")} - } - if v.StudioComponentId != nil { - if err := encoder.SetURI("studioComponentId").String(*v.StudioComponentId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetStudioMember struct { -} - -func (*awsRestjson1_serializeOpGetStudioMember) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetStudioMember) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*GetStudioMemberInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/membership/{principalId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetStudioMemberInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetStudioMemberInput(v *GetStudioMemberInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.PrincipalId == nil || len(*v.PrincipalId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member principalId must not be empty")} - } - if v.PrincipalId != nil { - if err := encoder.SetURI("principalId").String(*v.PrincipalId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListEulaAcceptances struct { -} - -func (*awsRestjson1_serializeOpListEulaAcceptances) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListEulaAcceptances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*ListEulaAcceptancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/eula-acceptances") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListEulaAcceptancesInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListEulaAcceptancesInput(v *ListEulaAcceptancesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.EulaIds != nil { - for i := range v.EulaIds { - encoder.AddQuery("eulaIds").String(v.EulaIds[i]) - } - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListEulas struct { -} - -func (*awsRestjson1_serializeOpListEulas) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListEulas) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*ListEulasInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/eulas") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListEulasInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListEulasInput(v *ListEulasInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.EulaIds != nil { - for i := range v.EulaIds { - encoder.AddQuery("eulaIds").String(v.EulaIds[i]) - } - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListLaunchProfileMembers struct { -} - -func (*awsRestjson1_serializeOpListLaunchProfileMembers) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListLaunchProfileMembers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*ListLaunchProfileMembersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/membership") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListLaunchProfileMembersInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListLaunchProfileMembersInput(v *ListLaunchProfileMembersInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.LaunchProfileId == nil || len(*v.LaunchProfileId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member launchProfileId must not be empty")} - } - if v.LaunchProfileId != nil { - if err := encoder.SetURI("launchProfileId").String(*v.LaunchProfileId); err != nil { - return err - } - } - - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListLaunchProfiles struct { -} - -func (*awsRestjson1_serializeOpListLaunchProfiles) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListLaunchProfiles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*ListLaunchProfilesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/launch-profiles") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListLaunchProfilesInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListLaunchProfilesInput(v *ListLaunchProfilesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - - if v.PrincipalId != nil { - encoder.SetQuery("principalId").String(*v.PrincipalId) - } - - if v.States != nil { - for i := range v.States { - encoder.AddQuery("states").String(string(v.States[i])) - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListStreamingImages struct { -} - -func (*awsRestjson1_serializeOpListStreamingImages) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListStreamingImages) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*ListStreamingImagesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/streaming-images") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListStreamingImagesInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListStreamingImagesInput(v *ListStreamingImagesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - - if v.Owner != nil { - encoder.SetQuery("owner").String(*v.Owner) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListStreamingSessionBackups struct { -} - -func (*awsRestjson1_serializeOpListStreamingSessionBackups) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListStreamingSessionBackups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*ListStreamingSessionBackupsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/streaming-session-backups") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListStreamingSessionBackupsInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListStreamingSessionBackupsInput(v *ListStreamingSessionBackupsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - - if v.OwnedBy != nil { - encoder.SetQuery("ownedBy").String(*v.OwnedBy) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListStreamingSessions struct { -} - -func (*awsRestjson1_serializeOpListStreamingSessions) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListStreamingSessions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*ListStreamingSessionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/streaming-sessions") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListStreamingSessionsInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListStreamingSessionsInput(v *ListStreamingSessionsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.CreatedBy != nil { - encoder.SetQuery("createdBy").String(*v.CreatedBy) - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - - if v.OwnedBy != nil { - encoder.SetQuery("ownedBy").String(*v.OwnedBy) - } - - if v.SessionIds != nil { - encoder.SetQuery("sessionIds").String(*v.SessionIds) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListStudioComponents struct { -} - -func (*awsRestjson1_serializeOpListStudioComponents) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListStudioComponents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*ListStudioComponentsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/studio-components") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListStudioComponentsInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListStudioComponentsInput(v *ListStudioComponentsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - - if v.States != nil { - for i := range v.States { - encoder.AddQuery("states").String(string(v.States[i])) - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - if v.Types != nil { - for i := range v.Types { - encoder.AddQuery("types").String(string(v.Types[i])) - } - } - - return nil -} - -type awsRestjson1_serializeOpListStudioMembers struct { -} - -func (*awsRestjson1_serializeOpListStudioMembers) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListStudioMembers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*ListStudioMembersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/membership") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListStudioMembersInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListStudioMembersInput(v *ListStudioMembersInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListStudios struct { -} - -func (*awsRestjson1_serializeOpListStudios) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListStudios) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*ListStudiosInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListStudiosInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListStudiosInput(v *ListStudiosInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListTagsForResource struct { -} - -func (*awsRestjson1_serializeOpListTagsForResource) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*ListTagsForResourceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/tags/{resourceArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} - } - if v.ResourceArn != nil { - if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpPutLaunchProfileMembers struct { -} - -func (*awsRestjson1_serializeOpPutLaunchProfileMembers) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpPutLaunchProfileMembers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*PutLaunchProfileMembersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/membership") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsPutLaunchProfileMembersInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutLaunchProfileMembersInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsPutLaunchProfileMembersInput(v *PutLaunchProfileMembersInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.LaunchProfileId == nil || len(*v.LaunchProfileId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member launchProfileId must not be empty")} - } - if v.LaunchProfileId != nil { - if err := encoder.SetURI("launchProfileId").String(*v.LaunchProfileId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutLaunchProfileMembersInput(v *PutLaunchProfileMembersInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.IdentityStoreId != nil { - ok := object.Key("identityStoreId") - ok.String(*v.IdentityStoreId) - } - - if v.Members != nil { - ok := object.Key("members") - if err := awsRestjson1_serializeDocumentNewLaunchProfileMemberList(v.Members, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpPutStudioMembers struct { -} - -func (*awsRestjson1_serializeOpPutStudioMembers) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpPutStudioMembers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*PutStudioMembersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/membership") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsPutStudioMembersInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutStudioMembersInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsPutStudioMembersInput(v *PutStudioMembersInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutStudioMembersInput(v *PutStudioMembersInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.IdentityStoreId != nil { - ok := object.Key("identityStoreId") - ok.String(*v.IdentityStoreId) - } - - if v.Members != nil { - ok := object.Key("members") - if err := awsRestjson1_serializeDocumentNewStudioMemberList(v.Members, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpStartStreamingSession struct { -} - -func (*awsRestjson1_serializeOpStartStreamingSession) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpStartStreamingSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*StartStreamingSessionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/streaming-sessions/{sessionId}/start") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsStartStreamingSessionInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentStartStreamingSessionInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsStartStreamingSessionInput(v *StartStreamingSessionInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.SessionId == nil || len(*v.SessionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member sessionId must not be empty")} - } - if v.SessionId != nil { - if err := encoder.SetURI("sessionId").String(*v.SessionId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentStartStreamingSessionInput(v *StartStreamingSessionInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.BackupId != nil { - ok := object.Key("backupId") - ok.String(*v.BackupId) - } - - return nil -} - -type awsRestjson1_serializeOpStartStudioSSOConfigurationRepair struct { -} - -func (*awsRestjson1_serializeOpStartStudioSSOConfigurationRepair) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpStartStudioSSOConfigurationRepair) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*StartStudioSSOConfigurationRepairInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/sso-configuration") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsStartStudioSSOConfigurationRepairInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsStartStudioSSOConfigurationRepairInput(v *StartStudioSSOConfigurationRepairInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpStopStreamingSession struct { -} - -func (*awsRestjson1_serializeOpStopStreamingSession) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpStopStreamingSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*StopStreamingSessionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/streaming-sessions/{sessionId}/stop") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsStopStreamingSessionInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentStopStreamingSessionInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsStopStreamingSessionInput(v *StopStreamingSessionInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.SessionId == nil || len(*v.SessionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member sessionId must not be empty")} - } - if v.SessionId != nil { - if err := encoder.SetURI("sessionId").String(*v.SessionId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentStopStreamingSessionInput(v *StopStreamingSessionInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.VolumeRetentionMode) > 0 { - ok := object.Key("volumeRetentionMode") - ok.String(string(v.VolumeRetentionMode)) - } - - return nil -} - -type awsRestjson1_serializeOpTagResource struct { -} - -func (*awsRestjson1_serializeOpTagResource) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*TagResourceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/tags/{resourceArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentTagResourceInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} - } - if v.ResourceArn != nil { - if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Tags != nil { - ok := object.Key("tags") - if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpUntagResource struct { -} - -func (*awsRestjson1_serializeOpUntagResource) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*UntagResourceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/tags/{resourceArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); 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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} - } - if v.ResourceArn != nil { - if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { - return err - } - } - - if v.TagKeys != nil { - for i := range v.TagKeys { - encoder.AddQuery("tagKeys").String(v.TagKeys[i]) - } - } - - return nil -} - -type awsRestjson1_serializeOpUpdateLaunchProfile struct { -} - -func (*awsRestjson1_serializeOpUpdateLaunchProfile) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateLaunchProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*UpdateLaunchProfileInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PATCH" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateLaunchProfileInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateLaunchProfileInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateLaunchProfileInput(v *UpdateLaunchProfileInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.LaunchProfileId == nil || len(*v.LaunchProfileId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member launchProfileId must not be empty")} - } - if v.LaunchProfileId != nil { - if err := encoder.SetURI("launchProfileId").String(*v.LaunchProfileId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateLaunchProfileInput(v *UpdateLaunchProfileInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Description != nil { - ok := object.Key("description") - ok.String(*v.Description) - } - - if v.LaunchProfileProtocolVersions != nil { - ok := object.Key("launchProfileProtocolVersions") - if err := awsRestjson1_serializeDocumentLaunchProfileProtocolVersionList(v.LaunchProfileProtocolVersions, ok); err != nil { - return err - } - } - - if v.Name != nil { - ok := object.Key("name") - ok.String(*v.Name) - } - - if v.StreamConfiguration != nil { - ok := object.Key("streamConfiguration") - if err := awsRestjson1_serializeDocumentStreamConfigurationCreate(v.StreamConfiguration, ok); err != nil { - return err - } - } - - if v.StudioComponentIds != nil { - ok := object.Key("studioComponentIds") - if err := awsRestjson1_serializeDocumentLaunchProfileStudioComponentIdList(v.StudioComponentIds, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpUpdateLaunchProfileMember struct { -} - -func (*awsRestjson1_serializeOpUpdateLaunchProfileMember) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateLaunchProfileMember) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*UpdateLaunchProfileMemberInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/launch-profiles/{launchProfileId}/membership/{principalId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PATCH" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateLaunchProfileMemberInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateLaunchProfileMemberInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateLaunchProfileMemberInput(v *UpdateLaunchProfileMemberInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.LaunchProfileId == nil || len(*v.LaunchProfileId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member launchProfileId must not be empty")} - } - if v.LaunchProfileId != nil { - if err := encoder.SetURI("launchProfileId").String(*v.LaunchProfileId); err != nil { - return err - } - } - - if v.PrincipalId == nil || len(*v.PrincipalId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member principalId must not be empty")} - } - if v.PrincipalId != nil { - if err := encoder.SetURI("principalId").String(*v.PrincipalId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateLaunchProfileMemberInput(v *UpdateLaunchProfileMemberInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.Persona) > 0 { - ok := object.Key("persona") - ok.String(string(v.Persona)) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateStreamingImage struct { -} - -func (*awsRestjson1_serializeOpUpdateStreamingImage) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateStreamingImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*UpdateStreamingImageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/streaming-images/{streamingImageId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PATCH" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateStreamingImageInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateStreamingImageInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateStreamingImageInput(v *UpdateStreamingImageInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.StreamingImageId == nil || len(*v.StreamingImageId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member streamingImageId must not be empty")} - } - if v.StreamingImageId != nil { - if err := encoder.SetURI("streamingImageId").String(*v.StreamingImageId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateStreamingImageInput(v *UpdateStreamingImageInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Description != nil { - ok := object.Key("description") - ok.String(*v.Description) - } - - if v.Name != nil { - ok := object.Key("name") - ok.String(*v.Name) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateStudio struct { -} - -func (*awsRestjson1_serializeOpUpdateStudio) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateStudio) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*UpdateStudioInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PATCH" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateStudioInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateStudioInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateStudioInput(v *UpdateStudioInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateStudioInput(v *UpdateStudioInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AdminRoleArn != nil { - ok := object.Key("adminRoleArn") - ok.String(*v.AdminRoleArn) - } - - if v.DisplayName != nil { - ok := object.Key("displayName") - ok.String(*v.DisplayName) - } - - if v.UserRoleArn != nil { - ok := object.Key("userRoleArn") - ok.String(*v.UserRoleArn) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateStudioComponent struct { -} - -func (*awsRestjson1_serializeOpUpdateStudioComponent) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateStudioComponent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - 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.(*UpdateStudioComponentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2020-08-01/studios/{studioId}/studio-components/{studioComponentId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PATCH" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateStudioComponentInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateStudioComponentInput(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 - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateStudioComponentInput(v *UpdateStudioComponentInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ClientToken != nil { - locationName := "X-Amz-Client-Token" - encoder.SetHeader(locationName).String(*v.ClientToken) - } - - if v.StudioComponentId == nil || len(*v.StudioComponentId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioComponentId must not be empty")} - } - if v.StudioComponentId != nil { - if err := encoder.SetURI("studioComponentId").String(*v.StudioComponentId); err != nil { - return err - } - } - - if v.StudioId == nil || len(*v.StudioId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member studioId must not be empty")} - } - if v.StudioId != nil { - if err := encoder.SetURI("studioId").String(*v.StudioId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateStudioComponentInput(v *UpdateStudioComponentInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Configuration != nil { - ok := object.Key("configuration") - if err := awsRestjson1_serializeDocumentStudioComponentConfiguration(v.Configuration, ok); err != nil { - return err - } - } - - if v.Description != nil { - ok := object.Key("description") - ok.String(*v.Description) - } - - if v.Ec2SecurityGroupIds != nil { - ok := object.Key("ec2SecurityGroupIds") - if err := awsRestjson1_serializeDocumentStudioComponentSecurityGroupIdList(v.Ec2SecurityGroupIds, ok); err != nil { - return err - } - } - - if v.InitializationScripts != nil { - ok := object.Key("initializationScripts") - if err := awsRestjson1_serializeDocumentStudioComponentInitializationScriptList(v.InitializationScripts, ok); err != nil { - return err - } - } - - if v.Name != nil { - ok := object.Key("name") - ok.String(*v.Name) - } - - if v.RuntimeRoleArn != nil { - ok := object.Key("runtimeRoleArn") - ok.String(*v.RuntimeRoleArn) - } - - if v.ScriptParameters != nil { - ok := object.Key("scriptParameters") - if err := awsRestjson1_serializeDocumentStudioComponentScriptParameterKeyValueList(v.ScriptParameters, ok); err != nil { - return err - } - } - - if v.SecureInitializationRoleArn != nil { - ok := object.Key("secureInitializationRoleArn") - ok.String(*v.SecureInitializationRoleArn) - } - - if len(v.Subtype) > 0 { - ok := object.Key("subtype") - ok.String(string(v.Subtype)) - } - - if len(v.Type) > 0 { - ok := object.Key("type") - ok.String(string(v.Type)) - } - - return nil -} - -func awsRestjson1_serializeDocumentActiveDirectoryComputerAttribute(v *types.ActiveDirectoryComputerAttribute, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Name != nil { - ok := object.Key("name") - ok.String(*v.Name) - } - - if v.Value != nil { - ok := object.Key("value") - ok.String(*v.Value) - } - - return nil -} - -func awsRestjson1_serializeDocumentActiveDirectoryComputerAttributeList(v []types.ActiveDirectoryComputerAttribute, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentActiveDirectoryComputerAttribute(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentActiveDirectoryConfiguration(v *types.ActiveDirectoryConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ComputerAttributes != nil { - ok := object.Key("computerAttributes") - if err := awsRestjson1_serializeDocumentActiveDirectoryComputerAttributeList(v.ComputerAttributes, ok); err != nil { - return err - } - } - - if v.DirectoryId != nil { - ok := object.Key("directoryId") - ok.String(*v.DirectoryId) - } - - if v.OrganizationalUnitDistinguishedName != nil { - ok := object.Key("organizationalUnitDistinguishedName") - ok.String(*v.OrganizationalUnitDistinguishedName) - } - - return nil -} - -func awsRestjson1_serializeDocumentComputeFarmConfiguration(v *types.ComputeFarmConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ActiveDirectoryUser != nil { - ok := object.Key("activeDirectoryUser") - ok.String(*v.ActiveDirectoryUser) - } - - if v.Endpoint != nil { - ok := object.Key("endpoint") - ok.String(*v.Endpoint) - } - - return nil -} - -func awsRestjson1_serializeDocumentEC2SubnetIdList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentEulaIdList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentLaunchProfileProtocolVersionList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentLaunchProfileStudioComponentIdList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentLicenseServiceConfiguration(v *types.LicenseServiceConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Endpoint != nil { - ok := object.Key("endpoint") - ok.String(*v.Endpoint) - } - - return nil -} - -func awsRestjson1_serializeDocumentNewLaunchProfileMember(v *types.NewLaunchProfileMember, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.Persona) > 0 { - ok := object.Key("persona") - ok.String(string(v.Persona)) - } - - if v.PrincipalId != nil { - ok := object.Key("principalId") - ok.String(*v.PrincipalId) - } - - return nil -} - -func awsRestjson1_serializeDocumentNewLaunchProfileMemberList(v []types.NewLaunchProfileMember, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentNewLaunchProfileMember(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentNewStudioMember(v *types.NewStudioMember, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.Persona) > 0 { - ok := object.Key("persona") - ok.String(string(v.Persona)) - } - - if v.PrincipalId != nil { - ok := object.Key("principalId") - ok.String(*v.PrincipalId) - } - - return nil -} - -func awsRestjson1_serializeDocumentNewStudioMemberList(v []types.NewStudioMember, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentNewStudioMember(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentScriptParameterKeyValue(v *types.ScriptParameterKeyValue, 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_serializeDocumentSharedFileSystemConfiguration(v *types.SharedFileSystemConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Endpoint != nil { - ok := object.Key("endpoint") - ok.String(*v.Endpoint) - } - - if v.FileSystemId != nil { - ok := object.Key("fileSystemId") - ok.String(*v.FileSystemId) - } - - if v.LinuxMountPoint != nil { - ok := object.Key("linuxMountPoint") - ok.String(*v.LinuxMountPoint) - } - - if v.ShareName != nil { - ok := object.Key("shareName") - ok.String(*v.ShareName) - } - - if v.WindowsMountDrive != nil { - ok := object.Key("windowsMountDrive") - ok.String(*v.WindowsMountDrive) - } - - return nil -} - -func awsRestjson1_serializeDocumentStreamConfigurationCreate(v *types.StreamConfigurationCreate, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.AutomaticTerminationMode) > 0 { - ok := object.Key("automaticTerminationMode") - ok.String(string(v.AutomaticTerminationMode)) - } - - if len(v.ClipboardMode) > 0 { - ok := object.Key("clipboardMode") - ok.String(string(v.ClipboardMode)) - } - - if v.Ec2InstanceTypes != nil { - ok := object.Key("ec2InstanceTypes") - if err := awsRestjson1_serializeDocumentStreamingInstanceTypeList(v.Ec2InstanceTypes, ok); err != nil { - return err - } - } - - if v.MaxSessionLengthInMinutes != nil { - ok := object.Key("maxSessionLengthInMinutes") - ok.Integer(*v.MaxSessionLengthInMinutes) - } - - if v.MaxStoppedSessionLengthInMinutes != 0 { - ok := object.Key("maxStoppedSessionLengthInMinutes") - ok.Integer(v.MaxStoppedSessionLengthInMinutes) - } - - if v.SessionBackup != nil { - ok := object.Key("sessionBackup") - if err := awsRestjson1_serializeDocumentStreamConfigurationSessionBackup(v.SessionBackup, ok); err != nil { - return err - } - } - - if len(v.SessionPersistenceMode) > 0 { - ok := object.Key("sessionPersistenceMode") - ok.String(string(v.SessionPersistenceMode)) - } - - if v.SessionStorage != nil { - ok := object.Key("sessionStorage") - if err := awsRestjson1_serializeDocumentStreamConfigurationSessionStorage(v.SessionStorage, ok); err != nil { - return err - } - } - - if v.StreamingImageIds != nil { - ok := object.Key("streamingImageIds") - if err := awsRestjson1_serializeDocumentStreamingImageIdList(v.StreamingImageIds, ok); err != nil { - return err - } - } - - if v.VolumeConfiguration != nil { - ok := object.Key("volumeConfiguration") - if err := awsRestjson1_serializeDocumentVolumeConfiguration(v.VolumeConfiguration, ok); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeDocumentStreamConfigurationSessionBackup(v *types.StreamConfigurationSessionBackup, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.MaxBackupsToRetain != 0 { - ok := object.Key("maxBackupsToRetain") - ok.Integer(v.MaxBackupsToRetain) - } - - if len(v.Mode) > 0 { - ok := object.Key("mode") - ok.String(string(v.Mode)) - } - - return nil -} - -func awsRestjson1_serializeDocumentStreamConfigurationSessionStorage(v *types.StreamConfigurationSessionStorage, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Mode != nil { - ok := object.Key("mode") - if err := awsRestjson1_serializeDocumentStreamingSessionStorageModeList(v.Mode, ok); err != nil { - return err - } - } - - if v.Root != nil { - ok := object.Key("root") - if err := awsRestjson1_serializeDocumentStreamingSessionStorageRoot(v.Root, ok); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeDocumentStreamingImageIdList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentStreamingInstanceTypeList(v []types.StreamingInstanceType, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsRestjson1_serializeDocumentStreamingSessionStorageModeList(v []types.StreamingSessionStorageMode, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsRestjson1_serializeDocumentStreamingSessionStorageRoot(v *types.StreamingSessionStorageRoot, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Linux != nil { - ok := object.Key("linux") - ok.String(*v.Linux) - } - - if v.Windows != nil { - ok := object.Key("windows") - ok.String(*v.Windows) - } - - return nil -} - -func awsRestjson1_serializeDocumentStudioComponentConfiguration(v *types.StudioComponentConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ActiveDirectoryConfiguration != nil { - ok := object.Key("activeDirectoryConfiguration") - if err := awsRestjson1_serializeDocumentActiveDirectoryConfiguration(v.ActiveDirectoryConfiguration, ok); err != nil { - return err - } - } - - if v.ComputeFarmConfiguration != nil { - ok := object.Key("computeFarmConfiguration") - if err := awsRestjson1_serializeDocumentComputeFarmConfiguration(v.ComputeFarmConfiguration, ok); err != nil { - return err - } - } - - if v.LicenseServiceConfiguration != nil { - ok := object.Key("licenseServiceConfiguration") - if err := awsRestjson1_serializeDocumentLicenseServiceConfiguration(v.LicenseServiceConfiguration, ok); err != nil { - return err - } - } - - if v.SharedFileSystemConfiguration != nil { - ok := object.Key("sharedFileSystemConfiguration") - if err := awsRestjson1_serializeDocumentSharedFileSystemConfiguration(v.SharedFileSystemConfiguration, ok); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeDocumentStudioComponentInitializationScript(v *types.StudioComponentInitializationScript, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.LaunchProfileProtocolVersion != nil { - ok := object.Key("launchProfileProtocolVersion") - ok.String(*v.LaunchProfileProtocolVersion) - } - - if len(v.Platform) > 0 { - ok := object.Key("platform") - ok.String(string(v.Platform)) - } - - if len(v.RunContext) > 0 { - ok := object.Key("runContext") - ok.String(string(v.RunContext)) - } - - if v.Script != nil { - ok := object.Key("script") - ok.String(*v.Script) - } - - return nil -} - -func awsRestjson1_serializeDocumentStudioComponentInitializationScriptList(v []types.StudioComponentInitializationScript, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentStudioComponentInitializationScript(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentStudioComponentScriptParameterKeyValueList(v []types.ScriptParameterKeyValue, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentScriptParameterKeyValue(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentStudioComponentSecurityGroupIdList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentStudioEncryptionConfiguration(v *types.StudioEncryptionConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.KeyArn != nil { - ok := object.Key("keyArn") - ok.String(*v.KeyArn) - } - - if len(v.KeyType) > 0 { - ok := object.Key("keyType") - ok.String(string(v.KeyType)) - } - - return nil -} - -func awsRestjson1_serializeDocumentTags(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_serializeDocumentVolumeConfiguration(v *types.VolumeConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Iops != nil { - ok := object.Key("iops") - ok.Integer(*v.Iops) - } - - if v.Size != nil { - ok := object.Key("size") - ok.Integer(*v.Size) - } - - if v.Throughput != nil { - ok := object.Key("throughput") - ok.Integer(*v.Throughput) - } - - return nil -} diff --git a/service/nimble/snapshot/api_op_AcceptEulas.go.snap b/service/nimble/snapshot/api_op_AcceptEulas.go.snap deleted file mode 100644 index 0d7f2b8a7fa..00000000000 --- a/service/nimble/snapshot/api_op_AcceptEulas.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -AcceptEulas - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_CreateLaunchProfile.go.snap b/service/nimble/snapshot/api_op_CreateLaunchProfile.go.snap deleted file mode 100644 index 97223506d97..00000000000 --- a/service/nimble/snapshot/api_op_CreateLaunchProfile.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -CreateLaunchProfile - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_CreateStreamingImage.go.snap b/service/nimble/snapshot/api_op_CreateStreamingImage.go.snap deleted file mode 100644 index f1a791038d6..00000000000 --- a/service/nimble/snapshot/api_op_CreateStreamingImage.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -CreateStreamingImage - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_CreateStreamingSession.go.snap b/service/nimble/snapshot/api_op_CreateStreamingSession.go.snap deleted file mode 100644 index 59c979fb3a0..00000000000 --- a/service/nimble/snapshot/api_op_CreateStreamingSession.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -CreateStreamingSession - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_CreateStreamingSessionStream.go.snap b/service/nimble/snapshot/api_op_CreateStreamingSessionStream.go.snap deleted file mode 100644 index 397acf73d4a..00000000000 --- a/service/nimble/snapshot/api_op_CreateStreamingSessionStream.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -CreateStreamingSessionStream - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_CreateStudio.go.snap b/service/nimble/snapshot/api_op_CreateStudio.go.snap deleted file mode 100644 index 8a6051bee65..00000000000 --- a/service/nimble/snapshot/api_op_CreateStudio.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -CreateStudio - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_CreateStudioComponent.go.snap b/service/nimble/snapshot/api_op_CreateStudioComponent.go.snap deleted file mode 100644 index 70651a2a8ed..00000000000 --- a/service/nimble/snapshot/api_op_CreateStudioComponent.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -CreateStudioComponent - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_DeleteLaunchProfile.go.snap b/service/nimble/snapshot/api_op_DeleteLaunchProfile.go.snap deleted file mode 100644 index f9d89c9e998..00000000000 --- a/service/nimble/snapshot/api_op_DeleteLaunchProfile.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -DeleteLaunchProfile - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_DeleteLaunchProfileMember.go.snap b/service/nimble/snapshot/api_op_DeleteLaunchProfileMember.go.snap deleted file mode 100644 index 9bfdcbcdf90..00000000000 --- a/service/nimble/snapshot/api_op_DeleteLaunchProfileMember.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -DeleteLaunchProfileMember - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_DeleteStreamingImage.go.snap b/service/nimble/snapshot/api_op_DeleteStreamingImage.go.snap deleted file mode 100644 index ca6323b3286..00000000000 --- a/service/nimble/snapshot/api_op_DeleteStreamingImage.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -DeleteStreamingImage - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_DeleteStreamingSession.go.snap b/service/nimble/snapshot/api_op_DeleteStreamingSession.go.snap deleted file mode 100644 index 4198e0b21eb..00000000000 --- a/service/nimble/snapshot/api_op_DeleteStreamingSession.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -DeleteStreamingSession - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_DeleteStudio.go.snap b/service/nimble/snapshot/api_op_DeleteStudio.go.snap deleted file mode 100644 index b43aa02f502..00000000000 --- a/service/nimble/snapshot/api_op_DeleteStudio.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -DeleteStudio - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_DeleteStudioComponent.go.snap b/service/nimble/snapshot/api_op_DeleteStudioComponent.go.snap deleted file mode 100644 index 11fe7d9d73f..00000000000 --- a/service/nimble/snapshot/api_op_DeleteStudioComponent.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -DeleteStudioComponent - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_DeleteStudioMember.go.snap b/service/nimble/snapshot/api_op_DeleteStudioMember.go.snap deleted file mode 100644 index 5d3114e0d16..00000000000 --- a/service/nimble/snapshot/api_op_DeleteStudioMember.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -DeleteStudioMember - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_GetEula.go.snap b/service/nimble/snapshot/api_op_GetEula.go.snap deleted file mode 100644 index a5ede14cff7..00000000000 --- a/service/nimble/snapshot/api_op_GetEula.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -GetEula - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_GetLaunchProfile.go.snap b/service/nimble/snapshot/api_op_GetLaunchProfile.go.snap deleted file mode 100644 index ed2ee53812b..00000000000 --- a/service/nimble/snapshot/api_op_GetLaunchProfile.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -GetLaunchProfile - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_GetLaunchProfileDetails.go.snap b/service/nimble/snapshot/api_op_GetLaunchProfileDetails.go.snap deleted file mode 100644 index 4d685510d01..00000000000 --- a/service/nimble/snapshot/api_op_GetLaunchProfileDetails.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -GetLaunchProfileDetails - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_GetLaunchProfileInitialization.go.snap b/service/nimble/snapshot/api_op_GetLaunchProfileInitialization.go.snap deleted file mode 100644 index 2105b6e1c49..00000000000 --- a/service/nimble/snapshot/api_op_GetLaunchProfileInitialization.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -GetLaunchProfileInitialization - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_GetLaunchProfileMember.go.snap b/service/nimble/snapshot/api_op_GetLaunchProfileMember.go.snap deleted file mode 100644 index 500b2621a25..00000000000 --- a/service/nimble/snapshot/api_op_GetLaunchProfileMember.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -GetLaunchProfileMember - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_GetStreamingImage.go.snap b/service/nimble/snapshot/api_op_GetStreamingImage.go.snap deleted file mode 100644 index ec2e244fddf..00000000000 --- a/service/nimble/snapshot/api_op_GetStreamingImage.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -GetStreamingImage - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_GetStreamingSession.go.snap b/service/nimble/snapshot/api_op_GetStreamingSession.go.snap deleted file mode 100644 index 858290b8ada..00000000000 --- a/service/nimble/snapshot/api_op_GetStreamingSession.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -GetStreamingSession - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_GetStreamingSessionBackup.go.snap b/service/nimble/snapshot/api_op_GetStreamingSessionBackup.go.snap deleted file mode 100644 index 0cbcdc29f2c..00000000000 --- a/service/nimble/snapshot/api_op_GetStreamingSessionBackup.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -GetStreamingSessionBackup - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_GetStreamingSessionStream.go.snap b/service/nimble/snapshot/api_op_GetStreamingSessionStream.go.snap deleted file mode 100644 index d30f0f73d29..00000000000 --- a/service/nimble/snapshot/api_op_GetStreamingSessionStream.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -GetStreamingSessionStream - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_GetStudio.go.snap b/service/nimble/snapshot/api_op_GetStudio.go.snap deleted file mode 100644 index 6ce8d46eef3..00000000000 --- a/service/nimble/snapshot/api_op_GetStudio.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -GetStudio - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_GetStudioComponent.go.snap b/service/nimble/snapshot/api_op_GetStudioComponent.go.snap deleted file mode 100644 index 73b3e19600b..00000000000 --- a/service/nimble/snapshot/api_op_GetStudioComponent.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -GetStudioComponent - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_GetStudioMember.go.snap b/service/nimble/snapshot/api_op_GetStudioMember.go.snap deleted file mode 100644 index 3762efbba76..00000000000 --- a/service/nimble/snapshot/api_op_GetStudioMember.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -GetStudioMember - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_ListEulaAcceptances.go.snap b/service/nimble/snapshot/api_op_ListEulaAcceptances.go.snap deleted file mode 100644 index a0060c3e670..00000000000 --- a/service/nimble/snapshot/api_op_ListEulaAcceptances.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -ListEulaAcceptances - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_ListEulas.go.snap b/service/nimble/snapshot/api_op_ListEulas.go.snap deleted file mode 100644 index b0047c1959e..00000000000 --- a/service/nimble/snapshot/api_op_ListEulas.go.snap +++ /dev/null @@ -1,40 +0,0 @@ -ListEulas - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_ListLaunchProfileMembers.go.snap b/service/nimble/snapshot/api_op_ListLaunchProfileMembers.go.snap deleted file mode 100644 index 933086a6590..00000000000 --- a/service/nimble/snapshot/api_op_ListLaunchProfileMembers.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -ListLaunchProfileMembers - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_ListLaunchProfiles.go.snap b/service/nimble/snapshot/api_op_ListLaunchProfiles.go.snap deleted file mode 100644 index 477fd1b1f29..00000000000 --- a/service/nimble/snapshot/api_op_ListLaunchProfiles.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -ListLaunchProfiles - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_ListStreamingImages.go.snap b/service/nimble/snapshot/api_op_ListStreamingImages.go.snap deleted file mode 100644 index 986edfe672a..00000000000 --- a/service/nimble/snapshot/api_op_ListStreamingImages.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -ListStreamingImages - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_ListStreamingSessionBackups.go.snap b/service/nimble/snapshot/api_op_ListStreamingSessionBackups.go.snap deleted file mode 100644 index 9563e91e125..00000000000 --- a/service/nimble/snapshot/api_op_ListStreamingSessionBackups.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -ListStreamingSessionBackups - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_ListStreamingSessions.go.snap b/service/nimble/snapshot/api_op_ListStreamingSessions.go.snap deleted file mode 100644 index 392af28a21d..00000000000 --- a/service/nimble/snapshot/api_op_ListStreamingSessions.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -ListStreamingSessions - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_ListStudioComponents.go.snap b/service/nimble/snapshot/api_op_ListStudioComponents.go.snap deleted file mode 100644 index 7c3bf58cbaf..00000000000 --- a/service/nimble/snapshot/api_op_ListStudioComponents.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -ListStudioComponents - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_ListStudioMembers.go.snap b/service/nimble/snapshot/api_op_ListStudioMembers.go.snap deleted file mode 100644 index 720b788dc52..00000000000 --- a/service/nimble/snapshot/api_op_ListStudioMembers.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -ListStudioMembers - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_ListStudios.go.snap b/service/nimble/snapshot/api_op_ListStudios.go.snap deleted file mode 100644 index 9b63a92091d..00000000000 --- a/service/nimble/snapshot/api_op_ListStudios.go.snap +++ /dev/null @@ -1,40 +0,0 @@ -ListStudios - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_ListTagsForResource.go.snap b/service/nimble/snapshot/api_op_ListTagsForResource.go.snap deleted file mode 100644 index 071d3ac4e96..00000000000 --- a/service/nimble/snapshot/api_op_ListTagsForResource.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -ListTagsForResource - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_PutLaunchProfileMembers.go.snap b/service/nimble/snapshot/api_op_PutLaunchProfileMembers.go.snap deleted file mode 100644 index 1773f82c104..00000000000 --- a/service/nimble/snapshot/api_op_PutLaunchProfileMembers.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -PutLaunchProfileMembers - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_PutStudioMembers.go.snap b/service/nimble/snapshot/api_op_PutStudioMembers.go.snap deleted file mode 100644 index ed62c3fab27..00000000000 --- a/service/nimble/snapshot/api_op_PutStudioMembers.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -PutStudioMembers - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_StartStreamingSession.go.snap b/service/nimble/snapshot/api_op_StartStreamingSession.go.snap deleted file mode 100644 index f45f762ec4d..00000000000 --- a/service/nimble/snapshot/api_op_StartStreamingSession.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -StartStreamingSession - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_StartStudioSSOConfigurationRepair.go.snap b/service/nimble/snapshot/api_op_StartStudioSSOConfigurationRepair.go.snap deleted file mode 100644 index 320c14d1d4b..00000000000 --- a/service/nimble/snapshot/api_op_StartStudioSSOConfigurationRepair.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -StartStudioSSOConfigurationRepair - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_StopStreamingSession.go.snap b/service/nimble/snapshot/api_op_StopStreamingSession.go.snap deleted file mode 100644 index 73c29fa34c6..00000000000 --- a/service/nimble/snapshot/api_op_StopStreamingSession.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -StopStreamingSession - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_TagResource.go.snap b/service/nimble/snapshot/api_op_TagResource.go.snap deleted file mode 100644 index ae6f8e0846c..00000000000 --- a/service/nimble/snapshot/api_op_TagResource.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -TagResource - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_UntagResource.go.snap b/service/nimble/snapshot/api_op_UntagResource.go.snap deleted file mode 100644 index c7bbe038d98..00000000000 --- a/service/nimble/snapshot/api_op_UntagResource.go.snap +++ /dev/null @@ -1,41 +0,0 @@ -UntagResource - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_UpdateLaunchProfile.go.snap b/service/nimble/snapshot/api_op_UpdateLaunchProfile.go.snap deleted file mode 100644 index ae03b42e634..00000000000 --- a/service/nimble/snapshot/api_op_UpdateLaunchProfile.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -UpdateLaunchProfile - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_UpdateLaunchProfileMember.go.snap b/service/nimble/snapshot/api_op_UpdateLaunchProfileMember.go.snap deleted file mode 100644 index 9963f20515f..00000000000 --- a/service/nimble/snapshot/api_op_UpdateLaunchProfileMember.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -UpdateLaunchProfileMember - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_UpdateStreamingImage.go.snap b/service/nimble/snapshot/api_op_UpdateStreamingImage.go.snap deleted file mode 100644 index 44b82420e1b..00000000000 --- a/service/nimble/snapshot/api_op_UpdateStreamingImage.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -UpdateStreamingImage - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_UpdateStudio.go.snap b/service/nimble/snapshot/api_op_UpdateStudio.go.snap deleted file mode 100644 index b0fab1647f8..00000000000 --- a/service/nimble/snapshot/api_op_UpdateStudio.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -UpdateStudio - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot/api_op_UpdateStudioComponent.go.snap b/service/nimble/snapshot/api_op_UpdateStudioComponent.go.snap deleted file mode 100644 index b17c54b98a1..00000000000 --- a/service/nimble/snapshot/api_op_UpdateStudioComponent.go.snap +++ /dev/null @@ -1,42 +0,0 @@ -UpdateStudioComponent - Initialize stack step - spanInitializeStart - RegisterServiceMetadata - OperationIdempotencyTokenAutoFill - legacyEndpointContextSetter - SetLogger - OperationInputValidation - spanInitializeEnd - Serialize stack step - spanBuildRequestStart - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - spanBuildRequestEnd - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - spanRetryLoop - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/nimble/snapshot_test.go b/service/nimble/snapshot_test.go deleted file mode 100644 index 1d840211c71..00000000000 --- a/service/nimble/snapshot_test.go +++ /dev/null @@ -1,1238 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -//go:build snapshot - -package nimble - -import ( - "context" - "errors" - "fmt" - "github.com/aws/smithy-go/middleware" - "io" - "io/fs" - "os" - "testing" -) - -const ssprefix = "snapshot" - -type snapshotOK struct{} - -func (snapshotOK) Error() string { return "error: success" } - -func createp(path string) (*os.File, error) { - if err := os.Mkdir(ssprefix, 0700); err != nil && !errors.Is(err, fs.ErrExist) { - return nil, err - } - return os.Create(path) -} - -func sspath(op string) string { - return fmt.Sprintf("%s/api_op_%s.go.snap", ssprefix, op) -} - -func updateSnapshot(stack *middleware.Stack, operation string) error { - f, err := createp(sspath(operation)) - if err != nil { - return err - } - defer f.Close() - if _, err := f.Write([]byte(stack.String())); err != nil { - return err - } - return snapshotOK{} -} - -func testSnapshot(stack *middleware.Stack, operation string) error { - f, err := os.Open(sspath(operation)) - if errors.Is(err, fs.ErrNotExist) { - return snapshotOK{} - } - if err != nil { - return err - } - defer f.Close() - expected, err := io.ReadAll(f) - if err != nil { - return err - } - if actual := stack.String(); actual != string(expected) { - return fmt.Errorf("%s != %s", expected, actual) - } - return snapshotOK{} -} -func TestCheckSnapshot_AcceptEulas(t *testing.T) { - svc := New(Options{}) - _, err := svc.AcceptEulas(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "AcceptEulas") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_CreateLaunchProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateLaunchProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateLaunchProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_CreateStreamingImage(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateStreamingImage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateStreamingImage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_CreateStreamingSession(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateStreamingSession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateStreamingSession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_CreateStreamingSessionStream(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateStreamingSessionStream(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateStreamingSessionStream") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_CreateStudio(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateStudio(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateStudio") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_CreateStudioComponent(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateStudioComponent(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateStudioComponent") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_DeleteLaunchProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteLaunchProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteLaunchProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_DeleteLaunchProfileMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteLaunchProfileMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteLaunchProfileMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_DeleteStreamingImage(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteStreamingImage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteStreamingImage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_DeleteStreamingSession(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteStreamingSession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteStreamingSession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_DeleteStudio(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteStudio(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteStudio") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_DeleteStudioComponent(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteStudioComponent(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteStudioComponent") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_DeleteStudioMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteStudioMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteStudioMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetEula(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetEula(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetEula") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetLaunchProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetLaunchProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetLaunchProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetLaunchProfileDetails(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetLaunchProfileDetails(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetLaunchProfileDetails") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetLaunchProfileInitialization(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetLaunchProfileInitialization(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetLaunchProfileInitialization") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetLaunchProfileMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetLaunchProfileMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetLaunchProfileMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetStreamingImage(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetStreamingImage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetStreamingImage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetStreamingSession(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetStreamingSession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetStreamingSession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetStreamingSessionBackup(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetStreamingSessionBackup(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetStreamingSessionBackup") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetStreamingSessionStream(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetStreamingSessionStream(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetStreamingSessionStream") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetStudio(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetStudio(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetStudio") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetStudioComponent(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetStudioComponent(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetStudioComponent") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetStudioMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetStudioMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetStudioMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListEulaAcceptances(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListEulaAcceptances(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListEulaAcceptances") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListEulas(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListEulas(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListEulas") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListLaunchProfileMembers(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListLaunchProfileMembers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListLaunchProfileMembers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListLaunchProfiles(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListLaunchProfiles(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListLaunchProfiles") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListStreamingImages(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListStreamingImages(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListStreamingImages") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListStreamingSessionBackups(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListStreamingSessionBackups(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListStreamingSessionBackups") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListStreamingSessions(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListStreamingSessions(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListStreamingSessions") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListStudioComponents(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListStudioComponents(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListStudioComponents") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListStudioMembers(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListStudioMembers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListStudioMembers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListStudios(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListStudios(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListStudios") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListTagsForResource(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListTagsForResource") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_PutLaunchProfileMembers(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutLaunchProfileMembers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "PutLaunchProfileMembers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_PutStudioMembers(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutStudioMembers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "PutStudioMembers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_StartStreamingSession(t *testing.T) { - svc := New(Options{}) - _, err := svc.StartStreamingSession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "StartStreamingSession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_StartStudioSSOConfigurationRepair(t *testing.T) { - svc := New(Options{}) - _, err := svc.StartStudioSSOConfigurationRepair(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "StartStudioSSOConfigurationRepair") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_StopStreamingSession(t *testing.T) { - svc := New(Options{}) - _, err := svc.StopStreamingSession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "StopStreamingSession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_TagResource(t *testing.T) { - svc := New(Options{}) - _, err := svc.TagResource(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "TagResource") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UntagResource(t *testing.T) { - svc := New(Options{}) - _, err := svc.UntagResource(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UntagResource") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateLaunchProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateLaunchProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateLaunchProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateLaunchProfileMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateLaunchProfileMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateLaunchProfileMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateStreamingImage(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateStreamingImage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateStreamingImage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateStudio(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateStudio(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateStudio") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateStudioComponent(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateStudioComponent(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateStudioComponent") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} -func TestUpdateSnapshot_AcceptEulas(t *testing.T) { - svc := New(Options{}) - _, err := svc.AcceptEulas(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "AcceptEulas") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateLaunchProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateLaunchProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateLaunchProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateStreamingImage(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateStreamingImage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateStreamingImage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateStreamingSession(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateStreamingSession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateStreamingSession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateStreamingSessionStream(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateStreamingSessionStream(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateStreamingSessionStream") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateStudio(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateStudio(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateStudio") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateStudioComponent(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateStudioComponent(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateStudioComponent") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteLaunchProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteLaunchProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteLaunchProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteLaunchProfileMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteLaunchProfileMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteLaunchProfileMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteStreamingImage(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteStreamingImage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteStreamingImage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteStreamingSession(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteStreamingSession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteStreamingSession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteStudio(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteStudio(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteStudio") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteStudioComponent(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteStudioComponent(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteStudioComponent") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteStudioMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteStudioMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteStudioMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetEula(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetEula(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetEula") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetLaunchProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetLaunchProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetLaunchProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetLaunchProfileDetails(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetLaunchProfileDetails(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetLaunchProfileDetails") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetLaunchProfileInitialization(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetLaunchProfileInitialization(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetLaunchProfileInitialization") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetLaunchProfileMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetLaunchProfileMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetLaunchProfileMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetStreamingImage(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetStreamingImage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetStreamingImage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetStreamingSession(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetStreamingSession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetStreamingSession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetStreamingSessionBackup(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetStreamingSessionBackup(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetStreamingSessionBackup") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetStreamingSessionStream(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetStreamingSessionStream(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetStreamingSessionStream") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetStudio(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetStudio(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetStudio") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetStudioComponent(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetStudioComponent(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetStudioComponent") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetStudioMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetStudioMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetStudioMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListEulaAcceptances(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListEulaAcceptances(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListEulaAcceptances") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListEulas(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListEulas(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListEulas") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListLaunchProfileMembers(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListLaunchProfileMembers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListLaunchProfileMembers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListLaunchProfiles(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListLaunchProfiles(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListLaunchProfiles") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListStreamingImages(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListStreamingImages(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListStreamingImages") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListStreamingSessionBackups(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListStreamingSessionBackups(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListStreamingSessionBackups") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListStreamingSessions(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListStreamingSessions(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListStreamingSessions") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListStudioComponents(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListStudioComponents(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListStudioComponents") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListStudioMembers(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListStudioMembers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListStudioMembers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListStudios(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListStudios(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListStudios") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListTagsForResource(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListTagsForResource") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_PutLaunchProfileMembers(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutLaunchProfileMembers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "PutLaunchProfileMembers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_PutStudioMembers(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutStudioMembers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "PutStudioMembers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_StartStreamingSession(t *testing.T) { - svc := New(Options{}) - _, err := svc.StartStreamingSession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "StartStreamingSession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_StartStudioSSOConfigurationRepair(t *testing.T) { - svc := New(Options{}) - _, err := svc.StartStudioSSOConfigurationRepair(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "StartStudioSSOConfigurationRepair") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_StopStreamingSession(t *testing.T) { - svc := New(Options{}) - _, err := svc.StopStreamingSession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "StopStreamingSession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_TagResource(t *testing.T) { - svc := New(Options{}) - _, err := svc.TagResource(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "TagResource") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_UntagResource(t *testing.T) { - svc := New(Options{}) - _, err := svc.UntagResource(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UntagResource") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_UpdateLaunchProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateLaunchProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateLaunchProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_UpdateLaunchProfileMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateLaunchProfileMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateLaunchProfileMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_UpdateStreamingImage(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateStreamingImage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateStreamingImage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_UpdateStudio(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateStudio(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateStudio") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_UpdateStudioComponent(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateStudioComponent(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateStudioComponent") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} diff --git a/service/nimble/types/enums.go b/service/nimble/types/enums.go deleted file mode 100644 index d00c7c04eae..00000000000 --- a/service/nimble/types/enums.go +++ /dev/null @@ -1,823 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -type AutomaticTerminationMode string - -// Enum values for AutomaticTerminationMode -const ( - AutomaticTerminationModeDeactivated AutomaticTerminationMode = "DEACTIVATED" - AutomaticTerminationModeActivated AutomaticTerminationMode = "ACTIVATED" -) - -// Values returns all known values for AutomaticTerminationMode. 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 (AutomaticTerminationMode) Values() []AutomaticTerminationMode { - return []AutomaticTerminationMode{ - "DEACTIVATED", - "ACTIVATED", - } -} - -type LaunchProfilePersona string - -// Enum values for LaunchProfilePersona -const ( - LaunchProfilePersonaUser LaunchProfilePersona = "USER" -) - -// Values returns all known values for LaunchProfilePersona. 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 (LaunchProfilePersona) Values() []LaunchProfilePersona { - return []LaunchProfilePersona{ - "USER", - } -} - -type LaunchProfilePlatform string - -// Enum values for LaunchProfilePlatform -const ( - LaunchProfilePlatformLinux LaunchProfilePlatform = "LINUX" - LaunchProfilePlatformWindows LaunchProfilePlatform = "WINDOWS" -) - -// Values returns all known values for LaunchProfilePlatform. 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 (LaunchProfilePlatform) Values() []LaunchProfilePlatform { - return []LaunchProfilePlatform{ - "LINUX", - "WINDOWS", - } -} - -type LaunchProfileState string - -// Enum values for LaunchProfileState -const ( - LaunchProfileStateCreateInProgress LaunchProfileState = "CREATE_IN_PROGRESS" - LaunchProfileStateReady LaunchProfileState = "READY" - LaunchProfileStateUpdateInProgress LaunchProfileState = "UPDATE_IN_PROGRESS" - LaunchProfileStateDeleteInProgress LaunchProfileState = "DELETE_IN_PROGRESS" - LaunchProfileStateDeleted LaunchProfileState = "DELETED" - LaunchProfileStateDeleteFailed LaunchProfileState = "DELETE_FAILED" - LaunchProfileStateCreateFailed LaunchProfileState = "CREATE_FAILED" - LaunchProfileStateUpdateFailed LaunchProfileState = "UPDATE_FAILED" -) - -// Values returns all known values for LaunchProfileState. 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 (LaunchProfileState) Values() []LaunchProfileState { - return []LaunchProfileState{ - "CREATE_IN_PROGRESS", - "READY", - "UPDATE_IN_PROGRESS", - "DELETE_IN_PROGRESS", - "DELETED", - "DELETE_FAILED", - "CREATE_FAILED", - "UPDATE_FAILED", - } -} - -type LaunchProfileStatusCode string - -// Enum values for LaunchProfileStatusCode -const ( - LaunchProfileStatusCodeLaunchProfileCreated LaunchProfileStatusCode = "LAUNCH_PROFILE_CREATED" - LaunchProfileStatusCodeLaunchProfileUpdated LaunchProfileStatusCode = "LAUNCH_PROFILE_UPDATED" - LaunchProfileStatusCodeLaunchProfileDeleted LaunchProfileStatusCode = "LAUNCH_PROFILE_DELETED" - LaunchProfileStatusCodeLaunchProfileCreateInProgress LaunchProfileStatusCode = "LAUNCH_PROFILE_CREATE_IN_PROGRESS" - LaunchProfileStatusCodeLaunchProfileUpdateInProgress LaunchProfileStatusCode = "LAUNCH_PROFILE_UPDATE_IN_PROGRESS" - LaunchProfileStatusCodeLaunchProfileDeleteInProgress LaunchProfileStatusCode = "LAUNCH_PROFILE_DELETE_IN_PROGRESS" - LaunchProfileStatusCodeInternalError LaunchProfileStatusCode = "INTERNAL_ERROR" - LaunchProfileStatusCodeStreamingImageNotFound LaunchProfileStatusCode = "STREAMING_IMAGE_NOT_FOUND" - LaunchProfileStatusCodeStreamingImageNotReady LaunchProfileStatusCode = "STREAMING_IMAGE_NOT_READY" - LaunchProfileStatusCodeLaunchProfileWithStreamSessionsNotDeleted LaunchProfileStatusCode = "LAUNCH_PROFILE_WITH_STREAM_SESSIONS_NOT_DELETED" - LaunchProfileStatusCodeEncryptionKeyAccessDenied LaunchProfileStatusCode = "ENCRYPTION_KEY_ACCESS_DENIED" - LaunchProfileStatusCodeEncryptionKeyNotFound LaunchProfileStatusCode = "ENCRYPTION_KEY_NOT_FOUND" - LaunchProfileStatusCodeInvalidSubnetsProvided LaunchProfileStatusCode = "INVALID_SUBNETS_PROVIDED" - LaunchProfileStatusCodeInvalidInstanceTypesProvided LaunchProfileStatusCode = "INVALID_INSTANCE_TYPES_PROVIDED" - LaunchProfileStatusCodeInvalidSubnetsCombination LaunchProfileStatusCode = "INVALID_SUBNETS_COMBINATION" -) - -// Values returns all known values for LaunchProfileStatusCode. 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 (LaunchProfileStatusCode) Values() []LaunchProfileStatusCode { - return []LaunchProfileStatusCode{ - "LAUNCH_PROFILE_CREATED", - "LAUNCH_PROFILE_UPDATED", - "LAUNCH_PROFILE_DELETED", - "LAUNCH_PROFILE_CREATE_IN_PROGRESS", - "LAUNCH_PROFILE_UPDATE_IN_PROGRESS", - "LAUNCH_PROFILE_DELETE_IN_PROGRESS", - "INTERNAL_ERROR", - "STREAMING_IMAGE_NOT_FOUND", - "STREAMING_IMAGE_NOT_READY", - "LAUNCH_PROFILE_WITH_STREAM_SESSIONS_NOT_DELETED", - "ENCRYPTION_KEY_ACCESS_DENIED", - "ENCRYPTION_KEY_NOT_FOUND", - "INVALID_SUBNETS_PROVIDED", - "INVALID_INSTANCE_TYPES_PROVIDED", - "INVALID_SUBNETS_COMBINATION", - } -} - -type LaunchProfileValidationState string - -// Enum values for LaunchProfileValidationState -const ( - LaunchProfileValidationStateValidationNotStarted LaunchProfileValidationState = "VALIDATION_NOT_STARTED" - LaunchProfileValidationStateValidationInProgress LaunchProfileValidationState = "VALIDATION_IN_PROGRESS" - LaunchProfileValidationStateValidationSuccess LaunchProfileValidationState = "VALIDATION_SUCCESS" - LaunchProfileValidationStateValidationFailed LaunchProfileValidationState = "VALIDATION_FAILED" - LaunchProfileValidationStateValidationFailedInternalServerError LaunchProfileValidationState = "VALIDATION_FAILED_INTERNAL_SERVER_ERROR" -) - -// Values returns all known values for LaunchProfileValidationState. 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 (LaunchProfileValidationState) Values() []LaunchProfileValidationState { - return []LaunchProfileValidationState{ - "VALIDATION_NOT_STARTED", - "VALIDATION_IN_PROGRESS", - "VALIDATION_SUCCESS", - "VALIDATION_FAILED", - "VALIDATION_FAILED_INTERNAL_SERVER_ERROR", - } -} - -type LaunchProfileValidationStatusCode string - -// Enum values for LaunchProfileValidationStatusCode -const ( - LaunchProfileValidationStatusCodeValidationNotStarted LaunchProfileValidationStatusCode = "VALIDATION_NOT_STARTED" - LaunchProfileValidationStatusCodeValidationInProgress LaunchProfileValidationStatusCode = "VALIDATION_IN_PROGRESS" - LaunchProfileValidationStatusCodeValidationSuccess LaunchProfileValidationStatusCode = "VALIDATION_SUCCESS" - LaunchProfileValidationStatusCodeValidationFailedInvalidSubnetRouteTableAssociation LaunchProfileValidationStatusCode = "VALIDATION_FAILED_INVALID_SUBNET_ROUTE_TABLE_ASSOCIATION" - LaunchProfileValidationStatusCodeValidationFailedSubnetNotFound LaunchProfileValidationStatusCode = "VALIDATION_FAILED_SUBNET_NOT_FOUND" - LaunchProfileValidationStatusCodeValidationFailedInvalidSecurityGroupAssociation LaunchProfileValidationStatusCode = "VALIDATION_FAILED_INVALID_SECURITY_GROUP_ASSOCIATION" - LaunchProfileValidationStatusCodeValidationFailedInvalidActiveDirectory LaunchProfileValidationStatusCode = "VALIDATION_FAILED_INVALID_ACTIVE_DIRECTORY" - LaunchProfileValidationStatusCodeValidationFailedUnauthorized LaunchProfileValidationStatusCode = "VALIDATION_FAILED_UNAUTHORIZED" - LaunchProfileValidationStatusCodeValidationFailedInternalServerError LaunchProfileValidationStatusCode = "VALIDATION_FAILED_INTERNAL_SERVER_ERROR" -) - -// Values returns all known values for LaunchProfileValidationStatusCode. 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 (LaunchProfileValidationStatusCode) Values() []LaunchProfileValidationStatusCode { - return []LaunchProfileValidationStatusCode{ - "VALIDATION_NOT_STARTED", - "VALIDATION_IN_PROGRESS", - "VALIDATION_SUCCESS", - "VALIDATION_FAILED_INVALID_SUBNET_ROUTE_TABLE_ASSOCIATION", - "VALIDATION_FAILED_SUBNET_NOT_FOUND", - "VALIDATION_FAILED_INVALID_SECURITY_GROUP_ASSOCIATION", - "VALIDATION_FAILED_INVALID_ACTIVE_DIRECTORY", - "VALIDATION_FAILED_UNAUTHORIZED", - "VALIDATION_FAILED_INTERNAL_SERVER_ERROR", - } -} - -type LaunchProfileValidationType string - -// Enum values for LaunchProfileValidationType -const ( - LaunchProfileValidationTypeValidateActiveDirectoryStudioComponent LaunchProfileValidationType = "VALIDATE_ACTIVE_DIRECTORY_STUDIO_COMPONENT" - LaunchProfileValidationTypeValidateSubnetAssociation LaunchProfileValidationType = "VALIDATE_SUBNET_ASSOCIATION" - LaunchProfileValidationTypeValidateNetworkAclAssociation LaunchProfileValidationType = "VALIDATE_NETWORK_ACL_ASSOCIATION" - LaunchProfileValidationTypeValidateSecurityGroupAssociation LaunchProfileValidationType = "VALIDATE_SECURITY_GROUP_ASSOCIATION" -) - -// Values returns all known values for LaunchProfileValidationType. 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 (LaunchProfileValidationType) Values() []LaunchProfileValidationType { - return []LaunchProfileValidationType{ - "VALIDATE_ACTIVE_DIRECTORY_STUDIO_COMPONENT", - "VALIDATE_SUBNET_ASSOCIATION", - "VALIDATE_NETWORK_ACL_ASSOCIATION", - "VALIDATE_SECURITY_GROUP_ASSOCIATION", - } -} - -type SessionBackupMode string - -// Enum values for SessionBackupMode -const ( - SessionBackupModeAutomatic SessionBackupMode = "AUTOMATIC" - SessionBackupModeDeactivated SessionBackupMode = "DEACTIVATED" -) - -// Values returns all known values for SessionBackupMode. 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 (SessionBackupMode) Values() []SessionBackupMode { - return []SessionBackupMode{ - "AUTOMATIC", - "DEACTIVATED", - } -} - -type SessionPersistenceMode string - -// Enum values for SessionPersistenceMode -const ( - SessionPersistenceModeDeactivated SessionPersistenceMode = "DEACTIVATED" - SessionPersistenceModeActivated SessionPersistenceMode = "ACTIVATED" -) - -// Values returns all known values for SessionPersistenceMode. 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 (SessionPersistenceMode) Values() []SessionPersistenceMode { - return []SessionPersistenceMode{ - "DEACTIVATED", - "ACTIVATED", - } -} - -type StreamingClipboardMode string - -// Enum values for StreamingClipboardMode -const ( - StreamingClipboardModeEnabled StreamingClipboardMode = "ENABLED" - StreamingClipboardModeDisabled StreamingClipboardMode = "DISABLED" -) - -// Values returns all known values for StreamingClipboardMode. 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 (StreamingClipboardMode) Values() []StreamingClipboardMode { - return []StreamingClipboardMode{ - "ENABLED", - "DISABLED", - } -} - -type StreamingImageEncryptionConfigurationKeyType string - -// Enum values for StreamingImageEncryptionConfigurationKeyType -const ( - StreamingImageEncryptionConfigurationKeyTypeCustomerManagedKey StreamingImageEncryptionConfigurationKeyType = "CUSTOMER_MANAGED_KEY" -) - -// Values returns all known values for -// StreamingImageEncryptionConfigurationKeyType. 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 (StreamingImageEncryptionConfigurationKeyType) Values() []StreamingImageEncryptionConfigurationKeyType { - return []StreamingImageEncryptionConfigurationKeyType{ - "CUSTOMER_MANAGED_KEY", - } -} - -type StreamingImageState string - -// Enum values for StreamingImageState -const ( - StreamingImageStateCreateInProgress StreamingImageState = "CREATE_IN_PROGRESS" - StreamingImageStateReady StreamingImageState = "READY" - StreamingImageStateDeleteInProgress StreamingImageState = "DELETE_IN_PROGRESS" - StreamingImageStateDeleted StreamingImageState = "DELETED" - StreamingImageStateUpdateInProgress StreamingImageState = "UPDATE_IN_PROGRESS" - StreamingImageStateUpdateFailed StreamingImageState = "UPDATE_FAILED" - StreamingImageStateCreateFailed StreamingImageState = "CREATE_FAILED" - StreamingImageStateDeleteFailed StreamingImageState = "DELETE_FAILED" -) - -// Values returns all known values for StreamingImageState. 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 (StreamingImageState) Values() []StreamingImageState { - return []StreamingImageState{ - "CREATE_IN_PROGRESS", - "READY", - "DELETE_IN_PROGRESS", - "DELETED", - "UPDATE_IN_PROGRESS", - "UPDATE_FAILED", - "CREATE_FAILED", - "DELETE_FAILED", - } -} - -type StreamingImageStatusCode string - -// Enum values for StreamingImageStatusCode -const ( - StreamingImageStatusCodeStreamingImageCreateInProgress StreamingImageStatusCode = "STREAMING_IMAGE_CREATE_IN_PROGRESS" - StreamingImageStatusCodeStreamingImageReady StreamingImageStatusCode = "STREAMING_IMAGE_READY" - StreamingImageStatusCodeStreamingImageDeleteInProgress StreamingImageStatusCode = "STREAMING_IMAGE_DELETE_IN_PROGRESS" - StreamingImageStatusCodeStreamingImageDeleted StreamingImageStatusCode = "STREAMING_IMAGE_DELETED" - StreamingImageStatusCodeStreamingImageUpdateInProgress StreamingImageStatusCode = "STREAMING_IMAGE_UPDATE_IN_PROGRESS" - StreamingImageStatusCodeInternalError StreamingImageStatusCode = "INTERNAL_ERROR" - StreamingImageStatusCodeAccessDenied StreamingImageStatusCode = "ACCESS_DENIED" -) - -// Values returns all known values for StreamingImageStatusCode. 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 (StreamingImageStatusCode) Values() []StreamingImageStatusCode { - return []StreamingImageStatusCode{ - "STREAMING_IMAGE_CREATE_IN_PROGRESS", - "STREAMING_IMAGE_READY", - "STREAMING_IMAGE_DELETE_IN_PROGRESS", - "STREAMING_IMAGE_DELETED", - "STREAMING_IMAGE_UPDATE_IN_PROGRESS", - "INTERNAL_ERROR", - "ACCESS_DENIED", - } -} - -type StreamingInstanceType string - -// Enum values for StreamingInstanceType -const ( - StreamingInstanceTypeG4dnXlarge StreamingInstanceType = "g4dn.xlarge" - StreamingInstanceTypeG4dn2xlarge StreamingInstanceType = "g4dn.2xlarge" - StreamingInstanceTypeG4dn4xlarge StreamingInstanceType = "g4dn.4xlarge" - StreamingInstanceTypeG4dn8xlarge StreamingInstanceType = "g4dn.8xlarge" - StreamingInstanceTypeG4dn12xlarge StreamingInstanceType = "g4dn.12xlarge" - StreamingInstanceTypeG4dn16xlarge StreamingInstanceType = "g4dn.16xlarge" - StreamingInstanceTypeG34xlarge StreamingInstanceType = "g3.4xlarge" - StreamingInstanceTypeG3sXlarge StreamingInstanceType = "g3s.xlarge" - StreamingInstanceTypeG5Xlarge StreamingInstanceType = "g5.xlarge" - StreamingInstanceTypeG52xlarge StreamingInstanceType = "g5.2xlarge" - StreamingInstanceTypeG54xlarge StreamingInstanceType = "g5.4xlarge" - StreamingInstanceTypeG58xlarge StreamingInstanceType = "g5.8xlarge" - StreamingInstanceTypeG516xlarge StreamingInstanceType = "g5.16xlarge" -) - -// Values returns all known values for StreamingInstanceType. 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 (StreamingInstanceType) Values() []StreamingInstanceType { - return []StreamingInstanceType{ - "g4dn.xlarge", - "g4dn.2xlarge", - "g4dn.4xlarge", - "g4dn.8xlarge", - "g4dn.12xlarge", - "g4dn.16xlarge", - "g3.4xlarge", - "g3s.xlarge", - "g5.xlarge", - "g5.2xlarge", - "g5.4xlarge", - "g5.8xlarge", - "g5.16xlarge", - } -} - -type StreamingSessionState string - -// Enum values for StreamingSessionState -const ( - StreamingSessionStateCreateInProgress StreamingSessionState = "CREATE_IN_PROGRESS" - StreamingSessionStateDeleteInProgress StreamingSessionState = "DELETE_IN_PROGRESS" - StreamingSessionStateReady StreamingSessionState = "READY" - StreamingSessionStateDeleted StreamingSessionState = "DELETED" - StreamingSessionStateCreateFailed StreamingSessionState = "CREATE_FAILED" - StreamingSessionStateDeleteFailed StreamingSessionState = "DELETE_FAILED" - StreamingSessionStateStopInProgress StreamingSessionState = "STOP_IN_PROGRESS" - StreamingSessionStateStartInProgress StreamingSessionState = "START_IN_PROGRESS" - StreamingSessionStateStopped StreamingSessionState = "STOPPED" - StreamingSessionStateStopFailed StreamingSessionState = "STOP_FAILED" - StreamingSessionStateStartFailed StreamingSessionState = "START_FAILED" -) - -// Values returns all known values for StreamingSessionState. 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 (StreamingSessionState) Values() []StreamingSessionState { - return []StreamingSessionState{ - "CREATE_IN_PROGRESS", - "DELETE_IN_PROGRESS", - "READY", - "DELETED", - "CREATE_FAILED", - "DELETE_FAILED", - "STOP_IN_PROGRESS", - "START_IN_PROGRESS", - "STOPPED", - "STOP_FAILED", - "START_FAILED", - } -} - -type StreamingSessionStatusCode string - -// Enum values for StreamingSessionStatusCode -const ( - StreamingSessionStatusCodeStreamingSessionReady StreamingSessionStatusCode = "STREAMING_SESSION_READY" - StreamingSessionStatusCodeStreamingSessionDeleted StreamingSessionStatusCode = "STREAMING_SESSION_DELETED" - StreamingSessionStatusCodeStreamingSessionCreateInProgress StreamingSessionStatusCode = "STREAMING_SESSION_CREATE_IN_PROGRESS" - StreamingSessionStatusCodeStreamingSessionDeleteInProgress StreamingSessionStatusCode = "STREAMING_SESSION_DELETE_IN_PROGRESS" - StreamingSessionStatusCodeInternalError StreamingSessionStatusCode = "INTERNAL_ERROR" - StreamingSessionStatusCodeInsufficientCapacity StreamingSessionStatusCode = "INSUFFICIENT_CAPACITY" - StreamingSessionStatusCodeActiveDirectoryDomainJoinError StreamingSessionStatusCode = "ACTIVE_DIRECTORY_DOMAIN_JOIN_ERROR" - StreamingSessionStatusCodeNetworkConnectionError StreamingSessionStatusCode = "NETWORK_CONNECTION_ERROR" - StreamingSessionStatusCodeInitializationScriptError StreamingSessionStatusCode = "INITIALIZATION_SCRIPT_ERROR" - StreamingSessionStatusCodeDecryptStreamingImageError StreamingSessionStatusCode = "DECRYPT_STREAMING_IMAGE_ERROR" - StreamingSessionStatusCodeNetworkInterfaceError StreamingSessionStatusCode = "NETWORK_INTERFACE_ERROR" - StreamingSessionStatusCodeStreamingSessionStopped StreamingSessionStatusCode = "STREAMING_SESSION_STOPPED" - StreamingSessionStatusCodeStreamingSessionStarted StreamingSessionStatusCode = "STREAMING_SESSION_STARTED" - StreamingSessionStatusCodeStreamingSessionStopInProgress StreamingSessionStatusCode = "STREAMING_SESSION_STOP_IN_PROGRESS" - StreamingSessionStatusCodeStreamingSessionStartInProgress StreamingSessionStatusCode = "STREAMING_SESSION_START_IN_PROGRESS" - StreamingSessionStatusCodeAmiValidationError StreamingSessionStatusCode = "AMI_VALIDATION_ERROR" -) - -// Values returns all known values for StreamingSessionStatusCode. 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 (StreamingSessionStatusCode) Values() []StreamingSessionStatusCode { - return []StreamingSessionStatusCode{ - "STREAMING_SESSION_READY", - "STREAMING_SESSION_DELETED", - "STREAMING_SESSION_CREATE_IN_PROGRESS", - "STREAMING_SESSION_DELETE_IN_PROGRESS", - "INTERNAL_ERROR", - "INSUFFICIENT_CAPACITY", - "ACTIVE_DIRECTORY_DOMAIN_JOIN_ERROR", - "NETWORK_CONNECTION_ERROR", - "INITIALIZATION_SCRIPT_ERROR", - "DECRYPT_STREAMING_IMAGE_ERROR", - "NETWORK_INTERFACE_ERROR", - "STREAMING_SESSION_STOPPED", - "STREAMING_SESSION_STARTED", - "STREAMING_SESSION_STOP_IN_PROGRESS", - "STREAMING_SESSION_START_IN_PROGRESS", - "AMI_VALIDATION_ERROR", - } -} - -type StreamingSessionStorageMode string - -// Enum values for StreamingSessionStorageMode -const ( - StreamingSessionStorageModeUpload StreamingSessionStorageMode = "UPLOAD" -) - -// Values returns all known values for StreamingSessionStorageMode. 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 (StreamingSessionStorageMode) Values() []StreamingSessionStorageMode { - return []StreamingSessionStorageMode{ - "UPLOAD", - } -} - -type StreamingSessionStreamState string - -// Enum values for StreamingSessionStreamState -const ( - StreamingSessionStreamStateReady StreamingSessionStreamState = "READY" - StreamingSessionStreamStateCreateInProgress StreamingSessionStreamState = "CREATE_IN_PROGRESS" - StreamingSessionStreamStateDeleteInProgress StreamingSessionStreamState = "DELETE_IN_PROGRESS" - StreamingSessionStreamStateDeleted StreamingSessionStreamState = "DELETED" - StreamingSessionStreamStateCreateFailed StreamingSessionStreamState = "CREATE_FAILED" - StreamingSessionStreamStateDeleteFailed StreamingSessionStreamState = "DELETE_FAILED" -) - -// Values returns all known values for StreamingSessionStreamState. 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 (StreamingSessionStreamState) Values() []StreamingSessionStreamState { - return []StreamingSessionStreamState{ - "READY", - "CREATE_IN_PROGRESS", - "DELETE_IN_PROGRESS", - "DELETED", - "CREATE_FAILED", - "DELETE_FAILED", - } -} - -type StreamingSessionStreamStatusCode string - -// Enum values for StreamingSessionStreamStatusCode -const ( - StreamingSessionStreamStatusCodeStreamCreateInProgress StreamingSessionStreamStatusCode = "STREAM_CREATE_IN_PROGRESS" - StreamingSessionStreamStatusCodeStreamReady StreamingSessionStreamStatusCode = "STREAM_READY" - StreamingSessionStreamStatusCodeStreamDeleteInProgress StreamingSessionStreamStatusCode = "STREAM_DELETE_IN_PROGRESS" - StreamingSessionStreamStatusCodeStreamDeleted StreamingSessionStreamStatusCode = "STREAM_DELETED" - StreamingSessionStreamStatusCodeInternalError StreamingSessionStreamStatusCode = "INTERNAL_ERROR" - StreamingSessionStreamStatusCodeNetworkConnectionError StreamingSessionStreamStatusCode = "NETWORK_CONNECTION_ERROR" -) - -// Values returns all known values for StreamingSessionStreamStatusCode. 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 (StreamingSessionStreamStatusCode) Values() []StreamingSessionStreamStatusCode { - return []StreamingSessionStreamStatusCode{ - "STREAM_CREATE_IN_PROGRESS", - "STREAM_READY", - "STREAM_DELETE_IN_PROGRESS", - "STREAM_DELETED", - "INTERNAL_ERROR", - "NETWORK_CONNECTION_ERROR", - } -} - -type StudioComponentInitializationScriptRunContext string - -// Enum values for StudioComponentInitializationScriptRunContext -const ( - StudioComponentInitializationScriptRunContextSystemInitialization StudioComponentInitializationScriptRunContext = "SYSTEM_INITIALIZATION" - StudioComponentInitializationScriptRunContextUserInitialization StudioComponentInitializationScriptRunContext = "USER_INITIALIZATION" -) - -// Values returns all known values for -// StudioComponentInitializationScriptRunContext. 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 (StudioComponentInitializationScriptRunContext) Values() []StudioComponentInitializationScriptRunContext { - return []StudioComponentInitializationScriptRunContext{ - "SYSTEM_INITIALIZATION", - "USER_INITIALIZATION", - } -} - -type StudioComponentState string - -// Enum values for StudioComponentState -const ( - StudioComponentStateCreateInProgress StudioComponentState = "CREATE_IN_PROGRESS" - StudioComponentStateReady StudioComponentState = "READY" - StudioComponentStateUpdateInProgress StudioComponentState = "UPDATE_IN_PROGRESS" - StudioComponentStateDeleteInProgress StudioComponentState = "DELETE_IN_PROGRESS" - StudioComponentStateDeleted StudioComponentState = "DELETED" - StudioComponentStateDeleteFailed StudioComponentState = "DELETE_FAILED" - StudioComponentStateCreateFailed StudioComponentState = "CREATE_FAILED" - StudioComponentStateUpdateFailed StudioComponentState = "UPDATE_FAILED" -) - -// Values returns all known values for StudioComponentState. 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 (StudioComponentState) Values() []StudioComponentState { - return []StudioComponentState{ - "CREATE_IN_PROGRESS", - "READY", - "UPDATE_IN_PROGRESS", - "DELETE_IN_PROGRESS", - "DELETED", - "DELETE_FAILED", - "CREATE_FAILED", - "UPDATE_FAILED", - } -} - -type StudioComponentStatusCode string - -// Enum values for StudioComponentStatusCode -const ( - StudioComponentStatusCodeActiveDirectoryAlreadyExists StudioComponentStatusCode = "ACTIVE_DIRECTORY_ALREADY_EXISTS" - StudioComponentStatusCodeStudioComponentCreated StudioComponentStatusCode = "STUDIO_COMPONENT_CREATED" - StudioComponentStatusCodeStudioComponentUpdated StudioComponentStatusCode = "STUDIO_COMPONENT_UPDATED" - StudioComponentStatusCodeStudioComponentDeleted StudioComponentStatusCode = "STUDIO_COMPONENT_DELETED" - StudioComponentStatusCodeEncryptionKeyAccessDenied StudioComponentStatusCode = "ENCRYPTION_KEY_ACCESS_DENIED" - StudioComponentStatusCodeEncryptionKeyNotFound StudioComponentStatusCode = "ENCRYPTION_KEY_NOT_FOUND" - StudioComponentStatusCodeStudioComponentCreateInProgress StudioComponentStatusCode = "STUDIO_COMPONENT_CREATE_IN_PROGRESS" - StudioComponentStatusCodeStudioComponentUpdateInProgress StudioComponentStatusCode = "STUDIO_COMPONENT_UPDATE_IN_PROGRESS" - StudioComponentStatusCodeStudioComponentDeleteInProgress StudioComponentStatusCode = "STUDIO_COMPONENT_DELETE_IN_PROGRESS" - StudioComponentStatusCodeInternalError StudioComponentStatusCode = "INTERNAL_ERROR" -) - -// Values returns all known values for StudioComponentStatusCode. 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 (StudioComponentStatusCode) Values() []StudioComponentStatusCode { - return []StudioComponentStatusCode{ - "ACTIVE_DIRECTORY_ALREADY_EXISTS", - "STUDIO_COMPONENT_CREATED", - "STUDIO_COMPONENT_UPDATED", - "STUDIO_COMPONENT_DELETED", - "ENCRYPTION_KEY_ACCESS_DENIED", - "ENCRYPTION_KEY_NOT_FOUND", - "STUDIO_COMPONENT_CREATE_IN_PROGRESS", - "STUDIO_COMPONENT_UPDATE_IN_PROGRESS", - "STUDIO_COMPONENT_DELETE_IN_PROGRESS", - "INTERNAL_ERROR", - } -} - -type StudioComponentSubtype string - -// Enum values for StudioComponentSubtype -const ( - StudioComponentSubtypeAwsManagedMicrosoftAd StudioComponentSubtype = "AWS_MANAGED_MICROSOFT_AD" - StudioComponentSubtypeAmazonFsxForWindows StudioComponentSubtype = "AMAZON_FSX_FOR_WINDOWS" - StudioComponentSubtypeAmazonFsxForLustre StudioComponentSubtype = "AMAZON_FSX_FOR_LUSTRE" - StudioComponentSubtypeCustom StudioComponentSubtype = "CUSTOM" -) - -// Values returns all known values for StudioComponentSubtype. 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 (StudioComponentSubtype) Values() []StudioComponentSubtype { - return []StudioComponentSubtype{ - "AWS_MANAGED_MICROSOFT_AD", - "AMAZON_FSX_FOR_WINDOWS", - "AMAZON_FSX_FOR_LUSTRE", - "CUSTOM", - } -} - -type StudioComponentType string - -// Enum values for StudioComponentType -const ( - StudioComponentTypeActiveDirectory StudioComponentType = "ACTIVE_DIRECTORY" - StudioComponentTypeSharedFileSystem StudioComponentType = "SHARED_FILE_SYSTEM" - StudioComponentTypeComputeFarm StudioComponentType = "COMPUTE_FARM" - StudioComponentTypeLicenseService StudioComponentType = "LICENSE_SERVICE" - StudioComponentTypeCustom StudioComponentType = "CUSTOM" -) - -// Values returns all known values for StudioComponentType. 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 (StudioComponentType) Values() []StudioComponentType { - return []StudioComponentType{ - "ACTIVE_DIRECTORY", - "SHARED_FILE_SYSTEM", - "COMPUTE_FARM", - "LICENSE_SERVICE", - "CUSTOM", - } -} - -type StudioEncryptionConfigurationKeyType string - -// Enum values for StudioEncryptionConfigurationKeyType -const ( - StudioEncryptionConfigurationKeyTypeAwsOwnedKey StudioEncryptionConfigurationKeyType = "AWS_OWNED_KEY" - StudioEncryptionConfigurationKeyTypeCustomerManagedKey StudioEncryptionConfigurationKeyType = "CUSTOMER_MANAGED_KEY" -) - -// Values returns all known values for StudioEncryptionConfigurationKeyType. 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 (StudioEncryptionConfigurationKeyType) Values() []StudioEncryptionConfigurationKeyType { - return []StudioEncryptionConfigurationKeyType{ - "AWS_OWNED_KEY", - "CUSTOMER_MANAGED_KEY", - } -} - -type StudioPersona string - -// Enum values for StudioPersona -const ( - StudioPersonaAdministrator StudioPersona = "ADMINISTRATOR" -) - -// Values returns all known values for StudioPersona. 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 (StudioPersona) Values() []StudioPersona { - return []StudioPersona{ - "ADMINISTRATOR", - } -} - -type StudioState string - -// Enum values for StudioState -const ( - StudioStateCreateInProgress StudioState = "CREATE_IN_PROGRESS" - StudioStateReady StudioState = "READY" - StudioStateUpdateInProgress StudioState = "UPDATE_IN_PROGRESS" - StudioStateDeleteInProgress StudioState = "DELETE_IN_PROGRESS" - StudioStateDeleted StudioState = "DELETED" - StudioStateDeleteFailed StudioState = "DELETE_FAILED" - StudioStateCreateFailed StudioState = "CREATE_FAILED" - StudioStateUpdateFailed StudioState = "UPDATE_FAILED" -) - -// Values returns all known values for StudioState. 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 (StudioState) Values() []StudioState { - return []StudioState{ - "CREATE_IN_PROGRESS", - "READY", - "UPDATE_IN_PROGRESS", - "DELETE_IN_PROGRESS", - "DELETED", - "DELETE_FAILED", - "CREATE_FAILED", - "UPDATE_FAILED", - } -} - -type StudioStatusCode string - -// Enum values for StudioStatusCode -const ( - StudioStatusCodeStudioCreated StudioStatusCode = "STUDIO_CREATED" - StudioStatusCodeStudioDeleted StudioStatusCode = "STUDIO_DELETED" - StudioStatusCodeStudioUpdated StudioStatusCode = "STUDIO_UPDATED" - StudioStatusCodeStudioCreateInProgress StudioStatusCode = "STUDIO_CREATE_IN_PROGRESS" - StudioStatusCodeStudioUpdateInProgress StudioStatusCode = "STUDIO_UPDATE_IN_PROGRESS" - StudioStatusCodeStudioDeleteInProgress StudioStatusCode = "STUDIO_DELETE_IN_PROGRESS" - StudioStatusCodeStudioWithLaunchProfilesNotDeleted StudioStatusCode = "STUDIO_WITH_LAUNCH_PROFILES_NOT_DELETED" - StudioStatusCodeStudioWithStudioComponentsNotDeleted StudioStatusCode = "STUDIO_WITH_STUDIO_COMPONENTS_NOT_DELETED" - StudioStatusCodeStudioWithStreamingImagesNotDeleted StudioStatusCode = "STUDIO_WITH_STREAMING_IMAGES_NOT_DELETED" - StudioStatusCodeAwsSsoNotEnabled StudioStatusCode = "AWS_SSO_NOT_ENABLED" - StudioStatusCodeAwsSsoAccessDenied StudioStatusCode = "AWS_SSO_ACCESS_DENIED" - StudioStatusCodeRoleNotOwnedByStudioOwner StudioStatusCode = "ROLE_NOT_OWNED_BY_STUDIO_OWNER" - StudioStatusCodeRoleCouldNotBeAssumed StudioStatusCode = "ROLE_COULD_NOT_BE_ASSUMED" - StudioStatusCodeInternalError StudioStatusCode = "INTERNAL_ERROR" - StudioStatusCodeEncryptionKeyNotFound StudioStatusCode = "ENCRYPTION_KEY_NOT_FOUND" - StudioStatusCodeEncryptionKeyAccessDenied StudioStatusCode = "ENCRYPTION_KEY_ACCESS_DENIED" - StudioStatusCodeAwsSsoConfigurationRepaired StudioStatusCode = "AWS_SSO_CONFIGURATION_REPAIRED" - StudioStatusCodeAwsSsoConfigurationRepairInProgress StudioStatusCode = "AWS_SSO_CONFIGURATION_REPAIR_IN_PROGRESS" - StudioStatusCodeAwsStsRegionDisabled StudioStatusCode = "AWS_STS_REGION_DISABLED" -) - -// Values returns all known values for StudioStatusCode. 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 (StudioStatusCode) Values() []StudioStatusCode { - return []StudioStatusCode{ - "STUDIO_CREATED", - "STUDIO_DELETED", - "STUDIO_UPDATED", - "STUDIO_CREATE_IN_PROGRESS", - "STUDIO_UPDATE_IN_PROGRESS", - "STUDIO_DELETE_IN_PROGRESS", - "STUDIO_WITH_LAUNCH_PROFILES_NOT_DELETED", - "STUDIO_WITH_STUDIO_COMPONENTS_NOT_DELETED", - "STUDIO_WITH_STREAMING_IMAGES_NOT_DELETED", - "AWS_SSO_NOT_ENABLED", - "AWS_SSO_ACCESS_DENIED", - "ROLE_NOT_OWNED_BY_STUDIO_OWNER", - "ROLE_COULD_NOT_BE_ASSUMED", - "INTERNAL_ERROR", - "ENCRYPTION_KEY_NOT_FOUND", - "ENCRYPTION_KEY_ACCESS_DENIED", - "AWS_SSO_CONFIGURATION_REPAIRED", - "AWS_SSO_CONFIGURATION_REPAIR_IN_PROGRESS", - "AWS_STS_REGION_DISABLED", - } -} - -type VolumeRetentionMode string - -// Enum values for VolumeRetentionMode -const ( - VolumeRetentionModeRetain VolumeRetentionMode = "RETAIN" - VolumeRetentionModeDelete VolumeRetentionMode = "DELETE" -) - -// Values returns all known values for VolumeRetentionMode. 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 (VolumeRetentionMode) Values() []VolumeRetentionMode { - return []VolumeRetentionMode{ - "RETAIN", - "DELETE", - } -} diff --git a/service/nimble/types/errors.go b/service/nimble/types/errors.go deleted file mode 100644 index 60742b0b74a..00000000000 --- a/service/nimble/types/errors.go +++ /dev/null @@ -1,215 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - "fmt" - smithy "github.com/aws/smithy-go" -) - -// You are not authorized to perform this operation. Check your IAM policies, and -// ensure that you are using the correct access keys. -type AccessDeniedException struct { - Message *string - - ErrorCodeOverride *string - - Code *string - Context map[string]string - - noSmithyDocumentSerde -} - -func (e *AccessDeniedException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *AccessDeniedException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *AccessDeniedException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "AccessDeniedException" - } - return *e.ErrorCodeOverride -} -func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Another operation is in progress. -type ConflictException struct { - Message *string - - ErrorCodeOverride *string - - Code *string - Context map[string]string - - noSmithyDocumentSerde -} - -func (e *ConflictException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ConflictException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ConflictException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ConflictException" - } - return *e.ErrorCodeOverride -} -func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// An internal error has occurred. Please retry your request. -type InternalServerErrorException struct { - Message *string - - ErrorCodeOverride *string - - Code *string - Context map[string]string - - noSmithyDocumentSerde -} - -func (e *InternalServerErrorException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InternalServerErrorException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InternalServerErrorException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InternalServerErrorException" - } - return *e.ErrorCodeOverride -} -func (e *InternalServerErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } - -// The specified resource could not be found. -type ResourceNotFoundException struct { - Message *string - - ErrorCodeOverride *string - - Code *string - Context map[string]string - - noSmithyDocumentSerde -} - -func (e *ResourceNotFoundException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ResourceNotFoundException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ResourceNotFoundException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ResourceNotFoundException" - } - return *e.ErrorCodeOverride -} -func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Your current quota does not allow you to perform the request action. You can -// request increases for some quotas, and other quotas cannot be increased. -// -// Please use Amazon Web Services Service Quotas to request an increase. -type ServiceQuotaExceededException struct { - Message *string - - ErrorCodeOverride *string - - Code *string - Context map[string]string - - noSmithyDocumentSerde -} - -func (e *ServiceQuotaExceededException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ServiceQuotaExceededException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ServiceQuotaExceededException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ServiceQuotaExceededException" - } - return *e.ErrorCodeOverride -} -func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The request throughput limit was exceeded. -type ThrottlingException struct { - Message *string - - ErrorCodeOverride *string - - Code *string - Context map[string]string - - noSmithyDocumentSerde -} - -func (e *ThrottlingException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ThrottlingException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ThrottlingException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ThrottlingException" - } - return *e.ErrorCodeOverride -} -func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// One of the parameters in the request is invalid. -type ValidationException struct { - Message *string - - ErrorCodeOverride *string - - Code *string - Context map[string]string - - noSmithyDocumentSerde -} - -func (e *ValidationException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ValidationException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ValidationException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ValidationException" - } - return *e.ErrorCodeOverride -} -func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/nimble/types/types.go b/service/nimble/types/types.go deleted file mode 100644 index 801968e6287..00000000000 --- a/service/nimble/types/types.go +++ /dev/null @@ -1,1612 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - smithydocument "github.com/aws/smithy-go/document" - "time" -) - -// An LDAP attribute of an Active Directory computer account, in the form of a -// name:value pair. -type ActiveDirectoryComputerAttribute struct { - - // The name for the LDAP attribute. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Name *string - - // The value for the LDAP attribute. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Value *string - - noSmithyDocumentSerde -} - -// The configuration for a Directory Service for Microsoft Active Directory studio -// resource. -type ActiveDirectoryConfiguration struct { - - // A collection of custom attributes for an Active Directory computer. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ComputerAttributes []ActiveDirectoryComputerAttribute - - // The directory ID of the Directory Service for Microsoft Active Directory to - // access using this studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - DirectoryId *string - - // The distinguished name (DN) and organizational unit (OU) of an Active Directory - // computer. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - OrganizationalUnitDistinguishedName *string - - noSmithyDocumentSerde -} - -// The configuration for a render farm that is associated with a studio resource. -type ComputeFarmConfiguration struct { - - // The name of an Active Directory user that is used on ComputeFarm worker - // instances. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ActiveDirectoryUser *string - - // The endpoint of the ComputeFarm that is accessed by the studio component - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Endpoint *string - - noSmithyDocumentSerde -} - -// Represents a EULA resource. -type Eula struct { - - // The EULA content. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Content *string - - // The ISO timestamp in seconds for when the resource was created. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - CreatedAt *time.Time - - // The EULA ID. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - EulaId *string - - // The name for the EULA. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Name *string - - // The ISO timestamp in seconds for when the resource was updated. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - UpdatedAt *time.Time - - noSmithyDocumentSerde -} - -// The acceptance of a EULA, required to use Amazon-provided streaming images. -type EulaAcceptance struct { - - // The ISO timestamp in seconds for when the EULA was accepted. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - AcceptedAt *time.Time - - // The ID of the person who accepted the EULA. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - AcceptedBy *string - - // The ID of the acceptee. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - AccepteeId *string - - // The EULA acceptance ID. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - EulaAcceptanceId *string - - // The EULA ID. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - EulaId *string - - noSmithyDocumentSerde -} - -// A launch profile controls your artist workforce’s access to studio components, -// like compute farms, shared file systems, managed file systems, and license -// server configurations, as well as instance types and Amazon Machine Images -// (AMIs). -// -// Studio administrators create launch profiles in the Nimble Studio console. -// Artists can use their launch profiles to launch an instance from the Nimble -// Studio portal. Each user’s launch profile defines how they can launch a -// streaming session. By default, studio admins can use all launch profiles. -type LaunchProfile struct { - - // The Amazon Resource Name (ARN) that is assigned to a studio resource and - // uniquely identifies it. ARNs are unique across all Regions. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Arn *string - - // The ISO timestamp in seconds for when the resource was created. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - CreatedAt *time.Time - - // The user ID of the user that created the launch profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - CreatedBy *string - - // A human-readable description of the launch profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Description *string - - // Unique identifiers for a collection of EC2 subnets. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Ec2SubnetIds []string - - // The ID of the launch profile used to control access from the streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileId *string - - // The version number of the protocol that is used by the launch profile. The only - // valid version is "2021-03-31". - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileProtocolVersions []string - - // A friendly name for the launch profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Name *string - - // The current state. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - State LaunchProfileState - - // The status code. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StatusCode LaunchProfileStatusCode - - // The status message for the launch profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StatusMessage *string - - // A configuration for a streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamConfiguration *StreamConfiguration - - // Unique identifiers for a collection of studio components that can be used with - // this launch profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponentIds []string - - // A collection of labels, in the form of key-value pairs, that apply to this - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Tags map[string]string - - // The ISO timestamp in seconds for when the resource was updated. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - UpdatedAt *time.Time - - // The user ID of the user that most recently updated the resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - UpdatedBy *string - - // The list of the latest validation results. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ValidationResults []ValidationResult - - noSmithyDocumentSerde -} - -// A launch profile initialization contains information required for a workstation -// or server to connect to a launch profile. -// -// This includes scripts, endpoints, security groups, subnets, and other -// configuration. -type LaunchProfileInitialization struct { - - // A LaunchProfileInitializationActiveDirectory resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ActiveDirectory *LaunchProfileInitializationActiveDirectory - - // The EC2 security groups that control access to the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Ec2SecurityGroupIds []string - - // The ID of the launch profile used to control access from the streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileId *string - - // The version number of the protocol that is used by the launch profile. The only - // valid version is "2021-03-31". - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileProtocolVersion *string - - // The launch purpose. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchPurpose *string - - // The name for the launch profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Name *string - - // The platform of the launch platform, either Windows or Linux. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Platform LaunchProfilePlatform - - // The system initializtion scripts. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SystemInitializationScripts []LaunchProfileInitializationScript - - // The user initializtion scripts. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - UserInitializationScripts []LaunchProfileInitializationScript - - noSmithyDocumentSerde -} - -// The launch profile initialization Active Directory contains information -// required for the launch profile to connect to the Active Directory. -type LaunchProfileInitializationActiveDirectory struct { - - // A collection of custom attributes for an Active Directory computer. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ComputerAttributes []ActiveDirectoryComputerAttribute - - // The directory ID of the Directory Service for Microsoft Active Directory to - // access using this launch profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - DirectoryId *string - - // The directory name. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - DirectoryName *string - - // The DNS IP address. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - DnsIpAddresses []string - - // The name for the organizational unit distinguished name. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - OrganizationalUnitDistinguishedName *string - - // The unique identifier for a studio component resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponentId *string - - // The name for the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponentName *string - - noSmithyDocumentSerde -} - -// The launch profile initialization script is used when start streaming session -// runs. -type LaunchProfileInitializationScript struct { - - // An IAM role attached to a Studio Component that gives the studio component - // access to Amazon Web Services resources at anytime while the instance is - // running. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - RuntimeRoleArn *string - - // The initialization script. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Script *string - - // An IAM role attached to Studio Component when the system initialization script - // runs which give the studio component access to Amazon Web Services resources - // when the system initialization script runs. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SecureInitializationRoleArn *string - - // The unique identifier for a studio component resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponentId *string - - // The name for the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponentName *string - - noSmithyDocumentSerde -} - -// Studio admins can use launch profile membership to delegate launch profile -// access to studio users in the Nimble Studio portal without writing or -// maintaining complex IAM policies. A launch profile member is a user association -// from your studio identity source who is granted permissions to a launch profile. -// -// A launch profile member (type USER) provides the following permissions to that -// launch profile: -// -// - GetLaunchProfile -// -// - GetLaunchProfileInitialization -// -// - GetLaunchProfileMembers -// -// - GetLaunchProfileMember -// -// - CreateStreamingSession -// -// - GetLaunchProfileDetails -type LaunchProfileMembership struct { - - // The ID of the identity store. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - IdentityStoreId *string - - // The persona. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Persona LaunchProfilePersona - - // The principal ID. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - PrincipalId *string - - // The Active Directory Security Identifier for this user, if available. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Sid *string - - noSmithyDocumentSerde -} - -// The configuration for a license service that is associated with a studio -// resource. -type LicenseServiceConfiguration struct { - - // The endpoint of the license service that is accessed by the studio component - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Endpoint *string - - noSmithyDocumentSerde -} - -// A new member that is added to a launch profile. -type NewLaunchProfileMember struct { - - // The persona. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Persona LaunchProfilePersona - - // The principal ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - PrincipalId *string - - noSmithyDocumentSerde -} - -// A new studio user's membership. -type NewStudioMember struct { - - // The persona. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Persona StudioPersona - - // The principal ID. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - PrincipalId *string - - noSmithyDocumentSerde -} - -// A parameter for a studio component script, in the form of a key-value pair. -type ScriptParameterKeyValue struct { - - // A script parameter key. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Key *string - - // A script parameter value. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Value *string - - noSmithyDocumentSerde -} - -// The configuration for a shared file storage system that is associated with a -// studio resource. -type SharedFileSystemConfiguration struct { - - // The endpoint of the shared file system that is accessed by the studio component - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Endpoint *string - - // The unique identifier for a file system. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - FileSystemId *string - - // The mount location for a shared file system on a Linux virtual workstation. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LinuxMountPoint *string - - // The name of the file share. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ShareName *string - - // The mount location for a shared file system on a Windows virtual workstation. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - WindowsMountDrive *string - - noSmithyDocumentSerde -} - -// A configuration for a streaming session. -type StreamConfiguration struct { - - // Allows or deactivates the use of the system clipboard to copy and paste between - // the streaming session and streaming client. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClipboardMode StreamingClipboardMode - - // The EC2 instance types that users can select from when launching a streaming - // session with this launch profile. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Ec2InstanceTypes []StreamingInstanceType - - // The streaming images that users can select from when launching a streaming - // session with this launch profile. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingImageIds []string - - // Indicates if a streaming session created from this launch profile should be - // terminated automatically or retained without termination after being in a - // STOPPED state. - // - // - When ACTIVATED , the streaming session is scheduled for termination after - // being in the STOPPED state for the time specified in - // maxStoppedSessionLengthInMinutes . - // - // - When DEACTIVATED , the streaming session can remain in the STOPPED state - // indefinitely. - // - // This parameter is only allowed when sessionPersistenceMode is ACTIVATED . When - // allowed, the default value for this parameter is DEACTIVATED . - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - AutomaticTerminationMode AutomaticTerminationMode - - // The length of time, in minutes, that a streaming session can be active before - // it is stopped or terminated. After this point, Nimble Studio automatically - // terminates or stops the session. The default length of time is 690 minutes, and - // the maximum length of time is 30 days. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - MaxSessionLengthInMinutes *int32 - - // Integer that determines if you can start and stop your sessions and how long a - // session can stay in the STOPPED state. The default value is 0. The maximum - // value is 5760. - // - // This field is allowed only when sessionPersistenceMode is ACTIVATED and - // automaticTerminationMode is ACTIVATED . - // - // If the value is set to 0, your sessions can’t be STOPPED . If you then call - // StopStreamingSession , the session fails. If the time that a session stays in - // the READY state exceeds the maxSessionLengthInMinutes value, the session will - // automatically be terminated (instead of STOPPED ). - // - // If the value is set to a positive number, the session can be stopped. You can - // call StopStreamingSession to stop sessions in the READY state. If the time that - // a session stays in the READY state exceeds the maxSessionLengthInMinutes value, - // the session will automatically be stopped (instead of terminated). - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - MaxStoppedSessionLengthInMinutes int32 - - // Information about the streaming session backup. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionBackup *StreamConfigurationSessionBackup - - // Determine if a streaming session created from this launch profile can configure - // persistent storage. This means that volumeConfiguration and - // automaticTerminationMode are configured. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionPersistenceMode SessionPersistenceMode - - // The upload storage for a streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionStorage *StreamConfigurationSessionStorage - - // Custom volume configuration for the root volumes that are attached to streaming - // sessions. - // - // This parameter is only allowed when sessionPersistenceMode is ACTIVATED . - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - VolumeConfiguration *VolumeConfiguration - - noSmithyDocumentSerde -} - -// Configuration for streaming workstations created using this launch profile. -type StreamConfigurationCreate struct { - - // Allows or deactivates the use of the system clipboard to copy and paste between - // the streaming session and streaming client. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ClipboardMode StreamingClipboardMode - - // The EC2 instance types that users can select from when launching a streaming - // session with this launch profile. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Ec2InstanceTypes []StreamingInstanceType - - // The streaming images that users can select from when launching a streaming - // session with this launch profile. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingImageIds []string - - // Indicates if a streaming session created from this launch profile should be - // terminated automatically or retained without termination after being in a - // STOPPED state. - // - // - When ACTIVATED , the streaming session is scheduled for termination after - // being in the STOPPED state for the time specified in - // maxStoppedSessionLengthInMinutes . - // - // - When DEACTIVATED , the streaming session can remain in the STOPPED state - // indefinitely. - // - // This parameter is only allowed when sessionPersistenceMode is ACTIVATED . When - // allowed, the default value for this parameter is DEACTIVATED . - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - AutomaticTerminationMode AutomaticTerminationMode - - // The length of time, in minutes, that a streaming session can be active before - // it is stopped or terminated. After this point, Nimble Studio automatically - // terminates or stops the session. The default length of time is 690 minutes, and - // the maximum length of time is 30 days. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - MaxSessionLengthInMinutes *int32 - - // Integer that determines if you can start and stop your sessions and how long a - // session can stay in the STOPPED state. The default value is 0. The maximum - // value is 5760. - // - // This field is allowed only when sessionPersistenceMode is ACTIVATED and - // automaticTerminationMode is ACTIVATED . - // - // If the value is set to 0, your sessions can’t be STOPPED . If you then call - // StopStreamingSession , the session fails. If the time that a session stays in - // the READY state exceeds the maxSessionLengthInMinutes value, the session will - // automatically be terminated (instead of STOPPED ). - // - // If the value is set to a positive number, the session can be stopped. You can - // call StopStreamingSession to stop sessions in the READY state. If the time that - // a session stays in the READY state exceeds the maxSessionLengthInMinutes value, - // the session will automatically be stopped (instead of terminated). - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - MaxStoppedSessionLengthInMinutes int32 - - // Configures how streaming sessions are backed up when launched from this launch - // profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionBackup *StreamConfigurationSessionBackup - - // Determine if a streaming session created from this launch profile can configure - // persistent storage. This means that volumeConfiguration and - // automaticTerminationMode are configured. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionPersistenceMode SessionPersistenceMode - - // The upload storage for a streaming workstation that is created using this - // launch profile. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionStorage *StreamConfigurationSessionStorage - - // Custom volume configuration for the root volumes that are attached to streaming - // sessions. - // - // This parameter is only allowed when sessionPersistenceMode is ACTIVATED . - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - VolumeConfiguration *VolumeConfiguration - - noSmithyDocumentSerde -} - -// Configures how streaming sessions are backed up when launched from this launch -// profile. -type StreamConfigurationSessionBackup struct { - - // The maximum number of backups that each streaming session created from this - // launch profile can have. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - MaxBackupsToRetain int32 - - // Specifies how artists sessions are backed up. - // - // Configures backups for streaming sessions launched with this launch profile. - // The default value is DEACTIVATED , which means that backups are deactivated. To - // allow backups, set this value to AUTOMATIC . - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Mode SessionBackupMode - - noSmithyDocumentSerde -} - -// The configuration for a streaming session’s upload storage. -type StreamConfigurationSessionStorage struct { - - // Allows artists to upload files to their workstations. The only valid option is - // UPLOAD . - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Mode []StreamingSessionStorageMode - - // The configuration for the upload storage root of the streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Root *StreamingSessionStorageRoot - - noSmithyDocumentSerde -} - -// Represents a streaming image resource. -// -// Streaming images are used by studio users to select which operating system and -// software they want to use in a Nimble Studio streaming session. -// -// Amazon provides a number of streaming images that include popular 3rd-party -// software. -// -// You can create your own streaming images using an Amazon EC2 machine image that -// you create for this purpose. You can also include software that your users -// require. -type StreamingImage struct { - - // The Amazon Resource Name (ARN) that is assigned to a studio resource and - // uniquely identifies it. ARNs are unique across all Regions. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Arn *string - - // A human-readable description of the streaming image. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Description *string - - // The ID of an EC2 machine image with which to create the streaming image. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Ec2ImageId *string - - // The encryption configuration. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - EncryptionConfiguration *StreamingImageEncryptionConfiguration - - // The list of EULAs that must be accepted before a Streaming Session can be - // started using this streaming image. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - EulaIds []string - - // A friendly name for a streaming image resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Name *string - - // The owner of the streaming image, either the studioId that contains the - // streaming image, or amazon for images that are provided by Amazon Nimble Studio. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Owner *string - - // The platform of the streaming image, either Windows or Linux. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Platform *string - - // The current state. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - State StreamingImageState - - // The status code. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StatusCode StreamingImageStatusCode - - // The status message for the streaming image. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StatusMessage *string - - // The ID of the streaming image. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingImageId *string - - // A collection of labels, in the form of key-value pairs, that apply to this - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Tags map[string]string - - noSmithyDocumentSerde -} - -// Specifies how a streaming image is encrypted. -type StreamingImageEncryptionConfiguration struct { - - // The type of KMS key that is used to encrypt studio data. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - KeyType StreamingImageEncryptionConfigurationKeyType - - // The ARN for a KMS key that is used to encrypt studio data. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - KeyArn *string - - noSmithyDocumentSerde -} - -// A streaming session is a virtual workstation created using a particular launch -// profile. -type StreamingSession struct { - - // The Amazon Resource Name (ARN) that is assigned to a studio resource and - // uniquely identifies it. ARNs are unique across all Regions. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Arn *string - - // Indicates if a streaming session created from this launch profile should be - // terminated automatically or retained without termination after being in a - // STOPPED state. - // - // - When ACTIVATED , the streaming session is scheduled for termination after - // being in the STOPPED state for the time specified in - // maxStoppedSessionLengthInMinutes . - // - // - When DEACTIVATED , the streaming session can remain in the STOPPED state - // indefinitely. - // - // This parameter is only allowed when sessionPersistenceMode is ACTIVATED . When - // allowed, the default value for this parameter is DEACTIVATED . - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - AutomaticTerminationMode AutomaticTerminationMode - - // Shows the current backup setting of the session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - BackupMode SessionBackupMode - - // The ISO timestamp in seconds for when the resource was created. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - CreatedAt *time.Time - - // The user ID of the user that created the streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - CreatedBy *string - - // The EC2 Instance type used for the streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Ec2InstanceType *string - - // The ID of the launch profile used to control access from the streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileId *string - - // The maximum number of backups of a streaming session that you can have. When - // the maximum number of backups is reached, the oldest backup is deleted. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - MaxBackupsToRetain int32 - - // The user ID of the user that owns the streaming session. The user that owns the - // session will be logging into the session and interacting with the virtual - // workstation. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - OwnedBy *string - - // The session ID. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionId *string - - // Determine if a streaming session created from this launch profile can configure - // persistent storage. This means that volumeConfiguration and - // automaticTerminationMode are configured. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionPersistenceMode SessionPersistenceMode - - // The time the session entered START_IN_PROGRESS state. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StartedAt *time.Time - - // The user ID of the user that started the streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StartedBy *string - - // The backup ID used to restore a streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StartedFromBackupId *string - - // The current state. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - State StreamingSessionState - - // The status code. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StatusCode StreamingSessionStatusCode - - // The status message for the streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StatusMessage *string - - // The time the streaming session will automatically be stopped if the user - // doesn’t stop the session themselves. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StopAt *time.Time - - // The time the session entered STOP_IN_PROGRESS state. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StoppedAt *time.Time - - // The user ID of the user that stopped the streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StoppedBy *string - - // The ID of the streaming image. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamingImageId *string - - // A collection of labels, in the form of key-value pairs, that apply to this - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Tags map[string]string - - // The time the streaming session will automatically terminate if not terminated - // by the user. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - TerminateAt *time.Time - - // The ISO timestamp in seconds for when the resource was updated. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - UpdatedAt *time.Time - - // The user ID of the user that most recently updated the resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - UpdatedBy *string - - // Custom volume configuration for the root volumes that are attached to streaming - // sessions. - // - // This parameter is only allowed when sessionPersistenceMode is ACTIVATED . - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - VolumeConfiguration *VolumeConfiguration - - // Determine if an EBS volume created from this streaming session will be backed - // up. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - VolumeRetentionMode VolumeRetentionMode - - noSmithyDocumentSerde -} - -// Information about the streaming session backup. -type StreamingSessionBackup struct { - - // The Amazon Resource Name (ARN) that is assigned to a studio resource and - // uniquely identifies it. ARNs are unique across all Regions. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Arn *string - - // The ID of the backup. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - BackupId *string - - // The ISO timestamp in for when the resource was created. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - CreatedAt *time.Time - - // The ID of the launch profile which allowed the backups for the streaming - // session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileId *string - - // The user ID of the user that owns the streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - OwnedBy *string - - // The streaming session ID for the StreamingSessionBackup . - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SessionId *string - - // The streaming session state. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - State StreamingSessionState - - // The status code. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StatusCode StreamingSessionStatusCode - - // The status message for the streaming session backup. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StatusMessage *string - - // A collection of labels, in the form of key-value pairs, that apply to this - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Tags map[string]string - - noSmithyDocumentSerde -} - -// The upload storage root location (folder) on streaming workstations where files -// are uploaded. -type StreamingSessionStorageRoot struct { - - // The folder path in Linux workstations where files are uploaded. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Linux *string - - // The folder path in Windows workstations where files are uploaded. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Windows *string - - noSmithyDocumentSerde -} - -// A stream is an active connection to a streaming session, enabling a studio user -// to control the streaming session using a compatible client. Streaming session -// streams are compatible with the NICE DCV web client, included in the Nimble -// Studio portal, or the NICE DCV desktop client. -type StreamingSessionStream struct { - - // The ISO timestamp in seconds for when the resource was created. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - CreatedAt *time.Time - - // The user ID of the user that created the streaming session stream. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - CreatedBy *string - - // The ISO timestamp in seconds for when the resource expires. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ExpiresAt *time.Time - - // The user ID of the user that owns the streaming session. The user that owns the - // session will be logging into the session and interacting with the virtual - // workstation. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - OwnedBy *string - - // The current state. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - State StreamingSessionStreamState - - // The streaming session stream status code. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StatusCode StreamingSessionStreamStatusCode - - // The stream ID. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StreamId *string - - // The URL to connect to this stream using the DCV client. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Url *string - - noSmithyDocumentSerde -} - -// Represents a studio resource. -// -// A studio is the core resource used with Nimble Studio. You must create a studio -// first, before any other resource type can be created. All other resources you -// create and manage in Nimble Studio are contained within a studio. -// -// When creating a studio, you must provides two IAM roles for use with the Nimble -// Studio portal. These roles are assumed by your users when they log in to the -// Nimble Studio portal via IAM Identity Center and your identity source. -// -// The user role must have the AmazonNimbleStudio-StudioUser managed policy -// attached for the portal to function properly. -// -// The admin role must have the AmazonNimbleStudio-StudioAdmin managed policy -// attached for the portal to function properly. -// -// Your studio roles must trust the identity.nimble.amazonaws.com service -// principal to function properly. -type Studio struct { - - // The IAM role that studio admins assume when logging in to the Nimble Studio - // portal. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - AdminRoleArn *string - - // The Amazon Resource Name (ARN) that is assigned to a studio resource and - // uniquely identifies it. ARNs are unique across all Regions. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Arn *string - - // The ISO timestamp in seconds for when the resource was created. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - CreatedAt *time.Time - - // A friendly name for the studio. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - DisplayName *string - - // The Amazon Web Services Region where the studio resource is located. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - HomeRegion *string - - // The IAM Identity Center application client ID used to integrate with IAM - // Identity Center. This ID allows IAM Identity Center users to log in to Nimble - // Studio portal. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SsoClientId *string - - // The current state of the studio resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - State StudioState - - // Status codes that provide additional detail on the studio state. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StatusCode StudioStatusCode - - // Additional detail on the studio state. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StatusMessage *string - - // Configuration of the encryption method that is used for the studio. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioEncryptionConfiguration *StudioEncryptionConfiguration - - // The unique identifier for a studio resource. In Nimble Studio, all other - // resources are contained in a studio resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioId *string - - // The name of the studio, as included in the URL when accessing it in the Nimble - // Studio portal. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioName *string - - // The address of the web page for the studio. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioUrl *string - - // A collection of labels, in the form of key-value pairs, that apply to this - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Tags map[string]string - - // The ISO timestamp in seconds for when the resource was updated. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - UpdatedAt *time.Time - - // The IAM role that studio users assume when logging in to the Nimble Studio - // portal. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - UserRoleArn *string - - noSmithyDocumentSerde -} - -// A studio component represents a network resource to be used by a studio's users -// and workflows. A typical studio contains studio components for each of the -// following: render farm, Active Directory, licensing, and file system. -// -// Access to a studio component is managed by specifying security groups for the -// resource, as well as its endpoint. -// -// A studio component also has a set of initialization scripts that are returned -// by GetLaunchProfileInitialization . These initialization scripts run on -// streaming sessions when they start. They provide users with flexibility in -// controlling how the studio resources are configured on a streaming session. -type StudioComponent struct { - - // The Amazon Resource Name (ARN) that is assigned to a studio resource and - // uniquely identifies it. ARNs are unique across all Regions. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Arn *string - - // The configuration of the studio component, based on component type. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Configuration *StudioComponentConfiguration - - // The ISO timestamp in seconds for when the resource was created. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - CreatedAt *time.Time - - // The user ID of the user that created the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - CreatedBy *string - - // A human-readable description for the studio component resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Description *string - - // The EC2 security groups that control access to the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Ec2SecurityGroupIds []string - - // Initialization scripts for studio components. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - InitializationScripts []StudioComponentInitializationScript - - // A friendly name for the studio component resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Name *string - - // An IAM role attached to a Studio Component that gives the studio component - // access to Amazon Web Services resources at anytime while the instance is - // running. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - RuntimeRoleArn *string - - // Parameters for the studio component scripts. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ScriptParameters []ScriptParameterKeyValue - - // An IAM role attached to Studio Component when the system initialization script - // runs which give the studio component access to Amazon Web Services resources - // when the system initialization script runs. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SecureInitializationRoleArn *string - - // The current state. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - State StudioComponentState - - // The status code. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StatusCode StudioComponentStatusCode - - // The status message for the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StatusMessage *string - - // The unique identifier for a studio component resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponentId *string - - // The specific subtype of a studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Subtype StudioComponentSubtype - - // A collection of labels, in the form of key-value pairs, that apply to this - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Tags map[string]string - - // The type of the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Type StudioComponentType - - // The ISO timestamp in seconds for when the resource was updated. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - UpdatedAt *time.Time - - // The user ID of the user that most recently updated the resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - UpdatedBy *string - - noSmithyDocumentSerde -} - -// The configuration of the studio component, based on component type. -type StudioComponentConfiguration struct { - - // The configuration for a Directory Service for Microsoft Active Directory studio - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ActiveDirectoryConfiguration *ActiveDirectoryConfiguration - - // The configuration for a render farm that is associated with a studio resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - ComputeFarmConfiguration *ComputeFarmConfiguration - - // The configuration for a license service that is associated with a studio - // resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LicenseServiceConfiguration *LicenseServiceConfiguration - - // The configuration for a shared file storage system that is associated with a - // studio resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - SharedFileSystemConfiguration *SharedFileSystemConfiguration - - noSmithyDocumentSerde -} - -// Initialization scripts for studio components. -type StudioComponentInitializationScript struct { - - // The version number of the protocol that is used by the launch profile. The only - // valid version is "2021-03-31". - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - LaunchProfileProtocolVersion *string - - // The platform of the initialization script, either Windows or Linux. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Platform LaunchProfilePlatform - - // The method to use when running the initialization script. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - RunContext StudioComponentInitializationScriptRunContext - - // The initialization script. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Script *string - - noSmithyDocumentSerde -} - -// The studio component's summary. -type StudioComponentSummary struct { - - // The ISO timestamp in seconds for when the resource was created. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - CreatedAt *time.Time - - // The user ID of the user that created the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - CreatedBy *string - - // The description. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Description *string - - // The name for the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Name *string - - // The unique identifier for a studio component resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StudioComponentId *string - - // The specific subtype of a studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Subtype StudioComponentSubtype - - // The type of the studio component. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Type StudioComponentType - - // The ISO timestamp in seconds for when the resource was updated. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - UpdatedAt *time.Time - - // The user ID of the user that most recently updated the resource. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - UpdatedBy *string - - noSmithyDocumentSerde -} - -// Configuration of the encryption method that is used for the studio. -type StudioEncryptionConfiguration struct { - - // The type of KMS key that is used to encrypt studio data. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - KeyType StudioEncryptionConfigurationKeyType - - // The ARN for a KMS key that is used to encrypt studio data. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - KeyArn *string - - noSmithyDocumentSerde -} - -// A studio member is an association of a user from your studio identity source to -// elevated permissions that they are granted in the studio. -// -// When you add a user to your studio using the Nimble Studio console, they are -// given access to the studio's IAM Identity Center application and are given -// access to log in to the Nimble Studio portal. These users have the permissions -// provided by the studio's user IAM role and do not appear in the studio -// membership collection. Only studio admins appear in studio membership. -// -// When you add a user to studio membership with the ADMIN persona, upon logging -// in to the Nimble Studio portal, they are granted permissions specified by the -// Studio's Admin IAM role. -type StudioMembership struct { - - // The ID of the identity store. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - IdentityStoreId *string - - // The persona. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Persona StudioPersona - - // The principal ID. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - PrincipalId *string - - // The Active Directory Security Identifier for this user, if available. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Sid *string - - noSmithyDocumentSerde -} - -// The launch profile validation result. -type ValidationResult struct { - - // The current state. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - State LaunchProfileValidationState - - // The status code. This will contain the failure reason if the state is - // VALIDATION_FAILED . - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StatusCode LaunchProfileValidationStatusCode - - // The status message for the validation result. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - StatusMessage *string - - // The type of the validation result. - // - // This member is required. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Type LaunchProfileValidationType - - noSmithyDocumentSerde -} - -// Custom volume configuration for the root volumes that are attached to streaming -// sessions. -// -// This parameter is only allowed when sessionPersistenceMode is ACTIVATED . -type VolumeConfiguration struct { - - // The number of I/O operations per second for the root volume that is attached to - // streaming session. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Iops *int32 - - // The size of the root volume that is attached to the streaming session. The root - // volume size is measured in GiBs. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Size *int32 - - // The throughput to provision for the root volume that is attached to the - // streaming session. The throughput is measured in MiB/s. - // - // Deprecated: AWS has deprecated this service. It is no longer available for use. - Throughput *int32 - - noSmithyDocumentSerde -} - -type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/nimble/validators.go b/service/nimble/validators.go deleted file mode 100644 index 0c08895d671..00000000000 --- a/service/nimble/validators.go +++ /dev/null @@ -1,2145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package nimble - -import ( - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/nimble/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" -) - -type validateOpAcceptEulas struct { -} - -func (*validateOpAcceptEulas) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAcceptEulas) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AcceptEulasInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAcceptEulasInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateLaunchProfile struct { -} - -func (*validateOpCreateLaunchProfile) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateLaunchProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateLaunchProfileInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateLaunchProfileInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateStreamingImage struct { -} - -func (*validateOpCreateStreamingImage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateStreamingImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateStreamingImageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateStreamingImageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateStreamingSession struct { -} - -func (*validateOpCreateStreamingSession) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateStreamingSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateStreamingSessionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateStreamingSessionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateStreamingSessionStream struct { -} - -func (*validateOpCreateStreamingSessionStream) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateStreamingSessionStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateStreamingSessionStreamInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateStreamingSessionStreamInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateStudioComponent struct { -} - -func (*validateOpCreateStudioComponent) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateStudioComponent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateStudioComponentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateStudioComponentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateStudio struct { -} - -func (*validateOpCreateStudio) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateStudio) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateStudioInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateStudioInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteLaunchProfile struct { -} - -func (*validateOpDeleteLaunchProfile) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteLaunchProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteLaunchProfileInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteLaunchProfileInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteLaunchProfileMember struct { -} - -func (*validateOpDeleteLaunchProfileMember) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteLaunchProfileMember) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteLaunchProfileMemberInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteLaunchProfileMemberInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteStreamingImage struct { -} - -func (*validateOpDeleteStreamingImage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteStreamingImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteStreamingImageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteStreamingImageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteStreamingSession struct { -} - -func (*validateOpDeleteStreamingSession) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteStreamingSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteStreamingSessionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteStreamingSessionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteStudioComponent struct { -} - -func (*validateOpDeleteStudioComponent) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteStudioComponent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteStudioComponentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteStudioComponentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteStudio struct { -} - -func (*validateOpDeleteStudio) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteStudio) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteStudioInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteStudioInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteStudioMember struct { -} - -func (*validateOpDeleteStudioMember) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteStudioMember) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteStudioMemberInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteStudioMemberInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetEula struct { -} - -func (*validateOpGetEula) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetEula) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetEulaInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetEulaInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetLaunchProfileDetails struct { -} - -func (*validateOpGetLaunchProfileDetails) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetLaunchProfileDetails) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetLaunchProfileDetailsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetLaunchProfileDetailsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetLaunchProfileInitialization struct { -} - -func (*validateOpGetLaunchProfileInitialization) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetLaunchProfileInitialization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetLaunchProfileInitializationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetLaunchProfileInitializationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetLaunchProfile struct { -} - -func (*validateOpGetLaunchProfile) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetLaunchProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetLaunchProfileInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetLaunchProfileInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetLaunchProfileMember struct { -} - -func (*validateOpGetLaunchProfileMember) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetLaunchProfileMember) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetLaunchProfileMemberInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetLaunchProfileMemberInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetStreamingImage struct { -} - -func (*validateOpGetStreamingImage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetStreamingImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetStreamingImageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetStreamingImageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetStreamingSessionBackup struct { -} - -func (*validateOpGetStreamingSessionBackup) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetStreamingSessionBackup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetStreamingSessionBackupInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetStreamingSessionBackupInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetStreamingSession struct { -} - -func (*validateOpGetStreamingSession) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetStreamingSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetStreamingSessionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetStreamingSessionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetStreamingSessionStream struct { -} - -func (*validateOpGetStreamingSessionStream) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetStreamingSessionStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetStreamingSessionStreamInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetStreamingSessionStreamInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetStudioComponent struct { -} - -func (*validateOpGetStudioComponent) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetStudioComponent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetStudioComponentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetStudioComponentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetStudio struct { -} - -func (*validateOpGetStudio) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetStudio) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetStudioInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetStudioInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetStudioMember struct { -} - -func (*validateOpGetStudioMember) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetStudioMember) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetStudioMemberInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetStudioMemberInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListEulaAcceptances struct { -} - -func (*validateOpListEulaAcceptances) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListEulaAcceptances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListEulaAcceptancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListEulaAcceptancesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListLaunchProfileMembers struct { -} - -func (*validateOpListLaunchProfileMembers) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListLaunchProfileMembers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListLaunchProfileMembersInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListLaunchProfileMembersInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListLaunchProfiles struct { -} - -func (*validateOpListLaunchProfiles) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListLaunchProfiles) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListLaunchProfilesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListLaunchProfilesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListStreamingImages struct { -} - -func (*validateOpListStreamingImages) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListStreamingImages) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListStreamingImagesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListStreamingImagesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListStreamingSessionBackups struct { -} - -func (*validateOpListStreamingSessionBackups) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListStreamingSessionBackups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListStreamingSessionBackupsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListStreamingSessionBackupsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListStreamingSessions struct { -} - -func (*validateOpListStreamingSessions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListStreamingSessions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListStreamingSessionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListStreamingSessionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListStudioComponents struct { -} - -func (*validateOpListStudioComponents) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListStudioComponents) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListStudioComponentsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListStudioComponentsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListStudioMembers struct { -} - -func (*validateOpListStudioMembers) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListStudioMembers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListStudioMembersInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListStudioMembersInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListTagsForResource struct { -} - -func (*validateOpListTagsForResource) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListTagsForResourceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListTagsForResourceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutLaunchProfileMembers struct { -} - -func (*validateOpPutLaunchProfileMembers) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutLaunchProfileMembers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutLaunchProfileMembersInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutLaunchProfileMembersInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutStudioMembers struct { -} - -func (*validateOpPutStudioMembers) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutStudioMembers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutStudioMembersInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutStudioMembersInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpStartStreamingSession struct { -} - -func (*validateOpStartStreamingSession) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpStartStreamingSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*StartStreamingSessionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpStartStreamingSessionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpStartStudioSSOConfigurationRepair struct { -} - -func (*validateOpStartStudioSSOConfigurationRepair) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpStartStudioSSOConfigurationRepair) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*StartStudioSSOConfigurationRepairInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpStartStudioSSOConfigurationRepairInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpStopStreamingSession struct { -} - -func (*validateOpStopStreamingSession) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpStopStreamingSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*StopStreamingSessionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpStopStreamingSessionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpTagResource struct { -} - -func (*validateOpTagResource) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*TagResourceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpTagResourceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUntagResource struct { -} - -func (*validateOpUntagResource) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UntagResourceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUntagResourceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateLaunchProfile struct { -} - -func (*validateOpUpdateLaunchProfile) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateLaunchProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateLaunchProfileInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateLaunchProfileInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateLaunchProfileMember struct { -} - -func (*validateOpUpdateLaunchProfileMember) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateLaunchProfileMember) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateLaunchProfileMemberInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateLaunchProfileMemberInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateStreamingImage struct { -} - -func (*validateOpUpdateStreamingImage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateStreamingImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateStreamingImageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateStreamingImageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateStudioComponent struct { -} - -func (*validateOpUpdateStudioComponent) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateStudioComponent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateStudioComponentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateStudioComponentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateStudio struct { -} - -func (*validateOpUpdateStudio) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateStudio) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateStudioInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateStudioInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -func addOpAcceptEulasValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAcceptEulas{}, middleware.After) -} - -func addOpCreateLaunchProfileValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateLaunchProfile{}, middleware.After) -} - -func addOpCreateStreamingImageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateStreamingImage{}, middleware.After) -} - -func addOpCreateStreamingSessionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateStreamingSession{}, middleware.After) -} - -func addOpCreateStreamingSessionStreamValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateStreamingSessionStream{}, middleware.After) -} - -func addOpCreateStudioComponentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateStudioComponent{}, middleware.After) -} - -func addOpCreateStudioValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateStudio{}, middleware.After) -} - -func addOpDeleteLaunchProfileValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteLaunchProfile{}, middleware.After) -} - -func addOpDeleteLaunchProfileMemberValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteLaunchProfileMember{}, middleware.After) -} - -func addOpDeleteStreamingImageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteStreamingImage{}, middleware.After) -} - -func addOpDeleteStreamingSessionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteStreamingSession{}, middleware.After) -} - -func addOpDeleteStudioComponentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteStudioComponent{}, middleware.After) -} - -func addOpDeleteStudioValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteStudio{}, middleware.After) -} - -func addOpDeleteStudioMemberValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteStudioMember{}, middleware.After) -} - -func addOpGetEulaValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetEula{}, middleware.After) -} - -func addOpGetLaunchProfileDetailsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetLaunchProfileDetails{}, middleware.After) -} - -func addOpGetLaunchProfileInitializationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetLaunchProfileInitialization{}, middleware.After) -} - -func addOpGetLaunchProfileValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetLaunchProfile{}, middleware.After) -} - -func addOpGetLaunchProfileMemberValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetLaunchProfileMember{}, middleware.After) -} - -func addOpGetStreamingImageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetStreamingImage{}, middleware.After) -} - -func addOpGetStreamingSessionBackupValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetStreamingSessionBackup{}, middleware.After) -} - -func addOpGetStreamingSessionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetStreamingSession{}, middleware.After) -} - -func addOpGetStreamingSessionStreamValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetStreamingSessionStream{}, middleware.After) -} - -func addOpGetStudioComponentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetStudioComponent{}, middleware.After) -} - -func addOpGetStudioValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetStudio{}, middleware.After) -} - -func addOpGetStudioMemberValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetStudioMember{}, middleware.After) -} - -func addOpListEulaAcceptancesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListEulaAcceptances{}, middleware.After) -} - -func addOpListLaunchProfileMembersValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListLaunchProfileMembers{}, middleware.After) -} - -func addOpListLaunchProfilesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListLaunchProfiles{}, middleware.After) -} - -func addOpListStreamingImagesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListStreamingImages{}, middleware.After) -} - -func addOpListStreamingSessionBackupsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListStreamingSessionBackups{}, middleware.After) -} - -func addOpListStreamingSessionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListStreamingSessions{}, middleware.After) -} - -func addOpListStudioComponentsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListStudioComponents{}, middleware.After) -} - -func addOpListStudioMembersValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListStudioMembers{}, middleware.After) -} - -func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) -} - -func addOpPutLaunchProfileMembersValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutLaunchProfileMembers{}, middleware.After) -} - -func addOpPutStudioMembersValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutStudioMembers{}, middleware.After) -} - -func addOpStartStreamingSessionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStartStreamingSession{}, middleware.After) -} - -func addOpStartStudioSSOConfigurationRepairValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStartStudioSSOConfigurationRepair{}, middleware.After) -} - -func addOpStopStreamingSessionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStopStreamingSession{}, middleware.After) -} - -func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) -} - -func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) -} - -func addOpUpdateLaunchProfileValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateLaunchProfile{}, middleware.After) -} - -func addOpUpdateLaunchProfileMemberValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateLaunchProfileMember{}, middleware.After) -} - -func addOpUpdateStreamingImageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateStreamingImage{}, middleware.After) -} - -func addOpUpdateStudioComponentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateStudioComponent{}, middleware.After) -} - -func addOpUpdateStudioValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateStudio{}, middleware.After) -} - -func validateNewLaunchProfileMember(v *types.NewLaunchProfileMember) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "NewLaunchProfileMember"} - if len(v.Persona) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Persona")) - } - if v.PrincipalId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrincipalId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateNewLaunchProfileMemberList(v []types.NewLaunchProfileMember) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "NewLaunchProfileMemberList"} - for i := range v { - if err := validateNewLaunchProfileMember(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateNewStudioMember(v *types.NewStudioMember) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "NewStudioMember"} - if len(v.Persona) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Persona")) - } - if v.PrincipalId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrincipalId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateNewStudioMemberList(v []types.NewStudioMember) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "NewStudioMemberList"} - for i := range v { - if err := validateNewStudioMember(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateStreamConfigurationCreate(v *types.StreamConfigurationCreate) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StreamConfigurationCreate"} - if len(v.ClipboardMode) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("ClipboardMode")) - } - if v.Ec2InstanceTypes == nil { - invalidParams.Add(smithy.NewErrParamRequired("Ec2InstanceTypes")) - } - if v.StreamingImageIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("StreamingImageIds")) - } - if v.SessionStorage != nil { - if err := validateStreamConfigurationSessionStorage(v.SessionStorage); err != nil { - invalidParams.AddNested("SessionStorage", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateStreamConfigurationSessionStorage(v *types.StreamConfigurationSessionStorage) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StreamConfigurationSessionStorage"} - if v.Mode == nil { - invalidParams.Add(smithy.NewErrParamRequired("Mode")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateStudioEncryptionConfiguration(v *types.StudioEncryptionConfiguration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StudioEncryptionConfiguration"} - if len(v.KeyType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("KeyType")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAcceptEulasInput(v *AcceptEulasInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AcceptEulasInput"} - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateLaunchProfileInput(v *CreateLaunchProfileInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateLaunchProfileInput"} - if v.Ec2SubnetIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("Ec2SubnetIds")) - } - if v.LaunchProfileProtocolVersions == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchProfileProtocolVersions")) - } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.StreamConfiguration == nil { - invalidParams.Add(smithy.NewErrParamRequired("StreamConfiguration")) - } else if v.StreamConfiguration != nil { - if err := validateStreamConfigurationCreate(v.StreamConfiguration); err != nil { - invalidParams.AddNested("StreamConfiguration", err.(smithy.InvalidParamsError)) - } - } - if v.StudioComponentIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioComponentIds")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateStreamingImageInput(v *CreateStreamingImageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateStreamingImageInput"} - if v.Ec2ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("Ec2ImageId")) - } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateStreamingSessionInput(v *CreateStreamingSessionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateStreamingSessionInput"} - if v.LaunchProfileId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchProfileId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateStreamingSessionStreamInput(v *CreateStreamingSessionStreamInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateStreamingSessionStreamInput"} - if v.SessionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SessionId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateStudioComponentInput(v *CreateStudioComponentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateStudioComponentInput"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if len(v.Type) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateStudioInput(v *CreateStudioInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateStudioInput"} - if v.AdminRoleArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AdminRoleArn")) - } - if v.DisplayName == nil { - invalidParams.Add(smithy.NewErrParamRequired("DisplayName")) - } - if v.StudioEncryptionConfiguration != nil { - if err := validateStudioEncryptionConfiguration(v.StudioEncryptionConfiguration); err != nil { - invalidParams.AddNested("StudioEncryptionConfiguration", err.(smithy.InvalidParamsError)) - } - } - if v.StudioName == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioName")) - } - if v.UserRoleArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserRoleArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteLaunchProfileInput(v *DeleteLaunchProfileInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteLaunchProfileInput"} - if v.LaunchProfileId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchProfileId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteLaunchProfileMemberInput(v *DeleteLaunchProfileMemberInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteLaunchProfileMemberInput"} - if v.LaunchProfileId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchProfileId")) - } - if v.PrincipalId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrincipalId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteStreamingImageInput(v *DeleteStreamingImageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteStreamingImageInput"} - if v.StreamingImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StreamingImageId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteStreamingSessionInput(v *DeleteStreamingSessionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteStreamingSessionInput"} - if v.SessionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SessionId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteStudioComponentInput(v *DeleteStudioComponentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteStudioComponentInput"} - if v.StudioComponentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioComponentId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteStudioInput(v *DeleteStudioInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteStudioInput"} - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteStudioMemberInput(v *DeleteStudioMemberInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteStudioMemberInput"} - if v.PrincipalId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrincipalId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetEulaInput(v *GetEulaInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetEulaInput"} - if v.EulaId == nil { - invalidParams.Add(smithy.NewErrParamRequired("EulaId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetLaunchProfileDetailsInput(v *GetLaunchProfileDetailsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetLaunchProfileDetailsInput"} - if v.LaunchProfileId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchProfileId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetLaunchProfileInitializationInput(v *GetLaunchProfileInitializationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetLaunchProfileInitializationInput"} - if v.LaunchProfileId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchProfileId")) - } - if v.LaunchProfileProtocolVersions == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchProfileProtocolVersions")) - } - if v.LaunchPurpose == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchPurpose")) - } - if v.Platform == nil { - invalidParams.Add(smithy.NewErrParamRequired("Platform")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetLaunchProfileInput(v *GetLaunchProfileInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetLaunchProfileInput"} - if v.LaunchProfileId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchProfileId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetLaunchProfileMemberInput(v *GetLaunchProfileMemberInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetLaunchProfileMemberInput"} - if v.LaunchProfileId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchProfileId")) - } - if v.PrincipalId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrincipalId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetStreamingImageInput(v *GetStreamingImageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetStreamingImageInput"} - if v.StreamingImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StreamingImageId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetStreamingSessionBackupInput(v *GetStreamingSessionBackupInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetStreamingSessionBackupInput"} - if v.BackupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("BackupId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetStreamingSessionInput(v *GetStreamingSessionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetStreamingSessionInput"} - if v.SessionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SessionId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetStreamingSessionStreamInput(v *GetStreamingSessionStreamInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetStreamingSessionStreamInput"} - if v.SessionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SessionId")) - } - if v.StreamId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StreamId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetStudioComponentInput(v *GetStudioComponentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetStudioComponentInput"} - if v.StudioComponentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioComponentId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetStudioInput(v *GetStudioInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetStudioInput"} - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetStudioMemberInput(v *GetStudioMemberInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetStudioMemberInput"} - if v.PrincipalId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrincipalId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListEulaAcceptancesInput(v *ListEulaAcceptancesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListEulaAcceptancesInput"} - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListLaunchProfileMembersInput(v *ListLaunchProfileMembersInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListLaunchProfileMembersInput"} - if v.LaunchProfileId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchProfileId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListLaunchProfilesInput(v *ListLaunchProfilesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListLaunchProfilesInput"} - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListStreamingImagesInput(v *ListStreamingImagesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListStreamingImagesInput"} - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListStreamingSessionBackupsInput(v *ListStreamingSessionBackupsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListStreamingSessionBackupsInput"} - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListStreamingSessionsInput(v *ListStreamingSessionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListStreamingSessionsInput"} - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListStudioComponentsInput(v *ListStudioComponentsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListStudioComponentsInput"} - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListStudioMembersInput(v *ListStudioMembersInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListStudioMembersInput"} - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} - if v.ResourceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpPutLaunchProfileMembersInput(v *PutLaunchProfileMembersInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "PutLaunchProfileMembersInput"} - if v.IdentityStoreId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) - } - if v.LaunchProfileId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchProfileId")) - } - if v.Members == nil { - invalidParams.Add(smithy.NewErrParamRequired("Members")) - } else if v.Members != nil { - if err := validateNewLaunchProfileMemberList(v.Members); err != nil { - invalidParams.AddNested("Members", err.(smithy.InvalidParamsError)) - } - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpPutStudioMembersInput(v *PutStudioMembersInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "PutStudioMembersInput"} - if v.IdentityStoreId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IdentityStoreId")) - } - if v.Members == nil { - invalidParams.Add(smithy.NewErrParamRequired("Members")) - } else if v.Members != nil { - if err := validateNewStudioMemberList(v.Members); err != nil { - invalidParams.AddNested("Members", err.(smithy.InvalidParamsError)) - } - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpStartStreamingSessionInput(v *StartStreamingSessionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StartStreamingSessionInput"} - if v.SessionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SessionId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpStartStudioSSOConfigurationRepairInput(v *StartStudioSSOConfigurationRepairInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StartStudioSSOConfigurationRepairInput"} - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpStopStreamingSessionInput(v *StopStreamingSessionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StopStreamingSessionInput"} - if v.SessionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SessionId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpTagResourceInput(v *TagResourceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} - if v.ResourceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUntagResourceInput(v *UntagResourceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} - if v.ResourceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) - } - if v.TagKeys == nil { - invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUpdateLaunchProfileInput(v *UpdateLaunchProfileInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateLaunchProfileInput"} - if v.LaunchProfileId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchProfileId")) - } - if v.StreamConfiguration != nil { - if err := validateStreamConfigurationCreate(v.StreamConfiguration); err != nil { - invalidParams.AddNested("StreamConfiguration", err.(smithy.InvalidParamsError)) - } - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUpdateLaunchProfileMemberInput(v *UpdateLaunchProfileMemberInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateLaunchProfileMemberInput"} - if v.LaunchProfileId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchProfileId")) - } - if len(v.Persona) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Persona")) - } - if v.PrincipalId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrincipalId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUpdateStreamingImageInput(v *UpdateStreamingImageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateStreamingImageInput"} - if v.StreamingImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StreamingImageId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUpdateStudioComponentInput(v *UpdateStudioComponentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateStudioComponentInput"} - if v.StudioComponentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioComponentId")) - } - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUpdateStudioInput(v *UpdateStudioInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateStudioInput"} - if v.StudioId == nil { - invalidParams.Add(smithy.NewErrParamRequired("StudioId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -}