diff --git a/.changelog/270a627fb296447bb6dcebdd43fcf353.json b/.changelog/270a627fb296447bb6dcebdd43fcf353.json new file mode 100644 index 00000000000..66a6235039d --- /dev/null +++ b/.changelog/270a627fb296447bb6dcebdd43fcf353.json @@ -0,0 +1,22 @@ +{ + "id": "270a627f-b296-447b-b6dc-ebdd43fcf353", + "type": "feature", + "description": "API client updated", + "modules": [ + "service/accessanalyzer", + "service/amp", + "service/appmesh", + "service/braket", + "service/codeguruprofiler", + "service/evidently", + "service/grafana", + "service/location", + "service/networkmanager", + "service/nimble", + "service/proton", + "service/ram", + "service/rekognition", + "service/snowdevicemanagement", + "service/wisdom" + ] +} diff --git a/.changelog/41575353444b40ffbf474f4155544f00.json b/.changelog/41575353444b40ffbf474f4155544f00.json new file mode 100644 index 00000000000..5465aaecdd5 --- /dev/null +++ b/.changelog/41575353444b40ffbf474f4155544f00.json @@ -0,0 +1,8 @@ +{ + "id": "41575353-444b-40ff-bf47-4f4155544f00", + "type": "release", + "description": "New AWS service client module", + "modules": [ + "service/amplifyuibuilder" + ] +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/amplifyuibuilder.2021-08-11.json b/codegen/sdk-codegen/aws-models/amplifyuibuilder.2021-08-11.json new file mode 100644 index 00000000000..2398fa01c6b --- /dev/null +++ b/codegen/sdk-codegen/aws-models/amplifyuibuilder.2021-08-11.json @@ -0,0 +1,2408 @@ +{ + "smithy": "1.0", + "shapes": { + "com.amazonaws.amplifyuibuilder#AmplifyUIBuilder": { + "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "AmplifyUIBuilder", + "arnNamespace": "amplifyuibuilder", + "cloudFormationName": "AmplifyUIBuilder", + "cloudTrailEventSource": "amplifyuibuilder.amazonaws.com", + "endpointPrefix": "amplifyuibuilder" + }, + "aws.auth#sigv4": { + "name": "amplifyuibuilder" + }, + "aws.protocols#restJson1": {}, + "smithy.api#cors": {}, + "smithy.api#documentation": "

The Amplify UI Builder API provides a programmatic interface for creating and configuring\n user interface (UI) component libraries and themes for use in your Amplify applications. You\n can then connect these UI components to an application's backend Amazon Web Services\n resources.

\n

You can also use the Amplify Studio visual designer to create UI components and model data\n for an app. For more information, see Introduction in the\n Amplify Docs.

\n

The Amplify Framework is a comprehensive set of SDKs, libraries, tools, and documentation\n for client app development. For more information, see the Amplify Framework. For more information about\n deploying an Amplify application to Amazon Web Services, see the Amplify Console User Guide.

", + "smithy.api#title": "AWS Amplify UI Builder" + }, + "version": "2021-08-11", + "operations": [ + { + "target": "com.amazonaws.amplifyuibuilder#ExchangeCodeForToken" + }, + { + "target": "com.amazonaws.amplifyuibuilder#RefreshToken" + } + ], + "resources": [ + { + "target": "com.amazonaws.amplifyuibuilder#ComponentResource" + }, + { + "target": "com.amazonaws.amplifyuibuilder#ThemeResource" + } + ] + }, + "com.amazonaws.amplifyuibuilder#Component": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID of the Amplify app associated with the component.

", + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is a part of the Amplify app.

", + "smithy.api#required": {} + } + }, + "sourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID of the component in its original source system, such as Figma.

" + } + }, + "id": { + "target": "com.amazonaws.amplifyuibuilder#Uuid", + "traits": { + "smithy.api#documentation": "

The unique ID of the component.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.amplifyuibuilder#ComponentName", + "traits": { + "smithy.api#documentation": "

The name of the component.

", + "smithy.api#required": {} + } + }, + "componentType": { + "target": "com.amazonaws.amplifyuibuilder#ComponentType", + "traits": { + "smithy.api#documentation": "

The type of the component. This can be an Amplify custom UI component or another custom\n component.

", + "smithy.api#required": {} + } + }, + "properties": { + "target": "com.amazonaws.amplifyuibuilder#ComponentProperties", + "traits": { + "smithy.api#documentation": "

Describes the component's properties.

", + "smithy.api#required": {} + } + }, + "children": { + "target": "com.amazonaws.amplifyuibuilder#ComponentChildList", + "traits": { + "smithy.api#documentation": "

A list of the component's ComponentChild instances.

" + } + }, + "variants": { + "target": "com.amazonaws.amplifyuibuilder#ComponentVariants", + "traits": { + "smithy.api#documentation": "

A list of the component's variants. A variant is a unique style configuration of a\n main component.

", + "smithy.api#required": {} + } + }, + "overrides": { + "target": "com.amazonaws.amplifyuibuilder#ComponentOverrides", + "traits": { + "smithy.api#documentation": "

Describes the component's properties that can be overriden in a customized instance of the\n component.

", + "smithy.api#required": {} + } + }, + "bindingProperties": { + "target": "com.amazonaws.amplifyuibuilder#ComponentBindingProperties", + "traits": { + "smithy.api#documentation": "

The information to connect a component's properties to data at runtime.

", + "smithy.api#required": {} + } + }, + "collectionProperties": { + "target": "com.amazonaws.amplifyuibuilder#ComponentCollectionProperties", + "traits": { + "smithy.api#documentation": "

The data binding configuration for the component's properties. Use this for a collection component.

" + } + }, + "createdAt": { + "target": "smithy.api#Timestamp", + "traits": { + "aws.cloudformation#cfnMutability": "read", + "smithy.api#documentation": "

The time that the component was created.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "modifiedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "aws.cloudformation#cfnMutability": "read", + "smithy.api#documentation": "

The time that the component was modified.

", + "smithy.api#timestampFormat": "date-time" + } + }, + "tags": { + "target": "com.amazonaws.amplifyuibuilder#Tags", + "traits": { + "aws.cloudformation#cfnMutability": "create-and-read", + "smithy.api#documentation": "

One or more key-value pairs to use when tagging the component.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains the configuration settings for a user interface (UI) element for an Amplify app. A\n component is configured as a primary, stand-alone UI element. Use ComponentChild\n to configure an instance of a Component. A ComponentChild instance\n inherits the configuration of the main Component.

", + "smithy.api#references": [ + { + "resource": "com.amazonaws.amplifyuibuilder#ComponentResource" + } + ] + } + }, + "com.amazonaws.amplifyuibuilder#ComponentBindingProperties": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.amazonaws.amplifyuibuilder#ComponentBindingPropertiesValue" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentBindingPropertiesValue": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The property type.

" + } + }, + "bindingProperties": { + "target": "com.amazonaws.amplifyuibuilder#ComponentBindingPropertiesValueProperties", + "traits": { + "smithy.api#documentation": "

Describes the properties to customize with data at runtime.

" + } + }, + "defaultValue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The default value of the property.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents the data binding configuration for a component at runtime. You can use\n ComponentBindingPropertiesValue to add exposed properties to a component to\n allow different values to be entered when a component is reused in different places in an\n app.

" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentBindingPropertiesValueProperties": { + "type": "structure", + "members": { + "model": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

An Amplify DataStore model.

" + } + }, + "field": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The field to bind the data to.

" + } + }, + "predicates": { + "target": "com.amazonaws.amplifyuibuilder#PredicateList", + "traits": { + "smithy.api#documentation": "

A list of predicates for binding a component's properties to data.

" + } + }, + "userAttribute": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

An authenticated user attribute.

" + } + }, + "bucket": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

An Amazon S3 bucket.

" + } + }, + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The storage key for an Amazon S3 bucket.

" + } + }, + "defaultValue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The default value to assign to the property.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents the data binding configuration for a specific property using data stored in\n Amazon Web Services. For Amazon Web Services connected properties, you can bind a property to\n data stored in an Amazon S3 bucket, an Amplify DataStore model or an\n authenticated user attribute.

" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentChild": { + "type": "structure", + "members": { + "componentType": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The type of the child component.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the child component.

", + "smithy.api#required": {} + } + }, + "properties": { + "target": "com.amazonaws.amplifyuibuilder#ComponentProperties", + "traits": { + "smithy.api#documentation": "

Describes the properties of the child component.

", + "smithy.api#required": {} + } + }, + "children": { + "target": "com.amazonaws.amplifyuibuilder#ComponentChildList", + "traits": { + "smithy.api#documentation": "

The list of ComponentChild instances for this component.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A nested UI configuration within a parent Component.

" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentChildList": { + "type": "list", + "member": { + "target": "com.amazonaws.amplifyuibuilder#ComponentChild" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentCollectionProperties": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.amazonaws.amplifyuibuilder#ComponentDataConfiguration" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentConditionProperty": { + "type": "structure", + "members": { + "property": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the conditional property.

" + } + }, + "field": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of a field. Specify this when the property is a data model.

" + } + }, + "operator": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The operator to use to perform the evaluation, such as eq to represent\n equals.

" + } + }, + "operand": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The value of the property to evaluate.

" + } + }, + "then": { + "target": "com.amazonaws.amplifyuibuilder#ComponentProperty", + "traits": { + "smithy.api#documentation": "

The value to assign to the property if the condition is met.

" + } + }, + "else": { + "target": "com.amazonaws.amplifyuibuilder#ComponentProperty", + "traits": { + "smithy.api#documentation": "

The value to assign to the property if the condition is not met.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents a conditional expression to set a component property. Use\n ComponentConditionProperty to set a property to different values conditionally,\n based on the value of another property.

" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentDataConfiguration": { + "type": "structure", + "members": { + "model": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the data model to use to bind data to a component.

", + "smithy.api#required": {} + } + }, + "sort": { + "target": "com.amazonaws.amplifyuibuilder#SortPropertyList", + "traits": { + "smithy.api#documentation": "

Describes how to sort the component's properties.

" + } + }, + "predicate": { + "target": "com.amazonaws.amplifyuibuilder#Predicate", + "traits": { + "smithy.api#documentation": "

Represents the conditional logic to use when binding data to a component. Use this\n property to retrieve only a subset of the data in a collection.

" + } + }, + "identifiers": { + "target": "com.amazonaws.amplifyuibuilder#IdentifierList", + "traits": { + "smithy.api#documentation": "

A list of IDs to use to bind data to a component. Use this property to bind specifically\n chosen data, rather than data retrieved from a query.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the configuration for binding a component's properties to data.

" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentList": { + "type": "list", + "member": { + "target": "com.amazonaws.amplifyuibuilder#Component" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + } + } + }, + "com.amazonaws.amplifyuibuilder#ComponentOverrides": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.amazonaws.amplifyuibuilder#ComponentOverridesValue" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentOverridesValue": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentProperties": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.amazonaws.amplifyuibuilder#ComponentProperty" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentProperty": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The value to assign to the component property.

" + } + }, + "bindingProperties": { + "target": "com.amazonaws.amplifyuibuilder#ComponentPropertyBindingProperties", + "traits": { + "smithy.api#documentation": "

The information to bind the component property to data at runtime.

" + } + }, + "collectionBindingProperties": { + "target": "com.amazonaws.amplifyuibuilder#ComponentPropertyBindingProperties", + "traits": { + "smithy.api#documentation": "

The information to bind the component property to data at runtime. Use this for collection components.

" + } + }, + "defaultValue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The default value to assign to the component property.

" + } + }, + "model": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The data model to use to assign a value to the component property.

" + } + }, + "bindings": { + "target": "com.amazonaws.amplifyuibuilder#FormBindings", + "traits": { + "smithy.api#documentation": "

The information to bind the component property to form data.

" + } + }, + "event": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

An event that occurs in your app. Use this for workflow data binding.

" + } + }, + "userAttribute": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

An authenticated user attribute to use to assign a value to the component property.

" + } + }, + "concat": { + "target": "com.amazonaws.amplifyuibuilder#ComponentPropertyList", + "traits": { + "smithy.api#documentation": "

A list of component properties to concatenate to create the value to assign to this component property.

" + } + }, + "condition": { + "target": "com.amazonaws.amplifyuibuilder#ComponentConditionProperty", + "traits": { + "smithy.api#documentation": "

The conditional expression to use to assign a value to the component property..

" + } + }, + "configured": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Specifies whether the user configured the property in Amplify Studio after importing it.

" + } + }, + "type": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The component type.

" + } + }, + "importedValue": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The default value assigned to property when the component is imported into an app.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the configuration for all of a component's properties. Use\n ComponentProperty to specify the values to render or bind by\n default.

" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentPropertyBindingProperties": { + "type": "structure", + "members": { + "property": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The component property to bind to the data field.

", + "smithy.api#required": {} + } + }, + "field": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The data field to bind the property to.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Associates a component property to a binding property. This enables exposed properties on\n the top level component to propagate data to the component's property values.

" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentPropertyList": { + "type": "list", + "member": { + "target": "com.amazonaws.amplifyuibuilder#ComponentProperty" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentResource": { + "type": "resource", + "identifiers": { + "id": { + "target": "com.amazonaws.amplifyuibuilder#Uuid" + }, + "appId": { + "target": "smithy.api#String" + }, + "environmentName": { + "target": "smithy.api#String" + } + }, + "create": { + "target": "com.amazonaws.amplifyuibuilder#CreateComponent" + }, + "read": { + "target": "com.amazonaws.amplifyuibuilder#GetComponent" + }, + "update": { + "target": "com.amazonaws.amplifyuibuilder#UpdateComponent" + }, + "delete": { + "target": "com.amazonaws.amplifyuibuilder#DeleteComponent" + }, + "list": { + "target": "com.amazonaws.amplifyuibuilder#ListComponents" + }, + "collectionOperations": [ + { + "target": "com.amazonaws.amplifyuibuilder#ExportComponents" + } + ], + "traits": { + "aws.api#arn": { + "template": "app/{appId}/environment/{environmentName}/components/{id}", + "absolute": false, + "noAccount": false, + "noRegion": false + }, + "aws.cloudformation#cfnResource": { + "additionalSchemas": [ + "com.amazonaws.amplifyuibuilder#Component" + ], + "name": "Component" + } + } + }, + "com.amazonaws.amplifyuibuilder#ComponentSummary": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID of the Amplify app associated with the component.

", + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is a part of the Amplify app.

", + "smithy.api#required": {} + } + }, + "id": { + "target": "com.amazonaws.amplifyuibuilder#Uuid", + "traits": { + "smithy.api#documentation": "

The unique ID of the component.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.amplifyuibuilder#ComponentName", + "traits": { + "smithy.api#documentation": "

The name of the component.

", + "smithy.api#required": {} + } + }, + "componentType": { + "target": "com.amazonaws.amplifyuibuilder#ComponentType", + "traits": { + "smithy.api#documentation": "

The component type.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains a summary of a component. This is a read-only data type that is returned by\n ListComponents.

" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.amplifyuibuilder#ComponentSummary" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentType": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + } + } + }, + "com.amazonaws.amplifyuibuilder#ComponentVariant": { + "type": "structure", + "members": { + "variantValues": { + "target": "com.amazonaws.amplifyuibuilder#ComponentVariantValues", + "traits": { + "smithy.api#documentation": "

The combination of variants that comprise this variant.

" + } + }, + "overrides": { + "target": "com.amazonaws.amplifyuibuilder#ComponentOverrides", + "traits": { + "smithy.api#documentation": "

The properties of the component variant that can be overriden when customizing an instance\n of the component.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the style configuration of a unique variation of a main component.

" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentVariantValues": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "com.amazonaws.amplifyuibuilder#ComponentVariants": { + "type": "list", + "member": { + "target": "com.amazonaws.amplifyuibuilder#ComponentVariant" + } + }, + "com.amazonaws.amplifyuibuilder#CreateComponent": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifyuibuilder#CreateComponentRequest" + }, + "output": { + "target": "com.amazonaws.amplifyuibuilder#CreateComponentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifyuibuilder#InternalServerException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#InvalidParameterException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#ResourceConflictException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#ServiceQuotaExceededException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a new component for an Amplify app.

", + "smithy.api#http": { + "method": "POST", + "uri": "/app/{appId}/environment/{environmentName}/components", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.amplifyuibuilder#CreateComponentData": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.amplifyuibuilder#ComponentName", + "traits": { + "smithy.api#documentation": "

The name of the component

", + "smithy.api#required": {} + } + }, + "sourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID of the component in its original source system, such as Figma.

" + } + }, + "componentType": { + "target": "com.amazonaws.amplifyuibuilder#ComponentType", + "traits": { + "smithy.api#documentation": "

The component type. This can be an Amplify custom UI component or another custom\n component.

", + "smithy.api#required": {} + } + }, + "properties": { + "target": "com.amazonaws.amplifyuibuilder#ComponentProperties", + "traits": { + "smithy.api#documentation": "

Describes the component's properties.

", + "smithy.api#required": {} + } + }, + "children": { + "target": "com.amazonaws.amplifyuibuilder#ComponentChildList", + "traits": { + "smithy.api#documentation": "

A list of child components that are instances of the main component.

" + } + }, + "variants": { + "target": "com.amazonaws.amplifyuibuilder#ComponentVariants", + "traits": { + "smithy.api#documentation": "

A list of the unique variants of this component.

", + "smithy.api#required": {} + } + }, + "overrides": { + "target": "com.amazonaws.amplifyuibuilder#ComponentOverrides", + "traits": { + "smithy.api#documentation": "

Describes the component properties that can be overriden to customize an instance of the\n component.

", + "smithy.api#required": {} + } + }, + "bindingProperties": { + "target": "com.amazonaws.amplifyuibuilder#ComponentBindingProperties", + "traits": { + "smithy.api#documentation": "

The data binding information for the component's properties.

", + "smithy.api#required": {} + } + }, + "collectionProperties": { + "target": "com.amazonaws.amplifyuibuilder#ComponentCollectionProperties", + "traits": { + "smithy.api#documentation": "

The data binding configuration for customizing a component's properties. Use this for a collection component.

" + } + }, + "tags": { + "target": "com.amazonaws.amplifyuibuilder#Tags", + "traits": { + "smithy.api#documentation": "

One or more key-value pairs to use when tagging the component data.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents all of the information that is required to create a component.

" + } + }, + "com.amazonaws.amplifyuibuilder#CreateComponentRequest": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID of the Amplify app to associate with the component.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is a part of the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "smithy.api#String", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

The unique client token.

", + "smithy.api#httpQuery": "clientToken", + "smithy.api#idempotencyToken": {} + } + }, + "componentToCreate": { + "target": "com.amazonaws.amplifyuibuilder#CreateComponentData", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

Represents the configuration of the component to create.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#CreateComponentResponse": { + "type": "structure", + "members": { + "entity": { + "target": "com.amazonaws.amplifyuibuilder#Component", + "traits": { + "smithy.api#documentation": "

Describes the configuration of the new component.

", + "smithy.api#httpPayload": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#CreateTheme": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifyuibuilder#CreateThemeRequest" + }, + "output": { + "target": "com.amazonaws.amplifyuibuilder#CreateThemeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifyuibuilder#InternalServerException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#InvalidParameterException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#ResourceConflictException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#ServiceQuotaExceededException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a theme to apply to the components in an Amplify app.

", + "smithy.api#http": { + "method": "POST", + "uri": "/app/{appId}/environment/{environmentName}/themes", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.amplifyuibuilder#CreateThemeData": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.amplifyuibuilder#ThemeName", + "traits": { + "smithy.api#documentation": "

The name of the theme.

", + "smithy.api#required": {} + } + }, + "values": { + "target": "com.amazonaws.amplifyuibuilder#ThemeValuesList", + "traits": { + "smithy.api#documentation": "

A list of key-value pairs that defines the properties of the theme.

", + "smithy.api#required": {} + } + }, + "overrides": { + "target": "com.amazonaws.amplifyuibuilder#ThemeValuesList", + "traits": { + "smithy.api#documentation": "

Describes the properties that can be overriden to customize an instance of the\n theme.

" + } + }, + "tags": { + "target": "com.amazonaws.amplifyuibuilder#Tags", + "traits": { + "smithy.api#documentation": "

One or more key-value pairs to use when tagging the theme data.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents all of the information that is required to create a theme.

" + } + }, + "com.amazonaws.amplifyuibuilder#CreateThemeRequest": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID of the Amplify app associated with the theme.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is a part of the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "smithy.api#String", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

The unique client token.

", + "smithy.api#httpQuery": "clientToken", + "smithy.api#idempotencyToken": {} + } + }, + "themeToCreate": { + "target": "com.amazonaws.amplifyuibuilder#CreateThemeData", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

Represents the configuration of the theme to create.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#CreateThemeResponse": { + "type": "structure", + "members": { + "entity": { + "target": "com.amazonaws.amplifyuibuilder#Theme", + "traits": { + "smithy.api#documentation": "

Describes the configuration of the new theme.

", + "smithy.api#httpPayload": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#DeleteComponent": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifyuibuilder#DeleteComponentRequest" + }, + "errors": [ + { + "target": "com.amazonaws.amplifyuibuilder#InternalServerException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#InvalidParameterException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a component from an Amplify app.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/app/{appId}/environment/{environmentName}/components/{id}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.amplifyuibuilder#DeleteComponentRequest": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID of the Amplify app associated with the component to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is a part of the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "id": { + "target": "com.amazonaws.amplifyuibuilder#Uuid", + "traits": { + "smithy.api#documentation": "

The unique ID of the component to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#DeleteTheme": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifyuibuilder#DeleteThemeRequest" + }, + "errors": [ + { + "target": "com.amazonaws.amplifyuibuilder#InternalServerException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#InvalidParameterException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a theme from an Amplify app.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/app/{appId}/environment/{environmentName}/themes/{id}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.amplifyuibuilder#DeleteThemeRequest": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID of the Amplify app associated with the theme to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is a part of the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "id": { + "target": "com.amazonaws.amplifyuibuilder#Uuid", + "traits": { + "smithy.api#documentation": "

The unique ID of the theme to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#ExchangeCodeForToken": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifyuibuilder#ExchangeCodeForTokenRequest" + }, + "output": { + "target": "com.amazonaws.amplifyuibuilder#ExchangeCodeForTokenResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifyuibuilder#InvalidParameterException" + } + ], + "traits": { + "smithy.api#documentation": "

Exchanges an access code for a token.

", + "smithy.api#http": { + "method": "POST", + "uri": "/tokens/{provider}", + "code": 200 + } + } + }, + "com.amazonaws.amplifyuibuilder#ExchangeCodeForTokenRequest": { + "type": "structure", + "members": { + "provider": { + "target": "com.amazonaws.amplifyuibuilder#TokenProviders", + "traits": { + "smithy.api#documentation": "

The third-party provider for the token. The only valid value is figma.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "request": { + "target": "com.amazonaws.amplifyuibuilder#ExchangeCodeForTokenRequestBody", + "traits": { + "smithy.api#documentation": "

Describes the configuration of the request.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#ExchangeCodeForTokenRequestBody": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The access code to send in the request.

", + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + }, + "redirectUri": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The location of the application that will receive the access code.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the configuration of a request to exchange an access code for a token.

" + } + }, + "com.amazonaws.amplifyuibuilder#ExchangeCodeForTokenResponse": { + "type": "structure", + "members": { + "accessToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The access token.

", + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + }, + "expiresIn": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The date and time when the new access token expires.

", + "smithy.api#required": {} + } + }, + "refreshToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The token to use to refresh a previously issued access token that might have\n expired.

", + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#ExportComponents": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifyuibuilder#ExportComponentsRequest" + }, + "output": { + "target": "com.amazonaws.amplifyuibuilder#ExportComponentsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifyuibuilder#InternalServerException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#InvalidParameterException" + } + ], + "traits": { + "smithy.api#documentation": "

Exports component configurations to code that is ready to integrate into an Amplify\n app.

", + "smithy.api#http": { + "method": "GET", + "uri": "/export/app/{appId}/environment/{environmentName}/components", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.amplifyuibuilder#ExportComponentsRequest": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID of the Amplify app to export components to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is a part of the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#ExportComponentsResponse": { + "type": "structure", + "members": { + "entities": { + "target": "com.amazonaws.amplifyuibuilder#ComponentList", + "traits": { + "smithy.api#documentation": "

Represents the configuration of the exported components.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#ExportThemes": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifyuibuilder#ExportThemesRequest" + }, + "output": { + "target": "com.amazonaws.amplifyuibuilder#ExportThemesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifyuibuilder#InternalServerException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#InvalidParameterException" + } + ], + "traits": { + "smithy.api#documentation": "

Exports theme configurations to code that is ready to integrate into an Amplify\n app.

", + "smithy.api#http": { + "method": "GET", + "uri": "/export/app/{appId}/environment/{environmentName}/themes", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.amplifyuibuilder#ExportThemesRequest": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID of the Amplify app to export the themes to.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is part of the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#ExportThemesResponse": { + "type": "structure", + "members": { + "entities": { + "target": "com.amazonaws.amplifyuibuilder#ThemeList", + "traits": { + "smithy.api#documentation": "

Represents the configuration of the exported themes.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#FormBindingElement": { + "type": "structure", + "members": { + "element": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the component to retrieve a value from.

", + "smithy.api#required": {} + } + }, + "property": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The property to retrieve a value from.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes how to bind a component property to form data.

" + } + }, + "com.amazonaws.amplifyuibuilder#FormBindings": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "com.amazonaws.amplifyuibuilder#FormBindingElement" + } + }, + "com.amazonaws.amplifyuibuilder#GetComponent": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifyuibuilder#GetComponentRequest" + }, + "output": { + "target": "com.amazonaws.amplifyuibuilder#GetComponentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifyuibuilder#InternalServerException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#InvalidParameterException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns an existing component for an Amplify app.

", + "smithy.api#http": { + "method": "GET", + "uri": "/app/{appId}/environment/{environmentName}/components/{id}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.amplifyuibuilder#GetComponentRequest": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID of the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is part of the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "id": { + "target": "com.amazonaws.amplifyuibuilder#Uuid", + "traits": { + "smithy.api#documentation": "

The unique ID of the component.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#GetComponentResponse": { + "type": "structure", + "members": { + "component": { + "target": "com.amazonaws.amplifyuibuilder#Component", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

Represents the configuration settings for the component.

", + "smithy.api#httpPayload": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#GetTheme": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifyuibuilder#GetThemeRequest" + }, + "output": { + "target": "com.amazonaws.amplifyuibuilder#GetThemeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifyuibuilder#InternalServerException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#InvalidParameterException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns an existing theme for an Amplify app.

", + "smithy.api#http": { + "method": "GET", + "uri": "/app/{appId}/environment/{environmentName}/themes/{id}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.amplifyuibuilder#GetThemeRequest": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID of the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is part of the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "id": { + "target": "com.amazonaws.amplifyuibuilder#Uuid", + "traits": { + "smithy.api#documentation": "

The unique ID for the theme.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#GetThemeResponse": { + "type": "structure", + "members": { + "theme": { + "target": "com.amazonaws.amplifyuibuilder#Theme", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

Represents the configuration settings for the theme.

", + "smithy.api#httpPayload": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#IdentifierList": { + "type": "list", + "member": { + "target": "smithy.api#String" + } + }, + "com.amazonaws.amplifyuibuilder#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

An internal error has occurred. Please retry your request.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.amplifyuibuilder#InvalidParameterException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

An invalid or out-of-range value was supplied for the input parameter.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.amplifyuibuilder#ListComponents": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifyuibuilder#ListComponentsRequest" + }, + "output": { + "target": "com.amazonaws.amplifyuibuilder#ListComponentsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifyuibuilder#InternalServerException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#InvalidParameterException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves a list of components for a specified Amplify app and backend environment.

", + "smithy.api#http": { + "method": "GET", + "uri": "/app/{appId}/environment/{environmentName}/components", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "entities", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.amplifyuibuilder#ListComponentsLimit": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.amplifyuibuilder#ListComponentsRequest": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID for the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is a part of the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The token to request the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.amplifyuibuilder#ListComponentsLimit", + "traits": { + "smithy.api#documentation": "

The maximum number of components to retrieve.

", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.amplifyuibuilder#ListComponentsResponse": { + "type": "structure", + "members": { + "entities": { + "target": "com.amazonaws.amplifyuibuilder#ComponentSummaryList", + "traits": { + "smithy.api#documentation": "

The list of components for the Amplify app.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pagination token that's included if more results are available.

" + } + } + } + }, + "com.amazonaws.amplifyuibuilder#ListThemes": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifyuibuilder#ListThemesRequest" + }, + "output": { + "target": "com.amazonaws.amplifyuibuilder#ListThemesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifyuibuilder#InternalServerException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#InvalidParameterException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves a list of themes for a specified Amplify app and backend environment.

", + "smithy.api#http": { + "method": "GET", + "uri": "/app/{appId}/environment/{environmentName}/themes", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "entities", + "pageSize": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.amplifyuibuilder#ListThemesLimit": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.amplifyuibuilder#ListThemesRequest": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID for the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is a part of the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The token to request the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.amplifyuibuilder#ListThemesLimit", + "traits": { + "smithy.api#documentation": "

The maximum number of theme results to return in the response.

", + "smithy.api#httpQuery": "maxResults" + } + } + } + }, + "com.amazonaws.amplifyuibuilder#ListThemesResponse": { + "type": "structure", + "members": { + "entities": { + "target": "com.amazonaws.amplifyuibuilder#ThemeSummaryList", + "traits": { + "smithy.api#documentation": "

The list of themes for the Amplify app.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The pagination token that's returned if more results are available.

" + } + } + } + }, + "com.amazonaws.amplifyuibuilder#Predicate": { + "type": "structure", + "members": { + "or": { + "target": "com.amazonaws.amplifyuibuilder#PredicateList", + "traits": { + "smithy.api#documentation": "

A list of predicates to combine logically.

" + } + }, + "and": { + "target": "com.amazonaws.amplifyuibuilder#PredicateList", + "traits": { + "smithy.api#documentation": "

A list of predicates to combine logically.

" + } + }, + "field": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The field to query.

" + } + }, + "operator": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The operator to use to perform the evaluation.

" + } + }, + "operand": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The value to use when performing the evaluation.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Stores information for generating Amplify DataStore queries. Use a Predicate\n to retrieve a subset of the data in a collection.

" + } + }, + "com.amazonaws.amplifyuibuilder#PredicateList": { + "type": "list", + "member": { + "target": "com.amazonaws.amplifyuibuilder#Predicate" + } + }, + "com.amazonaws.amplifyuibuilder#RefreshToken": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifyuibuilder#RefreshTokenRequest" + }, + "output": { + "target": "com.amazonaws.amplifyuibuilder#RefreshTokenResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifyuibuilder#InvalidParameterException" + } + ], + "traits": { + "smithy.api#documentation": "

Refreshes a previously issued access token that might have expired.

", + "smithy.api#http": { + "method": "POST", + "uri": "/tokens/{provider}/refresh", + "code": 200 + } + } + }, + "com.amazonaws.amplifyuibuilder#RefreshTokenRequest": { + "type": "structure", + "members": { + "provider": { + "target": "com.amazonaws.amplifyuibuilder#TokenProviders", + "traits": { + "smithy.api#documentation": "

The third-party provider for the token. The only valid value is figma.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "refreshTokenBody": { + "target": "com.amazonaws.amplifyuibuilder#RefreshTokenRequestBody", + "traits": { + "smithy.api#documentation": "

Information about the refresh token request.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#RefreshTokenRequestBody": { + "type": "structure", + "members": { + "token": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The token to use to refresh a previously issued access token that might have\n expired.

", + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes a refresh token.

" + } + }, + "com.amazonaws.amplifyuibuilder#RefreshTokenResponse": { + "type": "structure", + "members": { + "accessToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The access token.

", + "smithy.api#required": {}, + "smithy.api#sensitive": {} + } + }, + "expiresIn": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#documentation": "

The date and time when the new access token expires.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#ResourceConflictException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

The resource specified in the request conflicts with an existing resource.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.amplifyuibuilder#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

The requested resource does not exist, or access was denied.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.amplifyuibuilder#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

You exceeded your service quota. Service quotas, also referred to as limits, are the\n maximum number of service resources or operations for your Amazon Web Services account.

", + "smithy.api#error": "client", + "smithy.api#httpError": 402 + } + }, + "com.amazonaws.amplifyuibuilder#SortDirection": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ASC" + }, + { + "value": "DESC" + } + ] + } + }, + "com.amazonaws.amplifyuibuilder#SortProperty": { + "type": "structure", + "members": { + "field": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The field to perform the sort on.

", + "smithy.api#required": {} + } + }, + "direction": { + "target": "com.amazonaws.amplifyuibuilder#SortDirection", + "traits": { + "smithy.api#documentation": "

The direction of the sort, either ascending or descending.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes how to sort the data that you bind to a component.

" + } + }, + "com.amazonaws.amplifyuibuilder#SortPropertyList": { + "type": "list", + "member": { + "target": "com.amazonaws.amplifyuibuilder#SortProperty" + } + }, + "com.amazonaws.amplifyuibuilder#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$" + } + }, + "com.amazonaws.amplifyuibuilder#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + } + } + }, + "com.amazonaws.amplifyuibuilder#Tags": { + "type": "map", + "key": { + "target": "com.amazonaws.amplifyuibuilder#TagKey" + }, + "value": { + "target": "com.amazonaws.amplifyuibuilder#TagValue" + } + }, + "com.amazonaws.amplifyuibuilder#Theme": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID for the Amplify app associated with the theme.

", + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is a part of the Amplify app.

", + "smithy.api#required": {} + } + }, + "id": { + "target": "com.amazonaws.amplifyuibuilder#Uuid", + "traits": { + "smithy.api#documentation": "

The ID for the theme.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.amplifyuibuilder#ThemeName", + "traits": { + "smithy.api#documentation": "

The name of the theme.

", + "smithy.api#required": {} + } + }, + "createdAt": { + "target": "smithy.api#Timestamp", + "traits": { + "aws.cloudformation#cfnMutability": "read", + "smithy.api#documentation": "

The time that the theme was created.

", + "smithy.api#required": {}, + "smithy.api#timestampFormat": "date-time" + } + }, + "modifiedAt": { + "target": "smithy.api#Timestamp", + "traits": { + "aws.cloudformation#cfnMutability": "read", + "smithy.api#documentation": "

The time that the theme was modified.

", + "smithy.api#timestampFormat": "date-time" + } + }, + "values": { + "target": "com.amazonaws.amplifyuibuilder#ThemeValuesList", + "traits": { + "smithy.api#documentation": "

A list of key-value pairs that defines the properties of the theme.

", + "smithy.api#required": {} + } + }, + "overrides": { + "target": "com.amazonaws.amplifyuibuilder#ThemeValuesList", + "traits": { + "smithy.api#documentation": "

Describes the properties that can be overriden to customize a theme.

" + } + }, + "tags": { + "target": "com.amazonaws.amplifyuibuilder#Tags", + "traits": { + "aws.cloudformation#cfnMutability": "create-and-read", + "smithy.api#documentation": "

One or more key-value pairs to use when tagging the theme.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A theme is a collection of style settings that apply globally to the components associated\n with an Amplify application.

", + "smithy.api#references": [ + { + "resource": "com.amazonaws.amplifyuibuilder#ThemeResource" + } + ] + } + }, + "com.amazonaws.amplifyuibuilder#ThemeList": { + "type": "list", + "member": { + "target": "com.amazonaws.amplifyuibuilder#Theme" + } + }, + "com.amazonaws.amplifyuibuilder#ThemeName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + } + } + }, + "com.amazonaws.amplifyuibuilder#ThemeResource": { + "type": "resource", + "identifiers": { + "id": { + "target": "com.amazonaws.amplifyuibuilder#Uuid" + }, + "appId": { + "target": "smithy.api#String" + }, + "environmentName": { + "target": "smithy.api#String" + } + }, + "create": { + "target": "com.amazonaws.amplifyuibuilder#CreateTheme" + }, + "read": { + "target": "com.amazonaws.amplifyuibuilder#GetTheme" + }, + "update": { + "target": "com.amazonaws.amplifyuibuilder#UpdateTheme" + }, + "delete": { + "target": "com.amazonaws.amplifyuibuilder#DeleteTheme" + }, + "list": { + "target": "com.amazonaws.amplifyuibuilder#ListThemes" + }, + "collectionOperations": [ + { + "target": "com.amazonaws.amplifyuibuilder#ExportThemes" + } + ], + "traits": { + "aws.api#arn": { + "template": "app/{appId}/environment/{environmentName}/themes/{id}", + "absolute": false, + "noAccount": false, + "noRegion": false + }, + "aws.cloudformation#cfnResource": { + "additionalSchemas": [ + "com.amazonaws.amplifyuibuilder#Theme" + ], + "name": "Theme" + } + } + }, + "com.amazonaws.amplifyuibuilder#ThemeSummary": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID for the app associated with the theme summary.

", + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is part of the Amplify app.

", + "smithy.api#required": {} + } + }, + "id": { + "target": "com.amazonaws.amplifyuibuilder#Uuid", + "traits": { + "smithy.api#documentation": "

The ID of the theme.

", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.amplifyuibuilder#ThemeName", + "traits": { + "smithy.api#documentation": "

The name of the theme.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the basic information about a theme.

" + } + }, + "com.amazonaws.amplifyuibuilder#ThemeSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.amplifyuibuilder#ThemeSummary" + } + }, + "com.amazonaws.amplifyuibuilder#ThemeValue": { + "type": "structure", + "members": { + "value": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The value of a theme property.

" + } + }, + "children": { + "target": "com.amazonaws.amplifyuibuilder#ThemeValuesList", + "traits": { + "smithy.api#documentation": "

A list of key-value pairs that define the theme's properties.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the configuration of a theme's properties.

" + } + }, + "com.amazonaws.amplifyuibuilder#ThemeValues": { + "type": "structure", + "members": { + "key": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the property.

" + } + }, + "value": { + "target": "com.amazonaws.amplifyuibuilder#ThemeValue", + "traits": { + "smithy.api#documentation": "

The value of the property.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A key-value pair that defines a property of a theme.

" + } + }, + "com.amazonaws.amplifyuibuilder#ThemeValuesList": { + "type": "list", + "member": { + "target": "com.amazonaws.amplifyuibuilder#ThemeValues" + } + }, + "com.amazonaws.amplifyuibuilder#TokenProviders": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "figma", + "name": "FIGMA", + "documentation": "The figma token provider." + } + ] + } + }, + "com.amazonaws.amplifyuibuilder#UpdateComponent": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifyuibuilder#UpdateComponentRequest" + }, + "output": { + "target": "com.amazonaws.amplifyuibuilder#UpdateComponentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifyuibuilder#InternalServerException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#InvalidParameterException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#ResourceConflictException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates an existing component.

", + "smithy.api#http": { + "method": "PATCH", + "uri": "/app/{appId}/environment/{environmentName}/components/{id}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.amplifyuibuilder#UpdateComponentData": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.amplifyuibuilder#Uuid", + "traits": { + "smithy.api#documentation": "

The unique ID of the component to update.

" + } + }, + "name": { + "target": "com.amazonaws.amplifyuibuilder#ComponentName", + "traits": { + "smithy.api#documentation": "

The name of the component to update.

" + } + }, + "sourceId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID of the component in its original source system, such as Figma.

" + } + }, + "componentType": { + "target": "com.amazonaws.amplifyuibuilder#ComponentType", + "traits": { + "smithy.api#documentation": "

The type of the component. This can be an Amplify custom UI component or another custom\n component.

" + } + }, + "properties": { + "target": "com.amazonaws.amplifyuibuilder#ComponentProperties", + "traits": { + "smithy.api#documentation": "

Describes the component's properties.

" + } + }, + "children": { + "target": "com.amazonaws.amplifyuibuilder#ComponentChildList", + "traits": { + "smithy.api#documentation": "

The components that are instances of the main component.

" + } + }, + "variants": { + "target": "com.amazonaws.amplifyuibuilder#ComponentVariants", + "traits": { + "smithy.api#documentation": "

A list of the unique variants of the main component being updated.

" + } + }, + "overrides": { + "target": "com.amazonaws.amplifyuibuilder#ComponentOverrides", + "traits": { + "smithy.api#documentation": "

Describes the properties that can be overriden to customize the component.

" + } + }, + "bindingProperties": { + "target": "com.amazonaws.amplifyuibuilder#ComponentBindingProperties", + "traits": { + "smithy.api#documentation": "

The data binding information for the component's properties.

" + } + }, + "collectionProperties": { + "target": "com.amazonaws.amplifyuibuilder#ComponentCollectionProperties", + "traits": { + "smithy.api#documentation": "

The configuration for binding a component's properties to a data model. Use this for a collection component.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Updates and saves all of the information about a component, based on component ID.

" + } + }, + "com.amazonaws.amplifyuibuilder#UpdateComponentRequest": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID for the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is part of the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "id": { + "target": "com.amazonaws.amplifyuibuilder#Uuid", + "traits": { + "smithy.api#documentation": "

The unique ID for the component.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "smithy.api#String", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

The unique client token.

", + "smithy.api#httpQuery": "clientToken", + "smithy.api#idempotencyToken": {} + } + }, + "updatedComponent": { + "target": "com.amazonaws.amplifyuibuilder#UpdateComponentData", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

The configuration of the updated component.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#UpdateComponentResponse": { + "type": "structure", + "members": { + "entity": { + "target": "com.amazonaws.amplifyuibuilder#Component", + "traits": { + "smithy.api#documentation": "

Describes the configuration of the updated component.

", + "smithy.api#httpPayload": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#UpdateTheme": { + "type": "operation", + "input": { + "target": "com.amazonaws.amplifyuibuilder#UpdateThemeRequest" + }, + "output": { + "target": "com.amazonaws.amplifyuibuilder#UpdateThemeResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amplifyuibuilder#InternalServerException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#InvalidParameterException" + }, + { + "target": "com.amazonaws.amplifyuibuilder#ResourceConflictException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates an existing theme.

", + "smithy.api#http": { + "method": "PATCH", + "uri": "/app/{appId}/environment/{environmentName}/themes/{id}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.amplifyuibuilder#UpdateThemeData": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.amplifyuibuilder#Uuid", + "traits": { + "smithy.api#documentation": "

The unique ID of the theme to update.

" + } + }, + "name": { + "target": "com.amazonaws.amplifyuibuilder#ThemeName", + "traits": { + "smithy.api#documentation": "

The name of the theme to update.

" + } + }, + "values": { + "target": "com.amazonaws.amplifyuibuilder#ThemeValuesList", + "traits": { + "smithy.api#documentation": "

A list of key-value pairs that define the theme's properties.

", + "smithy.api#required": {} + } + }, + "overrides": { + "target": "com.amazonaws.amplifyuibuilder#ThemeValuesList", + "traits": { + "smithy.api#documentation": "

Describes the properties that can be overriden to customize the theme.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Saves the data binding information for a theme.

" + } + }, + "com.amazonaws.amplifyuibuilder#UpdateThemeRequest": { + "type": "structure", + "members": { + "appId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The unique ID for the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "environmentName": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The name of the backend environment that is part of the Amplify app.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "id": { + "target": "com.amazonaws.amplifyuibuilder#Uuid", + "traits": { + "smithy.api#documentation": "

The unique ID for the theme.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "smithy.api#String", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

The unique client token.

", + "smithy.api#httpQuery": "clientToken", + "smithy.api#idempotencyToken": {} + } + }, + "updatedTheme": { + "target": "com.amazonaws.amplifyuibuilder#UpdateThemeData", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "

The configuration of the updated theme.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#UpdateThemeResponse": { + "type": "structure", + "members": { + "entity": { + "target": "com.amazonaws.amplifyuibuilder#Theme", + "traits": { + "smithy.api#documentation": "

Describes the configuration of the updated theme.

", + "smithy.api#httpPayload": {} + } + } + } + }, + "com.amazonaws.amplifyuibuilder#Uuid": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/networkmanager.2019-07-05.json b/codegen/sdk-codegen/aws-models/networkmanager.2019-07-05.json index cff1f458777..8577ac57744 100644 --- a/codegen/sdk-codegen/aws-models/networkmanager.2019-07-05.json +++ b/codegen/sdk-codegen/aws-models/networkmanager.2019-07-05.json @@ -29,17 +29,26 @@ ] }, "shapes": { + "com.amazonaws.networkmanager#AWSAccountId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 12, + "max": 12 + } + } + }, "com.amazonaws.networkmanager#AWSLocation": { "type": "structure", "members": { "Zone": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The Zone that the device is located in. Specify the ID of an Availability Zone, Local\n Zone, Wavelength Zone, or an Outpost.

" } }, "SubnetArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#SubnetArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the subnet that the device is located in.

" } @@ -49,11 +58,72 @@ "smithy.api#documentation": "

Specifies a location in Amazon Web Services.

" } }, + "com.amazonaws.networkmanager#AcceptAttachment": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#AcceptAttachmentRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#AcceptAttachmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Accepts a core network attachment request.

\n

Once the attachment request is accepted by a core network owner, the attachment is\n created and connected to a core network.

", + "smithy.api#http": { + "method": "POST", + "uri": "/attachments/{AttachmentId}/accept", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#AcceptAttachmentRequest": { + "type": "structure", + "members": { + "AttachmentId": { + "target": "com.amazonaws.networkmanager#AttachmentId", + "traits": { + "smithy.api#documentation": "

The ID of the attachment.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#AcceptAttachmentResponse": { + "type": "structure", + "members": { + "Attachment": { + "target": "com.amazonaws.networkmanager#Attachment", + "traits": { + "smithy.api#documentation": "

The response to the attachment request.

" + } + } + } + }, "com.amazonaws.networkmanager#AccessDeniedException": { "type": "structure", "members": { "Message": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { "smithy.api#required": {} } @@ -65,6 +135,90 @@ "smithy.api#httpError": 403 } }, + "com.amazonaws.networkmanager#AssociateConnectPeer": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#AssociateConnectPeerRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#AssociateConnectPeerResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Associates a core network Connect peer with a device and optionally, with a link.

\n

If you specify a link, it must be associated with the specified device. You can only\n associate core network Connect peers that have been created on a core network Connect\n attachment on a core network.

", + "smithy.api#http": { + "method": "POST", + "uri": "/global-networks/{GlobalNetworkId}/connect-peer-associations", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#AssociateConnectPeerRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of your global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ConnectPeerId": { + "target": "com.amazonaws.networkmanager#ConnectPeerId", + "traits": { + "smithy.api#documentation": "

The ID of the Connect peer.

", + "smithy.api#required": {} + } + }, + "DeviceId": { + "target": "com.amazonaws.networkmanager#DeviceId", + "traits": { + "smithy.api#documentation": "

The ID of the device.

", + "smithy.api#required": {} + } + }, + "LinkId": { + "target": "com.amazonaws.networkmanager#LinkId", + "traits": { + "smithy.api#documentation": "

The ID of the link.

" + } + } + } + }, + "com.amazonaws.networkmanager#AssociateConnectPeerResponse": { + "type": "structure", + "members": { + "ConnectPeerAssociation": { + "target": "com.amazonaws.networkmanager#ConnectPeerAssociation", + "traits": { + "smithy.api#documentation": "

The response to the Connect peer request.

" + } + } + } + }, "com.amazonaws.networkmanager#AssociateCustomerGateway": { "type": "operation", "input": { @@ -109,14 +263,14 @@ "type": "structure", "members": { "CustomerGatewayArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#CustomerGatewayArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the customer gateway.

", "smithy.api#required": {} } }, "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, @@ -124,14 +278,14 @@ } }, "DeviceId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#DeviceId", "traits": { "smithy.api#documentation": "

The ID of the device.

", "smithy.api#required": {} } }, "LinkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#LinkId", "traits": { "smithy.api#documentation": "

The ID of the link.

" } @@ -193,7 +347,7 @@ "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, @@ -201,14 +355,14 @@ } }, "DeviceId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#DeviceId", "traits": { "smithy.api#documentation": "

The ID of the device.

", "smithy.api#required": {} } }, "LinkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#LinkId", "traits": { "smithy.api#documentation": "

The ID of the link.

", "smithy.api#required": {} @@ -271,7 +425,7 @@ "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, @@ -279,21 +433,21 @@ } }, "TransitGatewayConnectPeerArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#TransitGatewayConnectPeerArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Connect peer.

", "smithy.api#required": {} } }, "DeviceId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#DeviceId", "traits": { "smithy.api#documentation": "

The ID of the device.

", "smithy.api#required": {} } }, "LinkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#LinkId", "traits": { "smithy.api#documentation": "

The ID of the link.

" } @@ -311,729 +465,794 @@ } } }, - "com.amazonaws.networkmanager#Bandwidth": { + "com.amazonaws.networkmanager#Attachment": { "type": "structure", "members": { - "UploadSpeed": { - "target": "com.amazonaws.networkmanager#Integer", + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", "traits": { - "smithy.api#documentation": "

Upload speed in Mbps.

" + "smithy.api#documentation": "

A core network ID.

" } }, - "DownloadSpeed": { - "target": "com.amazonaws.networkmanager#Integer", + "CoreNetworkArn": { + "target": "com.amazonaws.networkmanager#CoreNetworkArn", "traits": { - "smithy.api#documentation": "

Download speed in Mbps.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Describes bandwidth information.

" - } - }, - "com.amazonaws.networkmanager#Boolean": { - "type": "boolean" - }, - "com.amazonaws.networkmanager#ConflictException": { - "type": "structure", - "members": { - "Message": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#required": {} + "smithy.api#documentation": "

The ARN of a core network.

" } }, - "ResourceId": { - "target": "com.amazonaws.networkmanager#String", + "AttachmentId": { + "target": "com.amazonaws.networkmanager#AttachmentId", "traits": { - "smithy.api#documentation": "

The ID of the resource.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The ID of the attachment.

" } }, - "ResourceType": { - "target": "com.amazonaws.networkmanager#String", + "OwnerAccountId": { + "target": "com.amazonaws.networkmanager#AWSAccountId", "traits": { - "smithy.api#documentation": "

The resource type.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The ID of the attachment account owner.

" } - } - }, - "traits": { - "smithy.api#documentation": "

There was a conflict processing the request. Updating or deleting the resource can\n cause an inconsistent state.

", - "smithy.api#error": "client", - "smithy.api#httpError": 409 - } - }, - "com.amazonaws.networkmanager#Connection": { - "type": "structure", - "members": { - "ConnectionId": { - "target": "com.amazonaws.networkmanager#String", + }, + "AttachmentType": { + "target": "com.amazonaws.networkmanager#AttachmentType", "traits": { - "smithy.api#documentation": "

The ID of the connection.

" + "smithy.api#documentation": "

The type of attachment.

" } }, - "ConnectionArn": { - "target": "com.amazonaws.networkmanager#String", + "State": { + "target": "com.amazonaws.networkmanager#AttachmentState", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the connection.

" + "smithy.api#documentation": "

The state of the attachment.

" } }, - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "EdgeLocation": { + "target": "com.amazonaws.networkmanager#ExternalRegionCode", "traits": { - "smithy.api#documentation": "

The ID of the global network.

" + "smithy.api#documentation": "

The Region where the edge is located.

" } }, - "DeviceId": { - "target": "com.amazonaws.networkmanager#String", + "ResourceArn": { + "target": "com.amazonaws.networkmanager#ResourceArn", "traits": { - "smithy.api#documentation": "

The ID of the first device in the connection.

" + "smithy.api#documentation": "

The attachment resource ARN.

" } }, - "ConnectedDeviceId": { - "target": "com.amazonaws.networkmanager#String", + "AttachmentPolicyRuleNumber": { + "target": "com.amazonaws.networkmanager#Integer", "traits": { - "smithy.api#documentation": "

The ID of the second device in the connection.

" + "smithy.api#documentation": "

The policy rule number associated with the attachment.

" } }, - "LinkId": { - "target": "com.amazonaws.networkmanager#String", + "SegmentName": { + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { - "smithy.api#documentation": "

The ID of the link for the first device in the connection.

" + "smithy.api#documentation": "

The name of the segment attachment.

" } }, - "ConnectedLinkId": { - "target": "com.amazonaws.networkmanager#String", + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", "traits": { - "smithy.api#documentation": "

The ID of the link for the second device in the connection.

" + "smithy.api#documentation": "

The tags associated with the attachment.

" } }, - "Description": { - "target": "com.amazonaws.networkmanager#String", + "ProposedSegmentChange": { + "target": "com.amazonaws.networkmanager#ProposedSegmentChange", "traits": { - "smithy.api#documentation": "

The description of the connection.

" + "smithy.api#documentation": "

The attachment to move from one segment to another.

" } }, "CreatedAt": { "target": "com.amazonaws.networkmanager#DateTime", "traits": { - "smithy.api#documentation": "

The date and time that the connection was created.

" - } - }, - "State": { - "target": "com.amazonaws.networkmanager#ConnectionState", - "traits": { - "smithy.api#documentation": "

The state of the connection.

" + "smithy.api#documentation": "

The timestamp when the attachment was created.

" } }, - "Tags": { - "target": "com.amazonaws.networkmanager#TagList", + "UpdatedAt": { + "target": "com.amazonaws.networkmanager#DateTime", "traits": { - "smithy.api#documentation": "

The tags for the connection.

" + "smithy.api#documentation": "

The timestamp when the attachment was last updated.

" } } }, "traits": { - "smithy.api#documentation": "

Describes a connection.

" + "smithy.api#documentation": "

Describes a core network attachment.

" } }, - "com.amazonaws.networkmanager#ConnectionHealth": { - "type": "structure", - "members": { - "Type": { - "target": "com.amazonaws.networkmanager#ConnectionType", - "traits": { - "smithy.api#documentation": "

The connection type.

" - } - }, - "Status": { - "target": "com.amazonaws.networkmanager#ConnectionStatus", - "traits": { - "smithy.api#documentation": "

The connection status.

" - } - }, - "Timestamp": { - "target": "com.amazonaws.networkmanager#DateTime", - "traits": { - "smithy.api#documentation": "

The time the status was last updated.

" - } - } - }, + "com.amazonaws.networkmanager#AttachmentId": { + "type": "string", "traits": { - "smithy.api#documentation": "

Describes connection health.

" + "smithy.api#length": { + "min": 0, + "max": 50 + }, + "smithy.api#pattern": "^attachment-([0-9a-f]{8,17})$" } }, - "com.amazonaws.networkmanager#ConnectionList": { + "com.amazonaws.networkmanager#AttachmentList": { "type": "list", "member": { - "target": "com.amazonaws.networkmanager#Connection" + "target": "com.amazonaws.networkmanager#Attachment" } }, - "com.amazonaws.networkmanager#ConnectionState": { + "com.amazonaws.networkmanager#AttachmentState": { "type": "string", "traits": { "smithy.api#enum": [ { - "value": "PENDING", - "name": "pending" + "value": "REJECTED", + "name": "REJECTED" }, { - "value": "AVAILABLE", - "name": "available" + "value": "PENDING_ATTACHMENT_ACCEPTANCE", + "name": "PENDING_ATTACHMENT_ACCEPTANCE" }, { - "value": "DELETING", - "name": "deleting" + "value": "CREATING", + "name": "CREATING" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "AVAILABLE", + "name": "AVAILABLE" }, { "value": "UPDATING", - "name": "updating" + "name": "UPDATING" + }, + { + "value": "PENDING_NETWORK_UPDATE", + "name": "PENDING_NETWORK_UPDATE" + }, + { + "value": "PENDING_TAG_ACCEPTANCE", + "name": "PENDING_TAG_ACCEPTANCE" + }, + { + "value": "DELETING", + "name": "DELETING" } ] } }, - "com.amazonaws.networkmanager#ConnectionStatus": { + "com.amazonaws.networkmanager#AttachmentType": { "type": "string", "traits": { "smithy.api#enum": [ { - "value": "UP", - "name": "UP" + "value": "CONNECT", + "name": "CONNECT" }, { - "value": "DOWN", - "name": "DOWN" + "value": "SITE_TO_SITE_VPN", + "name": "SITE_TO_SITE_VPN" + }, + { + "value": "VPC", + "name": "VPC" } ] } }, - "com.amazonaws.networkmanager#ConnectionType": { - "type": "string", + "com.amazonaws.networkmanager#Bandwidth": { + "type": "structure", + "members": { + "UploadSpeed": { + "target": "com.amazonaws.networkmanager#Integer", + "traits": { + "smithy.api#documentation": "

Upload speed in Mbps.

" + } + }, + "DownloadSpeed": { + "target": "com.amazonaws.networkmanager#Integer", + "traits": { + "smithy.api#documentation": "

Download speed in Mbps.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes bandwidth information.

" + } + }, + "com.amazonaws.networkmanager#BgpOptions": { + "type": "structure", + "members": { + "PeerAsn": { + "target": "com.amazonaws.networkmanager#Long", + "traits": { + "smithy.api#documentation": "

The Peer ASN of the BGP.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the BGP options.

" + } + }, + "com.amazonaws.networkmanager#Boolean": { + "type": "boolean" + }, + "com.amazonaws.networkmanager#ChangeAction": { + "type": "string", "traits": { "smithy.api#enum": [ { - "value": "BGP", - "name": "BGP" + "value": "ADD", + "name": "ADD" }, { - "value": "IPSEC", - "name": "IPSEC" + "value": "MODIFY", + "name": "MODIFY" + }, + { + "value": "REMOVE", + "name": "REMOVE" } ] } }, - "com.amazonaws.networkmanager#CreateConnection": { - "type": "operation", - "input": { - "target": "com.amazonaws.networkmanager#CreateConnectionRequest" - }, - "output": { - "target": "com.amazonaws.networkmanager#CreateConnectionResponse" - }, - "errors": [ - { - "target": "com.amazonaws.networkmanager#AccessDeniedException" - }, - { - "target": "com.amazonaws.networkmanager#ConflictException" - }, - { - "target": "com.amazonaws.networkmanager#InternalServerException" - }, - { - "target": "com.amazonaws.networkmanager#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.networkmanager#ThrottlingException" - }, - { - "target": "com.amazonaws.networkmanager#ValidationException" - } - ], + "com.amazonaws.networkmanager#ChangeSetState": { + "type": "string", "traits": { - "smithy.api#documentation": "

Creates a connection between two devices. The devices can be a physical or virtual appliance that connects to a third-party appliance in a VPC, or a physical appliance that connects to another physical appliance in an on-premises network.

", - "smithy.api#http": { - "method": "POST", - "uri": "/global-networks/{GlobalNetworkId}/connections", - "code": 200 + "smithy.api#enum": [ + { + "value": "PENDING_GENERATION", + "name": "PENDING_GENERATION" + }, + { + "value": "FAILED_GENERATION", + "name": "FAILED_GENERATION" + }, + { + "value": "READY_TO_EXECUTE", + "name": "READY_TO_EXECUTE" + }, + { + "value": "EXECUTING", + "name": "EXECUTING" + }, + { + "value": "EXECUTION_SUCCEEDED", + "name": "EXECUTION_SUCCEEDED" + }, + { + "value": "OUT_OF_DATE", + "name": "OUT_OF_DATE" + } + ] + } + }, + "com.amazonaws.networkmanager#ChangeType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CORE_NETWORK_SEGMENT", + "name": "CORE_NETWORK_SEGMENT" + }, + { + "value": "CORE_NETWORK_EDGE", + "name": "CORE_NETWORK_EDGE" + }, + { + "value": "ATTACHMENT_MAPPING", + "name": "ATTACHMENT_MAPPING" + }, + { + "value": "ATTACHMENT_ROUTE_PROPAGATION", + "name": "ATTACHMENT_ROUTE_PROPAGATION" + }, + { + "value": "ATTACHMENT_ROUTE_STATIC", + "name": "ATTACHMENT_ROUTE_STATIC" + } + ] + } + }, + "com.amazonaws.networkmanager#ClientToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 } } }, - "com.amazonaws.networkmanager#CreateConnectionRequest": { + "com.amazonaws.networkmanager#ConflictException": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "Message": { + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, - "DeviceId": { - "target": "com.amazonaws.networkmanager#String", + "ResourceId": { + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { - "smithy.api#documentation": "

The ID of the first device in the connection.

", + "smithy.api#documentation": "

The ID of the resource.

", "smithy.api#required": {} } }, - "ConnectedDeviceId": { - "target": "com.amazonaws.networkmanager#String", + "ResourceType": { + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { - "smithy.api#documentation": "

The ID of the second device in the connection.

", + "smithy.api#documentation": "

The resource type.

", "smithy.api#required": {} } - }, - "LinkId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ID of the link for the first device.

" - } - }, - "ConnectedLinkId": { - "target": "com.amazonaws.networkmanager#String", + } + }, + "traits": { + "smithy.api#documentation": "

There was a conflict processing the request. Updating or deleting the resource can\n cause an inconsistent state.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.networkmanager#ConnectAttachment": { + "type": "structure", + "members": { + "Attachment": { + "target": "com.amazonaws.networkmanager#Attachment", "traits": { - "smithy.api#documentation": "

The ID of the link for the second device.

" + "smithy.api#documentation": "

The attachment details.

" } }, - "Description": { - "target": "com.amazonaws.networkmanager#String", + "TransportAttachmentId": { + "target": "com.amazonaws.networkmanager#AttachmentId", "traits": { - "smithy.api#documentation": "

A description of the connection.

\n

Length Constraints: Maximum length of 256 characters.

" + "smithy.api#documentation": "

The ID of the transport attachment.

" } }, - "Tags": { - "target": "com.amazonaws.networkmanager#TagList", + "Options": { + "target": "com.amazonaws.networkmanager#ConnectAttachmentOptions", "traits": { - "smithy.api#documentation": "

The tags to apply to the resource during creation.

" + "smithy.api#documentation": "

Options for connecting an attachment.

" } } + }, + "traits": { + "smithy.api#documentation": "

Describes a core network Connect attachment.

" } }, - "com.amazonaws.networkmanager#CreateConnectionResponse": { + "com.amazonaws.networkmanager#ConnectAttachmentOptions": { "type": "structure", "members": { - "Connection": { - "target": "com.amazonaws.networkmanager#Connection", + "Protocol": { + "target": "com.amazonaws.networkmanager#TunnelProtocol", "traits": { - "smithy.api#documentation": "

Information about the connection.

" + "smithy.api#documentation": "

The protocol used for the attachment connection.

" } } - } - }, - "com.amazonaws.networkmanager#CreateDevice": { - "type": "operation", - "input": { - "target": "com.amazonaws.networkmanager#CreateDeviceRequest" - }, - "output": { - "target": "com.amazonaws.networkmanager#CreateDeviceResponse" }, - "errors": [ - { - "target": "com.amazonaws.networkmanager#AccessDeniedException" - }, - { - "target": "com.amazonaws.networkmanager#ConflictException" - }, - { - "target": "com.amazonaws.networkmanager#InternalServerException" - }, - { - "target": "com.amazonaws.networkmanager#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.networkmanager#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.networkmanager#ThrottlingException" - }, - { - "target": "com.amazonaws.networkmanager#ValidationException" - } - ], "traits": { - "smithy.api#documentation": "

Creates a new device in a global network. If you specify both a site ID and a\n location, the location of the site is used for visualization in the Network Manager console.

", - "smithy.api#http": { - "method": "POST", - "uri": "/global-networks/{GlobalNetworkId}/devices", - "code": 200 - } + "smithy.api#documentation": "

Describes a core network Connect attachment options.

" } }, - "com.amazonaws.networkmanager#CreateDeviceRequest": { + "com.amazonaws.networkmanager#ConnectPeer": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "AWSLocation": { - "target": "com.amazonaws.networkmanager#AWSLocation", - "traits": { - "smithy.api#documentation": "

The Amazon Web Services location of the device, if applicable. For an on-premises device, you can omit this parameter.

" - } - }, - "Description": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

A description of the device.

\n

Constraints: Maximum length of 256 characters.

" + "smithy.api#documentation": "

The ID of a core network.

" } }, - "Type": { - "target": "com.amazonaws.networkmanager#String", + "ConnectAttachmentId": { + "target": "com.amazonaws.networkmanager#AttachmentId", "traits": { - "smithy.api#documentation": "

The type of the device.

" + "smithy.api#documentation": "

The ID of the attachment to connect.

" } }, - "Vendor": { - "target": "com.amazonaws.networkmanager#String", + "ConnectPeerId": { + "target": "com.amazonaws.networkmanager#ConnectPeerId", "traits": { - "smithy.api#documentation": "

The vendor of the device.

\n

Constraints: Maximum length of 128 characters.

" + "smithy.api#documentation": "

The ID of the Connect peer.

" } }, - "Model": { - "target": "com.amazonaws.networkmanager#String", + "EdgeLocation": { + "target": "com.amazonaws.networkmanager#ExternalRegionCode", "traits": { - "smithy.api#documentation": "

The model of the device.

\n

Constraints: Maximum length of 128 characters.

" + "smithy.api#documentation": "

The Connect peer Regions where edges are located.

" } }, - "SerialNumber": { - "target": "com.amazonaws.networkmanager#String", + "State": { + "target": "com.amazonaws.networkmanager#ConnectPeerState", "traits": { - "smithy.api#documentation": "

The serial number of the device.

\n

Constraints: Maximum length of 128 characters.

" + "smithy.api#documentation": "

The state of the Connect peer.

" } }, - "Location": { - "target": "com.amazonaws.networkmanager#Location", + "CreatedAt": { + "target": "com.amazonaws.networkmanager#DateTime", "traits": { - "smithy.api#documentation": "

The location of the device.

" + "smithy.api#documentation": "

The timestamp when the Connect peer was created.

" } }, - "SiteId": { - "target": "com.amazonaws.networkmanager#String", + "Configuration": { + "target": "com.amazonaws.networkmanager#ConnectPeerConfiguration", "traits": { - "smithy.api#documentation": "

The ID of the site.

" + "smithy.api#documentation": "

The configuration of the Connect peer.

" } }, "Tags": { "target": "com.amazonaws.networkmanager#TagList", "traits": { - "smithy.api#documentation": "

The tags to apply to the resource during creation.

" + "smithy.api#documentation": "

The tags associated with the Connect peer.

" } } + }, + "traits": { + "smithy.api#documentation": "

Describes a core network Connect peer.

" } }, - "com.amazonaws.networkmanager#CreateDeviceResponse": { + "com.amazonaws.networkmanager#ConnectPeerAssociation": { "type": "structure", "members": { - "Device": { - "target": "com.amazonaws.networkmanager#Device", + "ConnectPeerId": { + "target": "com.amazonaws.networkmanager#ConnectPeerId", "traits": { - "smithy.api#documentation": "

Information about the device.

" + "smithy.api#documentation": "

The ID of the Connect peer.

" } - } - } - }, - "com.amazonaws.networkmanager#CreateGlobalNetwork": { - "type": "operation", - "input": { - "target": "com.amazonaws.networkmanager#CreateGlobalNetworkRequest" - }, - "output": { - "target": "com.amazonaws.networkmanager#CreateGlobalNetworkResponse" - }, - "errors": [ - { - "target": "com.amazonaws.networkmanager#AccessDeniedException" }, - { - "target": "com.amazonaws.networkmanager#ConflictException" + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

" + } }, - { - "target": "com.amazonaws.networkmanager#InternalServerException" + "DeviceId": { + "target": "com.amazonaws.networkmanager#DeviceId", + "traits": { + "smithy.api#documentation": "

The ID of the device to connect to.

" + } }, - { - "target": "com.amazonaws.networkmanager#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.networkmanager#ThrottlingException" - }, - { - "target": "com.amazonaws.networkmanager#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Creates a new, empty global network.

", - "smithy.api#http": { - "method": "POST", - "uri": "/global-networks", - "code": 200 - } - } - }, - "com.amazonaws.networkmanager#CreateGlobalNetworkRequest": { - "type": "structure", - "members": { - "Description": { - "target": "com.amazonaws.networkmanager#String", + "LinkId": { + "target": "com.amazonaws.networkmanager#LinkId", "traits": { - "smithy.api#documentation": "

A description of the global network.

\n

Constraints: Maximum length of 256 characters.

" + "smithy.api#documentation": "

The ID of the link.

" } }, - "Tags": { - "target": "com.amazonaws.networkmanager#TagList", + "State": { + "target": "com.amazonaws.networkmanager#ConnectPeerAssociationState", "traits": { - "smithy.api#documentation": "

The tags to apply to the resource during creation.

" + "smithy.api#documentation": "

The state of the Connect peer association.

" } } + }, + "traits": { + "smithy.api#documentation": "

Describes a core network Connect peer association.

" } }, - "com.amazonaws.networkmanager#CreateGlobalNetworkResponse": { - "type": "structure", - "members": { - "GlobalNetwork": { - "target": "com.amazonaws.networkmanager#GlobalNetwork", - "traits": { - "smithy.api#documentation": "

Information about the global network object.

" - } - } + "com.amazonaws.networkmanager#ConnectPeerAssociationList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#ConnectPeerAssociation" } }, - "com.amazonaws.networkmanager#CreateLink": { - "type": "operation", - "input": { - "target": "com.amazonaws.networkmanager#CreateLinkRequest" - }, - "output": { - "target": "com.amazonaws.networkmanager#CreateLinkResponse" - }, - "errors": [ - { - "target": "com.amazonaws.networkmanager#AccessDeniedException" - }, - { - "target": "com.amazonaws.networkmanager#ConflictException" - }, - { - "target": "com.amazonaws.networkmanager#InternalServerException" - }, - { - "target": "com.amazonaws.networkmanager#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.networkmanager#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.networkmanager#ThrottlingException" - }, - { - "target": "com.amazonaws.networkmanager#ValidationException" - } - ], + "com.amazonaws.networkmanager#ConnectPeerAssociationState": { + "type": "string", "traits": { - "smithy.api#documentation": "

Creates a new link for a specified site.

", - "smithy.api#http": { - "method": "POST", - "uri": "/global-networks/{GlobalNetworkId}/links", - "code": 200 - } + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "pending" + }, + { + "value": "AVAILABLE", + "name": "available" + }, + { + "value": "DELETING", + "name": "deleting" + }, + { + "value": "DELETED", + "name": "deleted" + } + ] } }, - "com.amazonaws.networkmanager#CreateLinkRequest": { + "com.amazonaws.networkmanager#ConnectPeerBgpConfiguration": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "CoreNetworkAsn": { + "target": "com.amazonaws.networkmanager#Long", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "

The ASN of the Coret Network.

" } }, - "Description": { - "target": "com.amazonaws.networkmanager#String", + "PeerAsn": { + "target": "com.amazonaws.networkmanager#Long", "traits": { - "smithy.api#documentation": "

A description of the link.

\n

Constraints: Maximum length of 256 characters.

" + "smithy.api#documentation": "

The ASN of the Connect peer.

" } }, - "Type": { - "target": "com.amazonaws.networkmanager#String", + "CoreNetworkAddress": { + "target": "com.amazonaws.networkmanager#IPAddress", "traits": { - "smithy.api#documentation": "

The type of the link.

\n

Constraints: Maximum length of 128 characters. Cannot include the following characters: | \\ ^

" + "smithy.api#documentation": "

The address of a core network.

" } }, - "Bandwidth": { - "target": "com.amazonaws.networkmanager#Bandwidth", + "PeerAddress": { + "target": "com.amazonaws.networkmanager#IPAddress", "traits": { - "smithy.api#documentation": "

The upload speed and download speed in Mbps.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The address of a core network Connect peer.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes a core network BGP configuration.

" + } + }, + "com.amazonaws.networkmanager#ConnectPeerBgpConfigurationList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#ConnectPeerBgpConfiguration" + } + }, + "com.amazonaws.networkmanager#ConnectPeerConfiguration": { + "type": "structure", + "members": { + "CoreNetworkAddress": { + "target": "com.amazonaws.networkmanager#IPAddress", + "traits": { + "smithy.api#documentation": "

The IP address of a core network.

" } }, - "Provider": { - "target": "com.amazonaws.networkmanager#String", + "PeerAddress": { + "target": "com.amazonaws.networkmanager#IPAddress", "traits": { - "smithy.api#documentation": "

The provider of the link.

\n

Constraints: Maximum length of 128 characters. Cannot include the following characters: | \\ ^

" + "smithy.api#documentation": "

The IP address of the Connect peer.

" } }, - "SiteId": { - "target": "com.amazonaws.networkmanager#String", + "InsideCidrBlocks": { + "target": "com.amazonaws.networkmanager#ConstrainedStringList", "traits": { - "smithy.api#documentation": "

The ID of the site.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The inside IP addresses used for a Connect peer configuration.

" } }, - "Tags": { - "target": "com.amazonaws.networkmanager#TagList", + "Protocol": { + "target": "com.amazonaws.networkmanager#TunnelProtocol", "traits": { - "smithy.api#documentation": "

The tags to apply to the resource during creation.

" + "smithy.api#documentation": "

The protocol used for a Connect peer configuration.

" } - } - } - }, - "com.amazonaws.networkmanager#CreateLinkResponse": { - "type": "structure", - "members": { - "Link": { - "target": "com.amazonaws.networkmanager#Link", + }, + "BgpConfigurations": { + "target": "com.amazonaws.networkmanager#ConnectPeerBgpConfigurationList", "traits": { - "smithy.api#documentation": "

Information about the link.

" + "smithy.api#documentation": "

The Connect peer BGP configurations.

" } } + }, + "traits": { + "smithy.api#documentation": "

Describes a core network Connect peer configuration.

" } }, - "com.amazonaws.networkmanager#CreateSite": { - "type": "operation", - "input": { - "target": "com.amazonaws.networkmanager#CreateSiteRequest" - }, - "output": { - "target": "com.amazonaws.networkmanager#CreateSiteResponse" - }, - "errors": [ - { - "target": "com.amazonaws.networkmanager#AccessDeniedException" - }, - { - "target": "com.amazonaws.networkmanager#ConflictException" - }, - { - "target": "com.amazonaws.networkmanager#InternalServerException" - }, - { - "target": "com.amazonaws.networkmanager#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.networkmanager#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.networkmanager#ThrottlingException" + "com.amazonaws.networkmanager#ConnectPeerId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 }, - { - "target": "com.amazonaws.networkmanager#ValidationException" - } - ], + "smithy.api#pattern": "^connect-peer-([0-9a-f]{8,17})$" + } + }, + "com.amazonaws.networkmanager#ConnectPeerIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#ConnectPeerId" + } + }, + "com.amazonaws.networkmanager#ConnectPeerState": { + "type": "string", "traits": { - "smithy.api#documentation": "

Creates a new site in a global network.

", - "smithy.api#http": { - "method": "POST", - "uri": "/global-networks/{GlobalNetworkId}/sites", - "code": 200 - } + "smithy.api#enum": [ + { + "value": "CREATING", + "name": "CREATING" + }, + { + "value": "FAILED", + "name": "FAILED" + }, + { + "value": "AVAILABLE", + "name": "AVAILABLE" + }, + { + "value": "DELETING", + "name": "DELETING" + } + ] } }, - "com.amazonaws.networkmanager#CreateSiteRequest": { + "com.amazonaws.networkmanager#ConnectPeerSummary": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "

The ID of a core network.

" } }, - "Description": { - "target": "com.amazonaws.networkmanager#String", + "ConnectAttachmentId": { + "target": "com.amazonaws.networkmanager#AttachmentId", "traits": { - "smithy.api#documentation": "

A description of your site.

\n

Constraints: Maximum length of 256 characters.

" + "smithy.api#documentation": "

The ID of a Connect peer attachment.

" } }, - "Location": { - "target": "com.amazonaws.networkmanager#Location", + "ConnectPeerId": { + "target": "com.amazonaws.networkmanager#ConnectPeerId", "traits": { - "smithy.api#documentation": "

The site location. This information is used for visualization in the Network Manager console. If you specify the address, the latitude and longitude are automatically calculated.

\n " + "smithy.api#documentation": "

The ID of a Connect peer.

" + } + }, + "EdgeLocation": { + "target": "com.amazonaws.networkmanager#ExternalRegionCode", + "traits": { + "smithy.api#documentation": "

The Region where the edge is located.

" + } + }, + "ConnectPeerState": { + "target": "com.amazonaws.networkmanager#ConnectPeerState", + "traits": { + "smithy.api#documentation": "

The state of a Connect peer.

" + } + }, + "CreatedAt": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

The timestamp when a Connect peer was created.

" } }, "Tags": { "target": "com.amazonaws.networkmanager#TagList", "traits": { - "smithy.api#documentation": "

The tags to apply to the resource during creation.

" + "smithy.api#documentation": "

The tags associated with a Connect peer summary.

" } } + }, + "traits": { + "smithy.api#documentation": "

Summary description of a Connect peer.

" } }, - "com.amazonaws.networkmanager#CreateSiteResponse": { - "type": "structure", - "members": { - "Site": { - "target": "com.amazonaws.networkmanager#Site", - "traits": { - "smithy.api#documentation": "

Information about the site.

" - } - } + "com.amazonaws.networkmanager#ConnectPeerSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#ConnectPeerSummary" } }, - "com.amazonaws.networkmanager#CustomerGatewayAssociation": { + "com.amazonaws.networkmanager#Connection": { "type": "structure", "members": { - "CustomerGatewayArn": { - "target": "com.amazonaws.networkmanager#String", + "ConnectionId": { + "target": "com.amazonaws.networkmanager#ConnectionId", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the customer gateway.

" + "smithy.api#documentation": "

The ID of the connection.

" + } + }, + "ConnectionArn": { + "target": "com.amazonaws.networkmanager#ConnectionArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the connection.

" } }, "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

" } }, "DeviceId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#DeviceId", "traits": { - "smithy.api#documentation": "

The ID of the device.

" + "smithy.api#documentation": "

The ID of the first device in the connection.

" } }, - "LinkId": { - "target": "com.amazonaws.networkmanager#String", + "ConnectedDeviceId": { + "target": "com.amazonaws.networkmanager#DeviceId", "traits": { - "smithy.api#documentation": "

The ID of the link.

" + "smithy.api#documentation": "

The ID of the second device in the connection.

" } }, - "State": { - "target": "com.amazonaws.networkmanager#CustomerGatewayAssociationState", + "LinkId": { + "target": "com.amazonaws.networkmanager#LinkId", "traits": { - "smithy.api#documentation": "

The association state.

" + "smithy.api#documentation": "

The ID of the link for the first device in the connection.

" + } + }, + "ConnectedLinkId": { + "target": "com.amazonaws.networkmanager#LinkId", + "traits": { + "smithy.api#documentation": "

The ID of the link for the second device in the connection.

" + } + }, + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The description of the connection.

" + } + }, + "CreatedAt": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

The date and time that the connection was created.

" + } + }, + "State": { + "target": "com.amazonaws.networkmanager#ConnectionState", + "traits": { + "smithy.api#documentation": "

The state of the connection.

" + } + }, + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", + "traits": { + "smithy.api#documentation": "

The tags for the connection.

" } } }, "traits": { - "smithy.api#documentation": "

Describes the association between a customer gateway, a device, and a link.

" + "smithy.api#documentation": "

Describes a connection.

" } }, - "com.amazonaws.networkmanager#CustomerGatewayAssociationList": { + "com.amazonaws.networkmanager#ConnectionArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + } + } + }, + "com.amazonaws.networkmanager#ConnectionHealth": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.networkmanager#ConnectionType", + "traits": { + "smithy.api#documentation": "

The connection type.

" + } + }, + "Status": { + "target": "com.amazonaws.networkmanager#ConnectionStatus", + "traits": { + "smithy.api#documentation": "

The connection status.

" + } + }, + "Timestamp": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

The time the status was last updated.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes connection health.

" + } + }, + "com.amazonaws.networkmanager#ConnectionId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.networkmanager#ConnectionIdList": { "type": "list", "member": { - "target": "com.amazonaws.networkmanager#CustomerGatewayAssociation" + "target": "com.amazonaws.networkmanager#ConnectionId" } }, - "com.amazonaws.networkmanager#CustomerGatewayAssociationState": { + "com.amazonaws.networkmanager#ConnectionList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#Connection" + } + }, + "com.amazonaws.networkmanager#ConnectionState": { "type": "string", "traits": { "smithy.api#enum": [ @@ -1050,359 +1269,588 @@ "name": "deleting" }, { - "value": "DELETED", - "name": "deleted" + "value": "UPDATING", + "name": "updating" } ] } }, - "com.amazonaws.networkmanager#DateTime": { - "type": "timestamp" + "com.amazonaws.networkmanager#ConnectionStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "UP", + "name": "UP" + }, + { + "value": "DOWN", + "name": "DOWN" + } + ] + } }, - "com.amazonaws.networkmanager#DeleteConnection": { - "type": "operation", - "input": { - "target": "com.amazonaws.networkmanager#DeleteConnectionRequest" - }, - "output": { - "target": "com.amazonaws.networkmanager#DeleteConnectionResponse" - }, - "errors": [ - { - "target": "com.amazonaws.networkmanager#AccessDeniedException" - }, - { - "target": "com.amazonaws.networkmanager#ConflictException" - }, - { - "target": "com.amazonaws.networkmanager#InternalServerException" - }, - { - "target": "com.amazonaws.networkmanager#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.networkmanager#ThrottlingException" - }, - { - "target": "com.amazonaws.networkmanager#ValidationException" - } - ], + "com.amazonaws.networkmanager#ConnectionType": { + "type": "string", "traits": { - "smithy.api#documentation": "

Deletes the specified connection in your global network.

", - "smithy.api#http": { - "method": "DELETE", - "uri": "/global-networks/{GlobalNetworkId}/connections/{ConnectionId}", - "code": 200 + "smithy.api#enum": [ + { + "value": "BGP", + "name": "BGP" + }, + { + "value": "IPSEC", + "name": "IPSEC" + } + ] + } + }, + "com.amazonaws.networkmanager#ConstrainedString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 } } }, - "com.amazonaws.networkmanager#DeleteConnectionRequest": { + "com.amazonaws.networkmanager#ConstrainedStringList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#ConstrainedString" + } + }, + "com.amazonaws.networkmanager#CoreNetwork": { "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "

The ID of the global network that your core network is a part of.

" } }, - "ConnectionId": { - "target": "com.amazonaws.networkmanager#String", + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", "traits": { - "smithy.api#documentation": "

The ID of the connection.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "

The ID of a core network.

" } - } - } - }, - "com.amazonaws.networkmanager#DeleteConnectionResponse": { - "type": "structure", - "members": { - "Connection": { - "target": "com.amazonaws.networkmanager#Connection", + }, + "CoreNetworkArn": { + "target": "com.amazonaws.networkmanager#CoreNetworkArn", "traits": { - "smithy.api#documentation": "

Information about the connection.

" + "smithy.api#documentation": "

The ARN of a core network.

" } - } - } - }, - "com.amazonaws.networkmanager#DeleteDevice": { - "type": "operation", - "input": { - "target": "com.amazonaws.networkmanager#DeleteDeviceRequest" - }, - "output": { - "target": "com.amazonaws.networkmanager#DeleteDeviceResponse" - }, - "errors": [ - { - "target": "com.amazonaws.networkmanager#AccessDeniedException" }, - { - "target": "com.amazonaws.networkmanager#ConflictException" + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The description of a core network.

" + } }, - { - "target": "com.amazonaws.networkmanager#InternalServerException" + "CreatedAt": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

The timestamp when a core network was created.

" + } }, - { - "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + "State": { + "target": "com.amazonaws.networkmanager#CoreNetworkState", + "traits": { + "smithy.api#documentation": "

The current state of a core network.

" + } }, - { - "target": "com.amazonaws.networkmanager#ThrottlingException" + "Segments": { + "target": "com.amazonaws.networkmanager#CoreNetworkSegmentList", + "traits": { + "smithy.api#documentation": "

The segments within a core network.

" + } }, - { - "target": "com.amazonaws.networkmanager#ValidationException" + "Edges": { + "target": "com.amazonaws.networkmanager#CoreNetworkEdgeList", + "traits": { + "smithy.api#documentation": "

The edges within a core network.

" + } + }, + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", + "traits": { + "smithy.api#documentation": "

The tags associated with a core network.

" + } } - ], + }, "traits": { - "smithy.api#documentation": "

Deletes an existing device. You must first disassociate the device from any links and\n customer gateways.

", - "smithy.api#http": { - "method": "DELETE", - "uri": "/global-networks/{GlobalNetworkId}/devices/{DeviceId}", - "code": 200 + "smithy.api#documentation": "

Describes a core network.

" + } + }, + "com.amazonaws.networkmanager#CoreNetworkArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 } } }, - "com.amazonaws.networkmanager#DeleteDeviceRequest": { + "com.amazonaws.networkmanager#CoreNetworkChange": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "Type": { + "target": "com.amazonaws.networkmanager#ChangeType", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "

The type of change.

" } }, - "DeviceId": { - "target": "com.amazonaws.networkmanager#String", + "Action": { + "target": "com.amazonaws.networkmanager#ChangeAction", "traits": { - "smithy.api#documentation": "

The ID of the device.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "

The action to take for a core network.

" + } + }, + "Identifier": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The resource identifier.

" + } + }, + "PreviousValues": { + "target": "com.amazonaws.networkmanager#CoreNetworkChangeValues", + "traits": { + "smithy.api#documentation": "

The previous values for a core network.

" + } + }, + "NewValues": { + "target": "com.amazonaws.networkmanager#CoreNetworkChangeValues", + "traits": { + "smithy.api#documentation": "

The new value for a core network

" } } + }, + "traits": { + "smithy.api#documentation": "

Details describing a core network change.

" } }, - "com.amazonaws.networkmanager#DeleteDeviceResponse": { + "com.amazonaws.networkmanager#CoreNetworkChangeList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#CoreNetworkChange" + } + }, + "com.amazonaws.networkmanager#CoreNetworkChangeValues": { "type": "structure", "members": { - "Device": { - "target": "com.amazonaws.networkmanager#Device", + "SegmentName": { + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { - "smithy.api#documentation": "

Information about the device.

" + "smithy.api#documentation": "

The names of the segments in a core network.

" } - } - } - }, - "com.amazonaws.networkmanager#DeleteGlobalNetwork": { - "type": "operation", - "input": { - "target": "com.amazonaws.networkmanager#DeleteGlobalNetworkRequest" - }, - "output": { - "target": "com.amazonaws.networkmanager#DeleteGlobalNetworkResponse" - }, - "errors": [ - { - "target": "com.amazonaws.networkmanager#AccessDeniedException" }, - { - "target": "com.amazonaws.networkmanager#ConflictException" + "EdgeLocations": { + "target": "com.amazonaws.networkmanager#ExternalRegionCodeList", + "traits": { + "smithy.api#documentation": "

The Regions where edges are located in a core network.

" + } }, - { - "target": "com.amazonaws.networkmanager#InternalServerException" + "Asn": { + "target": "com.amazonaws.networkmanager#Long", + "traits": { + "smithy.api#documentation": "

The ASN of a core network.

" + } }, - { - "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + "Cidr": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The IP addresses used for a core network.

" + } }, - { - "target": "com.amazonaws.networkmanager#ThrottlingException" + "DestinationIdentifier": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The ID of the destination.

" + } }, - { - "target": "com.amazonaws.networkmanager#ValidationException" + "InsideCidrBlocks": { + "target": "com.amazonaws.networkmanager#ConstrainedStringList", + "traits": { + "smithy.api#documentation": "

The inside IP addresses used for core network change values.

" + } + }, + "SharedSegments": { + "target": "com.amazonaws.networkmanager#ConstrainedStringList", + "traits": { + "smithy.api#documentation": "

The shared segments for a core network change value.

" + } } - ], + }, "traits": { - "smithy.api#documentation": "

Deletes an existing global network. You must first delete all global network objects\n (devices, links, and sites) and deregister all transit gateways.

", - "smithy.api#http": { - "method": "DELETE", - "uri": "/global-networks/{GlobalNetworkId}", - "code": 200 - } + "smithy.api#documentation": "

Describes a core network change.

" } }, - "com.amazonaws.networkmanager#DeleteGlobalNetworkRequest": { + "com.amazonaws.networkmanager#CoreNetworkEdge": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "EdgeLocation": { + "target": "com.amazonaws.networkmanager#ExternalRegionCode", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "

The Region where a core network edge is located.

" + } + }, + "Asn": { + "target": "com.amazonaws.networkmanager#Long", + "traits": { + "smithy.api#documentation": "

The ASN of a core network edge.

" + } + }, + "InsideCidrBlocks": { + "target": "com.amazonaws.networkmanager#ConstrainedStringList", + "traits": { + "smithy.api#documentation": "

The inside IP addresses used for core network edges.

" } } + }, + "traits": { + "smithy.api#documentation": "

Describes a core network edge.

" } }, - "com.amazonaws.networkmanager#DeleteGlobalNetworkResponse": { + "com.amazonaws.networkmanager#CoreNetworkEdgeList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#CoreNetworkEdge" + } + }, + "com.amazonaws.networkmanager#CoreNetworkId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + }, + "smithy.api#pattern": "^core-network-([0-9a-f]{8,17})$" + } + }, + "com.amazonaws.networkmanager#CoreNetworkPolicy": { "type": "structure", "members": { - "GlobalNetwork": { - "target": "com.amazonaws.networkmanager#GlobalNetwork", + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", "traits": { - "smithy.api#documentation": "

Information about the global network.

" + "smithy.api#documentation": "

The ID of a core network.

" } - } - } - }, - "com.amazonaws.networkmanager#DeleteLink": { - "type": "operation", - "input": { - "target": "com.amazonaws.networkmanager#DeleteLinkRequest" - }, - "output": { - "target": "com.amazonaws.networkmanager#DeleteLinkResponse" - }, - "errors": [ - { - "target": "com.amazonaws.networkmanager#AccessDeniedException" }, - { - "target": "com.amazonaws.networkmanager#ConflictException" + "PolicyVersionId": { + "target": "com.amazonaws.networkmanager#Integer", + "traits": { + "smithy.api#documentation": "

The ID of the policy version.

" + } }, - { - "target": "com.amazonaws.networkmanager#InternalServerException" + "Alias": { + "target": "com.amazonaws.networkmanager#CoreNetworkPolicyAlias", + "traits": { + "smithy.api#documentation": "

Whether a core network policy is the current LIVE policy or the most recently submitted policy.

" + } }, - { - "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The description of a core network policy.

" + } }, - { - "target": "com.amazonaws.networkmanager#ThrottlingException" + "CreatedAt": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

The timestamp when a core network policy was created.

" + } }, - { - "target": "com.amazonaws.networkmanager#ValidationException" + "ChangeSetState": { + "target": "com.amazonaws.networkmanager#ChangeSetState", + "traits": { + "smithy.api#documentation": "

The state of a core network policy.

" + } + }, + "PolicyErrors": { + "target": "com.amazonaws.networkmanager#CoreNetworkPolicyErrorList", + "traits": { + "smithy.api#documentation": "

Describes any errors in a core network policy.

" + } + }, + "PolicyDocument": { + "target": "com.amazonaws.networkmanager#SynthesizedJsonCoreNetworkPolicyDocument", + "traits": { + "smithy.api#documentation": "

Describes a core network policy.

" + } } - ], + }, "traits": { - "smithy.api#documentation": "

Deletes an existing link. You must first disassociate the link from any devices and\n customer gateways.

", - "smithy.api#http": { - "method": "DELETE", - "uri": "/global-networks/{GlobalNetworkId}/links/{LinkId}", - "code": 200 - } + "smithy.api#documentation": "

Describes a core network policy. You can have only one LIVE Core Policy.

" } }, - "com.amazonaws.networkmanager#DeleteLinkRequest": { + "com.amazonaws.networkmanager#CoreNetworkPolicyAlias": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "LIVE", + "name": "LIVE" + }, + { + "value": "LATEST", + "name": "LATEST" + } + ] + } + }, + "com.amazonaws.networkmanager#CoreNetworkPolicyDocument": { + "type": "string" + }, + "com.amazonaws.networkmanager#CoreNetworkPolicyError": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "ErrorCode": { + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, + "smithy.api#documentation": "

The error code associated with a core network policy error.

", "smithy.api#required": {} } }, - "LinkId": { - "target": "com.amazonaws.networkmanager#String", + "Message": { + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { - "smithy.api#documentation": "

The ID of the link.

", - "smithy.api#httpLabel": {}, + "smithy.api#documentation": "

The message associated with a core network policy error code.

", "smithy.api#required": {} } + }, + "Path": { + "target": "com.amazonaws.networkmanager#ServerSideString", + "traits": { + "smithy.api#documentation": "

The JSON path where the error was discovered in the policy document.

" + } } + }, + "traits": { + "smithy.api#documentation": "

Provides details about an error in a core network policy.

" } }, - "com.amazonaws.networkmanager#DeleteLinkResponse": { + "com.amazonaws.networkmanager#CoreNetworkPolicyErrorList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#CoreNetworkPolicyError" + } + }, + "com.amazonaws.networkmanager#CoreNetworkPolicyException": { "type": "structure", "members": { - "Link": { - "target": "com.amazonaws.networkmanager#Link", + "Message": { + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { - "smithy.api#documentation": "

Information about the link.

" + "smithy.api#required": {} + } + }, + "Errors": { + "target": "com.amazonaws.networkmanager#CoreNetworkPolicyErrorList", + "traits": { + "smithy.api#documentation": "

Describes a core network policy exception.

" } } + }, + "traits": { + "smithy.api#documentation": "

Describes a core network policy exception.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } }, - "com.amazonaws.networkmanager#DeleteSite": { - "type": "operation", - "input": { - "target": "com.amazonaws.networkmanager#DeleteSiteRequest" - }, - "output": { - "target": "com.amazonaws.networkmanager#DeleteSiteResponse" - }, - "errors": [ - { - "target": "com.amazonaws.networkmanager#AccessDeniedException" + "com.amazonaws.networkmanager#CoreNetworkPolicyVersion": { + "type": "structure", + "members": { + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of a core network.

" + } }, - { - "target": "com.amazonaws.networkmanager#ConflictException" + "PolicyVersionId": { + "target": "com.amazonaws.networkmanager#Integer", + "traits": { + "smithy.api#documentation": "

The ID of the policy version.

" + } }, - { - "target": "com.amazonaws.networkmanager#InternalServerException" + "Alias": { + "target": "com.amazonaws.networkmanager#CoreNetworkPolicyAlias", + "traits": { + "smithy.api#documentation": "

Whether a core network policy is the current policy or the most recently submitted policy.

" + } }, - { - "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The description of a core network policy version.

" + } }, - { - "target": "com.amazonaws.networkmanager#ThrottlingException" + "CreatedAt": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

The timestamp when a core network policy version was created.

" + } }, - { - "target": "com.amazonaws.networkmanager#ValidationException" + "ChangeSetState": { + "target": "com.amazonaws.networkmanager#ChangeSetState", + "traits": { + "smithy.api#documentation": "

The status of the policy version change set.

" + } } - ], + }, "traits": { - "smithy.api#documentation": "

Deletes an existing site. The site cannot be associated with any device or link.

", - "smithy.api#http": { - "method": "DELETE", - "uri": "/global-networks/{GlobalNetworkId}/sites/{SiteId}", - "code": 200 - } + "smithy.api#documentation": "

Describes a core network policy version.

" } }, - "com.amazonaws.networkmanager#DeleteSiteRequest": { + "com.amazonaws.networkmanager#CoreNetworkPolicyVersionList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#CoreNetworkPolicyVersion" + } + }, + "com.amazonaws.networkmanager#CoreNetworkSegment": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "Name": { + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "

The name of a core network segment.

" } }, - "SiteId": { - "target": "com.amazonaws.networkmanager#String", + "EdgeLocations": { + "target": "com.amazonaws.networkmanager#ExternalRegionCodeList", "traits": { - "smithy.api#documentation": "

The ID of the site.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "

The Regions where the edges are located.

" + } + }, + "SharedSegments": { + "target": "com.amazonaws.networkmanager#ConstrainedStringList", + "traits": { + "smithy.api#documentation": "

The shared segments of a core network.

" } } + }, + "traits": { + "smithy.api#documentation": "

Describes a core network segment, which are dedicated routes. Only attachments within this segment can communicate with each other.

" } }, - "com.amazonaws.networkmanager#DeleteSiteResponse": { + "com.amazonaws.networkmanager#CoreNetworkSegmentEdgeIdentifier": { "type": "structure", "members": { - "Site": { - "target": "com.amazonaws.networkmanager#Site", + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", "traits": { - "smithy.api#documentation": "

Information about the site.

" + "smithy.api#documentation": "

The ID of a core network.

" + } + }, + "SegmentName": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The name of the segment edge.

" + } + }, + "EdgeLocation": { + "target": "com.amazonaws.networkmanager#ExternalRegionCode", + "traits": { + "smithy.api#documentation": "

The Region where the segment edge is located.

" } } + }, + "traits": { + "smithy.api#documentation": "

Returns details about a core network edge.

" } }, - "com.amazonaws.networkmanager#DeregisterTransitGateway": { - "type": "operation", + "com.amazonaws.networkmanager#CoreNetworkSegmentList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#CoreNetworkSegment" + } + }, + "com.amazonaws.networkmanager#CoreNetworkState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "CREATING", + "name": "CREATING" + }, + { + "value": "UPDATING", + "name": "UPDATING" + }, + { + "value": "AVAILABLE", + "name": "AVAILABLE" + }, + { + "value": "DELETING", + "name": "DELETING" + } + ] + } + }, + "com.amazonaws.networkmanager#CoreNetworkSummary": { + "type": "structure", + "members": { + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of a core network.

" + } + }, + "CoreNetworkArn": { + "target": "com.amazonaws.networkmanager#CoreNetworkArn", + "traits": { + "smithy.api#documentation": "

a core network ARN.

" + } + }, + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The global network ID.

" + } + }, + "OwnerAccountId": { + "target": "com.amazonaws.networkmanager#AWSAccountId", + "traits": { + "smithy.api#documentation": "

The ID of the account owner.

" + } + }, + "State": { + "target": "com.amazonaws.networkmanager#CoreNetworkState", + "traits": { + "smithy.api#documentation": "

The state of a core network.

" + } + }, + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The description of a core network.

" + } + }, + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", + "traits": { + "smithy.api#documentation": "

The key-value tags associated with a core network summary.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Returns summary information about a core network.

" + } + }, + "com.amazonaws.networkmanager#CoreNetworkSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#CoreNetworkSummary" + } + }, + "com.amazonaws.networkmanager#CreateConnectAttachment": { + "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#DeregisterTransitGatewayRequest" + "target": "com.amazonaws.networkmanager#CreateConnectAttachmentRequest" }, "output": { - "target": "com.amazonaws.networkmanager#DeregisterTransitGatewayResponse" + "target": "com.amazonaws.networkmanager#CreateConnectAttachmentResponse" }, "errors": [ { @@ -1425,58 +1873,86 @@ } ], "traits": { - "smithy.api#documentation": "

Deregisters a transit gateway from your global network. This action does not delete\n your transit gateway, or modify any of its attachments. This action removes any customer gateway associations.

", + "smithy.api#documentation": "

Creates a core network Connect attachment from a specified core network attachment.

\n

A core network Connect attachment is a GRE-based tunnel attachment that you can use to\n establish a connection between a core network and an appliance. A core network Connect\n attachment uses an existing VPC attachment as the underlying transport mechanism.

", "smithy.api#http": { - "method": "DELETE", - "uri": "/global-networks/{GlobalNetworkId}/transit-gateway-registrations/{TransitGatewayArn}", + "method": "POST", + "uri": "/connect-attachments", "code": 200 } } }, - "com.amazonaws.networkmanager#DeregisterTransitGatewayRequest": { + "com.amazonaws.networkmanager#CreateConnectAttachmentRequest": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, + "smithy.api#documentation": "

The ID of a core network where you want to create the attachment.

", "smithy.api#required": {} } }, - "TransitGatewayArn": { - "target": "com.amazonaws.networkmanager#String", + "EdgeLocation": { + "target": "com.amazonaws.networkmanager#ExternalRegionCode", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the transit gateway.

", - "smithy.api#httpLabel": {}, + "smithy.api#documentation": "

The Region where the edge is located.

", + "smithy.api#required": {} + } + }, + "TransportAttachmentId": { + "target": "com.amazonaws.networkmanager#AttachmentId", + "traits": { + "smithy.api#documentation": "

The ID of the attachment between the two connections.

", + "smithy.api#required": {} + } + }, + "Options": { + "target": "com.amazonaws.networkmanager#ConnectAttachmentOptions", + "traits": { + "smithy.api#documentation": "

Options for creating an attachment.

", "smithy.api#required": {} } + }, + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", + "traits": { + "smithy.api#documentation": "

The list of key-value tags associated with the request.

" + } + }, + "ClientToken": { + "target": "com.amazonaws.networkmanager#ClientToken", + "traits": { + "smithy.api#documentation": "

The client token associated with the request.

", + "smithy.api#idempotencyToken": {} + } } } }, - "com.amazonaws.networkmanager#DeregisterTransitGatewayResponse": { + "com.amazonaws.networkmanager#CreateConnectAttachmentResponse": { "type": "structure", "members": { - "TransitGatewayRegistration": { - "target": "com.amazonaws.networkmanager#TransitGatewayRegistration", + "ConnectAttachment": { + "target": "com.amazonaws.networkmanager#ConnectAttachment", "traits": { - "smithy.api#documentation": "

The transit gateway registration information.

" + "smithy.api#documentation": "

The response to a Connect attachment request.

" } } } }, - "com.amazonaws.networkmanager#DescribeGlobalNetworks": { + "com.amazonaws.networkmanager#CreateConnectPeer": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#DescribeGlobalNetworksRequest" + "target": "com.amazonaws.networkmanager#CreateConnectPeerRequest" }, "output": { - "target": "com.amazonaws.networkmanager#DescribeGlobalNetworksResponse" + "target": "com.amazonaws.networkmanager#CreateConnectPeerResponse" }, "errors": [ { "target": "com.amazonaws.networkmanager#AccessDeniedException" }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, { "target": "com.amazonaws.networkmanager#InternalServerException" }, @@ -1491,190 +1967,83 @@ } ], "traits": { - "smithy.api#documentation": "

Describes one or more global networks. By default, all global networks are\n described. To describe the objects in your global network, you must use the appropriate\n Get* action. For example, to list the transit gateways in your global\n network, use GetTransitGatewayRegistrations.

", + "smithy.api#documentation": "

Creates a core network connect peer for a specified core network connect attachment between a core network and an appliance.\n The peer address and transit gateway address must be the same IP address family (IPv4 or IPv6).

", "smithy.api#http": { - "method": "GET", - "uri": "/global-networks", + "method": "POST", + "uri": "/connect-peers", "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "pageSize": "MaxResults" - } - } - }, - "com.amazonaws.networkmanager#DescribeGlobalNetworksRequest": { - "type": "structure", - "members": { - "GlobalNetworkIds": { - "target": "com.amazonaws.networkmanager#StringList", - "traits": { - "smithy.api#documentation": "

The IDs of one or more global networks. The maximum is 10.

", - "smithy.api#httpQuery": "globalNetworkIds" - } - }, - "MaxResults": { - "target": "com.amazonaws.networkmanager#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum number of results to return.

", - "smithy.api#httpQuery": "maxResults" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The token for the next page of results.

", - "smithy.api#httpQuery": "nextToken" - } - } - } - }, - "com.amazonaws.networkmanager#DescribeGlobalNetworksResponse": { - "type": "structure", - "members": { - "GlobalNetworks": { - "target": "com.amazonaws.networkmanager#GlobalNetworkList", - "traits": { - "smithy.api#documentation": "

Information about the global networks.

" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" - } } } }, - "com.amazonaws.networkmanager#Device": { + "com.amazonaws.networkmanager#CreateConnectPeerRequest": { "type": "structure", "members": { - "DeviceId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ID of the device.

" - } - }, - "DeviceArn": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the device.

" - } - }, - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ID of the global network.

" - } - }, - "AWSLocation": { - "target": "com.amazonaws.networkmanager#AWSLocation", - "traits": { - "smithy.api#documentation": "

The Amazon Web Services location of the device.

" - } - }, - "Description": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The description of the device.

" - } - }, - "Type": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The device type.

" - } - }, - "Vendor": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The device vendor.

" - } - }, - "Model": { - "target": "com.amazonaws.networkmanager#String", + "ConnectAttachmentId": { + "target": "com.amazonaws.networkmanager#AttachmentId", "traits": { - "smithy.api#documentation": "

The device model.

" + "smithy.api#documentation": "

The ID of the connection attachment.

", + "smithy.api#required": {} } }, - "SerialNumber": { - "target": "com.amazonaws.networkmanager#String", + "CoreNetworkAddress": { + "target": "com.amazonaws.networkmanager#IPAddress", "traits": { - "smithy.api#documentation": "

The device serial number.

" + "smithy.api#documentation": "

A Connect peer core network address.

" } }, - "Location": { - "target": "com.amazonaws.networkmanager#Location", + "PeerAddress": { + "target": "com.amazonaws.networkmanager#IPAddress", "traits": { - "smithy.api#documentation": "

The site location.

" + "smithy.api#documentation": "

The Connect peer address.

", + "smithy.api#required": {} } }, - "SiteId": { - "target": "com.amazonaws.networkmanager#String", + "BgpOptions": { + "target": "com.amazonaws.networkmanager#BgpOptions", "traits": { - "smithy.api#documentation": "

The site ID.

" + "smithy.api#documentation": "

The Connect peer BGP options.

" } }, - "CreatedAt": { - "target": "com.amazonaws.networkmanager#DateTime", + "InsideCidrBlocks": { + "target": "com.amazonaws.networkmanager#ConstrainedStringList", "traits": { - "smithy.api#documentation": "

The date and time that the site was created.

" + "smithy.api#documentation": "

The inside IP addresses used for BGP peering.

", + "smithy.api#required": {} } }, - "State": { - "target": "com.amazonaws.networkmanager#DeviceState", + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", "traits": { - "smithy.api#documentation": "

The device state.

" + "smithy.api#documentation": "

The tags associated with the peer request.

" } }, - "Tags": { - "target": "com.amazonaws.networkmanager#TagList", + "ClientToken": { + "target": "com.amazonaws.networkmanager#ClientToken", "traits": { - "smithy.api#documentation": "

The tags for the device.

" + "smithy.api#documentation": "

The client token associated with the request.

", + "smithy.api#idempotencyToken": {} } } - }, - "traits": { - "smithy.api#documentation": "

Describes a device.

" - } - }, - "com.amazonaws.networkmanager#DeviceList": { - "type": "list", - "member": { - "target": "com.amazonaws.networkmanager#Device" } }, - "com.amazonaws.networkmanager#DeviceState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PENDING", - "name": "pending" - }, - { - "value": "AVAILABLE", - "name": "available" - }, - { - "value": "DELETING", - "name": "deleting" - }, - { - "value": "UPDATING", - "name": "updating" + "com.amazonaws.networkmanager#CreateConnectPeerResponse": { + "type": "structure", + "members": { + "ConnectPeer": { + "target": "com.amazonaws.networkmanager#ConnectPeer", + "traits": { + "smithy.api#documentation": "

The response to the request.

" } - ] + } } }, - "com.amazonaws.networkmanager#DisassociateCustomerGateway": { + "com.amazonaws.networkmanager#CreateConnection": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#DisassociateCustomerGatewayRequest" + "target": "com.amazonaws.networkmanager#CreateConnectionRequest" }, "output": { - "target": "com.amazonaws.networkmanager#DisassociateCustomerGatewayResponse" + "target": "com.amazonaws.networkmanager#CreateConnectionResponse" }, "errors": [ { @@ -1687,7 +2056,7 @@ "target": "com.amazonaws.networkmanager#InternalServerException" }, { - "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + "target": "com.amazonaws.networkmanager#ServiceQuotaExceededException" }, { "target": "com.amazonaws.networkmanager#ThrottlingException" @@ -1697,53 +2066,83 @@ } ], "traits": { - "smithy.api#documentation": "

Disassociates a customer gateway from a device and a link.

", + "smithy.api#documentation": "

Creates a connection between two devices. The devices can be a physical or virtual appliance that connects to a third-party appliance in a VPC, or a physical appliance that connects to another physical appliance in an on-premises network.

", "smithy.api#http": { - "method": "DELETE", - "uri": "/global-networks/{GlobalNetworkId}/customer-gateway-associations/{CustomerGatewayArn}", + "method": "POST", + "uri": "/global-networks/{GlobalNetworkId}/connections", "code": 200 } } }, - "com.amazonaws.networkmanager#DisassociateCustomerGatewayRequest": { + "com.amazonaws.networkmanager#CreateConnectionRequest": { "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, - "CustomerGatewayArn": { - "target": "com.amazonaws.networkmanager#String", + "DeviceId": { + "target": "com.amazonaws.networkmanager#DeviceId", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the customer gateway.

", - "smithy.api#httpLabel": {}, + "smithy.api#documentation": "

The ID of the first device in the connection.

", + "smithy.api#required": {} + } + }, + "ConnectedDeviceId": { + "target": "com.amazonaws.networkmanager#DeviceId", + "traits": { + "smithy.api#documentation": "

The ID of the second device in the connection.

", "smithy.api#required": {} } + }, + "LinkId": { + "target": "com.amazonaws.networkmanager#LinkId", + "traits": { + "smithy.api#documentation": "

The ID of the link for the first device.

" + } + }, + "ConnectedLinkId": { + "target": "com.amazonaws.networkmanager#LinkId", + "traits": { + "smithy.api#documentation": "

The ID of the link for the second device.

" + } + }, + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

A description of the connection.

\n

Length Constraints: Maximum length of 256 characters.

" + } + }, + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", + "traits": { + "smithy.api#documentation": "

The tags to apply to the resource during creation.

" + } } } }, - "com.amazonaws.networkmanager#DisassociateCustomerGatewayResponse": { + "com.amazonaws.networkmanager#CreateConnectionResponse": { "type": "structure", "members": { - "CustomerGatewayAssociation": { - "target": "com.amazonaws.networkmanager#CustomerGatewayAssociation", + "Connection": { + "target": "com.amazonaws.networkmanager#Connection", "traits": { - "smithy.api#documentation": "

Information about the customer gateway association.

" + "smithy.api#documentation": "

Information about the connection.

" } } } }, - "com.amazonaws.networkmanager#DisassociateLink": { + "com.amazonaws.networkmanager#CreateCoreNetwork": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#DisassociateLinkRequest" + "target": "com.amazonaws.networkmanager#CreateCoreNetworkRequest" }, "output": { - "target": "com.amazonaws.networkmanager#DisassociateLinkResponse" + "target": "com.amazonaws.networkmanager#CreateCoreNetworkResponse" }, "errors": [ { @@ -1752,11 +2151,14 @@ { "target": "com.amazonaws.networkmanager#ConflictException" }, + { + "target": "com.amazonaws.networkmanager#CoreNetworkPolicyException" + }, { "target": "com.amazonaws.networkmanager#InternalServerException" }, { - "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + "target": "com.amazonaws.networkmanager#ServiceQuotaExceededException" }, { "target": "com.amazonaws.networkmanager#ThrottlingException" @@ -1766,61 +2168,69 @@ } ], "traits": { - "smithy.api#documentation": "

Disassociates an existing device from a link. You must first disassociate any customer\n gateways that are associated with the link.

", + "smithy.api#documentation": "

Creates a core network as part of your global network, and optionally, with a core network policy.

", "smithy.api#http": { - "method": "DELETE", - "uri": "/global-networks/{GlobalNetworkId}/link-associations", + "method": "POST", + "uri": "/core-networks", "code": 200 } } }, - "com.amazonaws.networkmanager#DisassociateLinkRequest": { + "com.amazonaws.networkmanager#CreateCoreNetworkRequest": { "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, + "smithy.api#documentation": "

The ID of the global network that a core network will be a part of.

", "smithy.api#required": {} } }, - "DeviceId": { - "target": "com.amazonaws.networkmanager#String", + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { - "smithy.api#documentation": "

The ID of the device.

", - "smithy.api#httpQuery": "deviceId", - "smithy.api#required": {} + "smithy.api#documentation": "

The description of a core network.

" } }, - "LinkId": { - "target": "com.amazonaws.networkmanager#String", + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", "traits": { - "smithy.api#documentation": "

The ID of the link.

", - "smithy.api#httpQuery": "linkId", - "smithy.api#required": {} + "smithy.api#documentation": "

Key-value tags associated with a core network request.

" + } + }, + "PolicyDocument": { + "target": "com.amazonaws.networkmanager#CoreNetworkPolicyDocument", + "traits": { + "smithy.api#documentation": "

The policy document for creating a core network.

" + } + }, + "ClientToken": { + "target": "com.amazonaws.networkmanager#ClientToken", + "traits": { + "smithy.api#documentation": "

The client token associated with a core network request.

", + "smithy.api#idempotencyToken": {} } } } }, - "com.amazonaws.networkmanager#DisassociateLinkResponse": { + "com.amazonaws.networkmanager#CreateCoreNetworkResponse": { "type": "structure", "members": { - "LinkAssociation": { - "target": "com.amazonaws.networkmanager#LinkAssociation", + "CoreNetwork": { + "target": "com.amazonaws.networkmanager#CoreNetwork", "traits": { - "smithy.api#documentation": "

Information about the link association.

" + "smithy.api#documentation": "

Returns details about a core network.

" } } } }, - "com.amazonaws.networkmanager#DisassociateTransitGatewayConnectPeer": { + "com.amazonaws.networkmanager#CreateDevice": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#DisassociateTransitGatewayConnectPeerRequest" + "target": "com.amazonaws.networkmanager#CreateDeviceRequest" }, "output": { - "target": "com.amazonaws.networkmanager#DisassociateTransitGatewayConnectPeerResponse" + "target": "com.amazonaws.networkmanager#CreateDeviceResponse" }, "errors": [ { @@ -1835,6 +2245,9 @@ { "target": "com.amazonaws.networkmanager#ResourceNotFoundException" }, + { + "target": "com.amazonaws.networkmanager#ServiceQuotaExceededException" + }, { "target": "com.amazonaws.networkmanager#ThrottlingException" }, @@ -1843,113 +2256,112 @@ } ], "traits": { - "smithy.api#documentation": "

Disassociates a transit gateway Connect peer from a device and link.

", + "smithy.api#documentation": "

Creates a new device in a global network. If you specify both a site ID and a\n location, the location of the site is used for visualization in the Network Manager console.

", "smithy.api#http": { - "method": "DELETE", - "uri": "/global-networks/{GlobalNetworkId}/transit-gateway-connect-peer-associations/{TransitGatewayConnectPeerArn}", + "method": "POST", + "uri": "/global-networks/{GlobalNetworkId}/devices", "code": 200 } } }, - "com.amazonaws.networkmanager#DisassociateTransitGatewayConnectPeerRequest": { + "com.amazonaws.networkmanager#CreateDeviceRequest": { "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, - "TransitGatewayConnectPeerArn": { - "target": "com.amazonaws.networkmanager#String", + "AWSLocation": { + "target": "com.amazonaws.networkmanager#AWSLocation", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the transit gateway Connect peer.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "

The Amazon Web Services location of the device, if applicable. For an on-premises device, you can omit this parameter.

" + } + }, + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

A description of the device.

\n

Constraints: Maximum length of 256 characters.

" + } + }, + "Type": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The type of the device.

" + } + }, + "Vendor": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The vendor of the device.

\n

Constraints: Maximum length of 128 characters.

" + } + }, + "Model": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The model of the device.

\n

Constraints: Maximum length of 128 characters.

" + } + }, + "SerialNumber": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The serial number of the device.

\n

Constraints: Maximum length of 128 characters.

" + } + }, + "Location": { + "target": "com.amazonaws.networkmanager#Location", + "traits": { + "smithy.api#documentation": "

The location of the device.

" + } + }, + "SiteId": { + "target": "com.amazonaws.networkmanager#SiteId", + "traits": { + "smithy.api#documentation": "

The ID of the site.

" + } + }, + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", + "traits": { + "smithy.api#documentation": "

The tags to apply to the resource during creation.

" } } } }, - "com.amazonaws.networkmanager#DisassociateTransitGatewayConnectPeerResponse": { + "com.amazonaws.networkmanager#CreateDeviceResponse": { "type": "structure", "members": { - "TransitGatewayConnectPeerAssociation": { - "target": "com.amazonaws.networkmanager#TransitGatewayConnectPeerAssociation", + "Device": { + "target": "com.amazonaws.networkmanager#Device", "traits": { - "smithy.api#documentation": "

The transit gateway Connect peer association.

" + "smithy.api#documentation": "

Information about the device.

" } } } }, - "com.amazonaws.networkmanager#ExceptionContextKey": { - "type": "string" - }, - "com.amazonaws.networkmanager#ExceptionContextMap": { - "type": "map", - "key": { - "target": "com.amazonaws.networkmanager#ExceptionContextKey" - }, - "value": { - "target": "com.amazonaws.networkmanager#ExceptionContextValue" - } - }, - "com.amazonaws.networkmanager#ExceptionContextValue": { - "type": "string" - }, - "com.amazonaws.networkmanager#FilterMap": { - "type": "map", - "key": { - "target": "com.amazonaws.networkmanager#FilterName" - }, - "value": { - "target": "com.amazonaws.networkmanager#FilterValues" - } - }, - "com.amazonaws.networkmanager#FilterName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 128 - }, - "smithy.api#pattern": "^[0-9a-zA-Z\\.-]*$" - } - }, - "com.amazonaws.networkmanager#FilterValue": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 255 - }, - "smithy.api#pattern": "^[0-9a-zA-Z\\*\\.\\\\/\\?-]*$" - } - }, - "com.amazonaws.networkmanager#FilterValues": { - "type": "list", - "member": { - "target": "com.amazonaws.networkmanager#FilterValue" - } - }, - "com.amazonaws.networkmanager#GetConnections": { + "com.amazonaws.networkmanager#CreateGlobalNetwork": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetConnectionsRequest" + "target": "com.amazonaws.networkmanager#CreateGlobalNetworkRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetConnectionsResponse" + "target": "com.amazonaws.networkmanager#CreateGlobalNetworkResponse" }, "errors": [ { "target": "com.amazonaws.networkmanager#AccessDeniedException" }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, { "target": "com.amazonaws.networkmanager#InternalServerException" }, { - "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + "target": "com.amazonaws.networkmanager#ServiceQuotaExceededException" }, { "target": "com.amazonaws.networkmanager#ThrottlingException" @@ -1959,84 +2371,49 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about one or more of your connections in a global network.

", + "smithy.api#documentation": "

Creates a new, empty global network.

", "smithy.api#http": { - "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/connections", + "method": "POST", + "uri": "/global-networks", "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "pageSize": "MaxResults" } } }, - "com.amazonaws.networkmanager#GetConnectionsRequest": { + "com.amazonaws.networkmanager#CreateGlobalNetworkRequest": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "ConnectionIds": { - "target": "com.amazonaws.networkmanager#StringList", - "traits": { - "smithy.api#documentation": "

One or more connection IDs.

", - "smithy.api#httpQuery": "connectionIds" - } - }, - "DeviceId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ID of the device.

", - "smithy.api#httpQuery": "deviceId" - } - }, - "MaxResults": { - "target": "com.amazonaws.networkmanager#MaxResults", + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { - "smithy.api#documentation": "

The maximum number of results to return.

", - "smithy.api#httpQuery": "maxResults" + "smithy.api#documentation": "

A description of the global network.

\n

Constraints: Maximum length of 256 characters.

" } }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

", - "smithy.api#httpQuery": "nextToken" + "smithy.api#documentation": "

The tags to apply to the resource during creation.

" } } } }, - "com.amazonaws.networkmanager#GetConnectionsResponse": { + "com.amazonaws.networkmanager#CreateGlobalNetworkResponse": { "type": "structure", "members": { - "Connections": { - "target": "com.amazonaws.networkmanager#ConnectionList", - "traits": { - "smithy.api#documentation": "

Information about the connections.

" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "GlobalNetwork": { + "target": "com.amazonaws.networkmanager#GlobalNetwork", "traits": { - "smithy.api#documentation": "

The token to use for the next page of results.

" + "smithy.api#documentation": "

Information about the global network object.

" } } } }, - "com.amazonaws.networkmanager#GetCustomerGatewayAssociations": { + "com.amazonaws.networkmanager#CreateLink": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetCustomerGatewayAssociationsRequest" + "target": "com.amazonaws.networkmanager#CreateLinkRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetCustomerGatewayAssociationsResponse" + "target": "com.amazonaws.networkmanager#CreateLinkResponse" }, "errors": [ { @@ -2051,6 +2428,9 @@ { "target": "com.amazonaws.networkmanager#ResourceNotFoundException" }, + { + "target": "com.amazonaws.networkmanager#ServiceQuotaExceededException" + }, { "target": "com.amazonaws.networkmanager#ThrottlingException" }, @@ -2059,88 +2439,100 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the association information for customer gateways that are associated with\n devices and links in your global network.

", + "smithy.api#documentation": "

Creates a new link for a specified site.

", "smithy.api#http": { - "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/customer-gateway-associations", + "method": "POST", + "uri": "/global-networks/{GlobalNetworkId}/links", "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "pageSize": "MaxResults" } } }, - "com.amazonaws.networkmanager#GetCustomerGatewayAssociationsRequest": { + "com.amazonaws.networkmanager#CreateLinkRequest": { "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, - "CustomerGatewayArns": { - "target": "com.amazonaws.networkmanager#StringList", + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { - "smithy.api#documentation": "

One or more customer gateway Amazon Resource Names (ARNs). The maximum is 10.

", - "smithy.api#httpQuery": "customerGatewayArns" + "smithy.api#documentation": "

A description of the link.

\n

Constraints: Maximum length of 256 characters.

" } }, - "MaxResults": { - "target": "com.amazonaws.networkmanager#MaxResults", + "Type": { + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { - "smithy.api#documentation": "

The maximum number of results to return.

", - "smithy.api#httpQuery": "maxResults" + "smithy.api#documentation": "

The type of the link.

\n

Constraints: Maximum length of 128 characters. Cannot include the following characters: | \\ ^

" } }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "Bandwidth": { + "target": "com.amazonaws.networkmanager#Bandwidth", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

", - "smithy.api#httpQuery": "nextToken" + "smithy.api#documentation": "

The upload speed and download speed in Mbps.

", + "smithy.api#required": {} + } + }, + "Provider": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The provider of the link.

\n

Constraints: Maximum length of 128 characters. Cannot include the following characters: | \\ ^

" + } + }, + "SiteId": { + "target": "com.amazonaws.networkmanager#SiteId", + "traits": { + "smithy.api#documentation": "

The ID of the site.

", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", + "traits": { + "smithy.api#documentation": "

The tags to apply to the resource during creation.

" } } } }, - "com.amazonaws.networkmanager#GetCustomerGatewayAssociationsResponse": { + "com.amazonaws.networkmanager#CreateLinkResponse": { "type": "structure", "members": { - "CustomerGatewayAssociations": { - "target": "com.amazonaws.networkmanager#CustomerGatewayAssociationList", - "traits": { - "smithy.api#documentation": "

The customer gateway associations.

" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "Link": { + "target": "com.amazonaws.networkmanager#Link", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Information about the link.

" } } } }, - "com.amazonaws.networkmanager#GetDevices": { + "com.amazonaws.networkmanager#CreateSite": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetDevicesRequest" + "target": "com.amazonaws.networkmanager#CreateSiteRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetDevicesResponse" + "target": "com.amazonaws.networkmanager#CreateSiteResponse" }, "errors": [ { "target": "com.amazonaws.networkmanager#AccessDeniedException" }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, { "target": "com.amazonaws.networkmanager#InternalServerException" }, { "target": "com.amazonaws.networkmanager#ResourceNotFoundException" }, + { + "target": "com.amazonaws.networkmanager#ServiceQuotaExceededException" + }, { "target": "com.amazonaws.networkmanager#ThrottlingException" }, @@ -2149,89 +2541,71 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about one or more of your devices in a global network.

", + "smithy.api#documentation": "

Creates a new site in a global network.

", "smithy.api#http": { - "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/devices", + "method": "POST", + "uri": "/global-networks/{GlobalNetworkId}/sites", "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "pageSize": "MaxResults" } } }, - "com.amazonaws.networkmanager#GetDevicesRequest": { + "com.amazonaws.networkmanager#CreateSiteRequest": { "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, - "DeviceIds": { - "target": "com.amazonaws.networkmanager#StringList", - "traits": { - "smithy.api#documentation": "

One or more device IDs. The maximum is 10.

", - "smithy.api#httpQuery": "deviceIds" - } - }, - "SiteId": { - "target": "com.amazonaws.networkmanager#String", + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { - "smithy.api#documentation": "

The ID of the site.

", - "smithy.api#httpQuery": "siteId" + "smithy.api#documentation": "

A description of your site.

\n

Constraints: Maximum length of 256 characters.

" } }, - "MaxResults": { - "target": "com.amazonaws.networkmanager#MaxResults", + "Location": { + "target": "com.amazonaws.networkmanager#Location", "traits": { - "smithy.api#documentation": "

The maximum number of results to return.

", - "smithy.api#httpQuery": "maxResults" + "smithy.api#documentation": "

The site location. This information is used for visualization in the Network Manager console. If you specify the address, the latitude and longitude are automatically calculated.

\n " } }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

", - "smithy.api#httpQuery": "nextToken" + "smithy.api#documentation": "

The tags to apply to the resource during creation.

" } } } }, - "com.amazonaws.networkmanager#GetDevicesResponse": { + "com.amazonaws.networkmanager#CreateSiteResponse": { "type": "structure", "members": { - "Devices": { - "target": "com.amazonaws.networkmanager#DeviceList", - "traits": { - "smithy.api#documentation": "

The devices.

" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "Site": { + "target": "com.amazonaws.networkmanager#Site", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Information about the site.

" } } } }, - "com.amazonaws.networkmanager#GetLinkAssociations": { + "com.amazonaws.networkmanager#CreateSiteToSiteVpnAttachment": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetLinkAssociationsRequest" + "target": "com.amazonaws.networkmanager#CreateSiteToSiteVpnAttachmentRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetLinkAssociationsResponse" + "target": "com.amazonaws.networkmanager#CreateSiteToSiteVpnAttachmentResponse" }, "errors": [ { "target": "com.amazonaws.networkmanager#AccessDeniedException" }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, { "target": "com.amazonaws.networkmanager#InternalServerException" }, @@ -2246,89 +2620,72 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the link associations for a device or a link. Either the device ID or the link ID\n must be specified.

", + "smithy.api#documentation": "

Creates a site-to-site VPN attachment on an edge location of a core network.

", "smithy.api#http": { - "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/link-associations", + "method": "POST", + "uri": "/site-to-site-vpn-attachments", "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "pageSize": "MaxResults" } } }, - "com.amazonaws.networkmanager#GetLinkAssociationsRequest": { + "com.amazonaws.networkmanager#CreateSiteToSiteVpnAttachmentRequest": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, + "smithy.api#documentation": "

The ID of a core network where you're creating a site-to-site VPN attachment.

", "smithy.api#required": {} } }, - "DeviceId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ID of the device.

", - "smithy.api#httpQuery": "deviceId" - } - }, - "LinkId": { - "target": "com.amazonaws.networkmanager#String", + "VpnConnectionArn": { + "target": "com.amazonaws.networkmanager#VpnConnectionArn", "traits": { - "smithy.api#documentation": "

The ID of the link.

", - "smithy.api#httpQuery": "linkId" + "smithy.api#documentation": "

The ARN identifying the VPN attachment.

", + "smithy.api#required": {} } }, - "MaxResults": { - "target": "com.amazonaws.networkmanager#MaxResults", + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", "traits": { - "smithy.api#documentation": "

The maximum number of results to return.

", - "smithy.api#httpQuery": "maxResults" + "smithy.api#documentation": "

The tags associated with the request.

" } }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "ClientToken": { + "target": "com.amazonaws.networkmanager#ClientToken", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

", - "smithy.api#httpQuery": "nextToken" + "smithy.api#documentation": "

The client token associated with the request.

", + "smithy.api#idempotencyToken": {} } } } }, - "com.amazonaws.networkmanager#GetLinkAssociationsResponse": { + "com.amazonaws.networkmanager#CreateSiteToSiteVpnAttachmentResponse": { "type": "structure", "members": { - "LinkAssociations": { - "target": "com.amazonaws.networkmanager#LinkAssociationList", + "SiteToSiteVpnAttachment": { + "target": "com.amazonaws.networkmanager#SiteToSiteVpnAttachment", "traits": { - "smithy.api#documentation": "

The link associations.

" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Details about a site-to-site VPN attachment.

" } } } }, - "com.amazonaws.networkmanager#GetLinks": { + "com.amazonaws.networkmanager#CreateVpcAttachment": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetLinksRequest" + "target": "com.amazonaws.networkmanager#CreateVpcAttachmentRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetLinksResponse" + "target": "com.amazonaws.networkmanager#CreateVpcAttachmentResponse" }, "errors": [ { "target": "com.amazonaws.networkmanager#AccessDeniedException" }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, { "target": "com.amazonaws.networkmanager#InternalServerException" }, @@ -2343,190 +2700,170 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about one or more links in a specified global network.

\n

If you specify the site ID, you cannot specify the type or provider in the same request. You can specify the type and provider in the same request.

", + "smithy.api#documentation": "

Creates a VPC attachment on an edge location of a core network.

", "smithy.api#http": { - "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/links", + "method": "POST", + "uri": "/vpc-attachments", "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "pageSize": "MaxResults" } } }, - "com.amazonaws.networkmanager#GetLinksRequest": { + "com.amazonaws.networkmanager#CreateVpcAttachmentRequest": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, + "smithy.api#documentation": "

The ID of a core network for the VPC attachment.

", "smithy.api#required": {} } }, - "LinkIds": { - "target": "com.amazonaws.networkmanager#StringList", - "traits": { - "smithy.api#documentation": "

One or more link IDs. The maximum is 10.

", - "smithy.api#httpQuery": "linkIds" - } - }, - "SiteId": { - "target": "com.amazonaws.networkmanager#String", + "VpcArn": { + "target": "com.amazonaws.networkmanager#VpcArn", "traits": { - "smithy.api#documentation": "

The ID of the site.

", - "smithy.api#httpQuery": "siteId" + "smithy.api#documentation": "

The ARN of the VPC.

", + "smithy.api#required": {} } }, - "Type": { - "target": "com.amazonaws.networkmanager#String", + "SubnetArns": { + "target": "com.amazonaws.networkmanager#SubnetArnList", "traits": { - "smithy.api#documentation": "

The link type.

", - "smithy.api#httpQuery": "type" + "smithy.api#documentation": "

The subnet ARN of the VPC attachment.

", + "smithy.api#required": {} } }, - "Provider": { - "target": "com.amazonaws.networkmanager#String", + "Options": { + "target": "com.amazonaws.networkmanager#VpcOptions", "traits": { - "smithy.api#documentation": "

The link provider.

", - "smithy.api#httpQuery": "provider" + "smithy.api#documentation": "

Options for the VPC attachment.

" } }, - "MaxResults": { - "target": "com.amazonaws.networkmanager#MaxResults", + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", "traits": { - "smithy.api#documentation": "

The maximum number of results to return.

", - "smithy.api#httpQuery": "maxResults" + "smithy.api#documentation": "

The key-value tags associated with the request.

" } }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "ClientToken": { + "target": "com.amazonaws.networkmanager#ClientToken", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

", - "smithy.api#httpQuery": "nextToken" + "smithy.api#documentation": "

The client token associated with the request.

", + "smithy.api#idempotencyToken": {} } } } }, - "com.amazonaws.networkmanager#GetLinksResponse": { + "com.amazonaws.networkmanager#CreateVpcAttachmentResponse": { "type": "structure", "members": { - "Links": { - "target": "com.amazonaws.networkmanager#LinkList", - "traits": { - "smithy.api#documentation": "

The links.

" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "VpcAttachment": { + "target": "com.amazonaws.networkmanager#VpcAttachment", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Provides details about the VPC attachment.

" } } } }, - "com.amazonaws.networkmanager#GetNetworkResourceCounts": { - "type": "operation", - "input": { - "target": "com.amazonaws.networkmanager#GetNetworkResourceCountsRequest" - }, - "output": { - "target": "com.amazonaws.networkmanager#GetNetworkResourceCountsResponse" - }, - "errors": [ - { - "target": "com.amazonaws.networkmanager#AccessDeniedException" - }, - { - "target": "com.amazonaws.networkmanager#InternalServerException" - }, - { - "target": "com.amazonaws.networkmanager#ThrottlingException" - }, - { - "target": "com.amazonaws.networkmanager#ValidationException" - } - ], + "com.amazonaws.networkmanager#CustomerGatewayArn": { + "type": "string", "traits": { - "smithy.api#documentation": "

Gets the count of network resources, by resource type, for the specified global network.

", - "smithy.api#http": { - "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/network-resource-count", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "pageSize": "MaxResults" + "smithy.api#length": { + "min": 0, + "max": 500 } } }, - "com.amazonaws.networkmanager#GetNetworkResourceCountsRequest": { + "com.amazonaws.networkmanager#CustomerGatewayArnList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#CustomerGatewayArn" + } + }, + "com.amazonaws.networkmanager#CustomerGatewayAssociation": { "type": "structure", "members": { + "CustomerGatewayArn": { + "target": "com.amazonaws.networkmanager#CustomerGatewayArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the customer gateway.

" + } + }, "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "

The ID of the global network.

" } }, - "ResourceType": { - "target": "com.amazonaws.networkmanager#String", + "DeviceId": { + "target": "com.amazonaws.networkmanager#DeviceId", "traits": { - "smithy.api#documentation": "

The resource type.

\n

The following are the supported resource types for Direct Connect:

\n \n \n

The following are the supported resource types for Network Manager:

\n \n\n

The following are the supported resource types for Amazon VPC:

\n ", - "smithy.api#httpQuery": "resourceType" + "smithy.api#documentation": "

The ID of the device.

" } }, - "MaxResults": { - "target": "com.amazonaws.networkmanager#MaxResults", + "LinkId": { + "target": "com.amazonaws.networkmanager#LinkId", "traits": { - "smithy.api#documentation": "

The maximum number of results to return.

", - "smithy.api#httpQuery": "maxResults" + "smithy.api#documentation": "

The ID of the link.

" } }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "State": { + "target": "com.amazonaws.networkmanager#CustomerGatewayAssociationState", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

", - "smithy.api#httpQuery": "nextToken" + "smithy.api#documentation": "

The association state.

" } } + }, + "traits": { + "smithy.api#documentation": "

Describes the association between a customer gateway, a device, and a link.

" } }, - "com.amazonaws.networkmanager#GetNetworkResourceCountsResponse": { - "type": "structure", - "members": { - "NetworkResourceCounts": { - "target": "com.amazonaws.networkmanager#NetworkResourceCountList", - "traits": { - "smithy.api#documentation": "

The count of resources.

" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "com.amazonaws.networkmanager#CustomerGatewayAssociationList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#CustomerGatewayAssociation" + } + }, + "com.amazonaws.networkmanager#CustomerGatewayAssociationState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "pending" + }, + { + "value": "AVAILABLE", + "name": "available" + }, + { + "value": "DELETING", + "name": "deleting" + }, + { + "value": "DELETED", + "name": "deleted" } - } + ] } }, - "com.amazonaws.networkmanager#GetNetworkResourceRelationships": { + "com.amazonaws.networkmanager#DateTime": { + "type": "timestamp" + }, + "com.amazonaws.networkmanager#DeleteAttachment": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetNetworkResourceRelationshipsRequest" + "target": "com.amazonaws.networkmanager#DeleteAttachmentRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetNetworkResourceRelationshipsResponse" + "target": "com.amazonaws.networkmanager#DeleteAttachmentResponse" }, "errors": [ { "target": "com.amazonaws.networkmanager#AccessDeniedException" }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, { "target": "com.amazonaws.networkmanager#InternalServerException" }, @@ -2541,110 +2878,53 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the network resource relationships for the specified global network.

", + "smithy.api#documentation": "

Deletes an attachment. Supports all attachment types.

", "smithy.api#http": { - "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/network-resource-relationships", + "method": "DELETE", + "uri": "/attachments/{AttachmentId}", "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "pageSize": "MaxResults" } } }, - "com.amazonaws.networkmanager#GetNetworkResourceRelationshipsRequest": { + "com.amazonaws.networkmanager#DeleteAttachmentRequest": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "AttachmentId": { + "target": "com.amazonaws.networkmanager#AttachmentId", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#documentation": "

The ID of the attachment to delete.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } - }, - "RegisteredGatewayArn": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ARN of the registered gateway.

", - "smithy.api#httpQuery": "registeredGatewayArn" - } - }, - "AwsRegion": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The Amazon Web Services Region.

", - "smithy.api#httpQuery": "awsRegion" - } - }, - "AccountId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The Amazon Web Services account ID.

", - "smithy.api#httpQuery": "accountId" - } - }, - "ResourceType": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The resource type.

\n

The following are the supported resource types for Direct Connect:

\n \n \n

The following are the supported resource types for Network Manager:

\n \n\n

The following are the supported resource types for Amazon VPC:

\n ", - "smithy.api#httpQuery": "resourceType" - } - }, - "ResourceArn": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ARN of the gateway.

", - "smithy.api#httpQuery": "resourceArn" - } - }, - "MaxResults": { - "target": "com.amazonaws.networkmanager#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum number of results to return.

", - "smithy.api#httpQuery": "maxResults" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The token for the next page of results.

", - "smithy.api#httpQuery": "nextToken" - } } } }, - "com.amazonaws.networkmanager#GetNetworkResourceRelationshipsResponse": { + "com.amazonaws.networkmanager#DeleteAttachmentResponse": { "type": "structure", "members": { - "Relationships": { - "target": "com.amazonaws.networkmanager#RelationshipList", - "traits": { - "smithy.api#documentation": "

The resource relationships.

" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "Attachment": { + "target": "com.amazonaws.networkmanager#Attachment", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Information about the deleted attachment.

" } } } }, - "com.amazonaws.networkmanager#GetNetworkResources": { + "com.amazonaws.networkmanager#DeleteConnectPeer": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetNetworkResourcesRequest" + "target": "com.amazonaws.networkmanager#DeleteConnectPeerRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetNetworkResourcesResponse" + "target": "com.amazonaws.networkmanager#DeleteConnectPeerResponse" }, "errors": [ { "target": "com.amazonaws.networkmanager#AccessDeniedException" }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, { "target": "com.amazonaws.networkmanager#InternalServerException" }, @@ -2659,110 +2939,53 @@ } ], "traits": { - "smithy.api#documentation": "

Describes the network resources for the specified global network.

\n

The results include information from the corresponding Describe call for the resource, minus any sensitive information such as pre-shared keys.

", + "smithy.api#documentation": "

Deletes a Connect peer.

", "smithy.api#http": { - "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/network-resources", + "method": "DELETE", + "uri": "/connect-peers/{ConnectPeerId}", "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "pageSize": "MaxResults" } } }, - "com.amazonaws.networkmanager#GetNetworkResourcesRequest": { + "com.amazonaws.networkmanager#DeleteConnectPeerRequest": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "ConnectPeerId": { + "target": "com.amazonaws.networkmanager#ConnectPeerId", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#documentation": "

The ID of the deleted Connect peer.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } - }, - "RegisteredGatewayArn": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ARN of the gateway.

", - "smithy.api#httpQuery": "registeredGatewayArn" - } - }, - "AwsRegion": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The Amazon Web Services Region.

", - "smithy.api#httpQuery": "awsRegion" - } - }, - "AccountId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The Amazon Web Services account ID.

", - "smithy.api#httpQuery": "accountId" - } - }, - "ResourceType": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The resource type.

\n

The following are the supported resource types for Direct Connect:

\n \n \n

The following are the supported resource types for Network Manager:

\n \n \n

The following are the supported resource types for Amazon VPC:

\n ", - "smithy.api#httpQuery": "resourceType" - } - }, - "ResourceArn": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ARN of the resource.

", - "smithy.api#httpQuery": "resourceArn" - } - }, - "MaxResults": { - "target": "com.amazonaws.networkmanager#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum number of results to return.

", - "smithy.api#httpQuery": "maxResults" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The token for the next page of results.

", - "smithy.api#httpQuery": "nextToken" - } } } }, - "com.amazonaws.networkmanager#GetNetworkResourcesResponse": { + "com.amazonaws.networkmanager#DeleteConnectPeerResponse": { "type": "structure", "members": { - "NetworkResources": { - "target": "com.amazonaws.networkmanager#NetworkResourceList", - "traits": { - "smithy.api#documentation": "

The network resources.

" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "ConnectPeer": { + "target": "com.amazonaws.networkmanager#ConnectPeer", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Information about the deleted Connect peer.

" } } } }, - "com.amazonaws.networkmanager#GetNetworkRoutes": { + "com.amazonaws.networkmanager#DeleteConnection": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetNetworkRoutesRequest" + "target": "com.amazonaws.networkmanager#DeleteConnectionRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetNetworkRoutesResponse" + "target": "com.amazonaws.networkmanager#DeleteConnectionResponse" }, "errors": [ { "target": "com.amazonaws.networkmanager#AccessDeniedException" }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, { "target": "com.amazonaws.networkmanager#InternalServerException" }, @@ -2777,123 +3000,191 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the network routes of the specified global network.

", + "smithy.api#documentation": "

Deletes the specified connection in your global network.

", "smithy.api#http": { - "method": "POST", - "uri": "/global-networks/{GlobalNetworkId}/network-routes", + "method": "DELETE", + "uri": "/global-networks/{GlobalNetworkId}/connections/{ConnectionId}", "code": 200 } } }, - "com.amazonaws.networkmanager#GetNetworkRoutesRequest": { + "com.amazonaws.networkmanager#DeleteConnectionRequest": { "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, - "RouteTableIdentifier": { - "target": "com.amazonaws.networkmanager#RouteTableIdentifier", + "ConnectionId": { + "target": "com.amazonaws.networkmanager#ConnectionId", "traits": { - "smithy.api#documentation": "

The ID of the route table.

", + "smithy.api#documentation": "

The ID of the connection.

", + "smithy.api#httpLabel": {}, "smithy.api#required": {} } - }, - "ExactCidrMatches": { - "target": "com.amazonaws.networkmanager#StringList", + } + } + }, + "com.amazonaws.networkmanager#DeleteConnectionResponse": { + "type": "structure", + "members": { + "Connection": { + "target": "com.amazonaws.networkmanager#Connection", "traits": { - "smithy.api#documentation": "

An exact CIDR block.

" + "smithy.api#documentation": "

Information about the connection.

" } + } + } + }, + "com.amazonaws.networkmanager#DeleteCoreNetwork": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#DeleteCoreNetworkRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#DeleteCoreNetworkResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" }, - "LongestPrefixMatches": { - "target": "com.amazonaws.networkmanager#StringList", - "traits": { - "smithy.api#documentation": "

The most specific route that matches the traffic (longest prefix match).

" - } + { + "target": "com.amazonaws.networkmanager#ConflictException" }, - "SubnetOfMatches": { - "target": "com.amazonaws.networkmanager#StringList", - "traits": { - "smithy.api#documentation": "

The routes with a subnet that match the specified CIDR filter.

" - } + { + "target": "com.amazonaws.networkmanager#InternalServerException" }, - "SupernetOfMatches": { - "target": "com.amazonaws.networkmanager#StringList", - "traits": { - "smithy.api#documentation": "

The routes with a CIDR that encompasses the CIDR filter. Example: If you specify 10.0.1.0/30, then the result returns 10.0.1.0/29.

" - } + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" }, - "PrefixListIds": { - "target": "com.amazonaws.networkmanager#StringList", - "traits": { - "smithy.api#documentation": "

The IDs of the prefix lists.

" - } + { + "target": "com.amazonaws.networkmanager#ThrottlingException" }, - "States": { - "target": "com.amazonaws.networkmanager#RouteStateList", - "traits": { - "smithy.api#documentation": "

The route states.

" - } + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a core network along with all core network policies. This can only be done if there are no attachments on a core network.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/core-networks/{CoreNetworkId}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#DeleteCoreNetworkPolicyVersion": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#DeleteCoreNetworkPolicyVersionRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#DeleteCoreNetworkPolicyVersionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" }, - "Types": { - "target": "com.amazonaws.networkmanager#RouteTypeList", + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a policy version from a core network. You can't delete the current LIVE policy.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/core-networks/{CoreNetworkId}/core-network-policy-versions/{PolicyVersionId}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#DeleteCoreNetworkPolicyVersionRequest": { + "type": "structure", + "members": { + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", "traits": { - "smithy.api#documentation": "

The route types.

" + "smithy.api#documentation": "

The ID of a core network for the deleted policy.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} } }, - "DestinationFilters": { - "target": "com.amazonaws.networkmanager#FilterMap", + "PolicyVersionId": { + "target": "com.amazonaws.networkmanager#Integer", "traits": { - "smithy.api#documentation": "

Filter by route table destination. Possible Values: TRANSIT_GATEWAY_ATTACHMENT_ID, RESOURCE_ID, or RESOURCE_TYPE.

" + "smithy.api#documentation": "

The version ID of the deleted policy.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} } } } }, - "com.amazonaws.networkmanager#GetNetworkRoutesResponse": { + "com.amazonaws.networkmanager#DeleteCoreNetworkPolicyVersionResponse": { "type": "structure", "members": { - "RouteTableArn": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ARN of the route table.

" - } - }, - "RouteTableType": { - "target": "com.amazonaws.networkmanager#RouteTableType", + "CoreNetworkPolicy": { + "target": "com.amazonaws.networkmanager#CoreNetworkPolicy", "traits": { - "smithy.api#documentation": "

The route table type.

" + "smithy.api#documentation": "

Returns information about the deleted policy version.

" } - }, - "RouteTableTimestamp": { - "target": "com.amazonaws.networkmanager#DateTime", + } + } + }, + "com.amazonaws.networkmanager#DeleteCoreNetworkRequest": { + "type": "structure", + "members": { + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", "traits": { - "smithy.api#documentation": "

The route table creation time.

" + "smithy.api#documentation": "

The network ID of the deleted core network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} } - }, - "NetworkRoutes": { - "target": "com.amazonaws.networkmanager#NetworkRouteList", + } + } + }, + "com.amazonaws.networkmanager#DeleteCoreNetworkResponse": { + "type": "structure", + "members": { + "CoreNetwork": { + "target": "com.amazonaws.networkmanager#CoreNetwork", "traits": { - "smithy.api#documentation": "

The network routes.

" + "smithy.api#documentation": "

Information about the deleted core network.

" } } } }, - "com.amazonaws.networkmanager#GetNetworkTelemetry": { + "com.amazonaws.networkmanager#DeleteDevice": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetNetworkTelemetryRequest" + "target": "com.amazonaws.networkmanager#DeleteDeviceRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetNetworkTelemetryResponse" + "target": "com.amazonaws.networkmanager#DeleteDeviceResponse" }, "errors": [ { "target": "com.amazonaws.networkmanager#AccessDeniedException" }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, { "target": "com.amazonaws.networkmanager#InternalServerException" }, @@ -2908,110 +3199,61 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the network telemetry of the specified global network.

", + "smithy.api#documentation": "

Deletes an existing device. You must first disassociate the device from any links and\n customer gateways.

", "smithy.api#http": { - "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/network-telemetry", + "method": "DELETE", + "uri": "/global-networks/{GlobalNetworkId}/devices/{DeviceId}", "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "pageSize": "MaxResults" } } }, - "com.amazonaws.networkmanager#GetNetworkTelemetryRequest": { + "com.amazonaws.networkmanager#DeleteDeviceRequest": { "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, - "RegisteredGatewayArn": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ARN of the gateway.

", - "smithy.api#httpQuery": "registeredGatewayArn" - } - }, - "AwsRegion": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The Amazon Web Services Region.

", - "smithy.api#httpQuery": "awsRegion" - } - }, - "AccountId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The Amazon Web Services account ID.

", - "smithy.api#httpQuery": "accountId" - } - }, - "ResourceType": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The resource type.

\n

The following are the supported resource types for Direct Connect:

\n \n \n

The following are the supported resource types for Network Manager:

\n \n\n

The following are the supported resource types for Amazon VPC:

\n ", - "smithy.api#httpQuery": "resourceType" - } - }, - "ResourceArn": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ARN of the resource.

", - "smithy.api#httpQuery": "resourceArn" - } - }, - "MaxResults": { - "target": "com.amazonaws.networkmanager#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum number of results to return.

", - "smithy.api#httpQuery": "maxResults" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "DeviceId": { + "target": "com.amazonaws.networkmanager#DeviceId", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

", - "smithy.api#httpQuery": "nextToken" + "smithy.api#documentation": "

The ID of the device.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} } } } }, - "com.amazonaws.networkmanager#GetNetworkTelemetryResponse": { + "com.amazonaws.networkmanager#DeleteDeviceResponse": { "type": "structure", "members": { - "NetworkTelemetry": { - "target": "com.amazonaws.networkmanager#NetworkTelemetryList", - "traits": { - "smithy.api#documentation": "

The network telemetry.

" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "Device": { + "target": "com.amazonaws.networkmanager#Device", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Information about the device.

" } } } }, - "com.amazonaws.networkmanager#GetRouteAnalysis": { + "com.amazonaws.networkmanager#DeleteGlobalNetwork": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetRouteAnalysisRequest" + "target": "com.amazonaws.networkmanager#DeleteGlobalNetworkRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetRouteAnalysisResponse" + "target": "com.amazonaws.networkmanager#DeleteGlobalNetworkResponse" }, "errors": [ { "target": "com.amazonaws.networkmanager#AccessDeniedException" }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, { "target": "com.amazonaws.networkmanager#InternalServerException" }, @@ -3026,53 +3268,3298 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about the specified route analysis.

", + "smithy.api#documentation": "

Deletes an existing global network. You must first delete all global network objects\n (devices, links, and sites) and deregister all transit gateways.

", "smithy.api#http": { - "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/route-analyses/{RouteAnalysisId}", + "method": "DELETE", + "uri": "/global-networks/{GlobalNetworkId}", "code": 200 } } }, - "com.amazonaws.networkmanager#GetRouteAnalysisRequest": { + "com.amazonaws.networkmanager#DeleteGlobalNetworkRequest": { "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } - }, - "RouteAnalysisId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ID of the route analysis.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } } } }, - "com.amazonaws.networkmanager#GetRouteAnalysisResponse": { + "com.amazonaws.networkmanager#DeleteGlobalNetworkResponse": { "type": "structure", "members": { - "RouteAnalysis": { - "target": "com.amazonaws.networkmanager#RouteAnalysis", + "GlobalNetwork": { + "target": "com.amazonaws.networkmanager#GlobalNetwork", "traits": { - "smithy.api#documentation": "

The route analysis.

" + "smithy.api#documentation": "

Information about the global network.

" + } + } + } + }, + "com.amazonaws.networkmanager#DeleteLink": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#DeleteLinkRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#DeleteLinkResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes an existing link. You must first disassociate the link from any devices and\n customer gateways.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/global-networks/{GlobalNetworkId}/links/{LinkId}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#DeleteLinkRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "LinkId": { + "target": "com.amazonaws.networkmanager#LinkId", + "traits": { + "smithy.api#documentation": "

The ID of the link.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#DeleteLinkResponse": { + "type": "structure", + "members": { + "Link": { + "target": "com.amazonaws.networkmanager#Link", + "traits": { + "smithy.api#documentation": "

Information about the link.

" + } + } + } + }, + "com.amazonaws.networkmanager#DeleteResourcePolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#DeleteResourcePolicyRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#DeleteResourcePolicyResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a resource policy for the specified resource. This revokes the access of the principals specified in the resource policy.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/resource-policy/{ResourceArn}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#DeleteResourcePolicyRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.networkmanager#ResourceArn", + "traits": { + "smithy.api#documentation": "

The ARN of the policy to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#DeleteResourcePolicyResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.networkmanager#DeleteSite": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#DeleteSiteRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#DeleteSiteResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes an existing site. The site cannot be associated with any device or link.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/global-networks/{GlobalNetworkId}/sites/{SiteId}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#DeleteSiteRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "SiteId": { + "target": "com.amazonaws.networkmanager#SiteId", + "traits": { + "smithy.api#documentation": "

The ID of the site.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#DeleteSiteResponse": { + "type": "structure", + "members": { + "Site": { + "target": "com.amazonaws.networkmanager#Site", + "traits": { + "smithy.api#documentation": "

Information about the site.

" + } + } + } + }, + "com.amazonaws.networkmanager#DeregisterTransitGateway": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#DeregisterTransitGatewayRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#DeregisterTransitGatewayResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deregisters a transit gateway from your global network. This action does not delete\n your transit gateway, or modify any of its attachments. This action removes any customer gateway associations.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/global-networks/{GlobalNetworkId}/transit-gateway-registrations/{TransitGatewayArn}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#DeregisterTransitGatewayRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TransitGatewayArn": { + "target": "com.amazonaws.networkmanager#TransitGatewayArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the transit gateway.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#DeregisterTransitGatewayResponse": { + "type": "structure", + "members": { + "TransitGatewayRegistration": { + "target": "com.amazonaws.networkmanager#TransitGatewayRegistration", + "traits": { + "smithy.api#documentation": "

The transit gateway registration information.

" + } + } + } + }, + "com.amazonaws.networkmanager#DescribeGlobalNetworks": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#DescribeGlobalNetworksRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#DescribeGlobalNetworksResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Describes one or more global networks. By default, all global networks are\n described. To describe the objects in your global network, you must use the appropriate\n Get* action. For example, to list the transit gateways in your global\n network, use GetTransitGatewayRegistrations.

", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#DescribeGlobalNetworksRequest": { + "type": "structure", + "members": { + "GlobalNetworkIds": { + "target": "com.amazonaws.networkmanager#GlobalNetworkIdList", + "traits": { + "smithy.api#documentation": "

The IDs of one or more global networks. The maximum is 10.

", + "smithy.api#httpQuery": "globalNetworkIds" + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#DescribeGlobalNetworksResponse": { + "type": "structure", + "members": { + "GlobalNetworks": { + "target": "com.amazonaws.networkmanager#GlobalNetworkList", + "traits": { + "smithy.api#documentation": "

Information about the global networks.

" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

" + } + } + } + }, + "com.amazonaws.networkmanager#Device": { + "type": "structure", + "members": { + "DeviceId": { + "target": "com.amazonaws.networkmanager#DeviceId", + "traits": { + "smithy.api#documentation": "

The ID of the device.

" + } + }, + "DeviceArn": { + "target": "com.amazonaws.networkmanager#DeviceArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the device.

" + } + }, + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

" + } + }, + "AWSLocation": { + "target": "com.amazonaws.networkmanager#AWSLocation", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services location of the device.

" + } + }, + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The description of the device.

" + } + }, + "Type": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The device type.

" + } + }, + "Vendor": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The device vendor.

" + } + }, + "Model": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The device model.

" + } + }, + "SerialNumber": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The device serial number.

" + } + }, + "Location": { + "target": "com.amazonaws.networkmanager#Location", + "traits": { + "smithy.api#documentation": "

The site location.

" + } + }, + "SiteId": { + "target": "com.amazonaws.networkmanager#SiteId", + "traits": { + "smithy.api#documentation": "

The site ID.

" + } + }, + "CreatedAt": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

The date and time that the site was created.

" + } + }, + "State": { + "target": "com.amazonaws.networkmanager#DeviceState", + "traits": { + "smithy.api#documentation": "

The device state.

" + } + }, + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", + "traits": { + "smithy.api#documentation": "

The tags for the device.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes a device.

" + } + }, + "com.amazonaws.networkmanager#DeviceArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + } + } + }, + "com.amazonaws.networkmanager#DeviceId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.networkmanager#DeviceIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#DeviceId" + } + }, + "com.amazonaws.networkmanager#DeviceList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#Device" + } + }, + "com.amazonaws.networkmanager#DeviceState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "pending" + }, + { + "value": "AVAILABLE", + "name": "available" + }, + { + "value": "DELETING", + "name": "deleting" + }, + { + "value": "UPDATING", + "name": "updating" + } + ] + } + }, + "com.amazonaws.networkmanager#DisassociateConnectPeer": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#DisassociateConnectPeerRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#DisassociateConnectPeerResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Disassociates a core network Connect peer from a device and a link.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/global-networks/{GlobalNetworkId}/connect-peer-associations/{ConnectPeerId}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#DisassociateConnectPeerRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ConnectPeerId": { + "target": "com.amazonaws.networkmanager#ConnectPeerId", + "traits": { + "smithy.api#documentation": "

The ID of the Connect peer to disassociate from a device.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#DisassociateConnectPeerResponse": { + "type": "structure", + "members": { + "ConnectPeerAssociation": { + "target": "com.amazonaws.networkmanager#ConnectPeerAssociation", + "traits": { + "smithy.api#documentation": "

Describes the Connect peer association.

" + } + } + } + }, + "com.amazonaws.networkmanager#DisassociateCustomerGateway": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#DisassociateCustomerGatewayRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#DisassociateCustomerGatewayResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Disassociates a customer gateway from a device and a link.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/global-networks/{GlobalNetworkId}/customer-gateway-associations/{CustomerGatewayArn}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#DisassociateCustomerGatewayRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "CustomerGatewayArn": { + "target": "com.amazonaws.networkmanager#CustomerGatewayArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the customer gateway.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#DisassociateCustomerGatewayResponse": { + "type": "structure", + "members": { + "CustomerGatewayAssociation": { + "target": "com.amazonaws.networkmanager#CustomerGatewayAssociation", + "traits": { + "smithy.api#documentation": "

Information about the customer gateway association.

" + } + } + } + }, + "com.amazonaws.networkmanager#DisassociateLink": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#DisassociateLinkRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#DisassociateLinkResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Disassociates an existing device from a link. You must first disassociate any customer\n gateways that are associated with the link.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/global-networks/{GlobalNetworkId}/link-associations", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#DisassociateLinkRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "DeviceId": { + "target": "com.amazonaws.networkmanager#DeviceId", + "traits": { + "smithy.api#documentation": "

The ID of the device.

", + "smithy.api#httpQuery": "deviceId", + "smithy.api#required": {} + } + }, + "LinkId": { + "target": "com.amazonaws.networkmanager#LinkId", + "traits": { + "smithy.api#documentation": "

The ID of the link.

", + "smithy.api#httpQuery": "linkId", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#DisassociateLinkResponse": { + "type": "structure", + "members": { + "LinkAssociation": { + "target": "com.amazonaws.networkmanager#LinkAssociation", + "traits": { + "smithy.api#documentation": "

Information about the link association.

" + } + } + } + }, + "com.amazonaws.networkmanager#DisassociateTransitGatewayConnectPeer": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#DisassociateTransitGatewayConnectPeerRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#DisassociateTransitGatewayConnectPeerResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Disassociates a transit gateway Connect peer from a device and link.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/global-networks/{GlobalNetworkId}/transit-gateway-connect-peer-associations/{TransitGatewayConnectPeerArn}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#DisassociateTransitGatewayConnectPeerRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TransitGatewayConnectPeerArn": { + "target": "com.amazonaws.networkmanager#TransitGatewayConnectPeerArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the transit gateway Connect peer.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#DisassociateTransitGatewayConnectPeerResponse": { + "type": "structure", + "members": { + "TransitGatewayConnectPeerAssociation": { + "target": "com.amazonaws.networkmanager#TransitGatewayConnectPeerAssociation", + "traits": { + "smithy.api#documentation": "

The transit gateway Connect peer association.

" + } + } + } + }, + "com.amazonaws.networkmanager#ExceptionContextKey": { + "type": "string" + }, + "com.amazonaws.networkmanager#ExceptionContextMap": { + "type": "map", + "key": { + "target": "com.amazonaws.networkmanager#ExceptionContextKey" + }, + "value": { + "target": "com.amazonaws.networkmanager#ExceptionContextValue" + } + }, + "com.amazonaws.networkmanager#ExceptionContextValue": { + "type": "string" + }, + "com.amazonaws.networkmanager#ExecuteCoreNetworkChangeSet": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#ExecuteCoreNetworkChangeSetRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#ExecuteCoreNetworkChangeSetResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Executes a change set on your core network. Deploys changes globally based on the policy submitted..

", + "smithy.api#http": { + "method": "POST", + "uri": "/core-networks/{CoreNetworkId}/core-network-change-sets/{PolicyVersionId}/execute", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#ExecuteCoreNetworkChangeSetRequest": { + "type": "structure", + "members": { + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of a core network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "PolicyVersionId": { + "target": "com.amazonaws.networkmanager#Integer", + "traits": { + "smithy.api#documentation": "

The ID of the policy version.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#ExecuteCoreNetworkChangeSetResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.networkmanager#ExternalRegionCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 63 + } + } + }, + "com.amazonaws.networkmanager#ExternalRegionCodeList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#ExternalRegionCode" + } + }, + "com.amazonaws.networkmanager#FilterMap": { + "type": "map", + "key": { + "target": "com.amazonaws.networkmanager#FilterName" + }, + "value": { + "target": "com.amazonaws.networkmanager#FilterValues" + } + }, + "com.amazonaws.networkmanager#FilterName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 128 + }, + "smithy.api#pattern": "^[0-9a-zA-Z\\.-]*$" + } + }, + "com.amazonaws.networkmanager#FilterValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 255 + }, + "smithy.api#pattern": "^[0-9a-zA-Z\\*\\.\\\\/\\?-]*$" + } + }, + "com.amazonaws.networkmanager#FilterValues": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#FilterValue" + } + }, + "com.amazonaws.networkmanager#GetConnectAttachment": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetConnectAttachmentRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetConnectAttachmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns information about a core network Connect attachment.

", + "smithy.api#http": { + "method": "GET", + "uri": "/connect-attachments/{AttachmentId}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#GetConnectAttachmentRequest": { + "type": "structure", + "members": { + "AttachmentId": { + "target": "com.amazonaws.networkmanager#AttachmentId", + "traits": { + "smithy.api#documentation": "

The ID of the attachment.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#GetConnectAttachmentResponse": { + "type": "structure", + "members": { + "ConnectAttachment": { + "target": "com.amazonaws.networkmanager#ConnectAttachment", + "traits": { + "smithy.api#documentation": "

Details about the Connect attachment.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetConnectPeer": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetConnectPeerRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetConnectPeerResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns information about a core network Connect peer.

", + "smithy.api#http": { + "method": "GET", + "uri": "/connect-peers/{ConnectPeerId}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#GetConnectPeerAssociations": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetConnectPeerAssociationsRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetConnectPeerAssociationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns information about a core network Connect peer associations.

", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/connect-peer-associations", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetConnectPeerAssociationsRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ConnectPeerIds": { + "target": "com.amazonaws.networkmanager#ConnectPeerIdList", + "traits": { + "smithy.api#documentation": "

The IDs of the Connect peers.

", + "smithy.api#httpQuery": "connectPeerIds" + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetConnectPeerAssociationsResponse": { + "type": "structure", + "members": { + "ConnectPeerAssociations": { + "target": "com.amazonaws.networkmanager#ConnectPeerAssociationList", + "traits": { + "smithy.api#documentation": "

Displays a list of Connect peer associations.

" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetConnectPeerRequest": { + "type": "structure", + "members": { + "ConnectPeerId": { + "target": "com.amazonaws.networkmanager#ConnectPeerId", + "traits": { + "smithy.api#documentation": "

The ID of the Connect peer.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#GetConnectPeerResponse": { + "type": "structure", + "members": { + "ConnectPeer": { + "target": "com.amazonaws.networkmanager#ConnectPeer", + "traits": { + "smithy.api#documentation": "

Returns information about a core network Connect peer.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetConnections": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetConnectionsRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetConnectionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets information about one or more of your connections in a global network.

", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/connections", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetConnectionsRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ConnectionIds": { + "target": "com.amazonaws.networkmanager#ConnectionIdList", + "traits": { + "smithy.api#documentation": "

One or more connection IDs.

", + "smithy.api#httpQuery": "connectionIds" + } + }, + "DeviceId": { + "target": "com.amazonaws.networkmanager#DeviceId", + "traits": { + "smithy.api#documentation": "

The ID of the device.

", + "smithy.api#httpQuery": "deviceId" + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetConnectionsResponse": { + "type": "structure", + "members": { + "Connections": { + "target": "com.amazonaws.networkmanager#ConnectionList", + "traits": { + "smithy.api#documentation": "

Information about the connections.

" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token to use for the next page of results.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetCoreNetwork": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetCoreNetworkRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetCoreNetworkResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns information about a core network. By default it returns the LIVE policy.

", + "smithy.api#http": { + "method": "GET", + "uri": "/core-networks/{CoreNetworkId}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#GetCoreNetworkChangeSet": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetCoreNetworkChangeSetRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetCoreNetworkChangeSetResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a change set between the LIVE core network policy and a submitted policy.

", + "smithy.api#http": { + "method": "GET", + "uri": "/core-networks/{CoreNetworkId}/core-network-change-sets/{PolicyVersionId}", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetCoreNetworkChangeSetRequest": { + "type": "structure", + "members": { + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of a core network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "PolicyVersionId": { + "target": "com.amazonaws.networkmanager#Integer", + "traits": { + "smithy.api#documentation": "

The ID of the policy version.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetCoreNetworkChangeSetResponse": { + "type": "structure", + "members": { + "CoreNetworkChanges": { + "target": "com.amazonaws.networkmanager#CoreNetworkChangeList", + "traits": { + "smithy.api#documentation": "

Describes a core network changes.

" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetCoreNetworkPolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetCoreNetworkPolicyRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetCoreNetworkPolicyResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets details about a core network policy. You can get details about your current live policy or any previous policy version.

", + "smithy.api#http": { + "method": "GET", + "uri": "/core-networks/{CoreNetworkId}/core-network-policy", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#GetCoreNetworkPolicyRequest": { + "type": "structure", + "members": { + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of a core network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "PolicyVersionId": { + "target": "com.amazonaws.networkmanager#Integer", + "traits": { + "smithy.api#documentation": "

The ID of a core network policy version.

", + "smithy.api#httpQuery": "policyVersionId" + } + }, + "Alias": { + "target": "com.amazonaws.networkmanager#CoreNetworkPolicyAlias", + "traits": { + "smithy.api#documentation": "

The alias of a core network policy

", + "smithy.api#httpQuery": "alias" + } + } + } + }, + "com.amazonaws.networkmanager#GetCoreNetworkPolicyResponse": { + "type": "structure", + "members": { + "CoreNetworkPolicy": { + "target": "com.amazonaws.networkmanager#CoreNetworkPolicy", + "traits": { + "smithy.api#documentation": "

The details about a core network policy.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetCoreNetworkRequest": { + "type": "structure", + "members": { + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of a core network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#GetCoreNetworkResponse": { + "type": "structure", + "members": { + "CoreNetwork": { + "target": "com.amazonaws.networkmanager#CoreNetwork", + "traits": { + "smithy.api#documentation": "

Details about a core network.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetCustomerGatewayAssociations": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetCustomerGatewayAssociationsRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetCustomerGatewayAssociationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets the association information for customer gateways that are associated with\n devices and links in your global network.

", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/customer-gateway-associations", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetCustomerGatewayAssociationsRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "CustomerGatewayArns": { + "target": "com.amazonaws.networkmanager#CustomerGatewayArnList", + "traits": { + "smithy.api#documentation": "

One or more customer gateway Amazon Resource Names (ARNs). The maximum is 10.

", + "smithy.api#httpQuery": "customerGatewayArns" + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetCustomerGatewayAssociationsResponse": { + "type": "structure", + "members": { + "CustomerGatewayAssociations": { + "target": "com.amazonaws.networkmanager#CustomerGatewayAssociationList", + "traits": { + "smithy.api#documentation": "

The customer gateway associations.

" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetDevices": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetDevicesRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetDevicesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets information about one or more of your devices in a global network.

", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/devices", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetDevicesRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "DeviceIds": { + "target": "com.amazonaws.networkmanager#DeviceIdList", + "traits": { + "smithy.api#documentation": "

One or more device IDs. The maximum is 10.

", + "smithy.api#httpQuery": "deviceIds" + } + }, + "SiteId": { + "target": "com.amazonaws.networkmanager#SiteId", + "traits": { + "smithy.api#documentation": "

The ID of the site.

", + "smithy.api#httpQuery": "siteId" + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetDevicesResponse": { + "type": "structure", + "members": { + "Devices": { + "target": "com.amazonaws.networkmanager#DeviceList", + "traits": { + "smithy.api#documentation": "

The devices.

" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetLinkAssociations": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetLinkAssociationsRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetLinkAssociationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets the link associations for a device or a link. Either the device ID or the link ID\n must be specified.

", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/link-associations", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetLinkAssociationsRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "DeviceId": { + "target": "com.amazonaws.networkmanager#DeviceId", + "traits": { + "smithy.api#documentation": "

The ID of the device.

", + "smithy.api#httpQuery": "deviceId" + } + }, + "LinkId": { + "target": "com.amazonaws.networkmanager#LinkId", + "traits": { + "smithy.api#documentation": "

The ID of the link.

", + "smithy.api#httpQuery": "linkId" + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetLinkAssociationsResponse": { + "type": "structure", + "members": { + "LinkAssociations": { + "target": "com.amazonaws.networkmanager#LinkAssociationList", + "traits": { + "smithy.api#documentation": "

The link associations.

" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetLinks": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetLinksRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetLinksResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets information about one or more links in a specified global network.

\n

If you specify the site ID, you cannot specify the type or provider in the same request. You can specify the type and provider in the same request.

", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/links", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetLinksRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "LinkIds": { + "target": "com.amazonaws.networkmanager#LinkIdList", + "traits": { + "smithy.api#documentation": "

One or more link IDs. The maximum is 10.

", + "smithy.api#httpQuery": "linkIds" + } + }, + "SiteId": { + "target": "com.amazonaws.networkmanager#SiteId", + "traits": { + "smithy.api#documentation": "

The ID of the site.

", + "smithy.api#httpQuery": "siteId" + } + }, + "Type": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The link type.

", + "smithy.api#httpQuery": "type" + } + }, + "Provider": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The link provider.

", + "smithy.api#httpQuery": "provider" + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetLinksResponse": { + "type": "structure", + "members": { + "Links": { + "target": "com.amazonaws.networkmanager#LinkList", + "traits": { + "smithy.api#documentation": "

The links.

" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetNetworkResourceCounts": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetNetworkResourceCountsRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetNetworkResourceCountsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets the count of network resources, by resource type, for the specified global network.

", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/network-resource-count", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetNetworkResourceCountsRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ResourceType": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The resource type.

\n

The following are the supported resource types for Direct Connect:

\n \n \n

The following are the supported resource types for Network Manager:

\n \n\n

The following are the supported resource types for Amazon VPC:

\n ", + "smithy.api#httpQuery": "resourceType" + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetNetworkResourceCountsResponse": { + "type": "structure", + "members": { + "NetworkResourceCounts": { + "target": "com.amazonaws.networkmanager#NetworkResourceCountList", + "traits": { + "smithy.api#documentation": "

The count of resources.

" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetNetworkResourceRelationships": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetNetworkResourceRelationshipsRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetNetworkResourceRelationshipsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets the network resource relationships for the specified global network.

", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/network-resource-relationships", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetNetworkResourceRelationshipsRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of a core network.

", + "smithy.api#httpQuery": "coreNetworkId" + } + }, + "RegisteredGatewayArn": { + "target": "com.amazonaws.networkmanager#ResourceArn", + "traits": { + "smithy.api#documentation": "

The ARN of the registered gateway.

", + "smithy.api#httpQuery": "registeredGatewayArn" + } + }, + "AwsRegion": { + "target": "com.amazonaws.networkmanager#ExternalRegionCode", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services Region.

", + "smithy.api#httpQuery": "awsRegion" + } + }, + "AccountId": { + "target": "com.amazonaws.networkmanager#AWSAccountId", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services account ID.

", + "smithy.api#httpQuery": "accountId" + } + }, + "ResourceType": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The resource type.

\n

The following are the supported resource types for Direct Connect:

\n \n \n

The following are the supported resource types for Network Manager:

\n \n\n

The following are the supported resource types for Amazon VPC:

\n ", + "smithy.api#httpQuery": "resourceType" + } + }, + "ResourceArn": { + "target": "com.amazonaws.networkmanager#ResourceArn", + "traits": { + "smithy.api#documentation": "

The ARN of the gateway.

", + "smithy.api#httpQuery": "resourceArn" + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetNetworkResourceRelationshipsResponse": { + "type": "structure", + "members": { + "Relationships": { + "target": "com.amazonaws.networkmanager#RelationshipList", + "traits": { + "smithy.api#documentation": "

The resource relationships.

" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetNetworkResources": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetNetworkResourcesRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetNetworkResourcesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Describes the network resources for the specified global network.

\n

The results include information from the corresponding Describe call for the resource, minus any sensitive information such as pre-shared keys.

", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/network-resources", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetNetworkResourcesRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of a core network.

", + "smithy.api#httpQuery": "coreNetworkId" + } + }, + "RegisteredGatewayArn": { + "target": "com.amazonaws.networkmanager#ResourceArn", + "traits": { + "smithy.api#documentation": "

The ARN of the gateway.

", + "smithy.api#httpQuery": "registeredGatewayArn" + } + }, + "AwsRegion": { + "target": "com.amazonaws.networkmanager#ExternalRegionCode", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services Region.

", + "smithy.api#httpQuery": "awsRegion" + } + }, + "AccountId": { + "target": "com.amazonaws.networkmanager#AWSAccountId", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services account ID.

", + "smithy.api#httpQuery": "accountId" + } + }, + "ResourceType": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The resource type.

\n

The following are the supported resource types for Direct Connect:

\n \n \n

The following are the supported resource types for Network Manager:

\n \n \n

The following are the supported resource types for Amazon VPC:

\n ", + "smithy.api#httpQuery": "resourceType" + } + }, + "ResourceArn": { + "target": "com.amazonaws.networkmanager#ResourceArn", + "traits": { + "smithy.api#documentation": "

The ARN of the resource.

", + "smithy.api#httpQuery": "resourceArn" + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetNetworkResourcesResponse": { + "type": "structure", + "members": { + "NetworkResources": { + "target": "com.amazonaws.networkmanager#NetworkResourceList", + "traits": { + "smithy.api#documentation": "

The network resources.

" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetNetworkRoutes": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetNetworkRoutesRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetNetworkRoutesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets the network routes of the specified global network.

", + "smithy.api#http": { + "method": "POST", + "uri": "/global-networks/{GlobalNetworkId}/network-routes", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#GetNetworkRoutesRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "RouteTableIdentifier": { + "target": "com.amazonaws.networkmanager#RouteTableIdentifier", + "traits": { + "smithy.api#documentation": "

The ID of the route table.

", + "smithy.api#required": {} + } + }, + "ExactCidrMatches": { + "target": "com.amazonaws.networkmanager#ConstrainedStringList", + "traits": { + "smithy.api#documentation": "

An exact CIDR block.

" + } + }, + "LongestPrefixMatches": { + "target": "com.amazonaws.networkmanager#ConstrainedStringList", + "traits": { + "smithy.api#documentation": "

The most specific route that matches the traffic (longest prefix match).

" + } + }, + "SubnetOfMatches": { + "target": "com.amazonaws.networkmanager#ConstrainedStringList", + "traits": { + "smithy.api#documentation": "

The routes with a subnet that match the specified CIDR filter.

" + } + }, + "SupernetOfMatches": { + "target": "com.amazonaws.networkmanager#ConstrainedStringList", + "traits": { + "smithy.api#documentation": "

The routes with a CIDR that encompasses the CIDR filter. Example: If you specify 10.0.1.0/30, then the result returns 10.0.1.0/29.

" + } + }, + "PrefixListIds": { + "target": "com.amazonaws.networkmanager#ConstrainedStringList", + "traits": { + "smithy.api#documentation": "

The IDs of the prefix lists.

" + } + }, + "States": { + "target": "com.amazonaws.networkmanager#RouteStateList", + "traits": { + "smithy.api#documentation": "

The route states.

" + } + }, + "Types": { + "target": "com.amazonaws.networkmanager#RouteTypeList", + "traits": { + "smithy.api#documentation": "

The route types.

" + } + }, + "DestinationFilters": { + "target": "com.amazonaws.networkmanager#FilterMap", + "traits": { + "smithy.api#documentation": "

Filter by route table destination. Possible Values: TRANSIT_GATEWAY_ATTACHMENT_ID, RESOURCE_ID, or RESOURCE_TYPE.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetNetworkRoutesResponse": { + "type": "structure", + "members": { + "RouteTableArn": { + "target": "com.amazonaws.networkmanager#ResourceArn", + "traits": { + "smithy.api#documentation": "

The ARN of the route table.

" + } + }, + "CoreNetworkSegmentEdge": { + "target": "com.amazonaws.networkmanager#CoreNetworkSegmentEdgeIdentifier", + "traits": { + "smithy.api#documentation": "

Describes a core network segment edge.

" + } + }, + "RouteTableType": { + "target": "com.amazonaws.networkmanager#RouteTableType", + "traits": { + "smithy.api#documentation": "

The route table type.

" + } + }, + "RouteTableTimestamp": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

The route table creation time.

" + } + }, + "NetworkRoutes": { + "target": "com.amazonaws.networkmanager#NetworkRouteList", + "traits": { + "smithy.api#documentation": "

The network routes.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetNetworkTelemetry": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetNetworkTelemetryRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetNetworkTelemetryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets the network telemetry of the specified global network.

", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/network-telemetry", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetNetworkTelemetryRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of a core network.

", + "smithy.api#httpQuery": "coreNetworkId" + } + }, + "RegisteredGatewayArn": { + "target": "com.amazonaws.networkmanager#ResourceArn", + "traits": { + "smithy.api#documentation": "

The ARN of the gateway.

", + "smithy.api#httpQuery": "registeredGatewayArn" + } + }, + "AwsRegion": { + "target": "com.amazonaws.networkmanager#ExternalRegionCode", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services Region.

", + "smithy.api#httpQuery": "awsRegion" + } + }, + "AccountId": { + "target": "com.amazonaws.networkmanager#AWSAccountId", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services account ID.

", + "smithy.api#httpQuery": "accountId" + } + }, + "ResourceType": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The resource type.

\n

The following are the supported resource types for Direct Connect:

\n \n \n

The following are the supported resource types for Network Manager:

\n \n\n

The following are the supported resource types for Amazon VPC:

\n ", + "smithy.api#httpQuery": "resourceType" + } + }, + "ResourceArn": { + "target": "com.amazonaws.networkmanager#ResourceArn", + "traits": { + "smithy.api#documentation": "

The ARN of the resource.

", + "smithy.api#httpQuery": "resourceArn" + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetNetworkTelemetryResponse": { + "type": "structure", + "members": { + "NetworkTelemetry": { + "target": "com.amazonaws.networkmanager#NetworkTelemetryList", + "traits": { + "smithy.api#documentation": "

The network telemetry.

" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetResourcePolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetResourcePolicyRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetResourcePolicyResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns information about a resource policy.

", + "smithy.api#http": { + "method": "GET", + "uri": "/resource-policy/{ResourceArn}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#GetResourcePolicyRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.networkmanager#ResourceArn", + "traits": { + "smithy.api#documentation": "

The ARN of the resource.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#GetResourcePolicyResponse": { + "type": "structure", + "members": { + "PolicyDocument": { + "target": "com.amazonaws.networkmanager#SynthesizedJsonResourcePolicyDocument", + "traits": { + "smithy.api#documentation": "

The resource policy document.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetRouteAnalysis": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetRouteAnalysisRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetRouteAnalysisResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets information about the specified route analysis.

", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/route-analyses/{RouteAnalysisId}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#GetRouteAnalysisRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "RouteAnalysisId": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The ID of the route analysis.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#GetRouteAnalysisResponse": { + "type": "structure", + "members": { + "RouteAnalysis": { + "target": "com.amazonaws.networkmanager#RouteAnalysis", + "traits": { + "smithy.api#documentation": "

The route analysis.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetSiteToSiteVpnAttachment": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetSiteToSiteVpnAttachmentRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetSiteToSiteVpnAttachmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns information about a site-to-site VPN attachment.

", + "smithy.api#http": { + "method": "GET", + "uri": "/site-to-site-vpn-attachments/{AttachmentId}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#GetSiteToSiteVpnAttachmentRequest": { + "type": "structure", + "members": { + "AttachmentId": { + "target": "com.amazonaws.networkmanager#AttachmentId", + "traits": { + "smithy.api#documentation": "

The ID of the attachment.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#GetSiteToSiteVpnAttachmentResponse": { + "type": "structure", + "members": { + "SiteToSiteVpnAttachment": { + "target": "com.amazonaws.networkmanager#SiteToSiteVpnAttachment", + "traits": { + "smithy.api#documentation": "

Describes the site-to-site attachment.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetSites": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetSitesRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetSitesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets information about one or more of your sites in a global network.

", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/sites", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetSitesRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "SiteIds": { + "target": "com.amazonaws.networkmanager#SiteIdList", + "traits": { + "smithy.api#documentation": "

One or more site IDs. The maximum is 10.

", + "smithy.api#httpQuery": "siteIds" + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetSitesResponse": { + "type": "structure", + "members": { + "Sites": { + "target": "com.amazonaws.networkmanager#SiteList", + "traits": { + "smithy.api#documentation": "

The sites.

" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociations": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets information about one or more of your transit gateway Connect peer associations in a global network.

", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/transit-gateway-connect-peer-associations", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TransitGatewayConnectPeerArns": { + "target": "com.amazonaws.networkmanager#TransitGatewayConnectPeerArnList", + "traits": { + "smithy.api#documentation": "

One or more transit gateway Connect peer Amazon Resource Names (ARNs).

", + "smithy.api#httpQuery": "transitGatewayConnectPeerArns" + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsResponse": { + "type": "structure", + "members": { + "TransitGatewayConnectPeerAssociations": { + "target": "com.amazonaws.networkmanager#TransitGatewayConnectPeerAssociationList", + "traits": { + "smithy.api#documentation": "

Information about the transit gateway Connect peer associations.

" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token to use for the next page of results.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetTransitGatewayRegistrations": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Gets information about the transit gateway registrations in a specified\n global network.

", + "smithy.api#http": { + "method": "GET", + "uri": "/global-networks/{GlobalNetworkId}/transit-gateway-registrations", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsRequest": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "TransitGatewayArns": { + "target": "com.amazonaws.networkmanager#TransitGatewayArnList", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of one or more transit gateways. The maximum is\n 10.

", + "smithy.api#httpQuery": "transitGatewayArns" + } + }, + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsResponse": { + "type": "structure", + "members": { + "TransitGatewayRegistrations": { + "target": "com.amazonaws.networkmanager#TransitGatewayRegistrationList", + "traits": { + "smithy.api#documentation": "

The transit gateway registrations.

" + } + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

" + } + } + } + }, + "com.amazonaws.networkmanager#GetVpcAttachment": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#GetVpcAttachmentRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#GetVpcAttachmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns information about a VPC attachment.

", + "smithy.api#http": { + "method": "GET", + "uri": "/vpc-attachments/{AttachmentId}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#GetVpcAttachmentRequest": { + "type": "structure", + "members": { + "AttachmentId": { + "target": "com.amazonaws.networkmanager#AttachmentId", + "traits": { + "smithy.api#documentation": "

The ID of the attachment.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#GetVpcAttachmentResponse": { + "type": "structure", + "members": { + "VpcAttachment": { + "target": "com.amazonaws.networkmanager#VpcAttachment", + "traits": { + "smithy.api#documentation": "

Returns details about a VPC attachment.

" + } + } + } + }, + "com.amazonaws.networkmanager#GlobalNetwork": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

" + } + }, + "GlobalNetworkArn": { + "target": "com.amazonaws.networkmanager#GlobalNetworkArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the global network.

" + } + }, + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The description of the global network.

" + } + }, + "CreatedAt": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

The date and time that the global network was created.

" + } + }, + "State": { + "target": "com.amazonaws.networkmanager#GlobalNetworkState", + "traits": { + "smithy.api#documentation": "

The state of the global network.

" + } + }, + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", + "traits": { + "smithy.api#documentation": "

The tags for the global network.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes a global network. This is a single private network acting as a high-level container for your network objects, including an Amazon Web Services-manged Core Network.

" + } + }, + "com.amazonaws.networkmanager#GlobalNetworkArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + } + } + }, + "com.amazonaws.networkmanager#GlobalNetworkId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.networkmanager#GlobalNetworkIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId" + } + }, + "com.amazonaws.networkmanager#GlobalNetworkList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#GlobalNetwork" + } + }, + "com.amazonaws.networkmanager#GlobalNetworkState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "pending" + }, + { + "value": "AVAILABLE", + "name": "available" + }, + { + "value": "DELETING", + "name": "deleting" + }, + { + "value": "UPDATING", + "name": "updating" + } + ] + } + }, + "com.amazonaws.networkmanager#IPAddress": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + } + } + }, + "com.amazonaws.networkmanager#Integer": { + "type": "integer", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.networkmanager#InternalServerException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.networkmanager#ServerSideString", + "traits": { + "smithy.api#required": {} + } + }, + "RetryAfterSeconds": { + "target": "com.amazonaws.networkmanager#RetryAfterSeconds", + "traits": { + "smithy.api#documentation": "

Indicates when to retry the request.

", + "smithy.api#httpHeader": "Retry-After" + } + } + }, + "traits": { + "smithy.api#documentation": "

The request has failed due to an internal error.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.networkmanager#Link": { + "type": "structure", + "members": { + "LinkId": { + "target": "com.amazonaws.networkmanager#LinkId", + "traits": { + "smithy.api#documentation": "

The ID of the link.

" + } + }, + "LinkArn": { + "target": "com.amazonaws.networkmanager#LinkArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the link.

" + } + }, + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

" + } + }, + "SiteId": { + "target": "com.amazonaws.networkmanager#SiteId", + "traits": { + "smithy.api#documentation": "

The ID of the site.

" + } + }, + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The description of the link.

" + } + }, + "Type": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The type of the link.

" + } + }, + "Bandwidth": { + "target": "com.amazonaws.networkmanager#Bandwidth", + "traits": { + "smithy.api#documentation": "

The bandwidth for the link.

" + } + }, + "Provider": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The provider of the link.

" + } + }, + "CreatedAt": { + "target": "com.amazonaws.networkmanager#DateTime", + "traits": { + "smithy.api#documentation": "

The date and time that the link was created.

" + } + }, + "State": { + "target": "com.amazonaws.networkmanager#LinkState", + "traits": { + "smithy.api#documentation": "

The state of the link.

" + } + }, + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", + "traits": { + "smithy.api#documentation": "

The tags for the link.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes a link.

" + } + }, + "com.amazonaws.networkmanager#LinkArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + } + } + }, + "com.amazonaws.networkmanager#LinkAssociation": { + "type": "structure", + "members": { + "GlobalNetworkId": { + "target": "com.amazonaws.networkmanager#GlobalNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of the global network.

" + } + }, + "DeviceId": { + "target": "com.amazonaws.networkmanager#DeviceId", + "traits": { + "smithy.api#documentation": "

The device ID for the link association.

" + } + }, + "LinkId": { + "target": "com.amazonaws.networkmanager#LinkId", + "traits": { + "smithy.api#documentation": "

The ID of the link.

" + } + }, + "LinkAssociationState": { + "target": "com.amazonaws.networkmanager#LinkAssociationState", + "traits": { + "smithy.api#documentation": "

The state of the association.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the association between a device and a link.

" + } + }, + "com.amazonaws.networkmanager#LinkAssociationList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#LinkAssociation" + } + }, + "com.amazonaws.networkmanager#LinkAssociationState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "pending" + }, + { + "value": "AVAILABLE", + "name": "available" + }, + { + "value": "DELETING", + "name": "deleting" + }, + { + "value": "DELETED", + "name": "deleted" + } + ] + } + }, + "com.amazonaws.networkmanager#LinkId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.networkmanager#LinkIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#LinkId" + } + }, + "com.amazonaws.networkmanager#LinkList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#Link" + } + }, + "com.amazonaws.networkmanager#LinkState": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING", + "name": "pending" + }, + { + "value": "AVAILABLE", + "name": "available" + }, + { + "value": "DELETING", + "name": "deleting" + }, + { + "value": "UPDATING", + "name": "updating" } - } + ] } }, - "com.amazonaws.networkmanager#GetSites": { + "com.amazonaws.networkmanager#ListAttachments": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetSitesRequest" + "target": "com.amazonaws.networkmanager#ListAttachmentsRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetSitesResponse" + "target": "com.amazonaws.networkmanager#ListAttachmentsResponse" }, "errors": [ { @@ -3081,9 +6568,6 @@ { "target": "com.amazonaws.networkmanager#InternalServerException" }, - { - "target": "com.amazonaws.networkmanager#ResourceNotFoundException" - }, { "target": "com.amazonaws.networkmanager#ThrottlingException" }, @@ -3092,10 +6576,10 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about one or more of your sites in a global network.

", + "smithy.api#documentation": "

Returns a list of core network attachments.

", "smithy.api#http": { "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/sites", + "uri": "/attachments", "code": 200 }, "smithy.api#paginated": { @@ -3105,22 +6589,35 @@ } } }, - "com.amazonaws.networkmanager#GetSitesRequest": { + "com.amazonaws.networkmanager#ListAttachmentsRequest": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "

The ID of a core network.

", + "smithy.api#httpQuery": "coreNetworkId" } }, - "SiteIds": { - "target": "com.amazonaws.networkmanager#StringList", + "AttachmentType": { + "target": "com.amazonaws.networkmanager#AttachmentType", "traits": { - "smithy.api#documentation": "

One or more site IDs. The maximum is 10.

", - "smithy.api#httpQuery": "siteIds" + "smithy.api#documentation": "

The type of attachment.

", + "smithy.api#httpQuery": "attachmentType" + } + }, + "EdgeLocation": { + "target": "com.amazonaws.networkmanager#ExternalRegionCode", + "traits": { + "smithy.api#documentation": "

The Region where the edge is located.

", + "smithy.api#httpQuery": "edgeLocation" + } + }, + "State": { + "target": "com.amazonaws.networkmanager#AttachmentState", + "traits": { + "smithy.api#documentation": "

The state of the attachment.

", + "smithy.api#httpQuery": "state" } }, "MaxResults": { @@ -3131,7 +6628,7 @@ } }, "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#NextToken", "traits": { "smithy.api#documentation": "

The token for the next page of results.

", "smithy.api#httpQuery": "nextToken" @@ -3139,44 +6636,38 @@ } } }, - "com.amazonaws.networkmanager#GetSitesResponse": { + "com.amazonaws.networkmanager#ListAttachmentsResponse": { "type": "structure", "members": { - "Sites": { - "target": "com.amazonaws.networkmanager#SiteList", + "Attachments": { + "target": "com.amazonaws.networkmanager#AttachmentList", "traits": { - "smithy.api#documentation": "

The sites.

" + "smithy.api#documentation": "

Describes the list of attachments.

" } }, "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#NextToken", "traits": { "smithy.api#documentation": "

The token for the next page of results.

" } } } }, - "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociations": { + "com.amazonaws.networkmanager#ListConnectPeers": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsRequest" + "target": "com.amazonaws.networkmanager#ListConnectPeersRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsResponse" + "target": "com.amazonaws.networkmanager#ListConnectPeersResponse" }, "errors": [ { "target": "com.amazonaws.networkmanager#AccessDeniedException" }, - { - "target": "com.amazonaws.networkmanager#ConflictException" - }, { "target": "com.amazonaws.networkmanager#InternalServerException" }, - { - "target": "com.amazonaws.networkmanager#ResourceNotFoundException" - }, { "target": "com.amazonaws.networkmanager#ThrottlingException" }, @@ -3185,10 +6676,10 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about one or more of your transit gateway Connect peer associations in a global network.

", + "smithy.api#documentation": "

Returns a list of core network Connect peers.

", "smithy.api#http": { "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/transit-gateway-connect-peer-associations", + "uri": "/connect-peers", "code": 200 }, "smithy.api#paginated": { @@ -3198,22 +6689,21 @@ } } }, - "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsRequest": { + "com.amazonaws.networkmanager#ListConnectPeersRequest": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} + "smithy.api#documentation": "

The ID of a core network.

", + "smithy.api#httpQuery": "coreNetworkId" } }, - "TransitGatewayConnectPeerArns": { - "target": "com.amazonaws.networkmanager#StringList", + "ConnectAttachmentId": { + "target": "com.amazonaws.networkmanager#AttachmentId", "traits": { - "smithy.api#documentation": "

One or more transit gateway Connect peer Amazon Resource Names (ARNs).

", - "smithy.api#httpQuery": "transitGatewayConnectPeerArns" + "smithy.api#documentation": "

The ID of the attachment.

", + "smithy.api#httpQuery": "connectAttachmentId" } }, "MaxResults": { @@ -3224,7 +6714,7 @@ } }, "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#NextToken", "traits": { "smithy.api#documentation": "

The token for the next page of results.

", "smithy.api#httpQuery": "nextToken" @@ -3232,30 +6722,30 @@ } } }, - "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociationsResponse": { + "com.amazonaws.networkmanager#ListConnectPeersResponse": { "type": "structure", "members": { - "TransitGatewayConnectPeerAssociations": { - "target": "com.amazonaws.networkmanager#TransitGatewayConnectPeerAssociationList", + "ConnectPeers": { + "target": "com.amazonaws.networkmanager#ConnectPeerSummaryList", "traits": { - "smithy.api#documentation": "

Information about the transit gateway Connect peer associations.

" + "smithy.api#documentation": "

Describes the Connect peers.

" } }, "NextToken": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#NextToken", "traits": { - "smithy.api#documentation": "

The token to use for the next page of results.

" + "smithy.api#documentation": "

The token for the next page of results.

" } } } }, - "com.amazonaws.networkmanager#GetTransitGatewayRegistrations": { + "com.amazonaws.networkmanager#ListCoreNetworkPolicyVersions": { "type": "operation", "input": { - "target": "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsRequest" + "target": "com.amazonaws.networkmanager#ListCoreNetworkPolicyVersionsRequest" }, "output": { - "target": "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsResponse" + "target": "com.amazonaws.networkmanager#ListCoreNetworkPolicyVersionsResponse" }, "errors": [ { @@ -3275,10 +6765,10 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about the transit gateway registrations in a specified\n global network.

", + "smithy.api#documentation": "

Returns a list of core network policy versions.

", "smithy.api#http": { "method": "GET", - "uri": "/global-networks/{GlobalNetworkId}/transit-gateway-registrations", + "uri": "/core-networks/{CoreNetworkId}/core-network-policy-versions", "code": 200 }, "smithy.api#paginated": { @@ -3288,321 +6778,120 @@ } } }, - "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsRequest": { - "type": "structure", - "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ID of the global network.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "TransitGatewayArns": { - "target": "com.amazonaws.networkmanager#StringList", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of one or more transit gateways. The maximum is\n 10.

", - "smithy.api#httpQuery": "transitGatewayArns" - } - }, - "MaxResults": { - "target": "com.amazonaws.networkmanager#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum number of results to return.

", - "smithy.api#httpQuery": "maxResults" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The token for the next page of results.

", - "smithy.api#httpQuery": "nextToken" - } - } - } - }, - "com.amazonaws.networkmanager#GetTransitGatewayRegistrationsResponse": { - "type": "structure", - "members": { - "TransitGatewayRegistrations": { - "target": "com.amazonaws.networkmanager#TransitGatewayRegistrationList", - "traits": { - "smithy.api#documentation": "

The transit gateway registrations.

" - } - }, - "NextToken": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" - } - } - } - }, - "com.amazonaws.networkmanager#GlobalNetwork": { - "type": "structure", - "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ID of the global network.

" - } - }, - "GlobalNetworkArn": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the global network.

" - } - }, - "Description": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The description of the global network.

" - } - }, - "CreatedAt": { - "target": "com.amazonaws.networkmanager#DateTime", - "traits": { - "smithy.api#documentation": "

The date and time that the global network was created.

" - } - }, - "State": { - "target": "com.amazonaws.networkmanager#GlobalNetworkState", - "traits": { - "smithy.api#documentation": "

The state of the global network.

" - } - }, - "Tags": { - "target": "com.amazonaws.networkmanager#TagList", - "traits": { - "smithy.api#documentation": "

The tags for the global network.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Describes a global network.

" - } - }, - "com.amazonaws.networkmanager#GlobalNetworkList": { - "type": "list", - "member": { - "target": "com.amazonaws.networkmanager#GlobalNetwork" - } - }, - "com.amazonaws.networkmanager#GlobalNetworkState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PENDING", - "name": "pending" - }, - { - "value": "AVAILABLE", - "name": "available" - }, - { - "value": "DELETING", - "name": "deleting" - }, - { - "value": "UPDATING", - "name": "updating" - } - ] - } - }, - "com.amazonaws.networkmanager#Integer": { - "type": "integer", - "traits": { - "smithy.api#box": {} - } - }, - "com.amazonaws.networkmanager#InternalServerException": { - "type": "structure", - "members": { - "Message": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#required": {} - } - }, - "RetryAfterSeconds": { - "target": "com.amazonaws.networkmanager#RetryAfterSeconds", - "traits": { - "smithy.api#documentation": "

Indicates when to retry the request.

", - "smithy.api#httpHeader": "Retry-After" - } - } - }, - "traits": { - "smithy.api#documentation": "

The request has failed due to an internal error.

", - "smithy.api#error": "server", - "smithy.api#httpError": 500 - } - }, - "com.amazonaws.networkmanager#Link": { + "com.amazonaws.networkmanager#ListCoreNetworkPolicyVersionsRequest": { "type": "structure", - "members": { - "LinkId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ID of the link.

" - } - }, - "LinkArn": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the link.

" - } - }, - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ID of the global network.

" - } - }, - "SiteId": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The ID of the site.

" - } - }, - "Description": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The description of the link.

" - } - }, - "Type": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The type of the link.

" - } - }, - "Bandwidth": { - "target": "com.amazonaws.networkmanager#Bandwidth", - "traits": { - "smithy.api#documentation": "

The bandwidth for the link.

" - } - }, - "Provider": { - "target": "com.amazonaws.networkmanager#String", - "traits": { - "smithy.api#documentation": "

The provider of the link.

" - } - }, - "CreatedAt": { - "target": "com.amazonaws.networkmanager#DateTime", + "members": { + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", "traits": { - "smithy.api#documentation": "

The date and time that the link was created.

" + "smithy.api#documentation": "

The ID of a core network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} } }, - "State": { - "target": "com.amazonaws.networkmanager#LinkState", + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", "traits": { - "smithy.api#documentation": "

The state of the link.

" + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" } }, - "Tags": { - "target": "com.amazonaws.networkmanager#TagList", + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", "traits": { - "smithy.api#documentation": "

The tags for the link.

" + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" } } - }, - "traits": { - "smithy.api#documentation": "

Describes a link.

" } }, - "com.amazonaws.networkmanager#LinkAssociation": { + "com.amazonaws.networkmanager#ListCoreNetworkPolicyVersionsResponse": { "type": "structure", "members": { - "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "CoreNetworkPolicyVersions": { + "target": "com.amazonaws.networkmanager#CoreNetworkPolicyVersionList", "traits": { - "smithy.api#documentation": "

The ID of the global network.

" + "smithy.api#documentation": "

Describes core network policy versions.

" } }, - "DeviceId": { - "target": "com.amazonaws.networkmanager#String", + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", "traits": { - "smithy.api#documentation": "

The device ID for the link association.

" + "smithy.api#documentation": "

The token for the next page of results.

" } + } + } + }, + "com.amazonaws.networkmanager#ListCoreNetworks": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#ListCoreNetworksRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#ListCoreNetworksResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" }, - "LinkId": { - "target": "com.amazonaws.networkmanager#String", + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of owned and shared core networks.

", + "smithy.api#http": { + "method": "GET", + "uri": "/core-networks", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.networkmanager#ListCoreNetworksRequest": { + "type": "structure", + "members": { + "MaxResults": { + "target": "com.amazonaws.networkmanager#MaxResults", "traits": { - "smithy.api#documentation": "

The ID of the link.

" + "smithy.api#documentation": "

The maximum number of results to return.

", + "smithy.api#httpQuery": "maxResults" } }, - "LinkAssociationState": { - "target": "com.amazonaws.networkmanager#LinkAssociationState", + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", "traits": { - "smithy.api#documentation": "

The state of the association.

" + "smithy.api#documentation": "

The token for the next page of results.

", + "smithy.api#httpQuery": "nextToken" } } - }, - "traits": { - "smithy.api#documentation": "

Describes the association between a device and a link.

" - } - }, - "com.amazonaws.networkmanager#LinkAssociationList": { - "type": "list", - "member": { - "target": "com.amazonaws.networkmanager#LinkAssociation" } }, - "com.amazonaws.networkmanager#LinkAssociationState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PENDING", - "name": "pending" - }, - { - "value": "AVAILABLE", - "name": "available" - }, - { - "value": "DELETING", - "name": "deleting" - }, - { - "value": "DELETED", - "name": "deleted" + "com.amazonaws.networkmanager#ListCoreNetworksResponse": { + "type": "structure", + "members": { + "CoreNetworks": { + "target": "com.amazonaws.networkmanager#CoreNetworkSummaryList", + "traits": { + "smithy.api#documentation": "

Describes the list of core networks.

" } - ] - } - }, - "com.amazonaws.networkmanager#LinkList": { - "type": "list", - "member": { - "target": "com.amazonaws.networkmanager#Link" - } - }, - "com.amazonaws.networkmanager#LinkState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PENDING", - "name": "pending" - }, - { - "value": "AVAILABLE", - "name": "available" - }, - { - "value": "DELETING", - "name": "deleting" - }, - { - "value": "UPDATING", - "name": "updating" + }, + "NextToken": { + "target": "com.amazonaws.networkmanager#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next page of results.

" } - ] + } } }, "com.amazonaws.networkmanager#ListTagsForResource": { @@ -3643,7 +6932,7 @@ "type": "structure", "members": { "ResourceArn": { - "target": "com.amazonaws.networkmanager#ResourceARN", + "target": "com.amazonaws.networkmanager#ResourceArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource.

", "smithy.api#httpLabel": {}, @@ -3667,19 +6956,19 @@ "type": "structure", "members": { "Address": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The physical address.

" } }, "Latitude": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The latitude.

" } }, "Longitude": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The longitude.

" } @@ -3690,6 +6979,12 @@ "smithy.api#sensitive": {} } }, + "com.amazonaws.networkmanager#Long": { + "type": "long", + "traits": { + "smithy.api#box": {} + } + }, "com.amazonaws.networkmanager#MaxResults": { "type": "integer", "traits": { @@ -3702,8 +6997,29 @@ }, "com.amazonaws.networkmanager#NetworkManager": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "NetworkManager", + "arnNamespace": "networkmanager", + "cloudFormationName": "NetworkManager", + "cloudTrailEventSource": "networkmanager.amazonaws.com", + "endpointPrefix": "networkmanager" + }, + "aws.auth#sigv4": { + "name": "networkmanager" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "

Transit Gateway Network Manager (Network Manager) enables you to create a global network, in which you can monitor your\n Amazon Web Services and on-premises networks that are built around transit gateways.

", + "smithy.api#title": "AWS Network Manager" + }, "version": "2019-07-05", "operations": [ + { + "target": "com.amazonaws.networkmanager#AcceptAttachment" + }, + { + "target": "com.amazonaws.networkmanager#AssociateConnectPeer" + }, { "target": "com.amazonaws.networkmanager#AssociateCustomerGateway" }, @@ -3713,9 +7029,18 @@ { "target": "com.amazonaws.networkmanager#AssociateTransitGatewayConnectPeer" }, + { + "target": "com.amazonaws.networkmanager#CreateConnectAttachment" + }, { "target": "com.amazonaws.networkmanager#CreateConnection" }, + { + "target": "com.amazonaws.networkmanager#CreateConnectPeer" + }, + { + "target": "com.amazonaws.networkmanager#CreateCoreNetwork" + }, { "target": "com.amazonaws.networkmanager#CreateDevice" }, @@ -3728,9 +7053,27 @@ { "target": "com.amazonaws.networkmanager#CreateSite" }, + { + "target": "com.amazonaws.networkmanager#CreateSiteToSiteVpnAttachment" + }, + { + "target": "com.amazonaws.networkmanager#CreateVpcAttachment" + }, + { + "target": "com.amazonaws.networkmanager#DeleteAttachment" + }, { "target": "com.amazonaws.networkmanager#DeleteConnection" }, + { + "target": "com.amazonaws.networkmanager#DeleteConnectPeer" + }, + { + "target": "com.amazonaws.networkmanager#DeleteCoreNetwork" + }, + { + "target": "com.amazonaws.networkmanager#DeleteCoreNetworkPolicyVersion" + }, { "target": "com.amazonaws.networkmanager#DeleteDevice" }, @@ -3740,6 +7083,9 @@ { "target": "com.amazonaws.networkmanager#DeleteLink" }, + { + "target": "com.amazonaws.networkmanager#DeleteResourcePolicy" + }, { "target": "com.amazonaws.networkmanager#DeleteSite" }, @@ -3749,6 +7095,9 @@ { "target": "com.amazonaws.networkmanager#DescribeGlobalNetworks" }, + { + "target": "com.amazonaws.networkmanager#DisassociateConnectPeer" + }, { "target": "com.amazonaws.networkmanager#DisassociateCustomerGateway" }, @@ -3758,9 +7107,30 @@ { "target": "com.amazonaws.networkmanager#DisassociateTransitGatewayConnectPeer" }, + { + "target": "com.amazonaws.networkmanager#ExecuteCoreNetworkChangeSet" + }, + { + "target": "com.amazonaws.networkmanager#GetConnectAttachment" + }, { "target": "com.amazonaws.networkmanager#GetConnections" }, + { + "target": "com.amazonaws.networkmanager#GetConnectPeer" + }, + { + "target": "com.amazonaws.networkmanager#GetConnectPeerAssociations" + }, + { + "target": "com.amazonaws.networkmanager#GetCoreNetwork" + }, + { + "target": "com.amazonaws.networkmanager#GetCoreNetworkChangeSet" + }, + { + "target": "com.amazonaws.networkmanager#GetCoreNetworkPolicy" + }, { "target": "com.amazonaws.networkmanager#GetCustomerGatewayAssociations" }, @@ -3788,24 +7158,57 @@ { "target": "com.amazonaws.networkmanager#GetNetworkTelemetry" }, + { + "target": "com.amazonaws.networkmanager#GetResourcePolicy" + }, { "target": "com.amazonaws.networkmanager#GetRouteAnalysis" }, { "target": "com.amazonaws.networkmanager#GetSites" }, + { + "target": "com.amazonaws.networkmanager#GetSiteToSiteVpnAttachment" + }, { "target": "com.amazonaws.networkmanager#GetTransitGatewayConnectPeerAssociations" }, { "target": "com.amazonaws.networkmanager#GetTransitGatewayRegistrations" }, + { + "target": "com.amazonaws.networkmanager#GetVpcAttachment" + }, + { + "target": "com.amazonaws.networkmanager#ListAttachments" + }, + { + "target": "com.amazonaws.networkmanager#ListConnectPeers" + }, + { + "target": "com.amazonaws.networkmanager#ListCoreNetworkPolicyVersions" + }, + { + "target": "com.amazonaws.networkmanager#ListCoreNetworks" + }, { "target": "com.amazonaws.networkmanager#ListTagsForResource" }, + { + "target": "com.amazonaws.networkmanager#PutCoreNetworkPolicy" + }, + { + "target": "com.amazonaws.networkmanager#PutResourcePolicy" + }, { "target": "com.amazonaws.networkmanager#RegisterTransitGateway" }, + { + "target": "com.amazonaws.networkmanager#RejectAttachment" + }, + { + "target": "com.amazonaws.networkmanager#RestoreCoreNetworkPolicyVersion" + }, { "target": "com.amazonaws.networkmanager#StartRouteAnalysis" }, @@ -3818,6 +7221,9 @@ { "target": "com.amazonaws.networkmanager#UpdateConnection" }, + { + "target": "com.amazonaws.networkmanager#UpdateCoreNetwork" + }, { "target": "com.amazonaws.networkmanager#UpdateDevice" }, @@ -3832,65 +7238,59 @@ }, { "target": "com.amazonaws.networkmanager#UpdateSite" - } - ], - "traits": { - "aws.api#service": { - "sdkId": "NetworkManager", - "arnNamespace": "networkmanager", - "cloudFormationName": "NetworkManager", - "cloudTrailEventSource": "networkmanager.amazonaws.com", - "endpointPrefix": "networkmanager" - }, - "aws.auth#sigv4": { - "name": "networkmanager" }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

Transit Gateway Network Manager (Network Manager) enables you to create a global network, in which you can monitor your\n Amazon Web Services and on-premises networks that are built around transit gateways.

", - "smithy.api#title": "AWS Network Manager" - } + { + "target": "com.amazonaws.networkmanager#UpdateVpcAttachment" + } + ] }, "com.amazonaws.networkmanager#NetworkResource": { "type": "structure", "members": { "RegisteredGatewayArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ResourceArn", "traits": { "smithy.api#documentation": "

The ARN of the gateway.

" } }, + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", + "traits": { + "smithy.api#documentation": "

a core network ID.

" + } + }, "AwsRegion": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ExternalRegionCode", "traits": { "smithy.api#documentation": "

The Amazon Web Services Region.

" } }, "AccountId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#AWSAccountId", "traits": { "smithy.api#documentation": "

The Amazon Web Services account ID.

" } }, "ResourceType": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The resource type.

\n

The following are the supported resource types for Direct Connect:

\n \n \n

The following are the supported resource types for Network Manager:

\n \n\n

The following are the supported resource types for Amazon VPC:

\n " } }, "ResourceId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The ID of the resource.

" } }, "ResourceArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ResourceArn", "traits": { "smithy.api#documentation": "

The ARN of the resource.

" } }, "Definition": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

Information about the resource, in JSON format. Network Manager gets this information by describing the resource using its Describe API call.

" } @@ -3922,7 +7322,7 @@ "type": "structure", "members": { "ResourceType": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The resource type.

" } @@ -3950,50 +7350,44 @@ "target": "com.amazonaws.networkmanager#NetworkResource" } }, - "com.amazonaws.networkmanager#NetworkResourceMetadataKey": { - "type": "string" - }, "com.amazonaws.networkmanager#NetworkResourceMetadataMap": { "type": "map", "key": { - "target": "com.amazonaws.networkmanager#NetworkResourceMetadataKey" + "target": "com.amazonaws.networkmanager#ConstrainedString" }, "value": { - "target": "com.amazonaws.networkmanager#NetworkResourceMetadataValue" + "target": "com.amazonaws.networkmanager#ConstrainedString" } }, - "com.amazonaws.networkmanager#NetworkResourceMetadataValue": { - "type": "string" - }, "com.amazonaws.networkmanager#NetworkResourceSummary": { "type": "structure", "members": { "RegisteredGatewayArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ResourceArn", "traits": { "smithy.api#documentation": "

The ARN of the gateway.

" } }, "ResourceArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ResourceArn", "traits": { "smithy.api#documentation": "

The ARN of the resource.

" } }, "ResourceType": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The resource type.

" } }, "Definition": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

Information about the resource, in JSON format. Network Manager gets this information by describing the resource using its Describe API call.

" } }, "NameTag": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The value for the Name tag.

" } @@ -4013,7 +7407,7 @@ "type": "structure", "members": { "DestinationCidrBlock": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

A unique identifier for the route, such as a CIDR block.

" } @@ -4025,7 +7419,7 @@ } }, "PrefixListId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The ID of the prefix list.

" } @@ -4050,20 +7444,38 @@ "com.amazonaws.networkmanager#NetworkRouteDestination": { "type": "structure", "members": { + "CoreNetworkAttachmentId": { + "target": "com.amazonaws.networkmanager#AttachmentId", + "traits": { + "smithy.api#documentation": "

The ID of a core network attachment.

" + } + }, "TransitGatewayAttachmentId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#TransitGatewayAttachmentId", "traits": { "smithy.api#documentation": "

The ID of the transit gateway attachment.

" } }, + "SegmentName": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The name of the segment.

" + } + }, + "EdgeLocation": { + "target": "com.amazonaws.networkmanager#ExternalRegionCode", + "traits": { + "smithy.api#documentation": "

The edge location for the network destination.

" + } + }, "ResourceType": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The resource type.

" } }, "ResourceId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The ID of the resource.

" } @@ -4089,43 +7501,49 @@ "type": "structure", "members": { "RegisteredGatewayArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ResourceArn", "traits": { "smithy.api#documentation": "

The ARN of the gateway.

" } }, + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of a core network.

" + } + }, "AwsRegion": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ExternalRegionCode", "traits": { "smithy.api#documentation": "

The Amazon Web Services Region.

" } }, "AccountId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#AWSAccountId", "traits": { "smithy.api#documentation": "

The Amazon Web Services account ID.

" } }, "ResourceType": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The resource type.

" } }, "ResourceId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The ID of the resource.

" } }, "ResourceArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ResourceArn", "traits": { "smithy.api#documentation": "

The ARN of the resource.

" } }, "Address": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The address.

" } @@ -4147,6 +7565,15 @@ "target": "com.amazonaws.networkmanager#NetworkTelemetry" } }, + "com.amazonaws.networkmanager#NextToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 2048 + } + } + }, "com.amazonaws.networkmanager#PathComponent": { "type": "structure", "members": { @@ -4163,7 +7590,7 @@ } }, "DestinationCidrBlock": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The destination CIDR block in the route table.

" } @@ -4179,6 +7606,183 @@ "target": "com.amazonaws.networkmanager#PathComponent" } }, + "com.amazonaws.networkmanager#ProposedSegmentChange": { + "type": "structure", + "members": { + "Tags": { + "target": "com.amazonaws.networkmanager#TagList", + "traits": { + "smithy.api#documentation": "

The key-value tags that changed for the segment.

" + } + }, + "AttachmentPolicyRuleNumber": { + "target": "com.amazonaws.networkmanager#Integer", + "traits": { + "smithy.api#documentation": "

The rule number in the policy document that applies to this change.

" + } + }, + "SegmentName": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The name of the segment to change.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes a proposed segment change. In some cases, the segment change must first be evaluated and accepted.

" + } + }, + "com.amazonaws.networkmanager#PutCoreNetworkPolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#PutCoreNetworkPolicyRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#PutCoreNetworkPolicyResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#CoreNetworkPolicyException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a new, immutable version of a core network policy. A subsequent change set is created showing the differences between the LIVE policy and the submitted policy.

", + "smithy.api#http": { + "method": "POST", + "uri": "/core-networks/{CoreNetworkId}/core-network-policy", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#PutCoreNetworkPolicyRequest": { + "type": "structure", + "members": { + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of a core network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "PolicyDocument": { + "target": "com.amazonaws.networkmanager#SynthesizedJsonCoreNetworkPolicyDocument", + "traits": { + "smithy.api#documentation": "

The policy document.

", + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

a core network policy description.

" + } + }, + "LatestVersionId": { + "target": "com.amazonaws.networkmanager#Integer", + "traits": { + "smithy.api#documentation": "

The ID of a core network policy.

" + } + }, + "ClientToken": { + "target": "com.amazonaws.networkmanager#ClientToken", + "traits": { + "smithy.api#documentation": "

The client token associated with the request.

", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.networkmanager#PutCoreNetworkPolicyResponse": { + "type": "structure", + "members": { + "CoreNetworkPolicy": { + "target": "com.amazonaws.networkmanager#CoreNetworkPolicy", + "traits": { + "smithy.api#documentation": "

Describes the changed core network policy.

" + } + } + } + }, + "com.amazonaws.networkmanager#PutResourcePolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#PutResourcePolicyRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#PutResourcePolicyResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates or updates a resource policy.

", + "smithy.api#http": { + "method": "POST", + "uri": "/resource-policy/{ResourceArn}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#PutResourcePolicyRequest": { + "type": "structure", + "members": { + "PolicyDocument": { + "target": "com.amazonaws.networkmanager#SynthesizedJsonResourcePolicyDocument", + "traits": { + "smithy.api#documentation": "

The JSON resource policy document.

", + "smithy.api#required": {} + } + }, + "ResourceArn": { + "target": "com.amazonaws.networkmanager#ResourceArn", + "traits": { + "smithy.api#documentation": "

The ARN of the resource policy.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#PutResourcePolicyResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.networkmanager#ReasonContextKey": { "type": "string" }, @@ -4235,7 +7839,7 @@ "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, @@ -4243,7 +7847,7 @@ } }, "TransitGatewayArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#TransitGatewayArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the transit gateway.

", "smithy.api#required": {} @@ -4262,17 +7866,78 @@ } } }, + "com.amazonaws.networkmanager#RejectAttachment": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#RejectAttachmentRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#RejectAttachmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Rejects a core network attachment request.

", + "smithy.api#http": { + "method": "POST", + "uri": "/attachments/{AttachmentId}/reject", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#RejectAttachmentRequest": { + "type": "structure", + "members": { + "AttachmentId": { + "target": "com.amazonaws.networkmanager#AttachmentId", + "traits": { + "smithy.api#documentation": "

The ID of the attachment.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#RejectAttachmentResponse": { + "type": "structure", + "members": { + "Attachment": { + "target": "com.amazonaws.networkmanager#Attachment", + "traits": { + "smithy.api#documentation": "

Describes the rejected attachment request.

" + } + } + } + }, "com.amazonaws.networkmanager#Relationship": { "type": "structure", "members": { "From": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The ARN of the resource.

" } }, "To": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The ARN of the resource.

" } @@ -4288,34 +7953,43 @@ "target": "com.amazonaws.networkmanager#Relationship" } }, - "com.amazonaws.networkmanager#ResourceARN": { - "type": "string" + "com.amazonaws.networkmanager#ResourceArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1500 + } + } }, "com.amazonaws.networkmanager#ResourceNotFoundException": { "type": "structure", "members": { "Message": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { "smithy.api#required": {} } }, "ResourceId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { "smithy.api#documentation": "

The ID of the resource.

", "smithy.api#required": {} } }, "ResourceType": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { "smithy.api#documentation": "

The resource type.

", "smithy.api#required": {} } }, "Context": { - "target": "com.amazonaws.networkmanager#ExceptionContextMap" + "target": "com.amazonaws.networkmanager#ExceptionContextMap", + "traits": { + "smithy.api#documentation": "

The specified resource could not be found.

" + } } }, "traits": { @@ -4324,6 +7998,75 @@ "smithy.api#httpError": 404 } }, + "com.amazonaws.networkmanager#RestoreCoreNetworkPolicyVersion": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#RestoreCoreNetworkPolicyVersionRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#RestoreCoreNetworkPolicyVersionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Restores a previous policy version as a new, immutable version of a core network policy. A subsequent change set is created showing the differences between the LIVE policy and restored policy.

", + "smithy.api#http": { + "method": "POST", + "uri": "/core-networks/{CoreNetworkId}/core-network-policy-versions/{PolicyVersionId}/restore", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#RestoreCoreNetworkPolicyVersionRequest": { + "type": "structure", + "members": { + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of a core network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "PolicyVersionId": { + "target": "com.amazonaws.networkmanager#Integer", + "traits": { + "smithy.api#documentation": "

The ID of the policy version to restore.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.networkmanager#RestoreCoreNetworkPolicyVersionResponse": { + "type": "structure", + "members": { + "CoreNetworkPolicy": { + "target": "com.amazonaws.networkmanager#CoreNetworkPolicy", + "traits": { + "smithy.api#documentation": "

Describes the restored core network policy.

" + } + } + } + }, "com.amazonaws.networkmanager#RetryAfterSeconds": { "type": "integer", "traits": { @@ -4334,19 +8077,19 @@ "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

" } }, "OwnerAccountId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#AWSAccountId", "traits": { "smithy.api#documentation": "

The ID of the AWS account that created the route analysis.

" } }, "RouteAnalysisId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The ID of the route analysis.

" } @@ -4500,19 +8243,19 @@ "type": "structure", "members": { "TransitGatewayAttachmentArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#TransitGatewayAttachmentArn", "traits": { "smithy.api#documentation": "

The ARN of the transit gateway attachment.

" } }, "TransitGatewayArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#TransitGatewayArn", "traits": { "smithy.api#documentation": "

The ARN of the transit gateway.

" } }, "IpAddress": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#IPAddress", "traits": { "smithy.api#documentation": "

The IP address.

" } @@ -4526,13 +8269,13 @@ "type": "structure", "members": { "TransitGatewayAttachmentArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#TransitGatewayAttachmentArn", "traits": { "smithy.api#documentation": "

The ARN of the transit gateway attachment.

" } }, "IpAddress": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#IPAddress", "traits": { "smithy.api#documentation": "

The IP address.

" } @@ -4606,10 +8349,16 @@ "type": "structure", "members": { "TransitGatewayRouteTableArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#TransitGatewayRouteTableArn", "traits": { "smithy.api#documentation": "

The ARN of the transit gateway route table.

" } + }, + "CoreNetworkSegmentEdge": { + "target": "com.amazonaws.networkmanager#CoreNetworkSegmentEdgeIdentifier", + "traits": { + "smithy.api#documentation": "

The segment edge in a core network.

" + } } }, "traits": { @@ -4623,6 +8372,10 @@ { "value": "TRANSIT_GATEWAY_ROUTE_TABLE", "name": "TRANSIT_GATEWAY_ROUTE_TABLE" + }, + { + "value": "CORE_NETWORK_SEGMENT", + "name": "CORE_NETWORK_SEGMENT" } ] } @@ -4648,37 +8401,40 @@ "target": "com.amazonaws.networkmanager#RouteType" } }, + "com.amazonaws.networkmanager#ServerSideString": { + "type": "string" + }, "com.amazonaws.networkmanager#ServiceQuotaExceededException": { "type": "structure", "members": { "Message": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { "smithy.api#documentation": "

The error message.

", "smithy.api#required": {} } }, "ResourceId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { "smithy.api#documentation": "

The ID of the resource.

" } }, "ResourceType": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { "smithy.api#documentation": "

The resource type.

" } }, "LimitCode": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { "smithy.api#documentation": "

The limit code.

", "smithy.api#required": {} } }, "ServiceCode": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { "smithy.api#documentation": "

The service code.

", "smithy.api#required": {} @@ -4695,25 +8451,25 @@ "type": "structure", "members": { "SiteId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#SiteId", "traits": { "smithy.api#documentation": "

The ID of the site.

" } }, "SiteArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#SiteArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the site.

" } }, "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

" } }, "Description": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The description of the site.

" } @@ -4747,6 +8503,30 @@ "smithy.api#documentation": "

Describes a site.

" } }, + "com.amazonaws.networkmanager#SiteArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + } + } + }, + "com.amazonaws.networkmanager#SiteId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.networkmanager#SiteIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#SiteId" + } + }, "com.amazonaws.networkmanager#SiteList": { "type": "list", "member": { @@ -4776,6 +8556,26 @@ ] } }, + "com.amazonaws.networkmanager#SiteToSiteVpnAttachment": { + "type": "structure", + "members": { + "Attachment": { + "target": "com.amazonaws.networkmanager#Attachment", + "traits": { + "smithy.api#documentation": "

Provides details about a site-to-site VPN attachment.

" + } + }, + "VpnConnectionArn": { + "target": "com.amazonaws.networkmanager#VpnConnectionArn", + "traits": { + "smithy.api#documentation": "

The ARN of the site-to-site VPN attachment.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Creates a site-to-site VPN attachment.

" + } + }, "com.amazonaws.networkmanager#StartRouteAnalysis": { "type": "operation", "input": { @@ -4817,7 +8617,7 @@ "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, @@ -4863,13 +8663,32 @@ } } }, - "com.amazonaws.networkmanager#String": { - "type": "string" + "com.amazonaws.networkmanager#SubnetArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + }, + "smithy.api#pattern": "^arn:[^:]{1,63}:ec2:[^:]{0,63}:[^:]{0,63}:subnet\\/subnet-[0-9a-f]{8,17}$" + } }, - "com.amazonaws.networkmanager#StringList": { + "com.amazonaws.networkmanager#SubnetArnList": { "type": "list", "member": { - "target": "com.amazonaws.networkmanager#String" + "target": "com.amazonaws.networkmanager#SubnetArn" + } + }, + "com.amazonaws.networkmanager#SynthesizedJsonCoreNetworkPolicyDocument": { + "type": "string", + "traits": { + "smithy.api#mediaType": "application/json" + } + }, + "com.amazonaws.networkmanager#SynthesizedJsonResourcePolicyDocument": { + "type": "string", + "traits": { + "smithy.api#mediaType": "application/json" } }, "com.amazonaws.networkmanager#Tag": { @@ -4951,7 +8770,7 @@ "type": "structure", "members": { "ResourceArn": { - "target": "com.amazonaws.networkmanager#ResourceARN", + "target": "com.amazonaws.networkmanager#ResourceArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource.

", "smithy.api#httpLabel": {}, @@ -4978,7 +8797,7 @@ "type": "structure", "members": { "Message": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { "smithy.api#required": {} } @@ -4997,29 +8816,77 @@ "smithy.api#httpError": 429 } }, + "com.amazonaws.networkmanager#TransitGatewayArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + } + } + }, + "com.amazonaws.networkmanager#TransitGatewayArnList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#TransitGatewayArn" + } + }, + "com.amazonaws.networkmanager#TransitGatewayAttachmentArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + } + } + }, + "com.amazonaws.networkmanager#TransitGatewayAttachmentId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.networkmanager#TransitGatewayConnectPeerArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + } + } + }, + "com.amazonaws.networkmanager#TransitGatewayConnectPeerArnList": { + "type": "list", + "member": { + "target": "com.amazonaws.networkmanager#TransitGatewayConnectPeerArn" + } + }, "com.amazonaws.networkmanager#TransitGatewayConnectPeerAssociation": { "type": "structure", "members": { "TransitGatewayConnectPeerArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#TransitGatewayConnectPeerArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the transit gateway Connect peer.

" } }, "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

" } }, "DeviceId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#DeviceId", "traits": { "smithy.api#documentation": "

The ID of the device.

" } }, "LinkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#LinkId", "traits": { "smithy.api#documentation": "

The ID of the link.

" } @@ -5068,13 +8935,13 @@ "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

" } }, "TransitGatewayArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#TransitGatewayArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the transit gateway.

" } @@ -5133,7 +9000,7 @@ } }, "Message": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The message for the state reason.

" } @@ -5143,6 +9010,26 @@ "smithy.api#documentation": "

Describes the status of a transit gateway registration.

" } }, + "com.amazonaws.networkmanager#TransitGatewayRouteTableArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + } + } + }, + "com.amazonaws.networkmanager#TunnelProtocol": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "GRE", + "name": "GRE" + } + ] + } + }, "com.amazonaws.networkmanager#UntagResource": { "type": "operation", "input": { @@ -5184,7 +9071,7 @@ "type": "structure", "members": { "ResourceArn": { - "target": "com.amazonaws.networkmanager#ResourceARN", + "target": "com.amazonaws.networkmanager#ResourceArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource.

", "smithy.api#httpLabel": {}, @@ -5246,7 +9133,7 @@ "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, @@ -5254,7 +9141,7 @@ } }, "ConnectionId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConnectionId", "traits": { "smithy.api#documentation": "

The ID of the connection.

", "smithy.api#httpLabel": {}, @@ -5262,19 +9149,19 @@ } }, "LinkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#LinkId", "traits": { "smithy.api#documentation": "

The ID of the link for the first device in the connection.

" } }, "ConnectedLinkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#LinkId", "traits": { "smithy.api#documentation": "

The ID of the link for the second device in the connection.

" } }, "Description": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

A description of the connection.

\n

Length Constraints: Maximum length of 256 characters.

" } @@ -5292,6 +9179,73 @@ } } }, + "com.amazonaws.networkmanager#UpdateCoreNetwork": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#UpdateCoreNetworkRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#UpdateCoreNetworkResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates the description of a core network.

", + "smithy.api#http": { + "method": "PATCH", + "uri": "/core-networks/{CoreNetworkId}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#UpdateCoreNetworkRequest": { + "type": "structure", + "members": { + "CoreNetworkId": { + "target": "com.amazonaws.networkmanager#CoreNetworkId", + "traits": { + "smithy.api#documentation": "

The ID of a core network.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "Description": { + "target": "com.amazonaws.networkmanager#ConstrainedString", + "traits": { + "smithy.api#documentation": "

The description of the update.

" + } + } + } + }, + "com.amazonaws.networkmanager#UpdateCoreNetworkResponse": { + "type": "structure", + "members": { + "CoreNetwork": { + "target": "com.amazonaws.networkmanager#CoreNetwork", + "traits": { + "smithy.api#documentation": "

Returns information about a core network update.

" + } + } + } + }, "com.amazonaws.networkmanager#UpdateDevice": { "type": "operation", "input": { @@ -5333,7 +9287,7 @@ "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, @@ -5341,7 +9295,7 @@ } }, "DeviceId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#DeviceId", "traits": { "smithy.api#documentation": "

The ID of the device.

", "smithy.api#httpLabel": {}, @@ -5355,31 +9309,31 @@ } }, "Description": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

A description of the device.

\n

Constraints: Maximum length of 256 characters.

" } }, "Type": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The type of the device.

" } }, "Vendor": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The vendor of the device.

\n

Constraints: Maximum length of 128 characters.

" } }, "Model": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The model of the device.

\n

Constraints: Maximum length of 128 characters.

" } }, "SerialNumber": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The serial number of the device.

\n

Constraints: Maximum length of 128 characters.

" } @@ -5388,7 +9342,7 @@ "target": "com.amazonaws.networkmanager#Location" }, "SiteId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#SiteId", "traits": { "smithy.api#documentation": "

The ID of the site.

" } @@ -5447,7 +9401,7 @@ "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of your global network.

", "smithy.api#httpLabel": {}, @@ -5455,7 +9409,7 @@ } }, "Description": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

A description of the global network.

\n

Constraints: Maximum length of 256 characters.

" } @@ -5517,7 +9471,7 @@ "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, @@ -5525,7 +9479,7 @@ } }, "LinkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#LinkId", "traits": { "smithy.api#documentation": "

The ID of the link.

", "smithy.api#httpLabel": {}, @@ -5533,13 +9487,13 @@ } }, "Description": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

A description of the link.

\n

Constraints: Maximum length of 256 characters.

" } }, "Type": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The type of the link.

\n

Constraints: Maximum length of 128 characters.

" } @@ -5551,7 +9505,7 @@ } }, "Provider": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

The provider of the link.

\n

Constraints: Maximum length of 128 characters.

" } @@ -5610,7 +9564,7 @@ "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, @@ -5618,7 +9572,7 @@ } }, "ResourceArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ResourceArn", "traits": { "smithy.api#documentation": "

The ARN of the resource.

", "smithy.api#httpLabel": {}, @@ -5638,7 +9592,7 @@ "type": "structure", "members": { "ResourceArn": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ResourceArn", "traits": { "smithy.api#documentation": "

The ARN of the resource.

" } @@ -5692,7 +9646,7 @@ "type": "structure", "members": { "GlobalNetworkId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#GlobalNetworkId", "traits": { "smithy.api#documentation": "

The ID of the global network.

", "smithy.api#httpLabel": {}, @@ -5700,7 +9654,7 @@ } }, "SiteId": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#SiteId", "traits": { "smithy.api#documentation": "

The ID of your site.

", "smithy.api#httpLabel": {}, @@ -5708,7 +9662,7 @@ } }, "Description": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ConstrainedString", "traits": { "smithy.api#documentation": "

A description of your site.

\n

Constraints: Maximum length of 256 characters.

" } @@ -5732,11 +9686,90 @@ } } }, + "com.amazonaws.networkmanager#UpdateVpcAttachment": { + "type": "operation", + "input": { + "target": "com.amazonaws.networkmanager#UpdateVpcAttachmentRequest" + }, + "output": { + "target": "com.amazonaws.networkmanager#UpdateVpcAttachmentResponse" + }, + "errors": [ + { + "target": "com.amazonaws.networkmanager#AccessDeniedException" + }, + { + "target": "com.amazonaws.networkmanager#ConflictException" + }, + { + "target": "com.amazonaws.networkmanager#InternalServerException" + }, + { + "target": "com.amazonaws.networkmanager#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.networkmanager#ThrottlingException" + }, + { + "target": "com.amazonaws.networkmanager#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates a VPC attachment.

", + "smithy.api#http": { + "method": "PATCH", + "uri": "/vpc-attachments/{AttachmentId}", + "code": 200 + } + } + }, + "com.amazonaws.networkmanager#UpdateVpcAttachmentRequest": { + "type": "structure", + "members": { + "AttachmentId": { + "target": "com.amazonaws.networkmanager#AttachmentId", + "traits": { + "smithy.api#documentation": "

The ID of the attachment.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "AddSubnetArns": { + "target": "com.amazonaws.networkmanager#SubnetArnList", + "traits": { + "smithy.api#documentation": "

Adds a subnet ARN to the VPC attachment.

" + } + }, + "RemoveSubnetArns": { + "target": "com.amazonaws.networkmanager#SubnetArnList", + "traits": { + "smithy.api#documentation": "

Removes a subnet ARN from the attachment.

" + } + }, + "Options": { + "target": "com.amazonaws.networkmanager#VpcOptions", + "traits": { + "smithy.api#documentation": "

Additional options for updating the VPC attachment.

" + } + } + } + }, + "com.amazonaws.networkmanager#UpdateVpcAttachmentResponse": { + "type": "structure", + "members": { + "VpcAttachment": { + "target": "com.amazonaws.networkmanager#VpcAttachment", + "traits": { + "smithy.api#documentation": "

Describes the updated VPC attachment.

" + } + } + } + }, "com.amazonaws.networkmanager#ValidationException": { "type": "structure", "members": { "Message": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { "smithy.api#required": {} } @@ -5764,14 +9797,14 @@ "type": "structure", "members": { "Name": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { "smithy.api#documentation": "

The name of the field.

", "smithy.api#required": {} } }, "Message": { - "target": "com.amazonaws.networkmanager#String", + "target": "com.amazonaws.networkmanager#ServerSideString", "traits": { "smithy.api#documentation": "

The message for the field.

", "smithy.api#required": {} @@ -5810,6 +9843,66 @@ } ] } + }, + "com.amazonaws.networkmanager#VpcArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + }, + "smithy.api#pattern": "^arn:[^:]{1,63}:ec2:[^:]{0,63}:[^:]{0,63}:vpc\\/vpc-[0-9a-f]{8,17}$" + } + }, + "com.amazonaws.networkmanager#VpcAttachment": { + "type": "structure", + "members": { + "Attachment": { + "target": "com.amazonaws.networkmanager#Attachment", + "traits": { + "smithy.api#documentation": "

Provides details about the VPC attachment.

" + } + }, + "SubnetArns": { + "target": "com.amazonaws.networkmanager#SubnetArnList", + "traits": { + "smithy.api#documentation": "

The subnet ARNs.

" + } + }, + "Options": { + "target": "com.amazonaws.networkmanager#VpcOptions", + "traits": { + "smithy.api#documentation": "

Provides details about the VPC attachment.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes a VPC attachment.

" + } + }, + "com.amazonaws.networkmanager#VpcOptions": { + "type": "structure", + "members": { + "Ipv6Support": { + "target": "com.amazonaws.networkmanager#Boolean", + "traits": { + "smithy.api#documentation": "

Indicates whether IPv6 is supported.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the VPC options.

" + } + }, + "com.amazonaws.networkmanager#VpnConnectionArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + }, + "smithy.api#pattern": "^arn:[^:]{1,63}:ec2:[^:]{0,63}:[^:]{0,63}:vpn-connection\\/vpn-[0-9a-f]{8,17}$" + } } } } diff --git a/codegen/sdk-codegen/aws-models/ram.2018-01-04.json b/codegen/sdk-codegen/aws-models/ram.2018-01-04.json index e1909d82ad4..2282a20f921 100644 --- a/codegen/sdk-codegen/aws-models/ram.2018-01-04.json +++ b/codegen/sdk-codegen/aws-models/ram.2018-01-04.json @@ -70,7 +70,7 @@ } ], "traits": { - "smithy.api#documentation": "

Accepts an invitation to a resource share from another Amazon Web Services account.

", + "smithy.api#documentation": "

Accepts an invitation to a resource share from another Amazon Web Services account. After you accept the\n invitation, the resources included in the resource share are available to interact with in the\n relevant Amazon Web Services Management Consoles and tools.

", "smithy.api#http": { "method": "POST", "uri": "/acceptresourceshareinvitation", @@ -84,14 +84,14 @@ "resourceShareInvitationArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the invitation.

", + "smithy.api#documentation": "

The Amazon Resoure Name (ARN) of the invitation that you want to accept.

", "smithy.api#required": {} } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

Specifies a unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. This lets you safely retry the request without\n accidentally performing the same operation a second time. Passing the same value to a\n later call to an operation requires that you also pass the same value for all other \n parameters. We recommend that you use a UUID type of \n value..

\n

If you don't provide this value, then Amazon Web Services generates a random one for\n you.

" } } } @@ -102,19 +102,34 @@ "resourceShareInvitation": { "target": "com.amazonaws.ram#ResourceShareInvitation", "traits": { - "smithy.api#documentation": "

Information about the invitation.

" + "smithy.api#documentation": "

An object that contains information about the specified invitation.

" } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

The idempotency identifier associated with this request. If you\n want to repeat the same operation in an idempotent manner then you must include this\n value in the clientToken request parameter of that later call. All other \n parameters must also have the same values that you used in the first call.

" } } } }, "com.amazonaws.ram#AmazonResourceSharing": { "type": "service", + "traits": { + "aws.api#service": { + "sdkId": "RAM", + "arnNamespace": "ram", + "cloudFormationName": "RAM", + "cloudTrailEventSource": "ram.amazonaws.com", + "endpointPrefix": "ram" + }, + "aws.auth#sigv4": { + "name": "ram" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "

This is the Resource Access Manager API Reference. This documentation provides\n descriptions and syntax for each of the actions and data types in RAM. RAM is a\n service that helps you securely share your Amazon Web Services resources across Amazon Web Services accounts. If you\n have multiple Amazon Web Services accounts, you can use RAM to share those resources with other\n accounts. If you use Organizations to manage your accounts, then you share your resources\n with your organization or organizational units (OUs). For supported resource types, you\n can also share resources with individual Identity and Access Management (IAM) roles an users.

\n \n

To learn more about RAM, see the following resources:

\n ", + "smithy.api#title": "AWS Resource Access Manager" + }, "version": "2018-01-04", "operations": [ { @@ -189,22 +204,7 @@ { "target": "com.amazonaws.ram#UpdateResourceShare" } - ], - "traits": { - "aws.api#service": { - "sdkId": "RAM", - "arnNamespace": "ram", - "cloudFormationName": "RAM", - "cloudTrailEventSource": "ram.amazonaws.com", - "endpointPrefix": "ram" - }, - "aws.auth#sigv4": { - "name": "ram" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

This is the Resource Access Manager API Reference. This documentation provides\n descriptions and syntax for each of the actions and data types in RAM. RAM is a\n service that helps you securely share your Amazon Web Services resources across Amazon Web Services accounts and\n within your organization or organizational units (OUs) in Organizations. For supported\n resource types, you can also share resources with IAM roles and IAM users. If you have\n multiple Amazon Web Services accounts, you can use RAM to share those resources with other\n accounts.

\n\n

To learn more about RAM, see the following resources:

\n\n ", - "smithy.api#title": "AWS Resource Access Manager" - } + ] }, "com.amazonaws.ram#AssociateResourceShare": { "type": "operation", @@ -242,12 +242,15 @@ { "target": "com.amazonaws.ram#ServiceUnavailableException" }, + { + "target": "com.amazonaws.ram#ThrottlingException" + }, { "target": "com.amazonaws.ram#UnknownResourceException" } ], "traits": { - "smithy.api#documentation": "

Associates the specified resource share with the specified principals and resources.

", + "smithy.api#documentation": "

Adds the specified list of principals and list of resources to a resource share. Principals that\n already have access to this resource share immediately receive access to the added resources.\n Newly added principals immediately receive access to the resources shared in this resource share.

", "smithy.api#http": { "method": "POST", "uri": "/associateresourceshare", @@ -287,7 +290,7 @@ } ], "traits": { - "smithy.api#documentation": "

Associates a permission with a resource share.

", + "smithy.api#documentation": "

Adds or replaces the RAM permission for a resource type included in a resource share. You can\n have exactly one permission associated with each resource type in the resource share. You can add\n a new RAM permission only if there are currently no resources of that resource type\n currently in the resource share.

", "smithy.api#http": { "method": "POST", "uri": "/associateresourcesharepermission", @@ -301,33 +304,33 @@ "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share.

", + "smithy.api#documentation": "

Specifies the Amazon Resoure Name (ARN) of the resource share to which you want to add or replace\n permissions.

", "smithy.api#required": {} } }, "permissionArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the RAM permission to associate with the\n resource share.

", + "smithy.api#documentation": "

Specifies the Amazon Resoure Name (ARN) of the RAM permission to associate with the resource share.\n To find the ARN for a permission, use either the ListPermissions operation or go to the Permissions library page in the RAM console and \n then choose the name of the permission. The ARN is displayed on the detail page.

", "smithy.api#required": {} } }, "replace": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether the permission should replace the permissions that are currently\n associated with the resource share. Use true to replace the current permissions. Use\n false to add the permission to the current permission.

" + "smithy.api#documentation": "

Specifies whether the specified permission should replace or add to the existing\n permission associated with the resource share. Use true to replace the current\n permissions. Use false to add the permission to the current permission. The\n default value is false.

\n \n

A resource share can have only one permission per resource type. If a resource share already has a\n permission for the specified resource type and you don't set replace to\n true then the operation returns an error. This helps prevent\n accidental overwriting of a permission.

\n
" } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

Specifies a unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. This lets you safely retry the request without\n accidentally performing the same operation a second time. Passing the same value to a\n later call to an operation requires that you also pass the same value for all other \n parameters. We recommend that you use a UUID type of \n value..

\n

If you don't provide this value, then Amazon Web Services generates a random one for\n you.

" } }, "permissionVersion": { "target": "com.amazonaws.ram#Integer", "traits": { - "smithy.api#documentation": "

The version of the RAM permissions to associate with the resource share.

" + "smithy.api#documentation": "

Specifies the version of the RAM permission to associate with the resource share. If you don't\n specify this parameter, the operation uses the version designated as the default.

" } } } @@ -338,13 +341,13 @@ "returnValue": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether the request succeeded.

" + "smithy.api#documentation": "

A return value of true indicates that the request succeeded. \n A value of false indicates that the request failed.

" } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

The idempotency identifier associated with this request. If you\n want to repeat the same operation in an idempotent manner then you must include this\n value in the clientToken request parameter of that later call. All other \n parameters must also have the same values that you used in the first call.

" } } } @@ -355,26 +358,26 @@ "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share.

", + "smithy.api#documentation": "

Specifies the Amazon Resoure Name (ARN) of the resource share that you want to add principals or resources\n to.

", "smithy.api#required": {} } }, "resourceArns": { "target": "com.amazonaws.ram#ResourceArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the resources.

" + "smithy.api#documentation": "

Specifies a list of Amazon Resource Names (ARNs) of the resources that you want to share. This can be\n null if you want to add only principals.

" } }, "principals": { "target": "com.amazonaws.ram#PrincipalArnOrIdList", "traits": { - "smithy.api#documentation": "

The principals to associate with the resource share. The possible values are:

\n \n \n

Not all resource types can be shared with IAM roles and IAM users. For more\n information, see Sharing with IAM roles and IAM users in the Resource Access Manager User\n Guide.

\n
" + "smithy.api#documentation": "

Specifies a list of principals to whom you want to the resource share. This can be\n null if you want to add only resources.

\n

What the principals can do with the resources in the share is determined by the RAM\n permissions that you associate with the resource share. See AssociateResourceSharePermission.

\n

You can include the following values:

\n \n \n

Not all resource types can be shared with IAM roles and users. \n For more information, see Sharing with IAM roles and users in the Resource Access Manager User\n Guide.

\n
" } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

Specifies a unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. This lets you safely retry the request without\n accidentally performing the same operation a second time. Passing the same value to a\n later call to an operation requires that you also pass the same value for all other \n parameters. We recommend that you use a UUID type of \n value..

\n

If you don't provide this value, then Amazon Web Services generates a random one for\n you.

" } } } @@ -385,13 +388,13 @@ "resourceShareAssociations": { "target": "com.amazonaws.ram#ResourceShareAssociationList", "traits": { - "smithy.api#documentation": "

Information about the associations.

" + "smithy.api#documentation": "

An array of objects that contain information about the associations.

" } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

The idempotency identifier associated with this request. If you\n want to repeat the same operation in an idempotent manner then you must include this\n value in the clientToken request parameter of that later call. All other \n parameters must also have the same values that you used in the first call.

" } } } @@ -446,7 +449,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a resource share. You must provide a list of the Amazon Resource Names (ARNs) for the\n resources you want to share. You must also specify who you want to share the resources\n with, and the permissions that you grant them.

\n \n

Sharing a resource makes it available for use by principals outside of the\n Amazon Web Services account that created the resource. Sharing doesn't change any permissions or\n quotas that apply to the resource in the account that created it.

\n
", + "smithy.api#documentation": "

Creates a resource share. You can provide a list of the Amazon Resource Names (ARNs) for the resources that you\n want to share, a list of principals you want to share the resources with, and the\n permissions to grant those principals.

\n \n

Sharing a resource makes it available for use by principals outside of the\n Amazon Web Services account that created the resource. Sharing doesn't change any permissions or\n quotas that apply to the resource in the account that created it.

\n
", "smithy.api#http": { "method": "POST", "uri": "/createresourceshare", @@ -460,44 +463,44 @@ "name": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The name of the resource share.

", + "smithy.api#documentation": "

Specifies the name of the resource share.

", "smithy.api#required": {} } }, "resourceArns": { "target": "com.amazonaws.ram#ResourceArnList", "traits": { - "smithy.api#documentation": "

The ARNs of the resources to associate with the resource share.

" + "smithy.api#documentation": "

Specifies a list of one or more ARNs of the resources to associate with the\n resource share.

" } }, "principals": { "target": "com.amazonaws.ram#PrincipalArnOrIdList", "traits": { - "smithy.api#documentation": "

The principals to associate with the resource share. The possible values are:

\n \n \n

Not all resource types can be shared with IAM roles and IAM users. For more\n information, see Sharing with IAM roles and IAM users in the Resource Access Manager User\n Guide.

\n
" + "smithy.api#documentation": "

Specifies a list of one or more principals to associate with the resource share.

\n

You can include the following values:

\n \n \n

Not all resource types can be shared with IAM roles and users. \n For more information, see Sharing with IAM roles and users in the Resource Access Manager User\n Guide.

\n
" } }, "tags": { "target": "com.amazonaws.ram#TagList", "traits": { - "smithy.api#documentation": "

One or more tags.

" + "smithy.api#documentation": "

Specifies one or more tags to attach to the resource share itself. It doesn't attach the tags to\n the resources associated with the resource share.

" } }, "allowExternalPrincipals": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether principals outside your organization in Organizations can be associated\n with a resource share.

" + "smithy.api#documentation": "

Specifies whether principals outside your organization in Organizations can be associated\n with a resource share. A value of true lets you share with individual Amazon Web Services accounts\n that are not in your organization. A value of false\n only has meaning if your account is a member of an Amazon Web Services Organization. The default value\n is true.

" } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

Specifies a unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. This lets you safely retry the request without\n accidentally performing the same operation a second time. Passing the same value to a\n later call to an operation requires that you also pass the same value for all other \n parameters. We recommend that you use a UUID type of \n value..

\n

If you don't provide this value, then Amazon Web Services generates a random one for\n you.

" } }, "permissionArns": { "target": "com.amazonaws.ram#PermissionArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the permissions to associate with the resource share. If you\n do not specify an ARN for the permission, RAM automatically attaches the default\n version of the permission for each resource type. Only one permission can be associated\n with each resource type in a resource share.

" + "smithy.api#documentation": "

Specifies the Amazon Resource Names (ARNs) of the RAM permission to associate with the resource share. If you do\n not specify an ARN for the permission, RAM automatically attaches the default version\n of the permission for each resource type. You can associate only one permission with\n each resource type included in the resource share.

" } } } @@ -508,13 +511,13 @@ "resourceShare": { "target": "com.amazonaws.ram#ResourceShare", "traits": { - "smithy.api#documentation": "

Information about the resource share.

" + "smithy.api#documentation": "

An object with information about the new resource share.

" } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

The idempotency identifier associated with this request. If you\n want to repeat the same operation in an idempotent manner then you must include this\n value in the clientToken request parameter of that later call. All other \n parameters must also have the same values that you used in the first call.

" } } } @@ -560,7 +563,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified resource share.

", + "smithy.api#documentation": "

Deletes the specified resource share. This doesn't delete any of the resources that were\n associated with the resource share; it only stops the sharing of those resources outside of the\n Amazon Web Services account that created them.

", "smithy.api#http": { "method": "DELETE", "uri": "/deleteresourceshare", @@ -574,7 +577,7 @@ "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share.

", + "smithy.api#documentation": "

Specifies the Amazon Resoure Name (ARN) of the resource share to delete.

", "smithy.api#httpQuery": "resourceShareArn", "smithy.api#required": {} } @@ -582,7 +585,7 @@ "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

", + "smithy.api#documentation": "

Specifies a unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. This lets you safely retry the request without\n accidentally performing the same operation a second time. Passing the same value to a\n later call to an operation requires that you also pass the same value for all other \n parameters. We recommend that you use a UUID type of \n value..

\n

If you don't provide this value, then Amazon Web Services generates a random one for\n you.

", "smithy.api#httpQuery": "clientToken" } } @@ -594,14 +597,14 @@ "returnValue": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether the request succeeded.

", + "smithy.api#documentation": "

A return value of true indicates that the request succeeded. \n A value of false indicates that the request failed.

", "smithy.api#xmlName": "return" } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

The idempotency identifier associated with this request. If you\n want to repeat the same operation in an idempotent manner then you must include this\n value in the clientToken request parameter of that later call. All other \n parameters must also have the same values that you used in the first call.

" } } } @@ -690,7 +693,7 @@ } ], "traits": { - "smithy.api#documentation": "

Disassociates an RAM permission from a resource share.

", + "smithy.api#documentation": "

Disassociates an RAM permission from a resource share. Permission changes take effect\n immediately. You can remove a RAM permission from a resource share only if there are currently\n no resources of the relevant resource type currently attached to the resource share.

", "smithy.api#http": { "method": "POST", "uri": "/disassociateresourcesharepermission", @@ -704,21 +707,21 @@ "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share.

", + "smithy.api#documentation": "

The Amazon Resoure Name (ARN) of the resource share from which you want to disassociate a permission.

", "smithy.api#required": {} } }, "permissionArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the permission to disassociate from the resource share.

", + "smithy.api#documentation": "

The Amazon Resoure Name (ARN) of the permission to disassociate from the resource share. Changes to permissions\n take effect immediately.

", "smithy.api#required": {} } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

Specifies a unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. This lets you safely retry the request without\n accidentally performing the same operation a second time. Passing the same value to a\n later call to an operation requires that you also pass the same value for all other \n parameters. We recommend that you use a UUID type of \n value..

\n

If you don't provide this value, then Amazon Web Services generates a random one for\n you.

" } } } @@ -729,13 +732,13 @@ "returnValue": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether the request succeeded.

" + "smithy.api#documentation": "

A return value of true indicates that the request succeeded. \n A value of false indicates that the request failed.

" } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

The idempotency identifier associated with this request. If you\n want to repeat the same operation in an idempotent manner then you must include this\n value in the clientToken request parameter of that later call. All other \n parameters must also have the same values that you used in the first call.

" } } } @@ -746,26 +749,26 @@ "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share.

", + "smithy.api#documentation": "

Specifies Amazon Resoure Name (ARN) of the resource share that you want to remove resources from.

", "smithy.api#required": {} } }, "resourceArns": { "target": "com.amazonaws.ram#ResourceArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the resources.

" + "smithy.api#documentation": "

Specifies a list of Amazon Resource Names (ARNs) for one or more resources that you want to remove from\n the resource share. After the operation runs, these resources are no longer shared with principals\n outside of the Amazon Web Services account that created the resources.

" } }, "principals": { "target": "com.amazonaws.ram#PrincipalArnOrIdList", "traits": { - "smithy.api#documentation": "

The principals.

" + "smithy.api#documentation": "

Specifies a list of one or more principals that no longer are to have access to the\n resources in this resource share.

\n

You can include the following values:

\n \n \n

Not all resource types can be shared with IAM roles and users. \n For more information, see Sharing with IAM roles and users in the Resource Access Manager User\n Guide.

\n
" } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

Specifies a unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. This lets you safely retry the request without\n accidentally performing the same operation a second time. Passing the same value to a\n later call to an operation requires that you also pass the same value for all other \n parameters. We recommend that you use a UUID type of \n value..

\n

If you don't provide this value, then Amazon Web Services generates a random one for\n you.

" } } } @@ -776,13 +779,13 @@ "resourceShareAssociations": { "target": "com.amazonaws.ram#ResourceShareAssociationList", "traits": { - "smithy.api#documentation": "

Information about the associations.

" + "smithy.api#documentation": "

An array of objects that contain information about the updated associations for this\n resource share.

" } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

The idempotency identifier associated with this request. If you\n want to repeat the same operation in an idempotent manner then you must include this\n value in the clientToken request parameter of that later call. All other \n parameters must also have the same values that you used in the first call.

" } } } @@ -807,7 +810,7 @@ } ], "traits": { - "smithy.api#documentation": "

Enables resource sharing within your organization in Organizations.

\n

The caller must be the master account for the organization.

", + "smithy.api#documentation": "

Enables resource sharing within your organization in Organizations. Calling this operation\n enables RAM to retrieve information about the organization and its structure. This\n lets you share resources with all of the accounts in an organization by specifying the\n organization's ID, or all of the accounts in an organizational unit (OU) by specifying\n the OU's ID. Until you enable sharing within the organization, you can specify only\n individual Amazon Web Services accounts, or for supported resource types, IAM users and\n roles.

\n

You must call this operation from an IAM user or role in the organization's\n management account.

", "smithy.api#http": { "method": "POST", "uri": "/enablesharingwithawsorganization", @@ -825,7 +828,7 @@ "returnValue": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether the request succeeded.

", + "smithy.api#documentation": "

A return value of true indicates that the request succeeded. \n A value of false indicates that the request failed.

", "smithy.api#xmlName": "return" } } @@ -874,14 +877,14 @@ "permissionArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the permission.

", + "smithy.api#documentation": "

Specifies the Amazon Resoure Name (ARN) of the permission whose contents you want to retrieve.\n To find the ARN for a permission, use either the ListPermissions operation or go to the Permissions library page in the RAM console and \n then choose the name of the permission. The ARN is displayed on the detail page.

", "smithy.api#required": {} } }, "permissionVersion": { "target": "com.amazonaws.ram#Integer", "traits": { - "smithy.api#documentation": "

The identifier for the version of the permission.

" + "smithy.api#documentation": "

Specifies identifier for the version of the RAM permission to retrieve. If you don't\n specify this parameter, the operation retrieves the default version.

" } } } @@ -892,7 +895,7 @@ "permission": { "target": "com.amazonaws.ram#ResourceSharePermissionDetail", "traits": { - "smithy.api#documentation": "

Information about the permission.

" + "smithy.api#documentation": "

An object that contains information about the permission.

" } } } @@ -926,7 +929,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the policies for the specified resources that you own and have shared.

", + "smithy.api#documentation": "

Retrieves the resource policies for the specified resources that you own and have\n shared.

", "smithy.api#http": { "method": "POST", "uri": "/getresourcepolicies", @@ -945,26 +948,26 @@ "resourceArns": { "target": "com.amazonaws.ram#ResourceArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the resources.

", + "smithy.api#documentation": "

Specifies the Amazon Resource Names (ARNs) of the resources whose policies you want to retrieve.

", "smithy.api#required": {} } }, "principal": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The principal.

" + "smithy.api#documentation": "

Specifies the principal.

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Specifies that you want to receive the next page of results. Valid \n only if you received a NextToken response in the previous request. If you\n did, it indicates that more output is available. Set this parameter to the value \n provided by the previous call's NextToken response to request the \n next page of results.

" } }, "maxResults": { "target": "com.amazonaws.ram#MaxResults", "traits": { - "smithy.api#documentation": "

The maximum number of results to return with a single call.\n To retrieve the remaining results, make another call with the returned nextToken value.

" + "smithy.api#documentation": "

Specifies the total number of results that you want included on each page \n of the response. If you do not include this parameter, it defaults to a value that is \n specific to the operation. If additional items exist beyond the number you specify, the\n NextToken response element is returned with a value (not null).\n Include the specified value as the NextToken request parameter in the next \n call to the operation to get the next part of the results. Note that the service might \n return fewer results than the maximum even when there are more results available. You \n should check NextToken after every operation to ensure that you receive all\n of the results.

" } } } @@ -975,13 +978,13 @@ "policies": { "target": "com.amazonaws.ram#PolicyList", "traits": { - "smithy.api#documentation": "

A key policy document, in JSON format.

" + "smithy.api#documentation": "

An array of resource policy documents in JSON format.

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

" + "smithy.api#documentation": "

If present, this value indicates that more output is available than \n is included in the current response. Use this value in the NextToken \n request parameter in a subsequent call to the operation to get the next part of the \n output. You should repeat this until the NextToken response element comes \n back as null. This indicates that this is the last page of results.

" } } } @@ -1018,7 +1021,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the resources or principals for the resource shares that you own.

", + "smithy.api#documentation": "

Retrieves the resource and principal associations for resource shares that you own.

", "smithy.api#http": { "method": "POST", "uri": "/getresourceshareassociations", @@ -1037,44 +1040,44 @@ "associationType": { "target": "com.amazonaws.ram#ResourceShareAssociationType", "traits": { - "smithy.api#documentation": "

The association type. Specify PRINCIPAL to list the principals that are\n associated with the specified resource share. Specify RESOURCE to list the resources\n that are associated with the specified resource share.

", + "smithy.api#documentation": "

Specifies whether you want to retrieve the associations that involve a specified\n resource or principal.

\n ", "smithy.api#required": {} } }, "resourceShareArns": { "target": "com.amazonaws.ram#ResourceShareArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARN) of the resource shares.

" + "smithy.api#documentation": "

Specifies a list of Amazon Resource Names (ARNs) of the resource share whose associations you want to\n retrieve.

" } }, "resourceArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource. You cannot specify this parameter if\n the association type is PRINCIPAL.

" + "smithy.api#documentation": "

Specifies the Amazon Resoure Name (ARN) of the resource whose resource shares you want to retrieve.

\n

You cannot specify this parameter if the association type is\n PRINCIPAL.

" } }, "principal": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The principal. You cannot specify this parameter if the association type is\n RESOURCE.

" + "smithy.api#documentation": "

Specifies the ID of the principal whose resource shares you want to retrieve. This can be an\n Amazon Web Services account ID, an organization ID, an organizational unit ID, or the Amazon Resoure Name (ARN) of an\n individual IAM user or role.

\n

You cannot specify this parameter if the association type is\n RESOURCE.

" } }, "associationStatus": { "target": "com.amazonaws.ram#ResourceShareAssociationStatus", "traits": { - "smithy.api#documentation": "

The association status.

" + "smithy.api#documentation": "

Specifies that you want to retrieve only associations with this status.

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Specifies that you want to receive the next page of results. Valid \n only if you received a NextToken response in the previous request. If you\n did, it indicates that more output is available. Set this parameter to the value \n provided by the previous call's NextToken response to request the \n next page of results.

" } }, "maxResults": { "target": "com.amazonaws.ram#MaxResults", "traits": { - "smithy.api#documentation": "

The maximum number of results to return with a single call.\n To retrieve the remaining results, make another call with the returned nextToken value.

" + "smithy.api#documentation": "

Specifies the total number of results that you want included on each page \n of the response. If you do not include this parameter, it defaults to a value that is \n specific to the operation. If additional items exist beyond the number you specify, the\n NextToken response element is returned with a value (not null).\n Include the specified value as the NextToken request parameter in the next \n call to the operation to get the next part of the results. Note that the service might \n return fewer results than the maximum even when there are more results available. You \n should check NextToken after every operation to ensure that you receive all\n of the results.

" } } } @@ -1085,13 +1088,13 @@ "resourceShareAssociations": { "target": "com.amazonaws.ram#ResourceShareAssociationList", "traits": { - "smithy.api#documentation": "

Information about the associations.

" + "smithy.api#documentation": "

An array of objects that contain the details about the associations.

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

" + "smithy.api#documentation": "

If present, this value indicates that more output is available than \n is included in the current response. Use this value in the NextToken \n request parameter in a subsequent call to the operation to get the next part of the \n output. You should repeat this until the NextToken response element comes \n back as null. This indicates that this is the last page of results.

" } } } @@ -1131,7 +1134,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the invitations that you have received for resource shares.

", + "smithy.api#documentation": "

Retrieves details about invitations that you have received for resource shares.

", "smithy.api#http": { "method": "POST", "uri": "/getresourceshareinvitations", @@ -1150,25 +1153,25 @@ "resourceShareInvitationArns": { "target": "com.amazonaws.ram#ResourceShareInvitationArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARN) of the invitations.

" + "smithy.api#documentation": "

Specifies the Amazon Resource Names (ARNs) of the resource share invitations you want information about.

" } }, "resourceShareArns": { "target": "com.amazonaws.ram#ResourceShareArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARN) of the resource shares.

" + "smithy.api#documentation": "

Specifies that you want details about invitations only for the resource shares described by this\n list of Amazon Resource Names (ARNs)\n

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Specifies that you want to receive the next page of results. Valid \n only if you received a NextToken response in the previous request. If you\n did, it indicates that more output is available. Set this parameter to the value \n provided by the previous call's NextToken response to request the \n next page of results.

" } }, "maxResults": { "target": "com.amazonaws.ram#MaxResults", "traits": { - "smithy.api#documentation": "

The maximum number of results to return with a single call.\n To retrieve the remaining results, make another call with the returned nextToken value.

" + "smithy.api#documentation": "

Specifies the total number of results that you want included on each page \n of the response. If you do not include this parameter, it defaults to a value that is \n specific to the operation. If additional items exist beyond the number you specify, the\n NextToken response element is returned with a value (not null).\n Include the specified value as the NextToken request parameter in the next \n call to the operation to get the next part of the results. Note that the service might \n return fewer results than the maximum even when there are more results available. You \n should check NextToken after every operation to ensure that you receive all\n of the results.

" } } } @@ -1179,13 +1182,13 @@ "resourceShareInvitations": { "target": "com.amazonaws.ram#ResourceShareInvitationList", "traits": { - "smithy.api#documentation": "

Information about the invitations.

" + "smithy.api#documentation": "

An array of objects that contain the details about the invitations.

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

" + "smithy.api#documentation": "

If present, this value indicates that more output is available than \n is included in the current response. Use this value in the NextToken \n request parameter in a subsequent call to the operation to get the next part of the \n output. You should repeat this until the NextToken response element comes \n back as null. This indicates that this is the last page of results.

" } } } @@ -1219,7 +1222,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the resource shares that you own or the resource shares that are shared with you.

", + "smithy.api#documentation": "

Retrieves details about the resource shares that you own or that are shared with you.

", "smithy.api#http": { "method": "POST", "uri": "/getresourceshares", @@ -1238,50 +1241,50 @@ "resourceShareArns": { "target": "com.amazonaws.ram#ResourceShareArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the resource shares.

" + "smithy.api#documentation": "

Specifies the Amazon Resource Names (ARNs) of individual resource shares that you want information about.

" } }, "resourceShareStatus": { "target": "com.amazonaws.ram#ResourceShareStatus", "traits": { - "smithy.api#documentation": "

The status of the resource share.

" + "smithy.api#documentation": "

Specifies that you want to retrieve details of only those resource shares that have this\n status.

" } }, "resourceOwner": { "target": "com.amazonaws.ram#ResourceOwner", "traits": { - "smithy.api#documentation": "

The type of owner.

", + "smithy.api#documentation": "

Specifies that you want to retrieve details of only those resource shares that match the\n following:

\n ", "smithy.api#required": {} } }, "name": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The name of the resource share.

" + "smithy.api#documentation": "

Specifies the name of an individual resource share that you want to retrieve details\n about.

" } }, "tagFilters": { "target": "com.amazonaws.ram#TagFilters", "traits": { - "smithy.api#documentation": "

One or more tag filters.

" + "smithy.api#documentation": "

Specifies that you want to retrieve details of only those resource shares that match the\n specified tag keys and values.

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Specifies that you want to receive the next page of results. Valid \n only if you received a NextToken response in the previous request. If you\n did, it indicates that more output is available. Set this parameter to the value \n provided by the previous call's NextToken response to request the \n next page of results.

" } }, "maxResults": { "target": "com.amazonaws.ram#MaxResults", "traits": { - "smithy.api#documentation": "

The maximum number of results to return with a single call.\n To retrieve the remaining results, make another call with the returned nextToken value.

" + "smithy.api#documentation": "

Specifies the total number of results that you want included on each page \n of the response. If you do not include this parameter, it defaults to a value that is \n specific to the operation. If additional items exist beyond the number you specify, the\n NextToken response element is returned with a value (not null).\n Include the specified value as the NextToken request parameter in the next \n call to the operation to get the next part of the results. Note that the service might \n return fewer results than the maximum even when there are more results available. You \n should check NextToken after every operation to ensure that you receive all\n of the results.

" } }, "permissionArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the RAM permission that is associated with the\n resource share.

" + "smithy.api#documentation": "

Specifies that you want to retrieve details of only those resource shares that use the RAM\n permission with this Amazon Resoure Name (ARN).

" } } } @@ -1292,13 +1295,13 @@ "resourceShares": { "target": "com.amazonaws.ram#ResourceShareList", "traits": { - "smithy.api#documentation": "

Information about the resource shares.

" + "smithy.api#documentation": "

An array of objects that contain the information about the resource shares.

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

" + "smithy.api#documentation": "

If present, this value indicates that more output is available than \n is included in the current response. Use this value in the NextToken \n request parameter in a subsequent call to the operation to get the next part of the \n output. You should repeat this until the NextToken response element comes \n back as null. This indicates that this is the last page of results.

" } } } @@ -1318,7 +1321,7 @@ "code": "IdempotentParameterMismatch", "httpResponseCode": 400 }, - "smithy.api#documentation": "

A client token input parameter was reused with an operation, but at least one of the\n other input parameters is different from the previous call to the operation.

", + "smithy.api#documentation": "

The client token input parameter was matched one used with a previous call to the\n operation, but at least one of the other input parameters is different from the previous\n call.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -1344,7 +1347,7 @@ "code": "InvalidClientToken", "httpResponseCode": 400 }, - "smithy.api#documentation": "

A client token is not valid.

", + "smithy.api#documentation": "

The client token is not valid.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -1364,7 +1367,7 @@ "code": "InvalidMaxResults", "httpResponseCode": 400 }, - "smithy.api#documentation": "

The specified value for MaxResults is not valid.

", + "smithy.api#documentation": "

The specified value for MaxResults is not valid.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -1384,7 +1387,7 @@ "code": "InvalidNextToken", "httpResponseCode": 400 }, - "smithy.api#documentation": "

The specified value for NextToken is not valid.

", + "smithy.api#documentation": "

The specified value for NextToken is not valid.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -1487,7 +1490,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the resources in a resource share that is shared with you but that the invitation is still\n pending for.

", + "smithy.api#documentation": "

Lists the resources in a resource share that is shared with you but for which the invitation is\n still PENDING. That means that you haven't accepted or rejected the\n invitation and the invitation hasn't expired.

", "smithy.api#http": { "method": "POST", "uri": "/listpendinginvitationresources", @@ -1506,20 +1509,26 @@ "resourceShareInvitationArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the invitation.

", + "smithy.api#documentation": "

Specifies the Amazon Resoure Name (ARN) of the invitation. You can use GetResourceShareInvitations to find the ARN of the invitation.

", "smithy.api#required": {} } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Specifies that you want to receive the next page of results. Valid \n only if you received a NextToken response in the previous request. If you\n did, it indicates that more output is available. Set this parameter to the value \n provided by the previous call's NextToken response to request the \n next page of results.

" } }, "maxResults": { "target": "com.amazonaws.ram#MaxResults", "traits": { - "smithy.api#documentation": "

The maximum number of results to return with a single call.\n To retrieve the remaining results, make another call with the returned nextToken value.

" + "smithy.api#documentation": "

Specifies the total number of results that you want included on each page \n of the response. If you do not include this parameter, it defaults to a value that is \n specific to the operation. If additional items exist beyond the number you specify, the\n NextToken response element is returned with a value (not null).\n Include the specified value as the NextToken request parameter in the next \n call to the operation to get the next part of the results. Note that the service might \n return fewer results than the maximum even when there are more results available. You \n should check NextToken after every operation to ensure that you receive all\n of the results.

" + } + }, + "resourceRegionScope": { + "target": "com.amazonaws.ram#ResourceRegionScopeFilter", + "traits": { + "smithy.api#documentation": "

Specifies that you want the results to include only \n resources that have the specified scope.

\n \n

The default value is ALL.

" } } } @@ -1530,13 +1539,13 @@ "resources": { "target": "com.amazonaws.ram#ResourceList", "traits": { - "smithy.api#documentation": "

Information about the resources included the resource share.

" + "smithy.api#documentation": "

An array of objects that contain the information about the resources included the\n specified resource share.

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

" + "smithy.api#documentation": "

If present, this value indicates that more output is available than \n is included in the current response. Use this value in the NextToken \n request parameter in a subsequent call to the operation to get the next part of the \n output. You should repeat this until the NextToken response element comes \n back as null. This indicates that this is the last page of results.

" } } } @@ -1567,7 +1576,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the RAM permissions.

", + "smithy.api#documentation": "

Retrieves a list of available RAM permissions that you can use for the supported\n resource types.

", "smithy.api#http": { "method": "POST", "uri": "/listpermissions", @@ -1586,19 +1595,19 @@ "resourceType": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

Specifies the resource type for which to list permissions. For example, to list only\n permissions that apply to EC2 subnets, specify ec2:Subnet.

" + "smithy.api#documentation": "

Specifies that you want to list permissions for only the specified resource type. For\n example, to list only permissions that apply to EC2 subnets, specify\n ec2:Subnet. You can use the ListResourceTypes\n operation to get the specific string required.

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Specifies that you want to receive the next page of results. Valid \n only if you received a NextToken response in the previous request. If you\n did, it indicates that more output is available. Set this parameter to the value \n provided by the previous call's NextToken response to request the \n next page of results.

" } }, "maxResults": { "target": "com.amazonaws.ram#MaxResults", "traits": { - "smithy.api#documentation": "

The maximum number of results to return with a single call.\n To retrieve the remaining results, make another call with the returned nextToken value.

" + "smithy.api#documentation": "

Specifies the total number of results that you want included on each page \n of the response. If you do not include this parameter, it defaults to a value that is \n specific to the operation. If additional items exist beyond the number you specify, the\n NextToken response element is returned with a value (not null).\n Include the specified value as the NextToken request parameter in the next \n call to the operation to get the next part of the results. Note that the service might \n return fewer results than the maximum even when there are more results available. You \n should check NextToken after every operation to ensure that you receive all\n of the results.

" } } } @@ -1609,13 +1618,13 @@ "permissions": { "target": "com.amazonaws.ram#ResourceSharePermissionList", "traits": { - "smithy.api#documentation": "

Information about the permissions.

" + "smithy.api#documentation": "

An array of objects with information about the permissions.

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

" + "smithy.api#documentation": "

If present, this value indicates that more output is available than \n is included in the current response. Use this value in the NextToken \n request parameter in a subsequent call to the operation to get the next part of the \n output. You should repeat this until the NextToken response element comes \n back as null. This indicates that this is the last page of results.

" } } } @@ -1649,7 +1658,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the principals that you have shared resources with or that have shared resources\n with you.

", + "smithy.api#documentation": "

Lists the principals that you are sharing resources with or that are sharing resources\n with you.

", "smithy.api#http": { "method": "POST", "uri": "/listprincipals", @@ -1668,44 +1677,44 @@ "resourceOwner": { "target": "com.amazonaws.ram#ResourceOwner", "traits": { - "smithy.api#documentation": "

The type of owner.

", + "smithy.api#documentation": "

Specifies that you want to list information for only resource shares that match the\n following:

\n ", "smithy.api#required": {} } }, "resourceArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource.

" + "smithy.api#documentation": "

Specifies that you want to list principal information for the resource share with the specified\n Amazon Resoure Name (ARN).

" } }, "principals": { "target": "com.amazonaws.ram#PrincipalArnOrIdList", "traits": { - "smithy.api#documentation": "

The principals.

" + "smithy.api#documentation": "

Specifies that you want to list information for only the listed principals.

\n

You can include the following values:

\n \n \n

Not all resource types can be shared with IAM roles and users. \n For more information, see Sharing with IAM roles and users in the Resource Access Manager User\n Guide.

\n
" } }, "resourceType": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The resource type.

\n

Valid values: acm-pca:CertificateAuthority | appmesh:Mesh | codebuild:Project | codebuild:ReportGroup | ec2:CapacityReservation | ec2:DedicatedHost | ec2:LocalGatewayRouteTable | ec2:PrefixList | ec2:Subnet | ec2:TrafficMirrorTarget | ec2:TransitGateway | imagebuilder:Component | imagebuilder:Image | imagebuilder:ImageRecipe | imagebuilder:ContainerRecipe | glue:Catalog | glue:Database | glue:Table | license-manager:LicenseConfiguration I network-firewall:FirewallPolicy | network-firewall:StatefulRuleGroup | network-firewall:StatelessRuleGroup | outposts:Outpost | resource-groups:Group | rds:Cluster | route53resolver:FirewallRuleGroup |route53resolver:ResolverQueryLogConfig | route53resolver:ResolverRule | s3-outposts:Outpost | ssm-contacts:Contact | ssm-incidents:ResponsePlan\n

" + "smithy.api#documentation": "

Specifies that you want to list information for only principals associated with resource shares\n that include the specified resource type.

\n

For a list of valid values, query the ListResourceTypes operation.

" } }, "resourceShareArns": { "target": "com.amazonaws.ram#ResourceShareArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARN) of the resource shares.

" + "smithy.api#documentation": "

Specifies that you want to list information for only principals associated with the\n resource shares specified by a list the Amazon Resource Names (ARNs).

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Specifies that you want to receive the next page of results. Valid \n only if you received a NextToken response in the previous request. If you\n did, it indicates that more output is available. Set this parameter to the value \n provided by the previous call's NextToken response to request the \n next page of results.

" } }, "maxResults": { "target": "com.amazonaws.ram#MaxResults", "traits": { - "smithy.api#documentation": "

The maximum number of results to return with a single call.\n To retrieve the remaining results, make another call with the returned nextToken value.

" + "smithy.api#documentation": "

Specifies the total number of results that you want included on each page \n of the response. If you do not include this parameter, it defaults to a value that is \n specific to the operation. If additional items exist beyond the number you specify, the\n NextToken response element is returned with a value (not null).\n Include the specified value as the NextToken request parameter in the next \n call to the operation to get the next part of the results. Note that the service might \n return fewer results than the maximum even when there are more results available. You \n should check NextToken after every operation to ensure that you receive all\n of the results.

" } } } @@ -1716,13 +1725,13 @@ "principals": { "target": "com.amazonaws.ram#PrincipalList", "traits": { - "smithy.api#documentation": "

The principals.

" + "smithy.api#documentation": "

An array of objects that contain the details about the principals.

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

" + "smithy.api#documentation": "

If present, this value indicates that more output is available than \n is included in the current response. Use this value in the NextToken \n request parameter in a subsequent call to the operation to get the next part of the \n output. You should repeat this until the NextToken response element comes \n back as null. This indicates that this is the last page of results.

" } } } @@ -1778,20 +1787,20 @@ "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share.

", + "smithy.api#documentation": "

Specifies the Amazon Resoure Name (ARN) of the resource share for which you want to retrieve the associated\n permissions.

", "smithy.api#required": {} } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Specifies that you want to receive the next page of results. Valid \n only if you received a NextToken response in the previous request. If you\n did, it indicates that more output is available. Set this parameter to the value \n provided by the previous call's NextToken response to request the \n next page of results.

" } }, "maxResults": { "target": "com.amazonaws.ram#MaxResults", "traits": { - "smithy.api#documentation": "

The maximum number of results to return with a single call.\n To retrieve the remaining results, make another call with the returned nextToken value.

" + "smithy.api#documentation": "

Specifies the total number of results that you want included on each page \n of the response. If you do not include this parameter, it defaults to a value that is \n specific to the operation. If additional items exist beyond the number you specify, the\n NextToken response element is returned with a value (not null).\n Include the specified value as the NextToken request parameter in the next \n call to the operation to get the next part of the results. Note that the service might \n return fewer results than the maximum even when there are more results available. You \n should check NextToken after every operation to ensure that you receive all\n of the results.

" } } } @@ -1802,13 +1811,13 @@ "permissions": { "target": "com.amazonaws.ram#ResourceSharePermissionList", "traits": { - "smithy.api#documentation": "

The permissions associated with the resource share.

" + "smithy.api#documentation": "

An array of objects that describe the permissions associated with the resource share.

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

" + "smithy.api#documentation": "

If present, this value indicates that more output is available than \n is included in the current response. Use this value in the NextToken \n request parameter in a subsequent call to the operation to get the next part of the \n output. You should repeat this until the NextToken response element comes \n back as null. This indicates that this is the last page of results.

" } } } @@ -1836,7 +1845,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the shareable resource types supported by RAM.

", + "smithy.api#documentation": "

Lists the resource types that can be shared by RAM.

", "smithy.api#http": { "method": "POST", "uri": "/listresourcetypes", @@ -1855,13 +1864,19 @@ "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Specifies that you want to receive the next page of results. Valid \n only if you received a NextToken response in the previous request. If you\n did, it indicates that more output is available. Set this parameter to the value \n provided by the previous call's NextToken response to request the \n next page of results.

" } }, "maxResults": { "target": "com.amazonaws.ram#MaxResults", "traits": { - "smithy.api#documentation": "

The maximum number of results to return with a single call.\n To retrieve the remaining results, make another call with the returned nextToken value.

" + "smithy.api#documentation": "

Specifies the total number of results that you want included on each page \n of the response. If you do not include this parameter, it defaults to a value that is \n specific to the operation. If additional items exist beyond the number you specify, the\n NextToken response element is returned with a value (not null).\n Include the specified value as the NextToken request parameter in the next \n call to the operation to get the next part of the results. Note that the service might \n return fewer results than the maximum even when there are more results available. You \n should check NextToken after every operation to ensure that you receive all\n of the results.

" + } + }, + "resourceRegionScope": { + "target": "com.amazonaws.ram#ResourceRegionScopeFilter", + "traits": { + "smithy.api#documentation": "

Specifies that you want the results to include only \n resources that have the specified scope.

\n \n

The default value is ALL.

" } } } @@ -1872,13 +1887,13 @@ "resourceTypes": { "target": "com.amazonaws.ram#ServiceNameAndResourceTypeList", "traits": { - "smithy.api#documentation": "

The shareable resource types supported by RAM.

" + "smithy.api#documentation": "

An array of objects that contain information about the resource types that can be\n shared using RAM.

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

" + "smithy.api#documentation": "

If present, this value indicates that more output is available than \n is included in the current response. Use this value in the NextToken \n request parameter in a subsequent call to the operation to get the next part of the \n output. You should repeat this until the NextToken response element comes \n back as null. This indicates that this is the last page of results.

" } } } @@ -1934,44 +1949,50 @@ "resourceOwner": { "target": "com.amazonaws.ram#ResourceOwner", "traits": { - "smithy.api#documentation": "

The type of owner.

", + "smithy.api#documentation": "

Specifies that you want to list only the resource shares that match the following:

\n ", "smithy.api#required": {} } }, "principal": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The principal.

" + "smithy.api#documentation": "

Specifies that you want to list only the resource shares that are associated with the specified\n principal.

" } }, "resourceType": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The resource type.

\n

Valid values: acm-pca:CertificateAuthority | appmesh:Mesh | codebuild:Project | codebuild:ReportGroup | ec2:CapacityReservation | ec2:DedicatedHost | ec2:LocalGatewayRouteTable | ec2:PrefixList | ec2:Subnet | ec2:TrafficMirrorTarget | ec2:TransitGateway | imagebuilder:Component | imagebuilder:Image | imagebuilder:ImageRecipe | imagebuilder:ContainerRecipe | glue:Catalog | glue:Database | glue:Table | license-manager:LicenseConfiguration I network-firewall:FirewallPolicy | network-firewall:StatefulRuleGroup | network-firewall:StatelessRuleGroup | outposts:Outpost | resource-groups:Group | rds:Cluster | route53resolver:FirewallRuleGroup |route53resolver:ResolverQueryLogConfig | route53resolver:ResolverRule | s3-outposts:Outpost | ssm-contacts:Contact | ssm-incidents:ResponsePlan\n

" + "smithy.api#documentation": "

Specifies that you want to list only the resource shares that include resources of the specified\n resource type.

\n

For valid values, query the ListResourceTypes operation.

" } }, "resourceArns": { "target": "com.amazonaws.ram#ResourceArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the resources.

" + "smithy.api#documentation": "

Specifies that you want to list only the resource shares that include resources with the\n specified Amazon Resource Names (ARNs).

" } }, "resourceShareArns": { "target": "com.amazonaws.ram#ResourceShareArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARN) of the resource shares.

" + "smithy.api#documentation": "

Specifies that you want to list only resources in the resource shares identified by the\n specified Amazon Resource Names (ARNs).

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token for the next page of results.

" + "smithy.api#documentation": "

Specifies that you want to receive the next page of results. Valid \n only if you received a NextToken response in the previous request. If you\n did, it indicates that more output is available. Set this parameter to the value \n provided by the previous call's NextToken response to request the \n next page of results.

" } }, "maxResults": { "target": "com.amazonaws.ram#MaxResults", "traits": { - "smithy.api#documentation": "

The maximum number of results to return with a single call.\n To retrieve the remaining results, make another call with the returned nextToken value.

" + "smithy.api#documentation": "

Specifies the total number of results that you want included on each page \n of the response. If you do not include this parameter, it defaults to a value that is \n specific to the operation. If additional items exist beyond the number you specify, the\n NextToken response element is returned with a value (not null).\n Include the specified value as the NextToken request parameter in the next \n call to the operation to get the next part of the results. Note that the service might \n return fewer results than the maximum even when there are more results available. You \n should check NextToken after every operation to ensure that you receive all\n of the results.

" + } + }, + "resourceRegionScope": { + "target": "com.amazonaws.ram#ResourceRegionScopeFilter", + "traits": { + "smithy.api#documentation": "

Specifies that you want the results to include only \n resources that have the specified scope.

\n \n

The default value is ALL.

" } } } @@ -1982,13 +2003,13 @@ "resources": { "target": "com.amazonaws.ram#ResourceList", "traits": { - "smithy.api#documentation": "

Information about the resources.

" + "smithy.api#documentation": "

An array of objects that contain information about the resources.

" } }, "nextToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

" + "smithy.api#documentation": "

If present, this value indicates that more output is available than \n is included in the current response. Use this value in the NextToken \n request parameter in a subsequent call to the operation to get the next part of the \n output. You should repeat this until the NextToken response element comes \n back as null. This indicates that this is the last page of results.

" } } } @@ -2096,19 +2117,19 @@ "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share.

" + "smithy.api#documentation": "

The Amazon Resoure Name (ARN) of a resource share the principal is associated with.

" } }, "creationTime": { "target": "com.amazonaws.ram#DateTime", "traits": { - "smithy.api#documentation": "

The time when the principal was associated with the resource share.

" + "smithy.api#documentation": "

The date and time when the principal was associated with the resource share.

" } }, "lastUpdatedTime": { "target": "com.amazonaws.ram#DateTime", "traits": { - "smithy.api#documentation": "

The time when the association was last updated.

" + "smithy.api#documentation": "

The date and time when the association was last updated.

" } }, "external": { @@ -2175,7 +2196,7 @@ } ], "traits": { - "smithy.api#documentation": "

Resource shares that were created by attaching a policy to a resource are visible only\n to the resource share owner, and the resource share cannot be modified in RAM.

\n\n

Use this API action to promote the resource share. When you promote the resource\n share, it becomes:

\n ", + "smithy.api#documentation": "

When you attach a resource-based permission policy to a resource, it automatically\n creates a resource share. However, resource shares created this way are visible only to the resource share\n owner, and the resource share can't be modified in RAM.

\n

You can use this operation to promote the resource share to a full RAM resource share. When you promote\n a resource share, you can then manage the resource share in RAM and it becomes visible to all of the\n principals you shared it with.

", "smithy.api#http": { "method": "POST", "uri": "/promoteresourcesharecreatedfrompolicy", @@ -2189,7 +2210,7 @@ "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share to promote.

", + "smithy.api#documentation": "

Specifies the Amazon Resoure Name (ARN) of the resource share to promote.

", "smithy.api#httpQuery": "resourceShareArn", "smithy.api#required": {} } @@ -2202,7 +2223,7 @@ "returnValue": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether the request succeeded.

", + "smithy.api#documentation": "

A return value of true indicates that the request succeeded. \n A value of false indicates that the request failed.

", "smithy.api#xmlName": "return" } } @@ -2263,14 +2284,14 @@ "resourceShareInvitationArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the invitation.

", + "smithy.api#documentation": "

Specifies the Amazon Resoure Name (ARN) of the invitation that you want to reject.

", "smithy.api#required": {} } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

Specifies a unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. This lets you safely retry the request without\n accidentally performing the same operation a second time. Passing the same value to a\n later call to an operation requires that you also pass the same value for all other \n parameters. We recommend that you use a UUID type of \n value..

\n

If you don't provide this value, then Amazon Web Services generates a random one for\n you.

" } } } @@ -2281,13 +2302,13 @@ "resourceShareInvitation": { "target": "com.amazonaws.ram#ResourceShareInvitation", "traits": { - "smithy.api#documentation": "

Information about the invitation.

" + "smithy.api#documentation": "

An object that contains the details about the rejected invitation.

" } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

The idempotency identifier associated with this request. If you\n want to repeat the same operation in an idempotent manner then you must include this\n value in the clientToken request parameter of that later call. All other \n parameters must also have the same values that you used in the first call.

" } } } @@ -2298,31 +2319,31 @@ "arn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource.

" + "smithy.api#documentation": "

The Amazon Resoure Name (ARN) of the resource.

" } }, "type": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The resource type.

" + "smithy.api#documentation": "

The resource type. This takes the form of:\n service-code:resource-code\n

" } }, "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share.

" + "smithy.api#documentation": "

The Amazon Resoure Name (ARN) of the resource share this resource is associated with.

" } }, "resourceGroupArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource group. This value is returned only if\n the resource is a resource group.

" + "smithy.api#documentation": "

The Amazon Resoure Name (ARN) of the resource group. This value is available only if the resource is\n part of a resource group.

" } }, "status": { "target": "com.amazonaws.ram#ResourceStatus", "traits": { - "smithy.api#documentation": "

The status of the resource.

" + "smithy.api#documentation": "

The current status of the resource.

" } }, "statusMessage": { @@ -2334,18 +2355,24 @@ "creationTime": { "target": "com.amazonaws.ram#DateTime", "traits": { - "smithy.api#documentation": "

The time when the resource was associated with the resource share.

" + "smithy.api#documentation": "

The date and time when the resource was associated with the resource share.

" } }, "lastUpdatedTime": { "target": "com.amazonaws.ram#DateTime", "traits": { - "smithy.api#documentation": "

The time when the association was last updated.

" + "smithy.api#documentation": "

The date an time when the association was last updated.

" + } + }, + "resourceRegionScope": { + "target": "com.amazonaws.ram#ResourceRegionScope", + "traits": { + "smithy.api#documentation": "

Specifies the scope of visibility of this resource:

\n " } } }, "traits": { - "smithy.api#documentation": "

Describes a resource associated with a resource share.

" + "smithy.api#documentation": "

Describes a resource associated with a resource share in RAM.

" } }, "com.amazonaws.ram#ResourceArnList": { @@ -2372,7 +2399,7 @@ "code": "InvalidResourceArn.NotFound", "httpResponseCode": 400 }, - "smithy.api#documentation": "

An Amazon Resource Name (ARN) was not found.

", + "smithy.api#documentation": "

The specified Amazon Resource Name (ARN) was not found.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -2401,13 +2428,47 @@ ] } }, + "com.amazonaws.ram#ResourceRegionScope": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "REGIONAL", + "name": "REGIONAL" + }, + { + "value": "GLOBAL", + "name": "GLOBAL" + } + ] + } + }, + "com.amazonaws.ram#ResourceRegionScopeFilter": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ALL", + "name": "ALL" + }, + { + "value": "REGIONAL", + "name": "REGIONAL" + }, + { + "value": "GLOBAL", + "name": "GLOBAL" + } + ] + } + }, "com.amazonaws.ram#ResourceShare": { "type": "structure", "members": { "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share.

" + "smithy.api#documentation": "

The Amazon Resoure Name (ARN) of the resource share

" } }, "name": { @@ -2431,7 +2492,7 @@ "status": { "target": "com.amazonaws.ram#ResourceShareStatus", "traits": { - "smithy.api#documentation": "

The status of the resource share.

" + "smithy.api#documentation": "

The current status of the resource share.

" } }, "statusMessage": { @@ -2443,30 +2504,30 @@ "tags": { "target": "com.amazonaws.ram#TagList", "traits": { - "smithy.api#documentation": "

The tags for the resource share.

" + "smithy.api#documentation": "

The tag key and value pairs attached to the resource share.

" } }, "creationTime": { "target": "com.amazonaws.ram#DateTime", "traits": { - "smithy.api#documentation": "

The time when the resource share was created.

" + "smithy.api#documentation": "

The date and time when the resource share was created.

" } }, "lastUpdatedTime": { "target": "com.amazonaws.ram#DateTime", "traits": { - "smithy.api#documentation": "

The time when the resource share was last updated.

" + "smithy.api#documentation": "

The date and time when the resource share was last updated.

" } }, "featureSet": { "target": "com.amazonaws.ram#ResourceShareFeatureSet", "traits": { - "smithy.api#documentation": "

Indicates how the resource share was created. Possible values include:

\n " + "smithy.api#documentation": "

Indicates how the resource share was created. Possible values include:

\n " } } }, "traits": { - "smithy.api#documentation": "

Describes a resource share.

" + "smithy.api#documentation": "

Describes a resource share in RAM.

" } }, "com.amazonaws.ram#ResourceShareArnList": { @@ -2484,7 +2545,7 @@ "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share.

" + "smithy.api#documentation": "

The Amazon Resoure Name (ARN) of the resource share.

" } }, "resourceShareName": { @@ -2496,19 +2557,19 @@ "associatedEntity": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The associated entity. For resource associations, this is the Amazon Resource Name\n (ARN) of the resource. For principal associations, this is one of the following:

\n " + "smithy.api#documentation": "

The associated entity. This can be either of the following:

\n " } }, "associationType": { "target": "com.amazonaws.ram#ResourceShareAssociationType", "traits": { - "smithy.api#documentation": "

The association type.

" + "smithy.api#documentation": "

The type of entity included in this association.

" } }, "status": { "target": "com.amazonaws.ram#ResourceShareAssociationStatus", "traits": { - "smithy.api#documentation": "

The status of the association.

" + "smithy.api#documentation": "

The current status of the association.

" } }, "statusMessage": { @@ -2520,13 +2581,13 @@ "creationTime": { "target": "com.amazonaws.ram#DateTime", "traits": { - "smithy.api#documentation": "

The time when the association was created.

" + "smithy.api#documentation": "

The date and time when the association was created.

" } }, "lastUpdatedTime": { "target": "com.amazonaws.ram#DateTime", "traits": { - "smithy.api#documentation": "

The time when the association was last updated.

" + "smithy.api#documentation": "

The date and time when the association was last updated.

" } }, "external": { @@ -2537,7 +2598,7 @@ } }, "traits": { - "smithy.api#documentation": "

Describes an association with a resource share.

" + "smithy.api#documentation": "

Describes an association with a resource share and either a principal or a resource.

" } }, "com.amazonaws.ram#ResourceShareAssociationList": { @@ -2616,7 +2677,7 @@ "resourceShareInvitationArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the invitation.

" + "smithy.api#documentation": "

The Amazon Resoure Name (ARN) of the invitation.

" } }, "resourceShareName": { @@ -2628,7 +2689,7 @@ "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share.

" + "smithy.api#documentation": "

The Amazon Resoure Name (ARN) of the resource share

" } }, "senderAccountId": { @@ -2652,7 +2713,7 @@ "status": { "target": "com.amazonaws.ram#ResourceShareInvitationStatus", "traits": { - "smithy.api#documentation": "

The status of the invitation.

" + "smithy.api#documentation": "

The current status of the invitation.

" } }, "resourceShareAssociations": { @@ -2661,18 +2722,18 @@ "smithy.api#deprecated": { "message": "This member has been deprecated. Use ListPendingInvitationResources." }, - "smithy.api#documentation": "

To view the resources associated with a pending resource share invitation, use \n ListPendingInvitationResources.

" + "smithy.api#documentation": "

To view the resources associated with a pending resource share invitation, use ListPendingInvitationResources.

" } }, "receiverArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM user or IAM role that received the\n invitation.

" + "smithy.api#documentation": "

The Amazon Resoure Name (ARN) of the IAM user or role that received the invitation.

" } } }, "traits": { - "smithy.api#documentation": "

Describes an invitation to join a resource share.

" + "smithy.api#documentation": "

Describes an invitation for an Amazon Web Services account to join a resource share.

" } }, "com.amazonaws.ram#ResourceShareInvitationAlreadyAcceptedException": { @@ -2690,7 +2751,7 @@ "code": "InvalidResourceShareInvitationArn.AlreadyAccepted", "httpResponseCode": 400 }, - "smithy.api#documentation": "

The invitation was already accepted.

", + "smithy.api#documentation": "

The specified invitation was already accepted.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -2710,7 +2771,7 @@ "code": "InvalidResourceShareInvitationArn.AlreadyRejected", "httpResponseCode": 400 }, - "smithy.api#documentation": "

The invitation was already rejected.

", + "smithy.api#documentation": "

The specified invitation was already rejected.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -2739,7 +2800,7 @@ "code": "InvalidResourceShareInvitationArn.NotFound", "httpResponseCode": 400 }, - "smithy.api#documentation": "

The Amazon Resource Name (ARN) for an invitation was not found.

", + "smithy.api#documentation": "

The specified Amazon Resource Name (ARN) for an invitation was not found.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -2759,7 +2820,7 @@ "code": "InvalidResourceShareInvitationArn.Expired", "httpResponseCode": 400 }, - "smithy.api#documentation": "

The invitation is expired.

", + "smithy.api#documentation": "

The specified invitation is expired.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -2811,7 +2872,7 @@ "code": "ResourceShareLimitExceeded", "httpResponseCode": 400 }, - "smithy.api#documentation": "

The requested resource share exceeds the limit for your account.

", + "smithy.api#documentation": "

This request would exceed the limit for resource shares for your account.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -2831,37 +2892,37 @@ "arn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the permission.

" + "smithy.api#documentation": "

The Amazon Resoure Name (ARN) of this RAM permission.

" } }, "version": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The identifier for the version of the permission.

" + "smithy.api#documentation": "

The version of the permission represented in this structure.

" } }, "defaultVersion": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether the version of the permission is set to the default version for this\n permission.

" + "smithy.api#documentation": "

Specifies whether the version of the permission represented in this structure is the\n default version for this permission.

" } }, "name": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The name of the permission.

" + "smithy.api#documentation": "

The name of this permission.

" } }, "resourceType": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The resource type to which the permission applies.

" + "smithy.api#documentation": "

The resource type to which this permission applies.

" } }, "permission": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The permission's effect and actions in JSON format. The effect indicates\n whether the actions are allowed or denied. The actions list the API actions\n to which the principal is granted or denied access.

" + "smithy.api#documentation": "

The permission's effect and actions in JSON format. The effect indicates\n whether the specified actions are allowed or denied. The actions list the\n operations to which the principal is granted or denied access.

" } }, "creationTime": { @@ -2879,7 +2940,7 @@ "isResourceTypeDefault": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether the version of the permission is set to the default version for this\n resource type.

" + "smithy.api#documentation": "

Specifies whether the version of the permission represented in this structure is the\n default version for all resources of this resource type.

" } } }, @@ -2902,31 +2963,31 @@ "arn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the permission.

" + "smithy.api#documentation": "

The Amazon Resoure Name (ARN) of the permission you want information about.

" } }, "version": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The identifier for the version of the permission.

" + "smithy.api#documentation": "

The version of the permission represented in this structure.

" } }, "defaultVersion": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether the version of the permission is set to the default version for this\n permission.

" + "smithy.api#documentation": "

Specifies whether the version of the permission represented in this structure is the\n default version for this permission.

" } }, "name": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The name of the permission.

" + "smithy.api#documentation": "

The name of this permission.

" } }, "resourceType": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The type of resource to which the permission applies.

" + "smithy.api#documentation": "

The type of resource to which this permission applies.

" } }, "status": { @@ -2950,12 +3011,12 @@ "isResourceTypeDefault": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether the version of the permission is set to the default version for this\n resource type.

" + "smithy.api#documentation": "

Specifies whether the version of the permission represented in this structure is the\n default version for all resources of this resource type.

" } } }, "traits": { - "smithy.api#documentation": "

Information about a permission that is associated with a resource share.

" + "smithy.api#documentation": "

Information about an RAM permission that is associated with a resource share and any of its\n resources of a specified type.

" } }, "com.amazonaws.ram#ResourceShareStatus": { @@ -3038,18 +3099,24 @@ "resourceType": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The shareable resource types.

" + "smithy.api#documentation": "

The type of the resource.

" } }, "serviceName": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The name of the Amazon Web Services services to which the resources belong.

" + "smithy.api#documentation": "

The name of the Amazon Web Services service to which resources of this type belong.

" + } + }, + "resourceRegionScope": { + "target": "com.amazonaws.ram#ResourceRegionScope", + "traits": { + "smithy.api#documentation": "

Specifies the scope of visibility of resources of this type:

\n " } } }, "traits": { - "smithy.api#documentation": "

Information about the shareable resource types and the Amazon Web Services services to which they\n belong.

" + "smithy.api#documentation": "

Information about a shareable resource type and the Amazon Web Services service to which resources\n of that type belong.

" } }, "com.amazonaws.ram#ServiceNameAndResourceTypeList": { @@ -3090,18 +3157,18 @@ "key": { "target": "com.amazonaws.ram#TagKey", "traits": { - "smithy.api#documentation": "

The key of the tag.

" + "smithy.api#documentation": "

The key, or name, attached to the tag. Every tag must have a key. Key names are case\n sensitive.

" } }, "value": { "target": "com.amazonaws.ram#TagValue", "traits": { - "smithy.api#documentation": "

The value of the tag.

" + "smithy.api#documentation": "

The string value attached to the tag. The value can be an empty string. Key values are\n case sensitive.

" } } }, "traits": { - "smithy.api#documentation": "

Information about a tag.

" + "smithy.api#documentation": "

A structure containing a tag. A tag is metadata that you can attach to your resources\n to help organize and categorize them. You can also use them to help you secure your\n resources. For more information, see Controlling access to Amazon Web Services resources\n using tags.

\n

For more information about tags, see Tagging Amazon Web Services resources in the\n Amazon Web Services General Reference Guide.

" } }, "com.amazonaws.ram#TagFilter": { @@ -3110,18 +3177,18 @@ "tagKey": { "target": "com.amazonaws.ram#TagKey", "traits": { - "smithy.api#documentation": "

The tag key.

" + "smithy.api#documentation": "

The tag key. This must have a valid string value and can't be empty.

" } }, "tagValues": { "target": "com.amazonaws.ram#TagValueList", "traits": { - "smithy.api#documentation": "

The tag values.

" + "smithy.api#documentation": "

A list of zero or more tag values. If no values are provided, then the filter matches\n any tag with the specified key, regardless of its value.

" } } }, "traits": { - "smithy.api#documentation": "

Used to filter information based on tags.

" + "smithy.api#documentation": "

A tag key and optional list of possible values that you can use to filter results for\n tagged resources.

" } }, "com.amazonaws.ram#TagFilters": { @@ -3154,7 +3221,7 @@ "code": "TagLimitExceeded", "httpResponseCode": 400 }, - "smithy.api#documentation": "

The requested tags exceed the limit for your account.

", + "smithy.api#documentation": "

This request would exceed the limit for tags for your account.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -3180,7 +3247,7 @@ "code": "TagPolicyViolation", "httpResponseCode": 400 }, - "smithy.api#documentation": "

The specified tag is a reserved word and cannot be used.

", + "smithy.api#documentation": "

The specified tag key is a reserved word and can't be used.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -3220,7 +3287,7 @@ } ], "traits": { - "smithy.api#documentation": "

Adds the specified tags to the specified resource share that you own.

", + "smithy.api#documentation": "

Adds the specified tag keys and values to the specified resource share. The tags are attached\n only to the resource share, not to the resources that are in the resource share.

", "smithy.api#http": { "method": "POST", "uri": "/tagresource", @@ -3234,14 +3301,14 @@ "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share.

", + "smithy.api#documentation": "

Specifies the Amazon Resoure Name (ARN) of the resource share that you want to add tags to.

", "smithy.api#required": {} } }, "tags": { "target": "com.amazonaws.ram#TagList", "traits": { - "smithy.api#documentation": "

One or more tags.

", + "smithy.api#documentation": "

A list of one or more tag key and value pairs. The tag key must be present and not be\n an empty string. The tag value must be present but can be an empty string.

", "smithy.api#required": {} } } @@ -3260,6 +3327,26 @@ "target": "com.amazonaws.ram#TagValue" } }, + "com.amazonaws.ram#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.ram#String", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "ThrottlingException", + "httpResponseCode": 429 + }, + "smithy.api#documentation": "

You exceeded the rate at which you are allowed to perform this operation. Please try\n again later.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, "com.amazonaws.ram#UnknownResourceException": { "type": "structure", "members": { @@ -3300,7 +3387,7 @@ } ], "traits": { - "smithy.api#documentation": "

Removes the specified tags from the specified resource share that you own.

", + "smithy.api#documentation": "

Removes the specified tag key and value pairs from the specified resource share.

", "smithy.api#http": { "method": "POST", "uri": "/untagresource", @@ -3314,14 +3401,14 @@ "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share.

", + "smithy.api#documentation": "

Specifies the Amazon Resoure Name (ARN) of the resource share that you want to remove tags from. The tags are\n removed from the resource share, not the resources in the resource share.

", "smithy.api#required": {} } }, "tagKeys": { "target": "com.amazonaws.ram#TagKeyList", "traits": { - "smithy.api#documentation": "

The tag keys of the tags to remove.

", + "smithy.api#documentation": "

Specifies a list of one or more tag keys that you want to remove.

", "smithy.api#required": {} } } @@ -3369,7 +3456,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the specified resource share that you own.

", + "smithy.api#documentation": "

Modifies some of the properties of the specified resource share.

", "smithy.api#http": { "method": "POST", "uri": "/updateresourceshare", @@ -3383,26 +3470,26 @@ "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share.

", + "smithy.api#documentation": "

Specifies the Amazon Resoure Name (ARN) of the resource share that you want to modify.

", "smithy.api#required": {} } }, "name": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The name of the resource share.

" + "smithy.api#documentation": "

If specified, the new name that you want to attach to the resource share.

" } }, "allowExternalPrincipals": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether principals outside your organization in Organizations can be associated\n with a resource share.

" + "smithy.api#documentation": "

Specifies whether principals outside your organization in Organizations can be associated\n with a resource share.

" } }, "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

Specifies a unique, case-sensitive identifier that you provide to\n ensure the idempotency of the request. This lets you safely retry the request without\n accidentally performing the same operation a second time. Passing the same value to a\n later call to an operation requires that you also pass the same value for all other \n parameters. We recommend that you use a UUID type of \n value..

\n

If you don't provide this value, then Amazon Web Services generates a random one for\n you.

" } } } @@ -3419,7 +3506,7 @@ "clientToken": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

" + "smithy.api#documentation": "

The idempotency identifier associated with this request. If you\n want to repeat the same operation in an idempotent manner then you must include this\n value in the clientToken request parameter of that later call. All other \n parameters must also have the same values that you used in the first call.

" } } } diff --git a/codegen/sdk-codegen/aws-models/rekognition.2016-06-27.json b/codegen/sdk-codegen/aws-models/rekognition.2016-06-27.json index 0628f4dceac..14f39001b9f 100644 --- a/codegen/sdk-codegen/aws-models/rekognition.2016-06-27.json +++ b/codegen/sdk-codegen/aws-models/rekognition.2016-06-27.json @@ -469,7 +469,7 @@ } ], "traits": { - "smithy.api#documentation": "

Compares a face in the source input image with\n each of the 100 largest faces detected in the target input image.\n

\n \n

If the source image contains multiple faces, the service detects the largest face\n and compares it with each face detected in the target image.

\n \n \n \n

CompareFaces uses machine learning algorithms, which are probabilistic. \n A false negative is an incorrect prediction that\n a face in the target image has a low similarity confidence score when compared to the face\n in the source image. To reduce the probability of false negatives, \n we recommend that you compare the target image against multiple source images.\n If you plan to use CompareFaces to make a decision that impacts an individual's rights,\n privacy, or access to services, we recommend that you pass the result to a human for review and further\n validation before taking action.

\n
\n\n\n

You pass the input and target images either as base64-encoded image bytes or as\n references to images in an Amazon S3 bucket. If you use the\n AWS\n CLI to call Amazon Rekognition operations, passing image bytes isn't\n supported. The image must be formatted as a PNG or JPEG file.

\n

In response, the operation returns an array of face matches ordered by similarity score\n in descending order. For each face match, the response provides a bounding box of the face,\n facial landmarks, pose details (pitch, role, and yaw), quality (brightness and sharpness), and\n confidence value (indicating the level of confidence that the bounding box contains a face).\n The response also provides a similarity score, which indicates how closely the faces match.

\n\n \n

By default, only faces with a similarity score of greater than or equal to 80% are\n returned in the response. You can change this value by specifying the\n SimilarityThreshold parameter.

\n
\n\n

\n CompareFaces also returns an array of faces that don't match the source image. \n For each face, it returns a bounding box, confidence value, landmarks, pose details, and quality.\n The response also returns information about the face in the source image, including the bounding box\n of the face and confidence value.

\n \n

The QualityFilter input parameter allows you to filter out detected faces\n that don’t meet a required quality bar. The quality bar is based on a\n variety of common use cases. Use QualityFilter to set the quality bar\n by specifying LOW, MEDIUM, or HIGH.\n If you do not want to filter detected faces, specify NONE. The default value is NONE.

\n\n

If the image doesn't contain Exif metadata, CompareFaces returns orientation information for the\n source and target images. Use these values to display the images with the correct image orientation.

\n

If no faces are detected in the source or target images, CompareFaces returns an \n InvalidParameterException error.

\n\n\n \n

This is a stateless API operation. That is, data returned by this operation doesn't persist.

\n
\n\n \n

For an example, see Comparing Faces in Images in the Amazon Rekognition Developer Guide.

\n

This operation requires permissions to perform the rekognition:CompareFaces\n action.

" + "smithy.api#documentation": "

Compares a face in the source input image with\n each of the 100 largest faces detected in the target input image.\n

\n \n

If the source image contains multiple faces, the service detects the largest face\n and compares it with each face detected in the target image.

\n \n \n \n

CompareFaces uses machine learning algorithms, which are probabilistic. \n A false negative is an incorrect prediction that\n a face in the target image has a low similarity confidence score when compared to the face\n in the source image. To reduce the probability of false negatives, \n we recommend that you compare the target image against multiple source images.\n If you plan to use CompareFaces to make a decision that impacts an individual's rights,\n privacy, or access to services, we recommend that you pass the result to a human for review and further\n validation before taking action.

\n
\n\n\n

You pass the input and target images either as base64-encoded image bytes or as\n references to images in an Amazon S3 bucket. If you use the\n AWS\n CLI to call Amazon Rekognition operations, passing image bytes isn't\n supported. The image must be formatted as a PNG or JPEG file.

\n

In response, the operation returns an array of face matches ordered by similarity score\n in descending order. For each face match, the response provides a bounding box of the face,\n facial landmarks, pose details (pitch, roll, and yaw), quality (brightness and sharpness), and\n confidence value (indicating the level of confidence that the bounding box contains a face).\n The response also provides a similarity score, which indicates how closely the faces match.

\n\n \n

By default, only faces with a similarity score of greater than or equal to 80% are\n returned in the response. You can change this value by specifying the\n SimilarityThreshold parameter.

\n
\n\n

\n CompareFaces also returns an array of faces that don't match the source image. \n For each face, it returns a bounding box, confidence value, landmarks, pose details, and quality.\n The response also returns information about the face in the source image, including the bounding box\n of the face and confidence value.

\n \n

The QualityFilter input parameter allows you to filter out detected faces\n that don’t meet a required quality bar. The quality bar is based on a\n variety of common use cases. Use QualityFilter to set the quality bar\n by specifying LOW, MEDIUM, or HIGH.\n If you do not want to filter detected faces, specify NONE. The default value is NONE.

\n\n

If the image doesn't contain Exif metadata, CompareFaces returns orientation information for the\n source and target images. Use these values to display the images with the correct image orientation.

\n

If no faces are detected in the source or target images, CompareFaces returns an \n InvalidParameterException error.

\n\n\n \n

This is a stateless API operation. That is, data returned by this operation doesn't persist.

\n
\n\n \n

For an example, see Comparing Faces in Images in the Amazon Rekognition Developer Guide.

\n

This operation requires permissions to perform the rekognition:CompareFaces\n action.

" } }, "com.amazonaws.rekognition#CompareFacesMatch": { @@ -2751,7 +2751,7 @@ } ], "traits": { - "smithy.api#documentation": "

Detects text in the input image and converts it into machine-readable text.

\n

Pass the input image as base64-encoded image bytes or as a reference to an image in an\n Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, you must pass it as a\n reference to an image in an Amazon S3 bucket. For the AWS CLI, passing image bytes is not\n supported. The image must be either a .png or .jpeg formatted file.

\n

The DetectText operation returns text in an array of TextDetection elements, TextDetections. Each\n TextDetection element provides information about a single word or line of text\n that was detected in the image.

\n

A word is one or more ISO basic latin script characters that are not separated by spaces.\n DetectText can detect up to 100 words in an image.

\n

A line is a string of equally spaced words. A line isn't necessarily a complete\n sentence. For example, a driver's license number is detected as a line. A line ends when there\n is no aligned text after it. Also, a line ends when there is a large gap between words,\n relative to the length of the words. This means, depending on the gap between words, Amazon Rekognition\n may detect multiple lines in text aligned in the same direction. Periods don't represent the\n end of a line. If a sentence spans multiple lines, the DetectText operation\n returns multiple lines.

\n

To determine whether a TextDetection element is a line of text or a word,\n use the TextDetection object Type field.

\n

To be detected, text must be within +/- 90 degrees orientation of the horizontal axis.

\n \n

For more information, see DetectText in the Amazon Rekognition Developer Guide.

" + "smithy.api#documentation": "

Detects text in the input image and converts it into machine-readable text.

\n

Pass the input image as base64-encoded image bytes or as a reference to an image in an\n Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, you must pass it as a\n reference to an image in an Amazon S3 bucket. For the AWS CLI, passing image bytes is not\n supported. The image must be either a .png or .jpeg formatted file.

\n

The DetectText operation returns text in an array of TextDetection elements, TextDetections. Each\n TextDetection element provides information about a single word or line of text\n that was detected in the image.

\n

A word is one or more script characters that are not separated by spaces.\n DetectText can detect up to 100 words in an image.

\n

A line is a string of equally spaced words. A line isn't necessarily a complete\n sentence. For example, a driver's license number is detected as a line. A line ends when there\n is no aligned text after it. Also, a line ends when there is a large gap between words,\n relative to the length of the words. This means, depending on the gap between words, Amazon Rekognition\n may detect multiple lines in text aligned in the same direction. Periods don't represent the\n end of a line. If a sentence spans multiple lines, the DetectText operation\n returns multiple lines.

\n

To determine whether a TextDetection element is a line of text or a word,\n use the TextDetection object Type field.

\n

To be detected, text must be within +/- 90 degrees orientation of the horizontal axis.

\n \n

For more information, see DetectText in the Amazon Rekognition Developer Guide.

" } }, "com.amazonaws.rekognition#DetectTextFilters": { @@ -4989,7 +4989,7 @@ } }, "traits": { - "smithy.api#documentation": "

The known gender identity for the celebrity that matches the provided ID.

" + "smithy.api#documentation": "

The known gender identity for the celebrity that matches the provided ID. The known\n gender identity can be Male, Female, Nonbinary, or Unlisted.

" } }, "com.amazonaws.rekognition#KnownGenderType": { @@ -5004,6 +5004,14 @@ { "value": "Female", "name": "Female" + }, + { + "value": "Nonbinary", + "name": "Nonbinary" + }, + { + "value": "Unlisted", + "name": "Unlisted" } ] } diff --git a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json index 6375693093d..0d3c91e1ba3 100644 --- a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json +++ b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json @@ -8,6 +8,7 @@ "Amp": "aps", "Amplify": "amplify", "AmplifyBackend": "amplifybackend", + "AmplifyUIBuilder": "amplifyuibuilder", "ApiGatewayManagementApi": "execute-api", "ApiGatewayV2": "apigateway", "App Mesh": "appmesh", diff --git a/service/accessanalyzer/api_op_CreateAnalyzer.go b/service/accessanalyzer/api_op_CreateAnalyzer.go index 229c2282e6a..d8a9ac5b6e0 100644 --- a/service/accessanalyzer/api_op_CreateAnalyzer.go +++ b/service/accessanalyzer/api_op_CreateAnalyzer.go @@ -4,7 +4,6 @@ package accessanalyzer import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/accessanalyzer/types" @@ -113,9 +112,6 @@ func (c *Client) addOperationCreateAnalyzerMiddlewares(stack *middleware.Stack, if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateAnalyzerMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateAnalyzerValidationMiddleware(stack); err != nil { return err } @@ -134,39 +130,6 @@ func (c *Client) addOperationCreateAnalyzerMiddlewares(stack *middleware.Stack, return nil } -type idempotencyToken_initializeOpCreateAnalyzer struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateAnalyzer) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateAnalyzer) 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.(*CreateAnalyzerInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAnalyzerInput ") - } - - 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_opCreateAnalyzerMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAnalyzer{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateAnalyzer(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/accessanalyzer/api_op_CreateArchiveRule.go b/service/accessanalyzer/api_op_CreateArchiveRule.go index 74c1948df02..311ed46cc13 100644 --- a/service/accessanalyzer/api_op_CreateArchiveRule.go +++ b/service/accessanalyzer/api_op_CreateArchiveRule.go @@ -4,7 +4,6 @@ package accessanalyzer import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/accessanalyzer/types" @@ -109,9 +108,6 @@ func (c *Client) addOperationCreateArchiveRuleMiddlewares(stack *middleware.Stac if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateArchiveRuleMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateArchiveRuleValidationMiddleware(stack); err != nil { return err } @@ -130,39 +126,6 @@ func (c *Client) addOperationCreateArchiveRuleMiddlewares(stack *middleware.Stac return nil } -type idempotencyToken_initializeOpCreateArchiveRule struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateArchiveRule) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateArchiveRule) 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.(*CreateArchiveRuleInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateArchiveRuleInput ") - } - - 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_opCreateArchiveRuleMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateArchiveRule{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateArchiveRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/accessanalyzer/api_op_DeleteAnalyzer.go b/service/accessanalyzer/api_op_DeleteAnalyzer.go index 825b65598f6..8268e20aba6 100644 --- a/service/accessanalyzer/api_op_DeleteAnalyzer.go +++ b/service/accessanalyzer/api_op_DeleteAnalyzer.go @@ -4,7 +4,6 @@ package accessanalyzer import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -96,9 +95,6 @@ func (c *Client) addOperationDeleteAnalyzerMiddlewares(stack *middleware.Stack, if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opDeleteAnalyzerMiddleware(stack, options); err != nil { - return err - } if err = addOpDeleteAnalyzerValidationMiddleware(stack); err != nil { return err } @@ -117,39 +113,6 @@ func (c *Client) addOperationDeleteAnalyzerMiddlewares(stack *middleware.Stack, return nil } -type idempotencyToken_initializeOpDeleteAnalyzer struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteAnalyzer) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteAnalyzer) 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.(*DeleteAnalyzerInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteAnalyzerInput ") - } - - 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_opDeleteAnalyzerMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteAnalyzer{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opDeleteAnalyzer(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/accessanalyzer/api_op_DeleteArchiveRule.go b/service/accessanalyzer/api_op_DeleteArchiveRule.go index 14c8882003e..ba9e0673ecd 100644 --- a/service/accessanalyzer/api_op_DeleteArchiveRule.go +++ b/service/accessanalyzer/api_op_DeleteArchiveRule.go @@ -4,7 +4,6 @@ package accessanalyzer import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -98,9 +97,6 @@ func (c *Client) addOperationDeleteArchiveRuleMiddlewares(stack *middleware.Stac if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opDeleteArchiveRuleMiddleware(stack, options); err != nil { - return err - } if err = addOpDeleteArchiveRuleValidationMiddleware(stack); err != nil { return err } @@ -119,39 +115,6 @@ func (c *Client) addOperationDeleteArchiveRuleMiddlewares(stack *middleware.Stac return nil } -type idempotencyToken_initializeOpDeleteArchiveRule struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteArchiveRule) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteArchiveRule) 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.(*DeleteArchiveRuleInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteArchiveRuleInput ") - } - - 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_opDeleteArchiveRuleMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteArchiveRule{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opDeleteArchiveRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/accessanalyzer/api_op_UpdateArchiveRule.go b/service/accessanalyzer/api_op_UpdateArchiveRule.go index 095a6d671ca..d9bcf31e936 100644 --- a/service/accessanalyzer/api_op_UpdateArchiveRule.go +++ b/service/accessanalyzer/api_op_UpdateArchiveRule.go @@ -4,7 +4,6 @@ package accessanalyzer import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/accessanalyzer/types" @@ -105,9 +104,6 @@ func (c *Client) addOperationUpdateArchiveRuleMiddlewares(stack *middleware.Stac if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opUpdateArchiveRuleMiddleware(stack, options); err != nil { - return err - } if err = addOpUpdateArchiveRuleValidationMiddleware(stack); err != nil { return err } @@ -126,39 +122,6 @@ func (c *Client) addOperationUpdateArchiveRuleMiddlewares(stack *middleware.Stac return nil } -type idempotencyToken_initializeOpUpdateArchiveRule struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpUpdateArchiveRule) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpUpdateArchiveRule) 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.(*UpdateArchiveRuleInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateArchiveRuleInput ") - } - - 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_opUpdateArchiveRuleMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateArchiveRule{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opUpdateArchiveRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amp/api_client.go b/service/amp/api_client.go index 570186959c0..ba3c1580727 100644 --- a/service/amp/api_client.go +++ b/service/amp/api_client.go @@ -4,7 +4,6 @@ package amp import ( "context" - cryptorand "crypto/rand" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" @@ -15,7 +14,6 @@ import ( smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" - smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "time" @@ -46,8 +44,6 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveDefaultEndpointConfiguration(&options) - resolveIdempotencyTokenProvider(&options) - for _, fn := range optFns { fn(&options) } @@ -80,10 +76,6 @@ type Options struct { // 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 @@ -249,13 +241,6 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } -func resolveIdempotencyTokenProvider(o *Options) { - if o.IdempotencyTokenProvider != nil { - return - } - o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) -} - func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, @@ -294,11 +279,6 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } -// IdempotencyTokenProvider interface for providing idempotency token -type IdempotencyTokenProvider interface { - GetIdempotencyToken() (string, error) -} - func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/amp/api_op_CreateAlertManagerDefinition.go b/service/amp/api_op_CreateAlertManagerDefinition.go index 5663d413a8c..3c80041fa99 100644 --- a/service/amp/api_op_CreateAlertManagerDefinition.go +++ b/service/amp/api_op_CreateAlertManagerDefinition.go @@ -4,7 +4,6 @@ package amp import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/amp/types" @@ -107,9 +106,6 @@ func (c *Client) addOperationCreateAlertManagerDefinitionMiddlewares(stack *midd if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateAlertManagerDefinitionMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateAlertManagerDefinitionValidationMiddleware(stack); err != nil { return err } @@ -128,39 +124,6 @@ func (c *Client) addOperationCreateAlertManagerDefinitionMiddlewares(stack *midd return nil } -type idempotencyToken_initializeOpCreateAlertManagerDefinition struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateAlertManagerDefinition) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateAlertManagerDefinition) 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.(*CreateAlertManagerDefinitionInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAlertManagerDefinitionInput ") - } - - 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_opCreateAlertManagerDefinitionMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAlertManagerDefinition{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateAlertManagerDefinition(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amp/api_op_CreateRuleGroupsNamespace.go b/service/amp/api_op_CreateRuleGroupsNamespace.go index 516812c6f5e..d03ebb21771 100644 --- a/service/amp/api_op_CreateRuleGroupsNamespace.go +++ b/service/amp/api_op_CreateRuleGroupsNamespace.go @@ -4,7 +4,6 @@ package amp import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/amp/types" @@ -128,9 +127,6 @@ func (c *Client) addOperationCreateRuleGroupsNamespaceMiddlewares(stack *middlew if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateRuleGroupsNamespaceMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateRuleGroupsNamespaceValidationMiddleware(stack); err != nil { return err } @@ -149,39 +145,6 @@ func (c *Client) addOperationCreateRuleGroupsNamespaceMiddlewares(stack *middlew return nil } -type idempotencyToken_initializeOpCreateRuleGroupsNamespace struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateRuleGroupsNamespace) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateRuleGroupsNamespace) 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.(*CreateRuleGroupsNamespaceInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateRuleGroupsNamespaceInput ") - } - - 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_opCreateRuleGroupsNamespaceMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateRuleGroupsNamespace{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateRuleGroupsNamespace(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amp/api_op_CreateWorkspace.go b/service/amp/api_op_CreateWorkspace.go index 533ef66ecb4..222e676d5b0 100644 --- a/service/amp/api_op_CreateWorkspace.go +++ b/service/amp/api_op_CreateWorkspace.go @@ -4,7 +4,6 @@ package amp import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/amp/types" @@ -117,9 +116,6 @@ func (c *Client) addOperationCreateWorkspaceMiddlewares(stack *middleware.Stack, if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateWorkspaceMiddleware(stack, options); err != nil { - return err - } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateWorkspace(options.Region), middleware.Before); err != nil { return err } @@ -135,39 +131,6 @@ func (c *Client) addOperationCreateWorkspaceMiddlewares(stack *middleware.Stack, return nil } -type idempotencyToken_initializeOpCreateWorkspace struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateWorkspace) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateWorkspace) 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.(*CreateWorkspaceInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateWorkspaceInput ") - } - - 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_opCreateWorkspaceMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateWorkspace{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateWorkspace(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amp/api_op_DeleteAlertManagerDefinition.go b/service/amp/api_op_DeleteAlertManagerDefinition.go index 937b7eb8905..4581506be11 100644 --- a/service/amp/api_op_DeleteAlertManagerDefinition.go +++ b/service/amp/api_op_DeleteAlertManagerDefinition.go @@ -4,7 +4,6 @@ package amp import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -94,9 +93,6 @@ func (c *Client) addOperationDeleteAlertManagerDefinitionMiddlewares(stack *midd if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opDeleteAlertManagerDefinitionMiddleware(stack, options); err != nil { - return err - } if err = addOpDeleteAlertManagerDefinitionValidationMiddleware(stack); err != nil { return err } @@ -115,39 +111,6 @@ func (c *Client) addOperationDeleteAlertManagerDefinitionMiddlewares(stack *midd return nil } -type idempotencyToken_initializeOpDeleteAlertManagerDefinition struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteAlertManagerDefinition) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteAlertManagerDefinition) 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.(*DeleteAlertManagerDefinitionInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteAlertManagerDefinitionInput ") - } - - 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_opDeleteAlertManagerDefinitionMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteAlertManagerDefinition{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opDeleteAlertManagerDefinition(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amp/api_op_DeleteRuleGroupsNamespace.go b/service/amp/api_op_DeleteRuleGroupsNamespace.go index ebe8476ab9c..14510f7df4b 100644 --- a/service/amp/api_op_DeleteRuleGroupsNamespace.go +++ b/service/amp/api_op_DeleteRuleGroupsNamespace.go @@ -4,7 +4,6 @@ package amp import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -99,9 +98,6 @@ func (c *Client) addOperationDeleteRuleGroupsNamespaceMiddlewares(stack *middlew if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opDeleteRuleGroupsNamespaceMiddleware(stack, options); err != nil { - return err - } if err = addOpDeleteRuleGroupsNamespaceValidationMiddleware(stack); err != nil { return err } @@ -120,39 +116,6 @@ func (c *Client) addOperationDeleteRuleGroupsNamespaceMiddlewares(stack *middlew return nil } -type idempotencyToken_initializeOpDeleteRuleGroupsNamespace struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteRuleGroupsNamespace) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteRuleGroupsNamespace) 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.(*DeleteRuleGroupsNamespaceInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteRuleGroupsNamespaceInput ") - } - - 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_opDeleteRuleGroupsNamespaceMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteRuleGroupsNamespace{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opDeleteRuleGroupsNamespace(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amp/api_op_DeleteWorkspace.go b/service/amp/api_op_DeleteWorkspace.go index 5dc47c79e22..6df1fe105ca 100644 --- a/service/amp/api_op_DeleteWorkspace.go +++ b/service/amp/api_op_DeleteWorkspace.go @@ -4,7 +4,6 @@ package amp import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -94,9 +93,6 @@ func (c *Client) addOperationDeleteWorkspaceMiddlewares(stack *middleware.Stack, if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opDeleteWorkspaceMiddleware(stack, options); err != nil { - return err - } if err = addOpDeleteWorkspaceValidationMiddleware(stack); err != nil { return err } @@ -115,39 +111,6 @@ func (c *Client) addOperationDeleteWorkspaceMiddlewares(stack *middleware.Stack, return nil } -type idempotencyToken_initializeOpDeleteWorkspace struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteWorkspace) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteWorkspace) 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.(*DeleteWorkspaceInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteWorkspaceInput ") - } - - 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_opDeleteWorkspaceMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteWorkspace{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opDeleteWorkspace(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amp/api_op_PutAlertManagerDefinition.go b/service/amp/api_op_PutAlertManagerDefinition.go index 056db42cf9a..fdc849c68e1 100644 --- a/service/amp/api_op_PutAlertManagerDefinition.go +++ b/service/amp/api_op_PutAlertManagerDefinition.go @@ -4,7 +4,6 @@ package amp import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/amp/types" @@ -107,9 +106,6 @@ func (c *Client) addOperationPutAlertManagerDefinitionMiddlewares(stack *middlew if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opPutAlertManagerDefinitionMiddleware(stack, options); err != nil { - return err - } if err = addOpPutAlertManagerDefinitionValidationMiddleware(stack); err != nil { return err } @@ -128,39 +124,6 @@ func (c *Client) addOperationPutAlertManagerDefinitionMiddlewares(stack *middlew return nil } -type idempotencyToken_initializeOpPutAlertManagerDefinition struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpPutAlertManagerDefinition) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpPutAlertManagerDefinition) 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.(*PutAlertManagerDefinitionInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *PutAlertManagerDefinitionInput ") - } - - 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_opPutAlertManagerDefinitionMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpPutAlertManagerDefinition{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opPutAlertManagerDefinition(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amp/api_op_PutRuleGroupsNamespace.go b/service/amp/api_op_PutRuleGroupsNamespace.go index 534c8edd0e0..9af4f8f57fa 100644 --- a/service/amp/api_op_PutRuleGroupsNamespace.go +++ b/service/amp/api_op_PutRuleGroupsNamespace.go @@ -4,7 +4,6 @@ package amp import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/amp/types" @@ -125,9 +124,6 @@ func (c *Client) addOperationPutRuleGroupsNamespaceMiddlewares(stack *middleware if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opPutRuleGroupsNamespaceMiddleware(stack, options); err != nil { - return err - } if err = addOpPutRuleGroupsNamespaceValidationMiddleware(stack); err != nil { return err } @@ -146,39 +142,6 @@ func (c *Client) addOperationPutRuleGroupsNamespaceMiddlewares(stack *middleware return nil } -type idempotencyToken_initializeOpPutRuleGroupsNamespace struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpPutRuleGroupsNamespace) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpPutRuleGroupsNamespace) 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.(*PutRuleGroupsNamespaceInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *PutRuleGroupsNamespaceInput ") - } - - 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_opPutRuleGroupsNamespaceMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpPutRuleGroupsNamespace{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opPutRuleGroupsNamespace(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amp/api_op_UpdateWorkspaceAlias.go b/service/amp/api_op_UpdateWorkspaceAlias.go index 3342b44bc59..73cc9826e9c 100644 --- a/service/amp/api_op_UpdateWorkspaceAlias.go +++ b/service/amp/api_op_UpdateWorkspaceAlias.go @@ -4,7 +4,6 @@ package amp import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -97,9 +96,6 @@ func (c *Client) addOperationUpdateWorkspaceAliasMiddlewares(stack *middleware.S if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opUpdateWorkspaceAliasMiddleware(stack, options); err != nil { - return err - } if err = addOpUpdateWorkspaceAliasValidationMiddleware(stack); err != nil { return err } @@ -118,39 +114,6 @@ func (c *Client) addOperationUpdateWorkspaceAliasMiddlewares(stack *middleware.S return nil } -type idempotencyToken_initializeOpUpdateWorkspaceAlias struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpUpdateWorkspaceAlias) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpUpdateWorkspaceAlias) 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.(*UpdateWorkspaceAliasInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateWorkspaceAliasInput ") - } - - 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_opUpdateWorkspaceAliasMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateWorkspaceAlias{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opUpdateWorkspaceAlias(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amplifyuibuilder/LICENSE.txt b/service/amplifyuibuilder/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/amplifyuibuilder/LICENSE.txt @@ -0,0 +1,202 @@ + + 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/amplifyuibuilder/api_client.go b/service/amplifyuibuilder/api_client.go new file mode 100644 index 00000000000..7c6014a0c3b --- /dev/null +++ b/service/amplifyuibuilder/api_client.go @@ -0,0 +1,297 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + 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" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "time" +) + +const ServiceID = "AmplifyUIBuilder" +const ServiceAPIVersion = "2021-08-11" + +// Client provides the API client to make operations call for AWS Amplify UI +// Builder. +type Client struct { + options Options +} + +// 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) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveDefaultEndpointConfiguration(&options) + + for _, fn := range optFns { + fn(&options) + } + + client := &Client{ + options: options, + } + + return client +} + +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 + + // 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 endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + EndpointResolver EndpointResolver + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The region to send requests to. (Required) + Region string + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. + Retryer aws.Retryer + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient +} + +// 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...) + } +} + +// WithEndpointResolver returns a functional option for setting the Client's +// EndpointResolver option. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +// 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 (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) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + for _, fn := range optFns { + fn(&options) + } + + 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 + } + } + + handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) + result, metadata, err = handler.Handle(ctx, params) + if err != nil { + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + return result, metadata, err +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +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) +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + if o.HTTPClient != nil { + return + } + o.HTTPClient = awshttp.NewBuildableClient() +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + o.Retryer = retry.NewStandard() +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "amplifyuibuilder", goModuleVersion)(stack) +} + +func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { + mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ + CredentialsProvider: o.Credentials, + Signer: o.HTTPSignerV4, + LogSigning: o.ClientLogMode.IsSigning(), + }) + return stack.Finalize.Add(mw, middleware.After) +} + +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 addRetryMiddlewares(stack *middleware.Stack, o Options) error { + mo := retry.AddRetryMiddlewaresOptions{ + Retryer: o.Retryer, + LogRetryAttempts: o.ClientLogMode.IsRetries(), + } + return retry.AddRetryMiddlewares(stack, mo) +} + +// 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 addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return awshttp.AddResponseErrorMiddleware(stack) +} + +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) +} diff --git a/service/amplifyuibuilder/api_op_CreateComponent.go b/service/amplifyuibuilder/api_op_CreateComponent.go new file mode 100644 index 00000000000..d8f02d328a4 --- /dev/null +++ b/service/amplifyuibuilder/api_op_CreateComponent.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new component for an Amplify app. +func (c *Client) CreateComponent(ctx context.Context, params *CreateComponentInput, optFns ...func(*Options)) (*CreateComponentOutput, error) { + if params == nil { + params = &CreateComponentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateComponent", params, optFns, c.addOperationCreateComponentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateComponentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateComponentInput struct { + + // The unique ID of the Amplify app to associate with the component. + // + // This member is required. + AppId *string + + // Represents the configuration of the component to create. + // + // This member is required. + ComponentToCreate *types.CreateComponentData + + // The name of the backend environment that is a part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // The unique client token. + ClientToken *string + + noSmithyDocumentSerde +} + +type CreateComponentOutput struct { + + // Describes the configuration of the new component. + Entity *types.Component + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateComponentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateComponent{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateComponent{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateComponentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateComponent(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateComponent(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "CreateComponent", + } +} diff --git a/service/amplifyuibuilder/api_op_CreateTheme.go b/service/amplifyuibuilder/api_op_CreateTheme.go new file mode 100644 index 00000000000..3ea4792725c --- /dev/null +++ b/service/amplifyuibuilder/api_op_CreateTheme.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a theme to apply to the components in an Amplify app. +func (c *Client) CreateTheme(ctx context.Context, params *CreateThemeInput, optFns ...func(*Options)) (*CreateThemeOutput, error) { + if params == nil { + params = &CreateThemeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateTheme", params, optFns, c.addOperationCreateThemeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateThemeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateThemeInput struct { + + // The unique ID of the Amplify app associated with the theme. + // + // This member is required. + AppId *string + + // The name of the backend environment that is a part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // Represents the configuration of the theme to create. + // + // This member is required. + ThemeToCreate *types.CreateThemeData + + // The unique client token. + ClientToken *string + + noSmithyDocumentSerde +} + +type CreateThemeOutput struct { + + // Describes the configuration of the new theme. + Entity *types.Theme + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateThemeMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateTheme{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateTheme{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateThemeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTheme(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateTheme(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "CreateTheme", + } +} diff --git a/service/amplifyuibuilder/api_op_DeleteComponent.go b/service/amplifyuibuilder/api_op_DeleteComponent.go new file mode 100644 index 00000000000..44c95b0f845 --- /dev/null +++ b/service/amplifyuibuilder/api_op_DeleteComponent.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a component from an Amplify app. +func (c *Client) DeleteComponent(ctx context.Context, params *DeleteComponentInput, optFns ...func(*Options)) (*DeleteComponentOutput, error) { + if params == nil { + params = &DeleteComponentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteComponent", params, optFns, c.addOperationDeleteComponentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteComponentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteComponentInput struct { + + // The unique ID of the Amplify app associated with the component to delete. + // + // This member is required. + AppId *string + + // The name of the backend environment that is a part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // The unique ID of the component to delete. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type DeleteComponentOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteComponentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteComponent{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteComponent{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteComponentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteComponent(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteComponent(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "DeleteComponent", + } +} diff --git a/service/amplifyuibuilder/api_op_DeleteTheme.go b/service/amplifyuibuilder/api_op_DeleteTheme.go new file mode 100644 index 00000000000..0be90777dee --- /dev/null +++ b/service/amplifyuibuilder/api_op_DeleteTheme.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a theme from an Amplify app. +func (c *Client) DeleteTheme(ctx context.Context, params *DeleteThemeInput, optFns ...func(*Options)) (*DeleteThemeOutput, error) { + if params == nil { + params = &DeleteThemeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteTheme", params, optFns, c.addOperationDeleteThemeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteThemeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteThemeInput struct { + + // The unique ID of the Amplify app associated with the theme to delete. + // + // This member is required. + AppId *string + + // The name of the backend environment that is a part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // The unique ID of the theme to delete. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type DeleteThemeOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteThemeMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteTheme{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteTheme{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteThemeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTheme(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteTheme(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "DeleteTheme", + } +} diff --git a/service/amplifyuibuilder/api_op_ExchangeCodeForToken.go b/service/amplifyuibuilder/api_op_ExchangeCodeForToken.go new file mode 100644 index 00000000000..db1c0e0d46f --- /dev/null +++ b/service/amplifyuibuilder/api_op_ExchangeCodeForToken.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Exchanges an access code for a token. +func (c *Client) ExchangeCodeForToken(ctx context.Context, params *ExchangeCodeForTokenInput, optFns ...func(*Options)) (*ExchangeCodeForTokenOutput, error) { + if params == nil { + params = &ExchangeCodeForTokenInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ExchangeCodeForToken", params, optFns, c.addOperationExchangeCodeForTokenMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ExchangeCodeForTokenOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ExchangeCodeForTokenInput struct { + + // The third-party provider for the token. The only valid value is figma. + // + // This member is required. + Provider types.TokenProviders + + // Describes the configuration of the request. + // + // This member is required. + Request *types.ExchangeCodeForTokenRequestBody + + noSmithyDocumentSerde +} + +type ExchangeCodeForTokenOutput struct { + + // The access token. + // + // This member is required. + AccessToken *string + + // The date and time when the new access token expires. + // + // This member is required. + ExpiresIn *int32 + + // The token to use to refresh a previously issued access token that might have + // expired. + // + // This member is required. + RefreshToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationExchangeCodeForTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpExchangeCodeForToken{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpExchangeCodeForToken{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpExchangeCodeForTokenValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExchangeCodeForToken(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opExchangeCodeForToken(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "ExchangeCodeForToken", + } +} diff --git a/service/amplifyuibuilder/api_op_ExportComponents.go b/service/amplifyuibuilder/api_op_ExportComponents.go new file mode 100644 index 00000000000..1e2209442a4 --- /dev/null +++ b/service/amplifyuibuilder/api_op_ExportComponents.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Exports component configurations to code that is ready to integrate into an +// Amplify app. +func (c *Client) ExportComponents(ctx context.Context, params *ExportComponentsInput, optFns ...func(*Options)) (*ExportComponentsOutput, error) { + if params == nil { + params = &ExportComponentsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ExportComponents", params, optFns, c.addOperationExportComponentsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ExportComponentsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ExportComponentsInput struct { + + // The unique ID of the Amplify app to export components to. + // + // This member is required. + AppId *string + + // The name of the backend environment that is a part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + noSmithyDocumentSerde +} + +type ExportComponentsOutput struct { + + // Represents the configuration of the exported components. + // + // This member is required. + Entities []types.Component + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationExportComponentsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpExportComponents{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpExportComponents{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpExportComponentsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExportComponents(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opExportComponents(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "ExportComponents", + } +} diff --git a/service/amplifyuibuilder/api_op_ExportThemes.go b/service/amplifyuibuilder/api_op_ExportThemes.go new file mode 100644 index 00000000000..d2ccda2a622 --- /dev/null +++ b/service/amplifyuibuilder/api_op_ExportThemes.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Exports theme configurations to code that is ready to integrate into an Amplify +// app. +func (c *Client) ExportThemes(ctx context.Context, params *ExportThemesInput, optFns ...func(*Options)) (*ExportThemesOutput, error) { + if params == nil { + params = &ExportThemesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ExportThemes", params, optFns, c.addOperationExportThemesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ExportThemesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ExportThemesInput struct { + + // The unique ID of the Amplify app to export the themes to. + // + // This member is required. + AppId *string + + // The name of the backend environment that is part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + noSmithyDocumentSerde +} + +type ExportThemesOutput struct { + + // Represents the configuration of the exported themes. + // + // This member is required. + Entities []types.Theme + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationExportThemesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpExportThemes{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpExportThemes{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpExportThemesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExportThemes(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opExportThemes(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "ExportThemes", + } +} diff --git a/service/amplifyuibuilder/api_op_GetComponent.go b/service/amplifyuibuilder/api_op_GetComponent.go new file mode 100644 index 00000000000..c67bb117476 --- /dev/null +++ b/service/amplifyuibuilder/api_op_GetComponent.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns an existing component for an Amplify app. +func (c *Client) GetComponent(ctx context.Context, params *GetComponentInput, optFns ...func(*Options)) (*GetComponentOutput, error) { + if params == nil { + params = &GetComponentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetComponent", params, optFns, c.addOperationGetComponentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetComponentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetComponentInput struct { + + // The unique ID of the Amplify app. + // + // This member is required. + AppId *string + + // The name of the backend environment that is part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // The unique ID of the component. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetComponentOutput struct { + + // Represents the configuration settings for the component. + Component *types.Component + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetComponentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetComponent{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetComponent{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetComponentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetComponent(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetComponent(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "GetComponent", + } +} diff --git a/service/amplifyuibuilder/api_op_GetTheme.go b/service/amplifyuibuilder/api_op_GetTheme.go new file mode 100644 index 00000000000..bd5e2e95b9d --- /dev/null +++ b/service/amplifyuibuilder/api_op_GetTheme.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns an existing theme for an Amplify app. +func (c *Client) GetTheme(ctx context.Context, params *GetThemeInput, optFns ...func(*Options)) (*GetThemeOutput, error) { + if params == nil { + params = &GetThemeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetTheme", params, optFns, c.addOperationGetThemeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetThemeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetThemeInput struct { + + // The unique ID of the Amplify app. + // + // This member is required. + AppId *string + + // The name of the backend environment that is part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // The unique ID for the theme. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetThemeOutput struct { + + // Represents the configuration settings for the theme. + Theme *types.Theme + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetThemeMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetTheme{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetTheme{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetThemeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTheme(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetTheme(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "GetTheme", + } +} diff --git a/service/amplifyuibuilder/api_op_ListComponents.go b/service/amplifyuibuilder/api_op_ListComponents.go new file mode 100644 index 00000000000..6962f537ca9 --- /dev/null +++ b/service/amplifyuibuilder/api_op_ListComponents.go @@ -0,0 +1,221 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of components for a specified Amplify app and backend +// environment. +func (c *Client) ListComponents(ctx context.Context, params *ListComponentsInput, optFns ...func(*Options)) (*ListComponentsOutput, error) { + if params == nil { + params = &ListComponentsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListComponents", params, optFns, c.addOperationListComponentsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListComponentsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListComponentsInput struct { + + // The unique ID for the Amplify app. + // + // This member is required. + AppId *string + + // The name of the backend environment that is a part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // The maximum number of components to retrieve. + MaxResults int32 + + // The token to request the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListComponentsOutput struct { + + // The list of components for the Amplify app. + // + // This member is required. + Entities []types.ComponentSummary + + // The pagination token that's included if more results are available. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListComponents{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListComponents{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListComponentsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListComponents(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListComponentsAPIClient is a client that implements the ListComponents +// operation. +type ListComponentsAPIClient interface { + ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) +} + +var _ ListComponentsAPIClient = (*Client)(nil) + +// ListComponentsPaginatorOptions is the paginator options for ListComponents +type ListComponentsPaginatorOptions struct { + // The maximum number of components to retrieve. + 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 +} + +// ListComponentsPaginator is a paginator for ListComponents +type ListComponentsPaginator struct { + options ListComponentsPaginatorOptions + client ListComponentsAPIClient + params *ListComponentsInput + nextToken *string + firstPage bool +} + +// NewListComponentsPaginator returns a new ListComponentsPaginator +func NewListComponentsPaginator(client ListComponentsAPIClient, params *ListComponentsInput, optFns ...func(*ListComponentsPaginatorOptions)) *ListComponentsPaginator { + if params == nil { + params = &ListComponentsInput{} + } + + options := ListComponentsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListComponentsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListComponentsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListComponents page. +func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListComponentsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListComponents(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 +} + +func newServiceMetadataMiddleware_opListComponents(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "ListComponents", + } +} diff --git a/service/amplifyuibuilder/api_op_ListThemes.go b/service/amplifyuibuilder/api_op_ListThemes.go new file mode 100644 index 00000000000..5eba570afc8 --- /dev/null +++ b/service/amplifyuibuilder/api_op_ListThemes.go @@ -0,0 +1,219 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of themes for a specified Amplify app and backend environment. +func (c *Client) ListThemes(ctx context.Context, params *ListThemesInput, optFns ...func(*Options)) (*ListThemesOutput, error) { + if params == nil { + params = &ListThemesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListThemes", params, optFns, c.addOperationListThemesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListThemesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListThemesInput struct { + + // The unique ID for the Amplify app. + // + // This member is required. + AppId *string + + // The name of the backend environment that is a part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // The maximum number of theme results to return in the response. + MaxResults int32 + + // The token to request the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListThemesOutput struct { + + // The list of themes for the Amplify app. + // + // This member is required. + Entities []types.ThemeSummary + + // The pagination token that's returned if more results are available. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListThemesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListThemes{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListThemes{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListThemesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListThemes(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListThemesAPIClient is a client that implements the ListThemes operation. +type ListThemesAPIClient interface { + ListThemes(context.Context, *ListThemesInput, ...func(*Options)) (*ListThemesOutput, error) +} + +var _ ListThemesAPIClient = (*Client)(nil) + +// ListThemesPaginatorOptions is the paginator options for ListThemes +type ListThemesPaginatorOptions struct { + // The maximum number of theme 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 +} + +// ListThemesPaginator is a paginator for ListThemes +type ListThemesPaginator struct { + options ListThemesPaginatorOptions + client ListThemesAPIClient + params *ListThemesInput + nextToken *string + firstPage bool +} + +// NewListThemesPaginator returns a new ListThemesPaginator +func NewListThemesPaginator(client ListThemesAPIClient, params *ListThemesInput, optFns ...func(*ListThemesPaginatorOptions)) *ListThemesPaginator { + if params == nil { + params = &ListThemesInput{} + } + + options := ListThemesPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListThemesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListThemesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListThemes page. +func (p *ListThemesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListThemesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListThemes(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 +} + +func newServiceMetadataMiddleware_opListThemes(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "ListThemes", + } +} diff --git a/service/amplifyuibuilder/api_op_RefreshToken.go b/service/amplifyuibuilder/api_op_RefreshToken.go new file mode 100644 index 00000000000..330020dcbb0 --- /dev/null +++ b/service/amplifyuibuilder/api_op_RefreshToken.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Refreshes a previously issued access token that might have expired. +func (c *Client) RefreshToken(ctx context.Context, params *RefreshTokenInput, optFns ...func(*Options)) (*RefreshTokenOutput, error) { + if params == nil { + params = &RefreshTokenInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RefreshToken", params, optFns, c.addOperationRefreshTokenMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RefreshTokenOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RefreshTokenInput struct { + + // The third-party provider for the token. The only valid value is figma. + // + // This member is required. + Provider types.TokenProviders + + // Information about the refresh token request. + // + // This member is required. + RefreshTokenBody *types.RefreshTokenRequestBody + + noSmithyDocumentSerde +} + +type RefreshTokenOutput struct { + + // The access token. + // + // This member is required. + AccessToken *string + + // The date and time when the new access token expires. + // + // This member is required. + ExpiresIn *int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRefreshTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpRefreshToken{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRefreshToken{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpRefreshTokenValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRefreshToken(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRefreshToken(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "RefreshToken", + } +} diff --git a/service/amplifyuibuilder/api_op_UpdateComponent.go b/service/amplifyuibuilder/api_op_UpdateComponent.go new file mode 100644 index 00000000000..83c54feeb10 --- /dev/null +++ b/service/amplifyuibuilder/api_op_UpdateComponent.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an existing component. +func (c *Client) UpdateComponent(ctx context.Context, params *UpdateComponentInput, optFns ...func(*Options)) (*UpdateComponentOutput, error) { + if params == nil { + params = &UpdateComponentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateComponent", params, optFns, c.addOperationUpdateComponentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateComponentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateComponentInput struct { + + // The unique ID for the Amplify app. + // + // This member is required. + AppId *string + + // The name of the backend environment that is part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // The unique ID for the component. + // + // This member is required. + Id *string + + // The configuration of the updated component. + // + // This member is required. + UpdatedComponent *types.UpdateComponentData + + // The unique client token. + ClientToken *string + + noSmithyDocumentSerde +} + +type UpdateComponentOutput struct { + + // Describes the configuration of the updated component. + Entity *types.Component + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateComponentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateComponent{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateComponent{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateComponentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateComponent(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateComponent(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "UpdateComponent", + } +} diff --git a/service/amplifyuibuilder/api_op_UpdateTheme.go b/service/amplifyuibuilder/api_op_UpdateTheme.go new file mode 100644 index 00000000000..e041462d33d --- /dev/null +++ b/service/amplifyuibuilder/api_op_UpdateTheme.go @@ -0,0 +1,139 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an existing theme. +func (c *Client) UpdateTheme(ctx context.Context, params *UpdateThemeInput, optFns ...func(*Options)) (*UpdateThemeOutput, error) { + if params == nil { + params = &UpdateThemeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateTheme", params, optFns, c.addOperationUpdateThemeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateThemeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateThemeInput struct { + + // The unique ID for the Amplify app. + // + // This member is required. + AppId *string + + // The name of the backend environment that is part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // The unique ID for the theme. + // + // This member is required. + Id *string + + // The configuration of the updated theme. + // + // This member is required. + UpdatedTheme *types.UpdateThemeData + + // The unique client token. + ClientToken *string + + noSmithyDocumentSerde +} + +type UpdateThemeOutput struct { + + // Describes the configuration of the updated theme. + Entity *types.Theme + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateThemeMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateTheme{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateTheme{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateThemeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTheme(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateTheme(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "amplifyuibuilder", + OperationName: "UpdateTheme", + } +} diff --git a/service/amplifyuibuilder/deserializers.go b/service/amplifyuibuilder/deserializers.go new file mode 100644 index 00000000000..82b28f78261 --- /dev/null +++ b/service/amplifyuibuilder/deserializers.go @@ -0,0 +1,4334 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "io/ioutil" + "strings" +) + +type awsRestjson1_deserializeOpCreateComponent struct { +} + +func (*awsRestjson1_deserializeOpCreateComponent) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateComponent(response, &metadata) + } + output := &CreateComponentOutput{} + 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_deserializeDocumentComponent(&output.Entity, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateComponentOutput(v **CreateComponentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateComponentOutput + if *v == nil { + sv = &CreateComponentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entity": + if err := awsRestjson1_deserializeDocumentComponent(&sv.Entity, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateTheme struct { +} + +func (*awsRestjson1_deserializeOpCreateTheme) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateTheme(response, &metadata) + } + output := &CreateThemeOutput{} + 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_deserializeDocumentTheme(&output.Entity, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateThemeOutput(v **CreateThemeOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateThemeOutput + if *v == nil { + sv = &CreateThemeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entity": + if err := awsRestjson1_deserializeDocumentTheme(&sv.Entity, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteComponent struct { +} + +func (*awsRestjson1_deserializeOpDeleteComponent) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteComponent(response, &metadata) + } + output := &DeleteComponentOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteTheme struct { +} + +func (*awsRestjson1_deserializeOpDeleteTheme) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteTheme(response, &metadata) + } + output := &DeleteThemeOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpExchangeCodeForToken struct { +} + +func (*awsRestjson1_deserializeOpExchangeCodeForToken) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpExchangeCodeForToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorExchangeCodeForToken(response, &metadata) + } + output := &ExchangeCodeForTokenOutput{} + 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_deserializeOpDocumentExchangeCodeForTokenOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorExchangeCodeForToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentExchangeCodeForTokenOutput(v **ExchangeCodeForTokenOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ExchangeCodeForTokenOutput + if *v == nil { + sv = &ExchangeCodeForTokenOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AccessToken = ptr.String(jtv) + } + + case "expiresIn": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ExpiresIn = ptr.Int32(int32(i64)) + } + + case "refreshToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RefreshToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpExportComponents struct { +} + +func (*awsRestjson1_deserializeOpExportComponents) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpExportComponents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorExportComponents(response, &metadata) + } + output := &ExportComponentsOutput{} + 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_deserializeOpDocumentExportComponentsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorExportComponents(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentExportComponentsOutput(v **ExportComponentsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ExportComponentsOutput + if *v == nil { + sv = &ExportComponentsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entities": + if err := awsRestjson1_deserializeDocumentComponentList(&sv.Entities, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpExportThemes struct { +} + +func (*awsRestjson1_deserializeOpExportThemes) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpExportThemes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorExportThemes(response, &metadata) + } + output := &ExportThemesOutput{} + 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_deserializeOpDocumentExportThemesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorExportThemes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentExportThemesOutput(v **ExportThemesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ExportThemesOutput + if *v == nil { + sv = &ExportThemesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entities": + if err := awsRestjson1_deserializeDocumentThemeList(&sv.Entities, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetComponent struct { +} + +func (*awsRestjson1_deserializeOpGetComponent) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetComponent(response, &metadata) + } + output := &GetComponentOutput{} + 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_deserializeDocumentComponent(&output.Component, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetComponentOutput(v **GetComponentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetComponentOutput + if *v == nil { + sv = &GetComponentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "component": + if err := awsRestjson1_deserializeDocumentComponent(&sv.Component, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetTheme struct { +} + +func (*awsRestjson1_deserializeOpGetTheme) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetTheme(response, &metadata) + } + output := &GetThemeOutput{} + 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_deserializeDocumentTheme(&output.Theme, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetThemeOutput(v **GetThemeOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetThemeOutput + if *v == nil { + sv = &GetThemeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "theme": + if err := awsRestjson1_deserializeDocumentTheme(&sv.Theme, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListComponents struct { +} + +func (*awsRestjson1_deserializeOpListComponents) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListComponents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListComponents(response, &metadata) + } + output := &ListComponentsOutput{} + 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_deserializeOpDocumentListComponentsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListComponents(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListComponentsOutput(v **ListComponentsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListComponentsOutput + if *v == nil { + sv = &ListComponentsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entities": + if err := awsRestjson1_deserializeDocumentComponentSummaryList(&sv.Entities, 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_deserializeOpListThemes struct { +} + +func (*awsRestjson1_deserializeOpListThemes) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListThemes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListThemes(response, &metadata) + } + output := &ListThemesOutput{} + 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_deserializeOpDocumentListThemesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListThemes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListThemesOutput(v **ListThemesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListThemesOutput + if *v == nil { + sv = &ListThemesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entities": + if err := awsRestjson1_deserializeDocumentThemeSummaryList(&sv.Entities, 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_deserializeOpRefreshToken struct { +} + +func (*awsRestjson1_deserializeOpRefreshToken) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRefreshToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorRefreshToken(response, &metadata) + } + output := &RefreshTokenOutput{} + 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_deserializeOpDocumentRefreshTokenOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorRefreshToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentRefreshTokenOutput(v **RefreshTokenOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RefreshTokenOutput + if *v == nil { + sv = &RefreshTokenOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accessToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AccessToken = ptr.String(jtv) + } + + case "expiresIn": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ExpiresIn = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateComponent struct { +} + +func (*awsRestjson1_deserializeOpUpdateComponent) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateComponent(response, &metadata) + } + output := &UpdateComponentOutput{} + 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_deserializeDocumentComponent(&output.Entity, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateComponentOutput(v **UpdateComponentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateComponentOutput + if *v == nil { + sv = &UpdateComponentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entity": + if err := awsRestjson1_deserializeDocumentComponent(&sv.Entity, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateTheme struct { +} + +func (*awsRestjson1_deserializeOpUpdateTheme) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateTheme) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateTheme(response, &metadata) + } + output := &UpdateThemeOutput{} + 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_deserializeDocumentTheme(&output.Entity, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateTheme(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceConflictException", errorCode): + return awsRestjson1_deserializeErrorResourceConflictException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateThemeOutput(v **UpdateThemeOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateThemeOutput + if *v == nil { + sv = &UpdateThemeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entity": + if err := awsRestjson1_deserializeDocumentTheme(&sv.Entity, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + 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_deserializeDocumentInternalServerException(&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_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidParameterException{} + 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_deserializeDocumentInvalidParameterException(&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_deserializeErrorResourceConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceConflictException{} + 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_deserializeDocumentResourceConflictException(&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_deserializeDocumentComponent(v **types.Component, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Component + if *v == nil { + sv = &types.Component{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "appId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AppId = ptr.String(jtv) + } + + case "bindingProperties": + if err := awsRestjson1_deserializeDocumentComponentBindingProperties(&sv.BindingProperties, value); err != nil { + return err + } + + case "children": + if err := awsRestjson1_deserializeDocumentComponentChildList(&sv.Children, value); err != nil { + return err + } + + case "collectionProperties": + if err := awsRestjson1_deserializeDocumentComponentCollectionProperties(&sv.CollectionProperties, value); err != nil { + return err + } + + case "componentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComponentType to be of type string, got %T instead", value) + } + sv.ComponentType = 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 "environmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.EnvironmentName = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + 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.ModifiedAt = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComponentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "overrides": + if err := awsRestjson1_deserializeDocumentComponentOverrides(&sv.Overrides, value); err != nil { + return err + } + + case "properties": + if err := awsRestjson1_deserializeDocumentComponentProperties(&sv.Properties, value); err != nil { + return err + } + + case "sourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SourceId = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "variants": + if err := awsRestjson1_deserializeDocumentComponentVariants(&sv.Variants, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentComponentBindingProperties(v *map[string]types.ComponentBindingPropertiesValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.ComponentBindingPropertiesValue + if *v == nil { + mv = map[string]types.ComponentBindingPropertiesValue{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.ComponentBindingPropertiesValue + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentComponentBindingPropertiesValue(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentComponentBindingPropertiesValue(v **types.ComponentBindingPropertiesValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ComponentBindingPropertiesValue + if *v == nil { + sv = &types.ComponentBindingPropertiesValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bindingProperties": + if err := awsRestjson1_deserializeDocumentComponentBindingPropertiesValueProperties(&sv.BindingProperties, value); err != nil { + return err + } + + case "defaultValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DefaultValue = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentComponentBindingPropertiesValueProperties(v **types.ComponentBindingPropertiesValueProperties, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ComponentBindingPropertiesValueProperties + if *v == nil { + sv = &types.ComponentBindingPropertiesValueProperties{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bucket": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Bucket = ptr.String(jtv) + } + + case "defaultValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DefaultValue = ptr.String(jtv) + } + + case "field": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Field = ptr.String(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "model": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Model = ptr.String(jtv) + } + + case "predicates": + if err := awsRestjson1_deserializeDocumentPredicateList(&sv.Predicates, value); err != nil { + return err + } + + case "userAttribute": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.UserAttribute = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentComponentChild(v **types.ComponentChild, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ComponentChild + if *v == nil { + sv = &types.ComponentChild{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "children": + if err := awsRestjson1_deserializeDocumentComponentChildList(&sv.Children, value); err != nil { + return err + } + + case "componentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ComponentType = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "properties": + if err := awsRestjson1_deserializeDocumentComponentProperties(&sv.Properties, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentComponentChildList(v *[]types.ComponentChild, 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.ComponentChild + if *v == nil { + cv = []types.ComponentChild{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ComponentChild + destAddr := &col + if err := awsRestjson1_deserializeDocumentComponentChild(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentComponentCollectionProperties(v *map[string]types.ComponentDataConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.ComponentDataConfiguration + if *v == nil { + mv = map[string]types.ComponentDataConfiguration{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.ComponentDataConfiguration + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentComponentDataConfiguration(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentComponentConditionProperty(v **types.ComponentConditionProperty, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ComponentConditionProperty + if *v == nil { + sv = &types.ComponentConditionProperty{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "else": + if err := awsRestjson1_deserializeDocumentComponentProperty(&sv.Else, value); err != nil { + return err + } + + case "field": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Field = ptr.String(jtv) + } + + case "operand": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Operand = ptr.String(jtv) + } + + case "operator": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Operator = ptr.String(jtv) + } + + case "property": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Property = ptr.String(jtv) + } + + case "then": + if err := awsRestjson1_deserializeDocumentComponentProperty(&sv.Then, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentComponentDataConfiguration(v **types.ComponentDataConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ComponentDataConfiguration + if *v == nil { + sv = &types.ComponentDataConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "identifiers": + if err := awsRestjson1_deserializeDocumentIdentifierList(&sv.Identifiers, value); err != nil { + return err + } + + case "model": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Model = ptr.String(jtv) + } + + case "predicate": + if err := awsRestjson1_deserializeDocumentPredicate(&sv.Predicate, value); err != nil { + return err + } + + case "sort": + if err := awsRestjson1_deserializeDocumentSortPropertyList(&sv.Sort, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentComponentList(v *[]types.Component, 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.Component + if *v == nil { + cv = []types.Component{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Component + destAddr := &col + if err := awsRestjson1_deserializeDocumentComponent(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentComponentOverrides(v *map[string]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]map[string]string + if *v == nil { + mv = map[string]map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal map[string]string + mapVar := parsedVal + if err := awsRestjson1_deserializeDocumentComponentOverridesValue(&mapVar, value); err != nil { + return err + } + parsedVal = mapVar + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentComponentOverridesValue(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_deserializeDocumentComponentProperties(v *map[string]types.ComponentProperty, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.ComponentProperty + if *v == nil { + mv = map[string]types.ComponentProperty{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.ComponentProperty + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentComponentProperty(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentComponentProperty(v **types.ComponentProperty, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ComponentProperty + if *v == nil { + sv = &types.ComponentProperty{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bindingProperties": + if err := awsRestjson1_deserializeDocumentComponentPropertyBindingProperties(&sv.BindingProperties, value); err != nil { + return err + } + + case "bindings": + if err := awsRestjson1_deserializeDocumentFormBindings(&sv.Bindings, value); err != nil { + return err + } + + case "collectionBindingProperties": + if err := awsRestjson1_deserializeDocumentComponentPropertyBindingProperties(&sv.CollectionBindingProperties, value); err != nil { + return err + } + + case "concat": + if err := awsRestjson1_deserializeDocumentComponentPropertyList(&sv.Concat, value); err != nil { + return err + } + + case "condition": + if err := awsRestjson1_deserializeDocumentComponentConditionProperty(&sv.Condition, value); err != nil { + return err + } + + case "configured": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Configured = ptr.Bool(jtv) + } + + case "defaultValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DefaultValue = ptr.String(jtv) + } + + case "event": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Event = ptr.String(jtv) + } + + case "importedValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ImportedValue = ptr.String(jtv) + } + + case "model": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Model = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + case "userAttribute": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.UserAttribute = ptr.String(jtv) + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentComponentPropertyBindingProperties(v **types.ComponentPropertyBindingProperties, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ComponentPropertyBindingProperties + if *v == nil { + sv = &types.ComponentPropertyBindingProperties{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "field": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Field = ptr.String(jtv) + } + + case "property": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Property = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentComponentPropertyList(v *[]types.ComponentProperty, 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.ComponentProperty + if *v == nil { + cv = []types.ComponentProperty{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ComponentProperty + destAddr := &col + if err := awsRestjson1_deserializeDocumentComponentProperty(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentComponentSummary(v **types.ComponentSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ComponentSummary + if *v == nil { + sv = &types.ComponentSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "appId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AppId = ptr.String(jtv) + } + + case "componentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComponentType to be of type string, got %T instead", value) + } + sv.ComponentType = ptr.String(jtv) + } + + case "environmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.EnvironmentName = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComponentName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentComponentSummaryList(v *[]types.ComponentSummary, 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.ComponentSummary + if *v == nil { + cv = []types.ComponentSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ComponentSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentComponentSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentComponentVariant(v **types.ComponentVariant, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ComponentVariant + if *v == nil { + sv = &types.ComponentVariant{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "overrides": + if err := awsRestjson1_deserializeDocumentComponentOverrides(&sv.Overrides, value); err != nil { + return err + } + + case "variantValues": + if err := awsRestjson1_deserializeDocumentComponentVariantValues(&sv.VariantValues, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentComponentVariants(v *[]types.ComponentVariant, 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.ComponentVariant + if *v == nil { + cv = []types.ComponentVariant{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ComponentVariant + destAddr := &col + if err := awsRestjson1_deserializeDocumentComponentVariant(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentComponentVariantValues(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_deserializeDocumentFormBindingElement(v **types.FormBindingElement, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.FormBindingElement + if *v == nil { + sv = &types.FormBindingElement{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "element": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Element = ptr.String(jtv) + } + + case "property": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Property = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFormBindings(v *map[string]types.FormBindingElement, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.FormBindingElement + if *v == nil { + mv = map[string]types.FormBindingElement{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.FormBindingElement + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentFormBindingElement(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentIdentifierList(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_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalServerException + if *v == nil { + sv = &types.InternalServerException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInvalidParameterException(v **types.InvalidParameterException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InvalidParameterException + if *v == nil { + sv = &types.InvalidParameterException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPredicate(v **types.Predicate, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Predicate + if *v == nil { + sv = &types.Predicate{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "and": + if err := awsRestjson1_deserializeDocumentPredicateList(&sv.And, value); err != nil { + return err + } + + case "field": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Field = ptr.String(jtv) + } + + case "operand": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Operand = ptr.String(jtv) + } + + case "operator": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Operator = ptr.String(jtv) + } + + case "or": + if err := awsRestjson1_deserializeDocumentPredicateList(&sv.Or, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPredicateList(v *[]types.Predicate, 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.Predicate + if *v == nil { + cv = []types.Predicate{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Predicate + destAddr := &col + if err := awsRestjson1_deserializeDocumentPredicate(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentResourceConflictException(v **types.ResourceConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceConflictException + if *v == nil { + sv = &types.ResourceConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = 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 "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_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 "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_deserializeDocumentSortProperty(v **types.SortProperty, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SortProperty + if *v == nil { + sv = &types.SortProperty{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "direction": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SortDirection to be of type string, got %T instead", value) + } + sv.Direction = types.SortDirection(jtv) + } + + case "field": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Field = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSortPropertyList(v *[]types.SortProperty, 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.SortProperty + if *v == nil { + cv = []types.SortProperty{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SortProperty + destAddr := &col + if err := awsRestjson1_deserializeDocumentSortProperty(&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 TagValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentTheme(v **types.Theme, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Theme + if *v == nil { + sv = &types.Theme{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "appId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AppId = 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 "environmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.EnvironmentName = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + 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.ModifiedAt = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ThemeName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "overrides": + if err := awsRestjson1_deserializeDocumentThemeValuesList(&sv.Overrides, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "values": + if err := awsRestjson1_deserializeDocumentThemeValuesList(&sv.Values, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentThemeList(v *[]types.Theme, 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.Theme + if *v == nil { + cv = []types.Theme{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Theme + destAddr := &col + if err := awsRestjson1_deserializeDocumentTheme(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentThemeSummary(v **types.ThemeSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ThemeSummary + if *v == nil { + sv = &types.ThemeSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "appId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AppId = ptr.String(jtv) + } + + case "environmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.EnvironmentName = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ThemeName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentThemeSummaryList(v *[]types.ThemeSummary, 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.ThemeSummary + if *v == nil { + cv = []types.ThemeSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ThemeSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentThemeSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentThemeValue(v **types.ThemeValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ThemeValue + if *v == nil { + sv = &types.ThemeValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "children": + if err := awsRestjson1_deserializeDocumentThemeValuesList(&sv.Children, value); err != nil { + return err + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentThemeValues(v **types.ThemeValues, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ThemeValues + if *v == nil { + sv = &types.ThemeValues{} + } 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 String to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "value": + if err := awsRestjson1_deserializeDocumentThemeValue(&sv.Value, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentThemeValuesList(v *[]types.ThemeValues, 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.ThemeValues + if *v == nil { + cv = []types.ThemeValues{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ThemeValues + destAddr := &col + if err := awsRestjson1_deserializeDocumentThemeValues(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} diff --git a/service/amplifyuibuilder/doc.go b/service/amplifyuibuilder/doc.go new file mode 100644 index 00000000000..bab04db3ca2 --- /dev/null +++ b/service/amplifyuibuilder/doc.go @@ -0,0 +1,18 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package amplifyuibuilder provides the API client, operations, and parameter +// types for AWS Amplify UI Builder. +// +// The Amplify UI Builder API provides a programmatic interface for creating and +// configuring user interface (UI) component libraries and themes for use in your +// Amplify applications. You can then connect these UI components to an +// application's backend Amazon Web Services resources. You can also use the +// Amplify Studio visual designer to create UI components and model data for an +// app. For more information, see Introduction +// (https://docs.amplify.aws/console/adminui/intro) in the Amplify Docs. The +// Amplify Framework is a comprehensive set of SDKs, libraries, tools, and +// documentation for client app development. For more information, see the Amplify +// Framework (https://docs.amplify.aws/). For more information about deploying an +// Amplify application to Amazon Web Services, see the Amplify Console User Guide +// (https://docs.aws.amazon.com/amplify/latest/userguide/welcome.html). +package amplifyuibuilder diff --git a/service/amplifyuibuilder/endpoints.go b/service/amplifyuibuilder/endpoints.go new file mode 100644 index 00000000000..1423bef7d19 --- /dev/null +++ b/service/amplifyuibuilder/endpoints.go @@ -0,0 +1,200 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" + "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) +} + +func resolveDefaultEndpointConfiguration(o *Options) { + if o.EndpointResolver != nil { + return + } + o.EndpointResolver = NewDefaultEndpointResolver() +} + +// 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, +) { + 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 { + 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 = "amplifyuibuilder" + } + 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 + resolver EndpointResolver +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + if w.awsResolver == nil { + goto fallback + } + endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) + if err == nil { + return endpoint, nil + } + + if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { + return endpoint, err + } + +fallback: + if w.resolver == nil { + return endpoint, fmt.Errorf("default endpoint resolver provided was nil") + } + return w.resolver.ResolveEndpoint(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 EndpointResolver that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided +// fallbackResolver for resolution. +// +// fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + resolver: fallbackResolver, + } +} + +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 + } + } + +} diff --git a/service/amplifyuibuilder/generated.json b/service/amplifyuibuilder/generated.json new file mode 100644 index 00000000000..d8685325dce --- /dev/null +++ b/service/amplifyuibuilder/generated.json @@ -0,0 +1,40 @@ +{ + "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" + }, + "files": [ + "api_client.go", + "api_op_CreateComponent.go", + "api_op_CreateTheme.go", + "api_op_DeleteComponent.go", + "api_op_DeleteTheme.go", + "api_op_ExchangeCodeForToken.go", + "api_op_ExportComponents.go", + "api_op_ExportThemes.go", + "api_op_GetComponent.go", + "api_op_GetTheme.go", + "api_op_ListComponents.go", + "api_op_ListThemes.go", + "api_op_RefreshToken.go", + "api_op_UpdateComponent.go", + "api_op_UpdateTheme.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "protocol_test.go", + "serializers.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder", + "unstable": false +} diff --git a/service/amplifyuibuilder/go.mod b/service/amplifyuibuilder/go.mod new file mode 100644 index 00000000000..59152df82df --- /dev/null +++ b/service/amplifyuibuilder/go.mod @@ -0,0 +1,16 @@ +module github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.11.2 + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.2 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.0.2 + github.com/aws/smithy-go v1.9.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/amplifyuibuilder/go.sum b/service/amplifyuibuilder/go.sum new file mode 100644 index 00000000000..45efc0b1e03 --- /dev/null +++ b/service/amplifyuibuilder/go.sum @@ -0,0 +1,14 @@ +github.com/aws/smithy-go v1.9.0 h1:c7FUdEqrQA1/UVKKCNDFQPNKGp4FQg3YW4Ck5SLTG58= +github.com/aws/smithy-go v1.9.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +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= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/service/amplifyuibuilder/go_module_metadata.go b/service/amplifyuibuilder/go_module_metadata.go new file mode 100644 index 00000000000..77c84d54c09 --- /dev/null +++ b/service/amplifyuibuilder/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package amplifyuibuilder + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/amplifyuibuilder/internal/endpoints/endpoints.go b/service/amplifyuibuilder/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..011fbff052e --- /dev/null +++ b/service/amplifyuibuilder/internal/endpoints/endpoints.go @@ -0,0 +1,250 @@ +// 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 AmplifyUIBuilder 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 + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\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: "amplifyuibuilder.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "amplifyuibuilder-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "amplifyuibuilder-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "amplifyuibuilder.{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: "amplifyuibuilder.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "amplifyuibuilder-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "amplifyuibuilder-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "amplifyuibuilder.{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: "amplifyuibuilder-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "amplifyuibuilder.{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: "amplifyuibuilder-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "amplifyuibuilder.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "amplifyuibuilder.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "amplifyuibuilder-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "amplifyuibuilder-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "amplifyuibuilder.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + }, +} diff --git a/service/amplifyuibuilder/internal/endpoints/endpoints_test.go b/service/amplifyuibuilder/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/amplifyuibuilder/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/amplifyuibuilder/protocol_test.go b/service/amplifyuibuilder/protocol_test.go new file mode 100644 index 00000000000..a143071007b --- /dev/null +++ b/service/amplifyuibuilder/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder diff --git a/service/amplifyuibuilder/serializers.go b/service/amplifyuibuilder/serializers.go new file mode 100644 index 00000000000..5ce96fbce1f --- /dev/null +++ b/service/amplifyuibuilder/serializers.go @@ -0,0 +1,1987 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/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" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +type awsRestjson1_serializeOpCreateComponent struct { +} + +func (*awsRestjson1_serializeOpCreateComponent) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateComponent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateComponentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app/{appId}/environment/{environmentName}/components") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateComponentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + + if input.ComponentToCreate != nil { + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentCreateComponentData(input.ComponentToCreate, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateComponentInput(v *CreateComponentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.ClientToken != nil { + encoder.SetQuery("clientToken").String(*v.ClientToken) + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateTheme struct { +} + +func (*awsRestjson1_serializeOpCreateTheme) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateTheme) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateThemeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app/{appId}/environment/{environmentName}/themes") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateThemeInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + + if input.ThemeToCreate != nil { + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentCreateThemeData(input.ThemeToCreate, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateThemeInput(v *CreateThemeInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.ClientToken != nil { + encoder.SetQuery("clientToken").String(*v.ClientToken) + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteComponent struct { +} + +func (*awsRestjson1_serializeOpDeleteComponent) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteComponent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteComponentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app/{appId}/environment/{environmentName}/components/{id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteComponentInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteComponentInput(v *DeleteComponentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteTheme struct { +} + +func (*awsRestjson1_serializeOpDeleteTheme) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteTheme) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteThemeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app/{appId}/environment/{environmentName}/themes/{id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteThemeInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteThemeInput(v *DeleteThemeInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpExchangeCodeForToken struct { +} + +func (*awsRestjson1_serializeOpExchangeCodeForToken) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpExchangeCodeForToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ExchangeCodeForTokenInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tokens/{provider}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsExchangeCodeForTokenInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + + if input.Request != nil { + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentExchangeCodeForTokenRequestBody(input.Request, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsExchangeCodeForTokenInput(v *ExchangeCodeForTokenInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.Provider) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member provider must not be empty")} + } + if len(v.Provider) > 0 { + if err := encoder.SetURI("provider").String(string(v.Provider)); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpExportComponents struct { +} + +func (*awsRestjson1_serializeOpExportComponents) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpExportComponents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ExportComponentsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/export/app/{appId}/environment/{environmentName}/components") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsExportComponentsInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsExportComponentsInput(v *ExportComponentsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpExportThemes struct { +} + +func (*awsRestjson1_serializeOpExportThemes) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpExportThemes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ExportThemesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/export/app/{appId}/environment/{environmentName}/themes") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsExportThemesInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsExportThemesInput(v *ExportThemesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetComponent struct { +} + +func (*awsRestjson1_serializeOpGetComponent) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetComponent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetComponentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app/{appId}/environment/{environmentName}/components/{id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetComponentInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetComponentInput(v *GetComponentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetTheme struct { +} + +func (*awsRestjson1_serializeOpGetTheme) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetTheme) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetThemeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app/{appId}/environment/{environmentName}/themes/{id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetThemeInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetThemeInput(v *GetThemeInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListComponents struct { +} + +func (*awsRestjson1_serializeOpListComponents) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListComponents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListComponentsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app/{appId}/environment/{environmentName}/components") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListComponentsInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListComponentsInput(v *ListComponentsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListThemes struct { +} + +func (*awsRestjson1_serializeOpListThemes) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListThemes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListThemesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app/{appId}/environment/{environmentName}/themes") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListThemesInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListThemesInput(v *ListThemesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpRefreshToken struct { +} + +func (*awsRestjson1_serializeOpRefreshToken) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRefreshToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*RefreshTokenInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tokens/{provider}/refresh") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsRefreshTokenInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + + if input.RefreshTokenBody != nil { + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentRefreshTokenRequestBody(input.RefreshTokenBody, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsRefreshTokenInput(v *RefreshTokenInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.Provider) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member provider must not be empty")} + } + if len(v.Provider) > 0 { + if err := encoder.SetURI("provider").String(string(v.Provider)); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateComponent struct { +} + +func (*awsRestjson1_serializeOpUpdateComponent) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateComponent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateComponentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app/{appId}/environment/{environmentName}/components/{id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateComponentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + + if input.UpdatedComponent != nil { + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentUpdateComponentData(input.UpdatedComponent, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateComponentInput(v *UpdateComponentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.ClientToken != nil { + encoder.SetQuery("clientToken").String(*v.ClientToken) + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateTheme struct { +} + +func (*awsRestjson1_serializeOpUpdateTheme) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateTheme) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateThemeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app/{appId}/environment/{environmentName}/themes/{id}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateThemeInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + + if input.UpdatedTheme != nil { + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentUpdateThemeData(input.UpdatedTheme, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateThemeInput(v *UpdateThemeInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppId == nil || len(*v.AppId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member appId must not be empty")} + } + if v.AppId != nil { + if err := encoder.SetURI("appId").String(*v.AppId); err != nil { + return err + } + } + + if v.ClientToken != nil { + encoder.SetQuery("clientToken").String(*v.ClientToken) + } + + if v.EnvironmentName == nil || len(*v.EnvironmentName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member environmentName must not be empty")} + } + if v.EnvironmentName != nil { + if err := encoder.SetURI("environmentName").String(*v.EnvironmentName); err != nil { + return err + } + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentComponentBindingProperties(v map[string]types.ComponentBindingPropertiesValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentComponentBindingPropertiesValue(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentComponentBindingPropertiesValue(v *types.ComponentBindingPropertiesValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BindingProperties != nil { + ok := object.Key("bindingProperties") + if err := awsRestjson1_serializeDocumentComponentBindingPropertiesValueProperties(v.BindingProperties, ok); err != nil { + return err + } + } + + if v.DefaultValue != nil { + ok := object.Key("defaultValue") + ok.String(*v.DefaultValue) + } + + if v.Type != nil { + ok := object.Key("type") + ok.String(*v.Type) + } + + return nil +} + +func awsRestjson1_serializeDocumentComponentBindingPropertiesValueProperties(v *types.ComponentBindingPropertiesValueProperties, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Bucket != nil { + ok := object.Key("bucket") + ok.String(*v.Bucket) + } + + if v.DefaultValue != nil { + ok := object.Key("defaultValue") + ok.String(*v.DefaultValue) + } + + if v.Field != nil { + ok := object.Key("field") + ok.String(*v.Field) + } + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if v.Model != nil { + ok := object.Key("model") + ok.String(*v.Model) + } + + if v.Predicates != nil { + ok := object.Key("predicates") + if err := awsRestjson1_serializeDocumentPredicateList(v.Predicates, ok); err != nil { + return err + } + } + + if v.UserAttribute != nil { + ok := object.Key("userAttribute") + ok.String(*v.UserAttribute) + } + + return nil +} + +func awsRestjson1_serializeDocumentComponentChild(v *types.ComponentChild, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Children != nil { + ok := object.Key("children") + if err := awsRestjson1_serializeDocumentComponentChildList(v.Children, ok); err != nil { + return err + } + } + + if v.ComponentType != nil { + ok := object.Key("componentType") + ok.String(*v.ComponentType) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Properties != nil { + ok := object.Key("properties") + if err := awsRestjson1_serializeDocumentComponentProperties(v.Properties, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentComponentChildList(v []types.ComponentChild, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentComponentChild(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentComponentCollectionProperties(v map[string]types.ComponentDataConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentComponentDataConfiguration(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentComponentConditionProperty(v *types.ComponentConditionProperty, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Else != nil { + ok := object.Key("else") + if err := awsRestjson1_serializeDocumentComponentProperty(v.Else, ok); err != nil { + return err + } + } + + if v.Field != nil { + ok := object.Key("field") + ok.String(*v.Field) + } + + if v.Operand != nil { + ok := object.Key("operand") + ok.String(*v.Operand) + } + + if v.Operator != nil { + ok := object.Key("operator") + ok.String(*v.Operator) + } + + if v.Property != nil { + ok := object.Key("property") + ok.String(*v.Property) + } + + if v.Then != nil { + ok := object.Key("then") + if err := awsRestjson1_serializeDocumentComponentProperty(v.Then, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentComponentDataConfiguration(v *types.ComponentDataConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifiers != nil { + ok := object.Key("identifiers") + if err := awsRestjson1_serializeDocumentIdentifierList(v.Identifiers, ok); err != nil { + return err + } + } + + if v.Model != nil { + ok := object.Key("model") + ok.String(*v.Model) + } + + if v.Predicate != nil { + ok := object.Key("predicate") + if err := awsRestjson1_serializeDocumentPredicate(v.Predicate, ok); err != nil { + return err + } + } + + if v.Sort != nil { + ok := object.Key("sort") + if err := awsRestjson1_serializeDocumentSortPropertyList(v.Sort, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentComponentOverrides(v map[string]map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentComponentOverridesValue(v[key], om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentComponentOverridesValue(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_serializeDocumentComponentProperties(v map[string]types.ComponentProperty, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentComponentProperty(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentComponentProperty(v *types.ComponentProperty, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BindingProperties != nil { + ok := object.Key("bindingProperties") + if err := awsRestjson1_serializeDocumentComponentPropertyBindingProperties(v.BindingProperties, ok); err != nil { + return err + } + } + + if v.Bindings != nil { + ok := object.Key("bindings") + if err := awsRestjson1_serializeDocumentFormBindings(v.Bindings, ok); err != nil { + return err + } + } + + if v.CollectionBindingProperties != nil { + ok := object.Key("collectionBindingProperties") + if err := awsRestjson1_serializeDocumentComponentPropertyBindingProperties(v.CollectionBindingProperties, ok); err != nil { + return err + } + } + + if v.Concat != nil { + ok := object.Key("concat") + if err := awsRestjson1_serializeDocumentComponentPropertyList(v.Concat, ok); err != nil { + return err + } + } + + if v.Condition != nil { + ok := object.Key("condition") + if err := awsRestjson1_serializeDocumentComponentConditionProperty(v.Condition, ok); err != nil { + return err + } + } + + if v.Configured != nil { + ok := object.Key("configured") + ok.Boolean(*v.Configured) + } + + if v.DefaultValue != nil { + ok := object.Key("defaultValue") + ok.String(*v.DefaultValue) + } + + if v.Event != nil { + ok := object.Key("event") + ok.String(*v.Event) + } + + if v.ImportedValue != nil { + ok := object.Key("importedValue") + ok.String(*v.ImportedValue) + } + + if v.Model != nil { + ok := object.Key("model") + ok.String(*v.Model) + } + + if v.Type != nil { + ok := object.Key("type") + ok.String(*v.Type) + } + + if v.UserAttribute != nil { + ok := object.Key("userAttribute") + ok.String(*v.UserAttribute) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentComponentPropertyBindingProperties(v *types.ComponentPropertyBindingProperties, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Field != nil { + ok := object.Key("field") + ok.String(*v.Field) + } + + if v.Property != nil { + ok := object.Key("property") + ok.String(*v.Property) + } + + return nil +} + +func awsRestjson1_serializeDocumentComponentPropertyList(v []types.ComponentProperty, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentComponentProperty(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentComponentVariant(v *types.ComponentVariant, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Overrides != nil { + ok := object.Key("overrides") + if err := awsRestjson1_serializeDocumentComponentOverrides(v.Overrides, ok); err != nil { + return err + } + } + + if v.VariantValues != nil { + ok := object.Key("variantValues") + if err := awsRestjson1_serializeDocumentComponentVariantValues(v.VariantValues, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentComponentVariants(v []types.ComponentVariant, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentComponentVariant(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentComponentVariantValues(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_serializeDocumentCreateComponentData(v *types.CreateComponentData, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BindingProperties != nil { + ok := object.Key("bindingProperties") + if err := awsRestjson1_serializeDocumentComponentBindingProperties(v.BindingProperties, ok); err != nil { + return err + } + } + + if v.Children != nil { + ok := object.Key("children") + if err := awsRestjson1_serializeDocumentComponentChildList(v.Children, ok); err != nil { + return err + } + } + + if v.CollectionProperties != nil { + ok := object.Key("collectionProperties") + if err := awsRestjson1_serializeDocumentComponentCollectionProperties(v.CollectionProperties, ok); err != nil { + return err + } + } + + if v.ComponentType != nil { + ok := object.Key("componentType") + ok.String(*v.ComponentType) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Overrides != nil { + ok := object.Key("overrides") + if err := awsRestjson1_serializeDocumentComponentOverrides(v.Overrides, ok); err != nil { + return err + } + } + + if v.Properties != nil { + ok := object.Key("properties") + if err := awsRestjson1_serializeDocumentComponentProperties(v.Properties, ok); err != nil { + return err + } + } + + if v.SourceId != nil { + ok := object.Key("sourceId") + ok.String(*v.SourceId) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + if v.Variants != nil { + ok := object.Key("variants") + if err := awsRestjson1_serializeDocumentComponentVariants(v.Variants, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentCreateThemeData(v *types.CreateThemeData, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Overrides != nil { + ok := object.Key("overrides") + if err := awsRestjson1_serializeDocumentThemeValuesList(v.Overrides, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + if v.Values != nil { + ok := object.Key("values") + if err := awsRestjson1_serializeDocumentThemeValuesList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentExchangeCodeForTokenRequestBody(v *types.ExchangeCodeForTokenRequestBody, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Code != nil { + ok := object.Key("code") + ok.String(*v.Code) + } + + if v.RedirectUri != nil { + ok := object.Key("redirectUri") + ok.String(*v.RedirectUri) + } + + return nil +} + +func awsRestjson1_serializeDocumentFormBindingElement(v *types.FormBindingElement, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Element != nil { + ok := object.Key("element") + ok.String(*v.Element) + } + + if v.Property != nil { + ok := object.Key("property") + ok.String(*v.Property) + } + + return nil +} + +func awsRestjson1_serializeDocumentFormBindings(v map[string]types.FormBindingElement, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentFormBindingElement(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentIdentifierList(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_serializeDocumentPredicate(v *types.Predicate, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.And != nil { + ok := object.Key("and") + if err := awsRestjson1_serializeDocumentPredicateList(v.And, ok); err != nil { + return err + } + } + + if v.Field != nil { + ok := object.Key("field") + ok.String(*v.Field) + } + + if v.Operand != nil { + ok := object.Key("operand") + ok.String(*v.Operand) + } + + if v.Operator != nil { + ok := object.Key("operator") + ok.String(*v.Operator) + } + + if v.Or != nil { + ok := object.Key("or") + if err := awsRestjson1_serializeDocumentPredicateList(v.Or, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentPredicateList(v []types.Predicate, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentPredicate(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRefreshTokenRequestBody(v *types.RefreshTokenRequestBody, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Token != nil { + ok := object.Key("token") + ok.String(*v.Token) + } + + return nil +} + +func awsRestjson1_serializeDocumentSortProperty(v *types.SortProperty, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Direction) > 0 { + ok := object.Key("direction") + ok.String(string(v.Direction)) + } + + if v.Field != nil { + ok := object.Key("field") + ok.String(*v.Field) + } + + return nil +} + +func awsRestjson1_serializeDocumentSortPropertyList(v []types.SortProperty, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentSortProperty(&v[i], av); err != nil { + return err + } + } + 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_serializeDocumentThemeValue(v *types.ThemeValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Children != nil { + ok := object.Key("children") + if err := awsRestjson1_serializeDocumentThemeValuesList(v.Children, ok); err != nil { + return err + } + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentThemeValues(v *types.ThemeValues, 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") + if err := awsRestjson1_serializeDocumentThemeValue(v.Value, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentThemeValuesList(v []types.ThemeValues, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentThemeValues(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentUpdateComponentData(v *types.UpdateComponentData, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BindingProperties != nil { + ok := object.Key("bindingProperties") + if err := awsRestjson1_serializeDocumentComponentBindingProperties(v.BindingProperties, ok); err != nil { + return err + } + } + + if v.Children != nil { + ok := object.Key("children") + if err := awsRestjson1_serializeDocumentComponentChildList(v.Children, ok); err != nil { + return err + } + } + + if v.CollectionProperties != nil { + ok := object.Key("collectionProperties") + if err := awsRestjson1_serializeDocumentComponentCollectionProperties(v.CollectionProperties, ok); err != nil { + return err + } + } + + if v.ComponentType != nil { + ok := object.Key("componentType") + ok.String(*v.ComponentType) + } + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Overrides != nil { + ok := object.Key("overrides") + if err := awsRestjson1_serializeDocumentComponentOverrides(v.Overrides, ok); err != nil { + return err + } + } + + if v.Properties != nil { + ok := object.Key("properties") + if err := awsRestjson1_serializeDocumentComponentProperties(v.Properties, ok); err != nil { + return err + } + } + + if v.SourceId != nil { + ok := object.Key("sourceId") + ok.String(*v.SourceId) + } + + if v.Variants != nil { + ok := object.Key("variants") + if err := awsRestjson1_serializeDocumentComponentVariants(v.Variants, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentUpdateThemeData(v *types.UpdateThemeData, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("id") + ok.String(*v.Id) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Overrides != nil { + ok := object.Key("overrides") + if err := awsRestjson1_serializeDocumentThemeValuesList(v.Overrides, ok); err != nil { + return err + } + } + + if v.Values != nil { + ok := object.Key("values") + if err := awsRestjson1_serializeDocumentThemeValuesList(v.Values, ok); err != nil { + return err + } + } + + return nil +} diff --git a/service/amplifyuibuilder/types/enums.go b/service/amplifyuibuilder/types/enums.go new file mode 100644 index 00000000000..0519e86cd02 --- /dev/null +++ b/service/amplifyuibuilder/types/enums.go @@ -0,0 +1,32 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type SortDirection string + +// Values returns all known values for SortDirection. 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 (SortDirection) Values() []SortDirection { + return []SortDirection{ + "ASC", + "DESC", + } +} + +type TokenProviders string + +// Enum values for TokenProviders +const ( + // The figma token provider. + TokenProvidersFigma TokenProviders = "figma" +) + +// Values returns all known values for TokenProviders. 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 (TokenProviders) Values() []TokenProviders { + return []TokenProviders{ + "figma", + } +} diff --git a/service/amplifyuibuilder/types/errors.go b/service/amplifyuibuilder/types/errors.go new file mode 100644 index 00000000000..00924b77fa7 --- /dev/null +++ b/service/amplifyuibuilder/types/errors.go @@ -0,0 +1,105 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// An internal error has occurred. Please retry your request. +type InternalServerException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerException) ErrorCode() string { return "InternalServerException" } +func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// An invalid or out-of-range value was supplied for the input parameter. +type InvalidParameterException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *InvalidParameterException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidParameterException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidParameterException) ErrorCode() string { return "InvalidParameterException" } +func (e *InvalidParameterException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The resource specified in the request conflicts with an existing resource. +type ResourceConflictException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ResourceConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceConflictException) ErrorCode() string { return "ResourceConflictException" } +func (e *ResourceConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The requested resource does not exist, or access was denied. +type ResourceNotFoundException struct { + Message *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 { return "ResourceNotFoundException" } +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// You exceeded your service quota. Service quotas, also referred to as limits, are +// the maximum number of service resources or operations for your Amazon Web +// Services account. +type ServiceQuotaExceededException struct { + Message *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 { return "ServiceQuotaExceededException" } +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/amplifyuibuilder/types/types.go b/service/amplifyuibuilder/types/types.go new file mode 100644 index 00000000000..8846dbf4ad8 --- /dev/null +++ b/service/amplifyuibuilder/types/types.go @@ -0,0 +1,631 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// Contains the configuration settings for a user interface (UI) element for an +// Amplify app. A component is configured as a primary, stand-alone UI element. Use +// ComponentChild to configure an instance of a Component. A ComponentChild +// instance inherits the configuration of the main Component. +type Component struct { + + // The unique ID of the Amplify app associated with the component. + // + // This member is required. + AppId *string + + // The information to connect a component's properties to data at runtime. + // + // This member is required. + BindingProperties map[string]ComponentBindingPropertiesValue + + // The type of the component. This can be an Amplify custom UI component or another + // custom component. + // + // This member is required. + ComponentType *string + + // The time that the component was created. + // + // This member is required. + CreatedAt *time.Time + + // The name of the backend environment that is a part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // The unique ID of the component. + // + // This member is required. + Id *string + + // The name of the component. + // + // This member is required. + Name *string + + // Describes the component's properties that can be overriden in a customized + // instance of the component. + // + // This member is required. + Overrides map[string]map[string]string + + // Describes the component's properties. + // + // This member is required. + Properties map[string]ComponentProperty + + // A list of the component's variants. A variant is a unique style configuration of + // a main component. + // + // This member is required. + Variants []ComponentVariant + + // A list of the component's ComponentChild instances. + Children []ComponentChild + + // The data binding configuration for the component's properties. Use this for a + // collection component. + CollectionProperties map[string]ComponentDataConfiguration + + // The time that the component was modified. + ModifiedAt *time.Time + + // The unique ID of the component in its original source system, such as Figma. + SourceId *string + + // One or more key-value pairs to use when tagging the component. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Represents the data binding configuration for a component at runtime. You can +// use ComponentBindingPropertiesValue to add exposed properties to a component to +// allow different values to be entered when a component is reused in different +// places in an app. +type ComponentBindingPropertiesValue struct { + + // Describes the properties to customize with data at runtime. + BindingProperties *ComponentBindingPropertiesValueProperties + + // The default value of the property. + DefaultValue *string + + // The property type. + Type *string + + noSmithyDocumentSerde +} + +// Represents the data binding configuration for a specific property using data +// stored in Amazon Web Services. For Amazon Web Services connected properties, you +// can bind a property to data stored in an Amazon S3 bucket, an Amplify DataStore +// model or an authenticated user attribute. +type ComponentBindingPropertiesValueProperties struct { + + // An Amazon S3 bucket. + Bucket *string + + // The default value to assign to the property. + DefaultValue *string + + // The field to bind the data to. + Field *string + + // The storage key for an Amazon S3 bucket. + Key *string + + // An Amplify DataStore model. + Model *string + + // A list of predicates for binding a component's properties to data. + Predicates []Predicate + + // An authenticated user attribute. + UserAttribute *string + + noSmithyDocumentSerde +} + +// A nested UI configuration within a parent Component. +type ComponentChild struct { + + // The type of the child component. + // + // This member is required. + ComponentType *string + + // The name of the child component. + // + // This member is required. + Name *string + + // Describes the properties of the child component. + // + // This member is required. + Properties map[string]ComponentProperty + + // The list of ComponentChild instances for this component. + Children []ComponentChild + + noSmithyDocumentSerde +} + +// Represents a conditional expression to set a component property. Use +// ComponentConditionProperty to set a property to different values conditionally, +// based on the value of another property. +type ComponentConditionProperty struct { + + // The value to assign to the property if the condition is not met. + Else *ComponentProperty + + // The name of a field. Specify this when the property is a data model. + Field *string + + // The value of the property to evaluate. + Operand *string + + // The operator to use to perform the evaluation, such as eq to represent equals. + Operator *string + + // The name of the conditional property. + Property *string + + // The value to assign to the property if the condition is met. + Then *ComponentProperty + + noSmithyDocumentSerde +} + +// Describes the configuration for binding a component's properties to data. +type ComponentDataConfiguration struct { + + // The name of the data model to use to bind data to a component. + // + // This member is required. + Model *string + + // A list of IDs to use to bind data to a component. Use this property to bind + // specifically chosen data, rather than data retrieved from a query. + Identifiers []string + + // Represents the conditional logic to use when binding data to a component. Use + // this property to retrieve only a subset of the data in a collection. + Predicate *Predicate + + // Describes how to sort the component's properties. + Sort []SortProperty + + noSmithyDocumentSerde +} + +// Describes the configuration for all of a component's properties. Use +// ComponentProperty to specify the values to render or bind by default. +type ComponentProperty struct { + + // The information to bind the component property to data at runtime. + BindingProperties *ComponentPropertyBindingProperties + + // The information to bind the component property to form data. + Bindings map[string]FormBindingElement + + // The information to bind the component property to data at runtime. Use this for + // collection components. + CollectionBindingProperties *ComponentPropertyBindingProperties + + // A list of component properties to concatenate to create the value to assign to + // this component property. + Concat []ComponentProperty + + // The conditional expression to use to assign a value to the component property.. + Condition *ComponentConditionProperty + + // Specifies whether the user configured the property in Amplify Studio after + // importing it. + Configured *bool + + // The default value to assign to the component property. + DefaultValue *string + + // An event that occurs in your app. Use this for workflow data binding. + Event *string + + // The default value assigned to property when the component is imported into an + // app. + ImportedValue *string + + // The data model to use to assign a value to the component property. + Model *string + + // The component type. + Type *string + + // An authenticated user attribute to use to assign a value to the component + // property. + UserAttribute *string + + // The value to assign to the component property. + Value *string + + noSmithyDocumentSerde +} + +// Associates a component property to a binding property. This enables exposed +// properties on the top level component to propagate data to the component's +// property values. +type ComponentPropertyBindingProperties struct { + + // The component property to bind to the data field. + // + // This member is required. + Property *string + + // The data field to bind the property to. + Field *string + + noSmithyDocumentSerde +} + +// Contains a summary of a component. This is a read-only data type that is +// returned by ListComponents. +type ComponentSummary struct { + + // The unique ID of the Amplify app associated with the component. + // + // This member is required. + AppId *string + + // The component type. + // + // This member is required. + ComponentType *string + + // The name of the backend environment that is a part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // The unique ID of the component. + // + // This member is required. + Id *string + + // The name of the component. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +// Describes the style configuration of a unique variation of a main component. +type ComponentVariant struct { + + // The properties of the component variant that can be overriden when customizing + // an instance of the component. + Overrides map[string]map[string]string + + // The combination of variants that comprise this variant. + VariantValues map[string]string + + noSmithyDocumentSerde +} + +// Represents all of the information that is required to create a component. +type CreateComponentData struct { + + // The data binding information for the component's properties. + // + // This member is required. + BindingProperties map[string]ComponentBindingPropertiesValue + + // The component type. This can be an Amplify custom UI component or another custom + // component. + // + // This member is required. + ComponentType *string + + // The name of the component + // + // This member is required. + Name *string + + // Describes the component properties that can be overriden to customize an + // instance of the component. + // + // This member is required. + Overrides map[string]map[string]string + + // Describes the component's properties. + // + // This member is required. + Properties map[string]ComponentProperty + + // A list of the unique variants of this component. + // + // This member is required. + Variants []ComponentVariant + + // A list of child components that are instances of the main component. + Children []ComponentChild + + // The data binding configuration for customizing a component's properties. Use + // this for a collection component. + CollectionProperties map[string]ComponentDataConfiguration + + // The unique ID of the component in its original source system, such as Figma. + SourceId *string + + // One or more key-value pairs to use when tagging the component data. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Represents all of the information that is required to create a theme. +type CreateThemeData struct { + + // The name of the theme. + // + // This member is required. + Name *string + + // A list of key-value pairs that defines the properties of the theme. + // + // This member is required. + Values []ThemeValues + + // Describes the properties that can be overriden to customize an instance of the + // theme. + Overrides []ThemeValues + + // One or more key-value pairs to use when tagging the theme data. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Describes the configuration of a request to exchange an access code for a token. +type ExchangeCodeForTokenRequestBody struct { + + // The access code to send in the request. + // + // This member is required. + Code *string + + // The location of the application that will receive the access code. + // + // This member is required. + RedirectUri *string + + noSmithyDocumentSerde +} + +// Describes how to bind a component property to form data. +type FormBindingElement struct { + + // The name of the component to retrieve a value from. + // + // This member is required. + Element *string + + // The property to retrieve a value from. + // + // This member is required. + Property *string + + noSmithyDocumentSerde +} + +// Stores information for generating Amplify DataStore queries. Use a Predicate to +// retrieve a subset of the data in a collection. +type Predicate struct { + + // A list of predicates to combine logically. + And []Predicate + + // The field to query. + Field *string + + // The value to use when performing the evaluation. + Operand *string + + // The operator to use to perform the evaluation. + Operator *string + + // A list of predicates to combine logically. + Or []Predicate + + noSmithyDocumentSerde +} + +// Describes a refresh token. +type RefreshTokenRequestBody struct { + + // The token to use to refresh a previously issued access token that might have + // expired. + // + // This member is required. + Token *string + + noSmithyDocumentSerde +} + +// Describes how to sort the data that you bind to a component. +type SortProperty struct { + + // The direction of the sort, either ascending or descending. + // + // This member is required. + Direction SortDirection + + // The field to perform the sort on. + // + // This member is required. + Field *string + + noSmithyDocumentSerde +} + +// A theme is a collection of style settings that apply globally to the components +// associated with an Amplify application. +type Theme struct { + + // The unique ID for the Amplify app associated with the theme. + // + // This member is required. + AppId *string + + // The time that the theme was created. + // + // This member is required. + CreatedAt *time.Time + + // The name of the backend environment that is a part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // The ID for the theme. + // + // This member is required. + Id *string + + // The name of the theme. + // + // This member is required. + Name *string + + // A list of key-value pairs that defines the properties of the theme. + // + // This member is required. + Values []ThemeValues + + // The time that the theme was modified. + ModifiedAt *time.Time + + // Describes the properties that can be overriden to customize a theme. + Overrides []ThemeValues + + // One or more key-value pairs to use when tagging the theme. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Describes the basic information about a theme. +type ThemeSummary struct { + + // The unique ID for the app associated with the theme summary. + // + // This member is required. + AppId *string + + // The name of the backend environment that is part of the Amplify app. + // + // This member is required. + EnvironmentName *string + + // The ID of the theme. + // + // This member is required. + Id *string + + // The name of the theme. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +// Describes the configuration of a theme's properties. +type ThemeValue struct { + + // A list of key-value pairs that define the theme's properties. + Children []ThemeValues + + // The value of a theme property. + Value *string + + noSmithyDocumentSerde +} + +// A key-value pair that defines a property of a theme. +type ThemeValues struct { + + // The name of the property. + Key *string + + // The value of the property. + Value *ThemeValue + + noSmithyDocumentSerde +} + +// Updates and saves all of the information about a component, based on component +// ID. +type UpdateComponentData struct { + + // The data binding information for the component's properties. + BindingProperties map[string]ComponentBindingPropertiesValue + + // The components that are instances of the main component. + Children []ComponentChild + + // The configuration for binding a component's properties to a data model. Use this + // for a collection component. + CollectionProperties map[string]ComponentDataConfiguration + + // The type of the component. This can be an Amplify custom UI component or another + // custom component. + ComponentType *string + + // The unique ID of the component to update. + Id *string + + // The name of the component to update. + Name *string + + // Describes the properties that can be overriden to customize the component. + Overrides map[string]map[string]string + + // Describes the component's properties. + Properties map[string]ComponentProperty + + // The unique ID of the component in its original source system, such as Figma. + SourceId *string + + // A list of the unique variants of the main component being updated. + Variants []ComponentVariant + + noSmithyDocumentSerde +} + +// Saves the data binding information for a theme. +type UpdateThemeData struct { + + // A list of key-value pairs that define the theme's properties. + // + // This member is required. + Values []ThemeValues + + // The unique ID of the theme to update. + Id *string + + // The name of the theme to update. + Name *string + + // Describes the properties that can be overriden to customize the theme. + Overrides []ThemeValues + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/amplifyuibuilder/validators.go b/service/amplifyuibuilder/validators.go new file mode 100644 index 00000000000..808d8ce8aba --- /dev/null +++ b/service/amplifyuibuilder/validators.go @@ -0,0 +1,1055 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amplifyuibuilder + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/amplifyuibuilder/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpCreateComponent struct { +} + +func (*validateOpCreateComponent) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateComponent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateComponentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateComponentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateTheme struct { +} + +func (*validateOpCreateTheme) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateTheme) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateThemeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateThemeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteComponent struct { +} + +func (*validateOpDeleteComponent) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteComponent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteComponentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteComponentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteTheme struct { +} + +func (*validateOpDeleteTheme) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteTheme) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteThemeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteThemeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpExchangeCodeForToken struct { +} + +func (*validateOpExchangeCodeForToken) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpExchangeCodeForToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ExchangeCodeForTokenInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpExchangeCodeForTokenInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpExportComponents struct { +} + +func (*validateOpExportComponents) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpExportComponents) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ExportComponentsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpExportComponentsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpExportThemes struct { +} + +func (*validateOpExportThemes) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpExportThemes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ExportThemesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpExportThemesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetComponent struct { +} + +func (*validateOpGetComponent) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetComponent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetComponentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetComponentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetTheme struct { +} + +func (*validateOpGetTheme) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetTheme) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetThemeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetThemeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListComponents struct { +} + +func (*validateOpListComponents) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListComponents) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListComponentsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListComponentsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListThemes struct { +} + +func (*validateOpListThemes) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListThemes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListThemesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListThemesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRefreshToken struct { +} + +func (*validateOpRefreshToken) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRefreshToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RefreshTokenInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRefreshTokenInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateComponent struct { +} + +func (*validateOpUpdateComponent) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateComponent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateComponentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateComponentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateTheme struct { +} + +func (*validateOpUpdateTheme) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateTheme) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateThemeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateThemeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpCreateComponentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateComponent{}, middleware.After) +} + +func addOpCreateThemeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateTheme{}, middleware.After) +} + +func addOpDeleteComponentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteComponent{}, middleware.After) +} + +func addOpDeleteThemeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteTheme{}, middleware.After) +} + +func addOpExchangeCodeForTokenValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpExchangeCodeForToken{}, middleware.After) +} + +func addOpExportComponentsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpExportComponents{}, middleware.After) +} + +func addOpExportThemesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpExportThemes{}, middleware.After) +} + +func addOpGetComponentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetComponent{}, middleware.After) +} + +func addOpGetThemeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetTheme{}, middleware.After) +} + +func addOpListComponentsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListComponents{}, middleware.After) +} + +func addOpListThemesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListThemes{}, middleware.After) +} + +func addOpRefreshTokenValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRefreshToken{}, middleware.After) +} + +func addOpUpdateComponentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateComponent{}, middleware.After) +} + +func addOpUpdateThemeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateTheme{}, middleware.After) +} + +func validateComponentChild(v *types.ComponentChild) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ComponentChild"} + if v.ComponentType == nil { + invalidParams.Add(smithy.NewErrParamRequired("ComponentType")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Properties == nil { + invalidParams.Add(smithy.NewErrParamRequired("Properties")) + } else if v.Properties != nil { + if err := validateComponentProperties(v.Properties); err != nil { + invalidParams.AddNested("Properties", err.(smithy.InvalidParamsError)) + } + } + if v.Children != nil { + if err := validateComponentChildList(v.Children); err != nil { + invalidParams.AddNested("Children", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateComponentChildList(v []types.ComponentChild) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ComponentChildList"} + for i := range v { + if err := validateComponentChild(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateComponentCollectionProperties(v map[string]types.ComponentDataConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ComponentCollectionProperties"} + for key := range v { + value := v[key] + if err := validateComponentDataConfiguration(&value); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%q]", key), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateComponentConditionProperty(v *types.ComponentConditionProperty) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ComponentConditionProperty"} + if v.Then != nil { + if err := validateComponentProperty(v.Then); err != nil { + invalidParams.AddNested("Then", err.(smithy.InvalidParamsError)) + } + } + if v.Else != nil { + if err := validateComponentProperty(v.Else); err != nil { + invalidParams.AddNested("Else", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateComponentDataConfiguration(v *types.ComponentDataConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ComponentDataConfiguration"} + if v.Model == nil { + invalidParams.Add(smithy.NewErrParamRequired("Model")) + } + if v.Sort != nil { + if err := validateSortPropertyList(v.Sort); err != nil { + invalidParams.AddNested("Sort", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateComponentProperties(v map[string]types.ComponentProperty) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ComponentProperties"} + for key := range v { + value := v[key] + if err := validateComponentProperty(&value); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%q]", key), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateComponentProperty(v *types.ComponentProperty) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ComponentProperty"} + if v.BindingProperties != nil { + if err := validateComponentPropertyBindingProperties(v.BindingProperties); err != nil { + invalidParams.AddNested("BindingProperties", err.(smithy.InvalidParamsError)) + } + } + if v.CollectionBindingProperties != nil { + if err := validateComponentPropertyBindingProperties(v.CollectionBindingProperties); err != nil { + invalidParams.AddNested("CollectionBindingProperties", err.(smithy.InvalidParamsError)) + } + } + if v.Bindings != nil { + if err := validateFormBindings(v.Bindings); err != nil { + invalidParams.AddNested("Bindings", err.(smithy.InvalidParamsError)) + } + } + if v.Concat != nil { + if err := validateComponentPropertyList(v.Concat); err != nil { + invalidParams.AddNested("Concat", err.(smithy.InvalidParamsError)) + } + } + if v.Condition != nil { + if err := validateComponentConditionProperty(v.Condition); err != nil { + invalidParams.AddNested("Condition", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateComponentPropertyBindingProperties(v *types.ComponentPropertyBindingProperties) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ComponentPropertyBindingProperties"} + if v.Property == nil { + invalidParams.Add(smithy.NewErrParamRequired("Property")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateComponentPropertyList(v []types.ComponentProperty) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ComponentPropertyList"} + for i := range v { + if err := validateComponentProperty(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCreateComponentData(v *types.CreateComponentData) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateComponentData"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.ComponentType == nil { + invalidParams.Add(smithy.NewErrParamRequired("ComponentType")) + } + if v.Properties == nil { + invalidParams.Add(smithy.NewErrParamRequired("Properties")) + } else if v.Properties != nil { + if err := validateComponentProperties(v.Properties); err != nil { + invalidParams.AddNested("Properties", err.(smithy.InvalidParamsError)) + } + } + if v.Children != nil { + if err := validateComponentChildList(v.Children); err != nil { + invalidParams.AddNested("Children", err.(smithy.InvalidParamsError)) + } + } + if v.Variants == nil { + invalidParams.Add(smithy.NewErrParamRequired("Variants")) + } + if v.Overrides == nil { + invalidParams.Add(smithy.NewErrParamRequired("Overrides")) + } + if v.BindingProperties == nil { + invalidParams.Add(smithy.NewErrParamRequired("BindingProperties")) + } + if v.CollectionProperties != nil { + if err := validateComponentCollectionProperties(v.CollectionProperties); err != nil { + invalidParams.AddNested("CollectionProperties", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCreateThemeData(v *types.CreateThemeData) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateThemeData"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateExchangeCodeForTokenRequestBody(v *types.ExchangeCodeForTokenRequestBody) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExchangeCodeForTokenRequestBody"} + if v.Code == nil { + invalidParams.Add(smithy.NewErrParamRequired("Code")) + } + if v.RedirectUri == nil { + invalidParams.Add(smithy.NewErrParamRequired("RedirectUri")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFormBindingElement(v *types.FormBindingElement) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FormBindingElement"} + if v.Element == nil { + invalidParams.Add(smithy.NewErrParamRequired("Element")) + } + if v.Property == nil { + invalidParams.Add(smithy.NewErrParamRequired("Property")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFormBindings(v map[string]types.FormBindingElement) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FormBindings"} + for key := range v { + value := v[key] + if err := validateFormBindingElement(&value); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%q]", key), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRefreshTokenRequestBody(v *types.RefreshTokenRequestBody) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RefreshTokenRequestBody"} + if v.Token == nil { + invalidParams.Add(smithy.NewErrParamRequired("Token")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSortProperty(v *types.SortProperty) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SortProperty"} + if v.Field == nil { + invalidParams.Add(smithy.NewErrParamRequired("Field")) + } + if len(v.Direction) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Direction")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSortPropertyList(v []types.SortProperty) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SortPropertyList"} + for i := range v { + if err := validateSortProperty(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateUpdateComponentData(v *types.UpdateComponentData) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateComponentData"} + if v.Properties != nil { + if err := validateComponentProperties(v.Properties); err != nil { + invalidParams.AddNested("Properties", err.(smithy.InvalidParamsError)) + } + } + if v.Children != nil { + if err := validateComponentChildList(v.Children); err != nil { + invalidParams.AddNested("Children", err.(smithy.InvalidParamsError)) + } + } + if v.CollectionProperties != nil { + if err := validateComponentCollectionProperties(v.CollectionProperties); err != nil { + invalidParams.AddNested("CollectionProperties", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateUpdateThemeData(v *types.UpdateThemeData) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateThemeData"} + if v.Values == nil { + invalidParams.Add(smithy.NewErrParamRequired("Values")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateComponentInput(v *CreateComponentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateComponentInput"} + if v.AppId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppId")) + } + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if v.ComponentToCreate == nil { + invalidParams.Add(smithy.NewErrParamRequired("ComponentToCreate")) + } else if v.ComponentToCreate != nil { + if err := validateCreateComponentData(v.ComponentToCreate); err != nil { + invalidParams.AddNested("ComponentToCreate", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateThemeInput(v *CreateThemeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateThemeInput"} + if v.AppId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppId")) + } + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if v.ThemeToCreate == nil { + invalidParams.Add(smithy.NewErrParamRequired("ThemeToCreate")) + } else if v.ThemeToCreate != nil { + if err := validateCreateThemeData(v.ThemeToCreate); err != nil { + invalidParams.AddNested("ThemeToCreate", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteComponentInput(v *DeleteComponentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteComponentInput"} + if v.AppId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppId")) + } + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteThemeInput(v *DeleteThemeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteThemeInput"} + if v.AppId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppId")) + } + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpExchangeCodeForTokenInput(v *ExchangeCodeForTokenInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExchangeCodeForTokenInput"} + if len(v.Provider) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Provider")) + } + if v.Request == nil { + invalidParams.Add(smithy.NewErrParamRequired("Request")) + } else if v.Request != nil { + if err := validateExchangeCodeForTokenRequestBody(v.Request); err != nil { + invalidParams.AddNested("Request", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpExportComponentsInput(v *ExportComponentsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExportComponentsInput"} + if v.AppId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppId")) + } + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpExportThemesInput(v *ExportThemesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ExportThemesInput"} + if v.AppId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppId")) + } + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetComponentInput(v *GetComponentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetComponentInput"} + if v.AppId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppId")) + } + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetThemeInput(v *GetThemeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetThemeInput"} + if v.AppId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppId")) + } + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListComponentsInput(v *ListComponentsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListComponentsInput"} + if v.AppId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppId")) + } + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListThemesInput(v *ListThemesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListThemesInput"} + if v.AppId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppId")) + } + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRefreshTokenInput(v *RefreshTokenInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RefreshTokenInput"} + if len(v.Provider) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Provider")) + } + if v.RefreshTokenBody == nil { + invalidParams.Add(smithy.NewErrParamRequired("RefreshTokenBody")) + } else if v.RefreshTokenBody != nil { + if err := validateRefreshTokenRequestBody(v.RefreshTokenBody); err != nil { + invalidParams.AddNested("RefreshTokenBody", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateComponentInput(v *UpdateComponentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateComponentInput"} + if v.AppId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppId")) + } + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.UpdatedComponent == nil { + invalidParams.Add(smithy.NewErrParamRequired("UpdatedComponent")) + } else if v.UpdatedComponent != nil { + if err := validateUpdateComponentData(v.UpdatedComponent); err != nil { + invalidParams.AddNested("UpdatedComponent", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateThemeInput(v *UpdateThemeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateThemeInput"} + if v.AppId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppId")) + } + if v.EnvironmentName == nil { + invalidParams.Add(smithy.NewErrParamRequired("EnvironmentName")) + } + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if v.UpdatedTheme == nil { + invalidParams.Add(smithy.NewErrParamRequired("UpdatedTheme")) + } else if v.UpdatedTheme != nil { + if err := validateUpdateThemeData(v.UpdatedTheme); err != nil { + invalidParams.AddNested("UpdatedTheme", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/appmesh/api_client.go b/service/appmesh/api_client.go index 0a27789e847..ac44a1c7bc4 100644 --- a/service/appmesh/api_client.go +++ b/service/appmesh/api_client.go @@ -4,7 +4,6 @@ package appmesh import ( "context" - cryptorand "crypto/rand" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" @@ -15,7 +14,6 @@ import ( smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" - smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "time" @@ -45,8 +43,6 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveDefaultEndpointConfiguration(&options) - resolveIdempotencyTokenProvider(&options) - for _, fn := range optFns { fn(&options) } @@ -79,10 +75,6 @@ type Options struct { // 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 @@ -248,13 +240,6 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } -func resolveIdempotencyTokenProvider(o *Options) { - if o.IdempotencyTokenProvider != nil { - return - } - o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) -} - func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, @@ -293,11 +278,6 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } -// IdempotencyTokenProvider interface for providing idempotency token -type IdempotencyTokenProvider interface { - GetIdempotencyToken() (string, error) -} - func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/appmesh/api_op_CreateGatewayRoute.go b/service/appmesh/api_op_CreateGatewayRoute.go index 653a67d0ab1..e3426f3644f 100644 --- a/service/appmesh/api_op_CreateGatewayRoute.go +++ b/service/appmesh/api_op_CreateGatewayRoute.go @@ -4,7 +4,6 @@ package appmesh import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/appmesh/types" @@ -134,9 +133,6 @@ func (c *Client) addOperationCreateGatewayRouteMiddlewares(stack *middleware.Sta if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateGatewayRouteMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateGatewayRouteValidationMiddleware(stack); err != nil { return err } @@ -155,39 +151,6 @@ func (c *Client) addOperationCreateGatewayRouteMiddlewares(stack *middleware.Sta return nil } -type idempotencyToken_initializeOpCreateGatewayRoute struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateGatewayRoute) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateGatewayRoute) 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.(*CreateGatewayRouteInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateGatewayRouteInput ") - } - - 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_opCreateGatewayRouteMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateGatewayRoute{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateGatewayRoute(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_CreateMesh.go b/service/appmesh/api_op_CreateMesh.go index e870cbc8250..664b91dbe79 100644 --- a/service/appmesh/api_op_CreateMesh.go +++ b/service/appmesh/api_op_CreateMesh.go @@ -4,7 +4,6 @@ package appmesh import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/appmesh/types" @@ -116,9 +115,6 @@ func (c *Client) addOperationCreateMeshMiddlewares(stack *middleware.Stack, opti if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateMeshMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateMeshValidationMiddleware(stack); err != nil { return err } @@ -137,39 +133,6 @@ func (c *Client) addOperationCreateMeshMiddlewares(stack *middleware.Stack, opti return nil } -type idempotencyToken_initializeOpCreateMesh struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateMesh) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateMesh) 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.(*CreateMeshInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateMeshInput ") - } - - 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_opCreateMeshMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateMesh{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateMesh(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_CreateRoute.go b/service/appmesh/api_op_CreateRoute.go index 3e8cd389284..ba65a5ca3c4 100644 --- a/service/appmesh/api_op_CreateRoute.go +++ b/service/appmesh/api_op_CreateRoute.go @@ -4,7 +4,6 @@ package appmesh import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/appmesh/types" @@ -135,9 +134,6 @@ func (c *Client) addOperationCreateRouteMiddlewares(stack *middleware.Stack, opt if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateRouteMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateRouteValidationMiddleware(stack); err != nil { return err } @@ -156,39 +152,6 @@ func (c *Client) addOperationCreateRouteMiddlewares(stack *middleware.Stack, opt return nil } -type idempotencyToken_initializeOpCreateRoute struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateRoute) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateRoute) 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.(*CreateRouteInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateRouteInput ") - } - - 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_opCreateRouteMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateRoute{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateRoute(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_CreateVirtualGateway.go b/service/appmesh/api_op_CreateVirtualGateway.go index 63718f4223b..073f15e5935 100644 --- a/service/appmesh/api_op_CreateVirtualGateway.go +++ b/service/appmesh/api_op_CreateVirtualGateway.go @@ -4,7 +4,6 @@ package appmesh import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/appmesh/types" @@ -130,9 +129,6 @@ func (c *Client) addOperationCreateVirtualGatewayMiddlewares(stack *middleware.S if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateVirtualGatewayMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateVirtualGatewayValidationMiddleware(stack); err != nil { return err } @@ -151,39 +147,6 @@ func (c *Client) addOperationCreateVirtualGatewayMiddlewares(stack *middleware.S return nil } -type idempotencyToken_initializeOpCreateVirtualGateway struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateVirtualGateway) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateVirtualGateway) 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.(*CreateVirtualGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateVirtualGatewayInput ") - } - - 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_opCreateVirtualGatewayMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateVirtualGateway{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateVirtualGateway(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_CreateVirtualNode.go b/service/appmesh/api_op_CreateVirtualNode.go index dcc2bd6caf6..a21f963ad93 100644 --- a/service/appmesh/api_op_CreateVirtualNode.go +++ b/service/appmesh/api_op_CreateVirtualNode.go @@ -4,7 +4,6 @@ package appmesh import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/appmesh/types" @@ -147,9 +146,6 @@ func (c *Client) addOperationCreateVirtualNodeMiddlewares(stack *middleware.Stac if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateVirtualNodeMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateVirtualNodeValidationMiddleware(stack); err != nil { return err } @@ -168,39 +164,6 @@ func (c *Client) addOperationCreateVirtualNodeMiddlewares(stack *middleware.Stac return nil } -type idempotencyToken_initializeOpCreateVirtualNode struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateVirtualNode) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateVirtualNode) 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.(*CreateVirtualNodeInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateVirtualNodeInput ") - } - - 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_opCreateVirtualNodeMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateVirtualNode{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateVirtualNode(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_CreateVirtualRouter.go b/service/appmesh/api_op_CreateVirtualRouter.go index b7a1e196687..fabe3f4f8e6 100644 --- a/service/appmesh/api_op_CreateVirtualRouter.go +++ b/service/appmesh/api_op_CreateVirtualRouter.go @@ -4,7 +4,6 @@ package appmesh import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/appmesh/types" @@ -132,9 +131,6 @@ func (c *Client) addOperationCreateVirtualRouterMiddlewares(stack *middleware.St if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateVirtualRouterMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateVirtualRouterValidationMiddleware(stack); err != nil { return err } @@ -153,39 +149,6 @@ func (c *Client) addOperationCreateVirtualRouterMiddlewares(stack *middleware.St return nil } -type idempotencyToken_initializeOpCreateVirtualRouter struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateVirtualRouter) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateVirtualRouter) 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.(*CreateVirtualRouterInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateVirtualRouterInput ") - } - - 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_opCreateVirtualRouterMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateVirtualRouter{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateVirtualRouter(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_CreateVirtualService.go b/service/appmesh/api_op_CreateVirtualService.go index a55d9c64ac4..8a7612319b5 100644 --- a/service/appmesh/api_op_CreateVirtualService.go +++ b/service/appmesh/api_op_CreateVirtualService.go @@ -4,7 +4,6 @@ package appmesh import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/appmesh/types" @@ -131,9 +130,6 @@ func (c *Client) addOperationCreateVirtualServiceMiddlewares(stack *middleware.S if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateVirtualServiceMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateVirtualServiceValidationMiddleware(stack); err != nil { return err } @@ -152,39 +148,6 @@ func (c *Client) addOperationCreateVirtualServiceMiddlewares(stack *middleware.S return nil } -type idempotencyToken_initializeOpCreateVirtualService struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateVirtualService) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateVirtualService) 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.(*CreateVirtualServiceInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateVirtualServiceInput ") - } - - 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_opCreateVirtualServiceMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateVirtualService{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateVirtualService(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_UpdateGatewayRoute.go b/service/appmesh/api_op_UpdateGatewayRoute.go index 6abb9316e37..45478c27f42 100644 --- a/service/appmesh/api_op_UpdateGatewayRoute.go +++ b/service/appmesh/api_op_UpdateGatewayRoute.go @@ -4,7 +4,6 @@ package appmesh import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/appmesh/types" @@ -122,9 +121,6 @@ func (c *Client) addOperationUpdateGatewayRouteMiddlewares(stack *middleware.Sta if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opUpdateGatewayRouteMiddleware(stack, options); err != nil { - return err - } if err = addOpUpdateGatewayRouteValidationMiddleware(stack); err != nil { return err } @@ -143,39 +139,6 @@ func (c *Client) addOperationUpdateGatewayRouteMiddlewares(stack *middleware.Sta return nil } -type idempotencyToken_initializeOpUpdateGatewayRoute struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpUpdateGatewayRoute) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpUpdateGatewayRoute) 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.(*UpdateGatewayRouteInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateGatewayRouteInput ") - } - - 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_opUpdateGatewayRouteMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateGatewayRoute{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opUpdateGatewayRoute(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_UpdateMesh.go b/service/appmesh/api_op_UpdateMesh.go index 20c9d728787..86a91ebd811 100644 --- a/service/appmesh/api_op_UpdateMesh.go +++ b/service/appmesh/api_op_UpdateMesh.go @@ -4,7 +4,6 @@ package appmesh import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/appmesh/types" @@ -105,9 +104,6 @@ func (c *Client) addOperationUpdateMeshMiddlewares(stack *middleware.Stack, opti if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opUpdateMeshMiddleware(stack, options); err != nil { - return err - } if err = addOpUpdateMeshValidationMiddleware(stack); err != nil { return err } @@ -126,39 +122,6 @@ func (c *Client) addOperationUpdateMeshMiddlewares(stack *middleware.Stack, opti return nil } -type idempotencyToken_initializeOpUpdateMesh struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpUpdateMesh) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpUpdateMesh) 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.(*UpdateMeshInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateMeshInput ") - } - - 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_opUpdateMeshMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateMesh{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opUpdateMesh(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_UpdateRoute.go b/service/appmesh/api_op_UpdateRoute.go index d823938f480..dbda5bd3290 100644 --- a/service/appmesh/api_op_UpdateRoute.go +++ b/service/appmesh/api_op_UpdateRoute.go @@ -4,7 +4,6 @@ package appmesh import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/appmesh/types" @@ -123,9 +122,6 @@ func (c *Client) addOperationUpdateRouteMiddlewares(stack *middleware.Stack, opt if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opUpdateRouteMiddleware(stack, options); err != nil { - return err - } if err = addOpUpdateRouteValidationMiddleware(stack); err != nil { return err } @@ -144,39 +140,6 @@ func (c *Client) addOperationUpdateRouteMiddlewares(stack *middleware.Stack, opt return nil } -type idempotencyToken_initializeOpUpdateRoute struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpUpdateRoute) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpUpdateRoute) 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.(*UpdateRouteInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateRouteInput ") - } - - 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_opUpdateRouteMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateRoute{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opUpdateRoute(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_UpdateVirtualGateway.go b/service/appmesh/api_op_UpdateVirtualGateway.go index ada4f8d7bc0..799a1890877 100644 --- a/service/appmesh/api_op_UpdateVirtualGateway.go +++ b/service/appmesh/api_op_UpdateVirtualGateway.go @@ -4,7 +4,6 @@ package appmesh import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/appmesh/types" @@ -117,9 +116,6 @@ func (c *Client) addOperationUpdateVirtualGatewayMiddlewares(stack *middleware.S if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opUpdateVirtualGatewayMiddleware(stack, options); err != nil { - return err - } if err = addOpUpdateVirtualGatewayValidationMiddleware(stack); err != nil { return err } @@ -138,39 +134,6 @@ func (c *Client) addOperationUpdateVirtualGatewayMiddlewares(stack *middleware.S return nil } -type idempotencyToken_initializeOpUpdateVirtualGateway struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpUpdateVirtualGateway) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpUpdateVirtualGateway) 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.(*UpdateVirtualGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateVirtualGatewayInput ") - } - - 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_opUpdateVirtualGatewayMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateVirtualGateway{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opUpdateVirtualGateway(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_UpdateVirtualNode.go b/service/appmesh/api_op_UpdateVirtualNode.go index 9b7a8600199..b90daf1a26d 100644 --- a/service/appmesh/api_op_UpdateVirtualNode.go +++ b/service/appmesh/api_op_UpdateVirtualNode.go @@ -4,7 +4,6 @@ package appmesh import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/appmesh/types" @@ -118,9 +117,6 @@ func (c *Client) addOperationUpdateVirtualNodeMiddlewares(stack *middleware.Stac if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opUpdateVirtualNodeMiddleware(stack, options); err != nil { - return err - } if err = addOpUpdateVirtualNodeValidationMiddleware(stack); err != nil { return err } @@ -139,39 +135,6 @@ func (c *Client) addOperationUpdateVirtualNodeMiddlewares(stack *middleware.Stac return nil } -type idempotencyToken_initializeOpUpdateVirtualNode struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpUpdateVirtualNode) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpUpdateVirtualNode) 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.(*UpdateVirtualNodeInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateVirtualNodeInput ") - } - - 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_opUpdateVirtualNodeMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateVirtualNode{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opUpdateVirtualNode(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_UpdateVirtualRouter.go b/service/appmesh/api_op_UpdateVirtualRouter.go index 446ff5ec989..82d9dacfb8d 100644 --- a/service/appmesh/api_op_UpdateVirtualRouter.go +++ b/service/appmesh/api_op_UpdateVirtualRouter.go @@ -4,7 +4,6 @@ package appmesh import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/appmesh/types" @@ -119,9 +118,6 @@ func (c *Client) addOperationUpdateVirtualRouterMiddlewares(stack *middleware.St if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opUpdateVirtualRouterMiddleware(stack, options); err != nil { - return err - } if err = addOpUpdateVirtualRouterValidationMiddleware(stack); err != nil { return err } @@ -140,39 +136,6 @@ func (c *Client) addOperationUpdateVirtualRouterMiddlewares(stack *middleware.St return nil } -type idempotencyToken_initializeOpUpdateVirtualRouter struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpUpdateVirtualRouter) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpUpdateVirtualRouter) 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.(*UpdateVirtualRouterInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateVirtualRouterInput ") - } - - 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_opUpdateVirtualRouterMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateVirtualRouter{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opUpdateVirtualRouter(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_UpdateVirtualService.go b/service/appmesh/api_op_UpdateVirtualService.go index 4a41845900b..c9621e0da23 100644 --- a/service/appmesh/api_op_UpdateVirtualService.go +++ b/service/appmesh/api_op_UpdateVirtualService.go @@ -4,7 +4,6 @@ package appmesh import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/appmesh/types" @@ -119,9 +118,6 @@ func (c *Client) addOperationUpdateVirtualServiceMiddlewares(stack *middleware.S if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opUpdateVirtualServiceMiddleware(stack, options); err != nil { - return err - } if err = addOpUpdateVirtualServiceValidationMiddleware(stack); err != nil { return err } @@ -140,39 +136,6 @@ func (c *Client) addOperationUpdateVirtualServiceMiddlewares(stack *middleware.S return nil } -type idempotencyToken_initializeOpUpdateVirtualService struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpUpdateVirtualService) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpUpdateVirtualService) 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.(*UpdateVirtualServiceInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateVirtualServiceInput ") - } - - 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_opUpdateVirtualServiceMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateVirtualService{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opUpdateVirtualService(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/braket/api_client.go b/service/braket/api_client.go index 8015f508356..d0999297f91 100644 --- a/service/braket/api_client.go +++ b/service/braket/api_client.go @@ -4,7 +4,6 @@ package braket import ( "context" - cryptorand "crypto/rand" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" @@ -15,7 +14,6 @@ import ( smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" - smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "time" @@ -45,8 +43,6 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveDefaultEndpointConfiguration(&options) - resolveIdempotencyTokenProvider(&options) - for _, fn := range optFns { fn(&options) } @@ -79,10 +75,6 @@ type Options struct { // 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 @@ -248,13 +240,6 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } -func resolveIdempotencyTokenProvider(o *Options) { - if o.IdempotencyTokenProvider != nil { - return - } - o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) -} - func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, @@ -293,11 +278,6 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } -// IdempotencyTokenProvider interface for providing idempotency token -type IdempotencyTokenProvider interface { - GetIdempotencyToken() (string, error) -} - func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/braket/api_op_CancelQuantumTask.go b/service/braket/api_op_CancelQuantumTask.go index 76ff6ef412b..13c8055babe 100644 --- a/service/braket/api_op_CancelQuantumTask.go +++ b/service/braket/api_op_CancelQuantumTask.go @@ -4,7 +4,6 @@ package braket import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/braket/types" @@ -106,9 +105,6 @@ func (c *Client) addOperationCancelQuantumTaskMiddlewares(stack *middleware.Stac if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCancelQuantumTaskMiddleware(stack, options); err != nil { - return err - } if err = addOpCancelQuantumTaskValidationMiddleware(stack); err != nil { return err } @@ -127,39 +123,6 @@ func (c *Client) addOperationCancelQuantumTaskMiddlewares(stack *middleware.Stac return nil } -type idempotencyToken_initializeOpCancelQuantumTask struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCancelQuantumTask) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCancelQuantumTask) 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.(*CancelQuantumTaskInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CancelQuantumTaskInput ") - } - - 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_opCancelQuantumTaskMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCancelQuantumTask{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCancelQuantumTask(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/braket/api_op_CreateJob.go b/service/braket/api_op_CreateJob.go index 22e8b662476..77fa932e3e5 100644 --- a/service/braket/api_op_CreateJob.go +++ b/service/braket/api_op_CreateJob.go @@ -4,7 +4,6 @@ package braket import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/braket/types" @@ -154,9 +153,6 @@ func (c *Client) addOperationCreateJobMiddlewares(stack *middleware.Stack, optio if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateJobMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateJobValidationMiddleware(stack); err != nil { return err } @@ -175,39 +171,6 @@ func (c *Client) addOperationCreateJobMiddlewares(stack *middleware.Stack, optio return nil } -type idempotencyToken_initializeOpCreateJob struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateJob) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateJob) 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.(*CreateJobInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateJobInput ") - } - - 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_opCreateJobMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateJob{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/braket/api_op_CreateQuantumTask.go b/service/braket/api_op_CreateQuantumTask.go index 50bbd1163e5..aadab502e2f 100644 --- a/service/braket/api_op_CreateQuantumTask.go +++ b/service/braket/api_op_CreateQuantumTask.go @@ -4,7 +4,6 @@ package braket import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -133,9 +132,6 @@ func (c *Client) addOperationCreateQuantumTaskMiddlewares(stack *middleware.Stac if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateQuantumTaskMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateQuantumTaskValidationMiddleware(stack); err != nil { return err } @@ -154,39 +150,6 @@ func (c *Client) addOperationCreateQuantumTaskMiddlewares(stack *middleware.Stac return nil } -type idempotencyToken_initializeOpCreateQuantumTask struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateQuantumTask) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateQuantumTask) 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.(*CreateQuantumTaskInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateQuantumTaskInput ") - } - - 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_opCreateQuantumTaskMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateQuantumTask{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateQuantumTask(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeguruprofiler/api_client.go b/service/codeguruprofiler/api_client.go index da9b44f7d87..a552694ff8a 100644 --- a/service/codeguruprofiler/api_client.go +++ b/service/codeguruprofiler/api_client.go @@ -4,7 +4,6 @@ package codeguruprofiler import ( "context" - cryptorand "crypto/rand" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" @@ -15,7 +14,6 @@ import ( smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" - smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "time" @@ -46,8 +44,6 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveDefaultEndpointConfiguration(&options) - resolveIdempotencyTokenProvider(&options) - for _, fn := range optFns { fn(&options) } @@ -80,10 +76,6 @@ type Options struct { // 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 @@ -249,13 +241,6 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } -func resolveIdempotencyTokenProvider(o *Options) { - if o.IdempotencyTokenProvider != nil { - return - } - o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) -} - func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, @@ -294,11 +279,6 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } -// IdempotencyTokenProvider interface for providing idempotency token -type IdempotencyTokenProvider interface { - GetIdempotencyToken() (string, error) -} - func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/codeguruprofiler/api_op_CreateProfilingGroup.go b/service/codeguruprofiler/api_op_CreateProfilingGroup.go index b6bdf832ba2..f3d6f34b614 100644 --- a/service/codeguruprofiler/api_op_CreateProfilingGroup.go +++ b/service/codeguruprofiler/api_op_CreateProfilingGroup.go @@ -4,7 +4,6 @@ package codeguruprofiler import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/codeguruprofiler/types" @@ -120,9 +119,6 @@ func (c *Client) addOperationCreateProfilingGroupMiddlewares(stack *middleware.S if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateProfilingGroupMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateProfilingGroupValidationMiddleware(stack); err != nil { return err } @@ -141,39 +137,6 @@ func (c *Client) addOperationCreateProfilingGroupMiddlewares(stack *middleware.S return nil } -type idempotencyToken_initializeOpCreateProfilingGroup struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateProfilingGroup) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateProfilingGroup) 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.(*CreateProfilingGroupInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateProfilingGroupInput ") - } - - 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_opCreateProfilingGroupMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateProfilingGroup{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateProfilingGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeguruprofiler/api_op_PostAgentProfile.go b/service/codeguruprofiler/api_op_PostAgentProfile.go index 7ba5414ba0a..cba339ce1c1 100644 --- a/service/codeguruprofiler/api_op_PostAgentProfile.go +++ b/service/codeguruprofiler/api_op_PostAgentProfile.go @@ -4,7 +4,6 @@ package codeguruprofiler import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -117,9 +116,6 @@ func (c *Client) addOperationPostAgentProfileMiddlewares(stack *middleware.Stack if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opPostAgentProfileMiddleware(stack, options); err != nil { - return err - } if err = addOpPostAgentProfileValidationMiddleware(stack); err != nil { return err } @@ -138,39 +134,6 @@ func (c *Client) addOperationPostAgentProfileMiddlewares(stack *middleware.Stack return nil } -type idempotencyToken_initializeOpPostAgentProfile struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpPostAgentProfile) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpPostAgentProfile) 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.(*PostAgentProfileInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *PostAgentProfileInput ") - } - - if input.ProfileToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ProfileToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opPostAgentProfileMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpPostAgentProfile{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opPostAgentProfile(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/evidently/api_op_BatchEvaluateFeature.go b/service/evidently/api_op_BatchEvaluateFeature.go index f5d9cf11883..3aa4ba29fb6 100644 --- a/service/evidently/api_op_BatchEvaluateFeature.go +++ b/service/evidently/api_op_BatchEvaluateFeature.go @@ -4,7 +4,6 @@ package evidently import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/evidently/types" @@ -116,9 +115,6 @@ func (c *Client) addOperationBatchEvaluateFeatureMiddlewares(stack *middleware.S if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opBatchEvaluateFeatureMiddleware(stack); err != nil { - return err - } if err = addOpBatchEvaluateFeatureValidationMiddleware(stack); err != nil { return err } @@ -137,33 +133,6 @@ func (c *Client) addOperationBatchEvaluateFeatureMiddlewares(stack *middleware.S return nil } -type endpointPrefix_opBatchEvaluateFeatureMiddleware struct { -} - -func (*endpointPrefix_opBatchEvaluateFeatureMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opBatchEvaluateFeatureMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "dataplane." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opBatchEvaluateFeatureMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opBatchEvaluateFeatureMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opBatchEvaluateFeature(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/evidently/api_op_EvaluateFeature.go b/service/evidently/api_op_EvaluateFeature.go index c0017f7a98b..34c57586e8f 100644 --- a/service/evidently/api_op_EvaluateFeature.go +++ b/service/evidently/api_op_EvaluateFeature.go @@ -4,7 +4,6 @@ package evidently import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/evidently/types" @@ -143,9 +142,6 @@ func (c *Client) addOperationEvaluateFeatureMiddlewares(stack *middleware.Stack, if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opEvaluateFeatureMiddleware(stack); err != nil { - return err - } if err = addOpEvaluateFeatureValidationMiddleware(stack); err != nil { return err } @@ -164,33 +160,6 @@ func (c *Client) addOperationEvaluateFeatureMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opEvaluateFeatureMiddleware struct { -} - -func (*endpointPrefix_opEvaluateFeatureMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opEvaluateFeatureMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "dataplane." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opEvaluateFeatureMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opEvaluateFeatureMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opEvaluateFeature(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/evidently/api_op_PutProjectEvents.go b/service/evidently/api_op_PutProjectEvents.go index a3a5502380c..4e5a1c49f4c 100644 --- a/service/evidently/api_op_PutProjectEvents.go +++ b/service/evidently/api_op_PutProjectEvents.go @@ -4,7 +4,6 @@ package evidently import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/evidently/types" @@ -105,9 +104,6 @@ func (c *Client) addOperationPutProjectEventsMiddlewares(stack *middleware.Stack if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opPutProjectEventsMiddleware(stack); err != nil { - return err - } if err = addOpPutProjectEventsValidationMiddleware(stack); err != nil { return err } @@ -126,33 +122,6 @@ func (c *Client) addOperationPutProjectEventsMiddlewares(stack *middleware.Stack return nil } -type endpointPrefix_opPutProjectEventsMiddleware struct { -} - -func (*endpointPrefix_opPutProjectEventsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opPutProjectEventsMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "dataplane." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opPutProjectEventsMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opPutProjectEventsMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opPutProjectEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/grafana/api_client.go b/service/grafana/api_client.go index 3605d847d07..a39a4ae9c31 100644 --- a/service/grafana/api_client.go +++ b/service/grafana/api_client.go @@ -4,7 +4,6 @@ package grafana import ( "context" - cryptorand "crypto/rand" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" @@ -15,7 +14,6 @@ import ( smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" - smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "time" @@ -46,8 +44,6 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveDefaultEndpointConfiguration(&options) - resolveIdempotencyTokenProvider(&options) - for _, fn := range optFns { fn(&options) } @@ -80,10 +76,6 @@ type Options struct { // 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 @@ -249,13 +241,6 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } -func resolveIdempotencyTokenProvider(o *Options) { - if o.IdempotencyTokenProvider != nil { - return - } - o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) -} - func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, @@ -294,11 +279,6 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } -// IdempotencyTokenProvider interface for providing idempotency token -type IdempotencyTokenProvider interface { - GetIdempotencyToken() (string, error) -} - func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/grafana/api_op_CreateWorkspace.go b/service/grafana/api_op_CreateWorkspace.go index e61f208d419..e9d1eee0310 100644 --- a/service/grafana/api_op_CreateWorkspace.go +++ b/service/grafana/api_op_CreateWorkspace.go @@ -4,7 +4,6 @@ package grafana import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/grafana/types" @@ -176,9 +175,6 @@ func (c *Client) addOperationCreateWorkspaceMiddlewares(stack *middleware.Stack, if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateWorkspaceMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateWorkspaceValidationMiddleware(stack); err != nil { return err } @@ -197,39 +193,6 @@ func (c *Client) addOperationCreateWorkspaceMiddlewares(stack *middleware.Stack, return nil } -type idempotencyToken_initializeOpCreateWorkspace struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateWorkspace) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateWorkspace) 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.(*CreateWorkspaceInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateWorkspaceInput ") - } - - 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_opCreateWorkspaceMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateWorkspace{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateWorkspace(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_AssociateTrackerConsumer.go b/service/location/api_op_AssociateTrackerConsumer.go index 4a71dcb0aec..57061982dcb 100644 --- a/service/location/api_op_AssociateTrackerConsumer.go +++ b/service/location/api_op_AssociateTrackerConsumer.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -104,9 +103,6 @@ func (c *Client) addOperationAssociateTrackerConsumerMiddlewares(stack *middlewa if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opAssociateTrackerConsumerMiddleware(stack); err != nil { - return err - } if err = addOpAssociateTrackerConsumerValidationMiddleware(stack); err != nil { return err } @@ -125,33 +121,6 @@ func (c *Client) addOperationAssociateTrackerConsumerMiddlewares(stack *middlewa return nil } -type endpointPrefix_opAssociateTrackerConsumerMiddleware struct { -} - -func (*endpointPrefix_opAssociateTrackerConsumerMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opAssociateTrackerConsumerMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opAssociateTrackerConsumerMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opAssociateTrackerConsumerMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opAssociateTrackerConsumer(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_BatchDeleteDevicePositionHistory.go b/service/location/api_op_BatchDeleteDevicePositionHistory.go index 6b1ce2fbdc0..0938ed3762c 100644 --- a/service/location/api_op_BatchDeleteDevicePositionHistory.go +++ b/service/location/api_op_BatchDeleteDevicePositionHistory.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -104,9 +103,6 @@ func (c *Client) addOperationBatchDeleteDevicePositionHistoryMiddlewares(stack * if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opBatchDeleteDevicePositionHistoryMiddleware(stack); err != nil { - return err - } if err = addOpBatchDeleteDevicePositionHistoryValidationMiddleware(stack); err != nil { return err } @@ -125,33 +121,6 @@ func (c *Client) addOperationBatchDeleteDevicePositionHistoryMiddlewares(stack * return nil } -type endpointPrefix_opBatchDeleteDevicePositionHistoryMiddleware struct { -} - -func (*endpointPrefix_opBatchDeleteDevicePositionHistoryMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opBatchDeleteDevicePositionHistoryMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opBatchDeleteDevicePositionHistoryMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opBatchDeleteDevicePositionHistoryMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opBatchDeleteDevicePositionHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_BatchDeleteGeofence.go b/service/location/api_op_BatchDeleteGeofence.go index 5b640ab0e19..b7b8c26a41d 100644 --- a/service/location/api_op_BatchDeleteGeofence.go +++ b/service/location/api_op_BatchDeleteGeofence.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -102,9 +101,6 @@ func (c *Client) addOperationBatchDeleteGeofenceMiddlewares(stack *middleware.St if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opBatchDeleteGeofenceMiddleware(stack); err != nil { - return err - } if err = addOpBatchDeleteGeofenceValidationMiddleware(stack); err != nil { return err } @@ -123,33 +119,6 @@ func (c *Client) addOperationBatchDeleteGeofenceMiddlewares(stack *middleware.St return nil } -type endpointPrefix_opBatchDeleteGeofenceMiddleware struct { -} - -func (*endpointPrefix_opBatchDeleteGeofenceMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opBatchDeleteGeofenceMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "geofencing." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opBatchDeleteGeofenceMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opBatchDeleteGeofenceMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opBatchDeleteGeofence(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_BatchEvaluateGeofences.go b/service/location/api_op_BatchEvaluateGeofences.go index d9ae7e7958b..07c509fd328 100644 --- a/service/location/api_op_BatchEvaluateGeofences.go +++ b/service/location/api_op_BatchEvaluateGeofences.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -118,9 +117,6 @@ func (c *Client) addOperationBatchEvaluateGeofencesMiddlewares(stack *middleware if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opBatchEvaluateGeofencesMiddleware(stack); err != nil { - return err - } if err = addOpBatchEvaluateGeofencesValidationMiddleware(stack); err != nil { return err } @@ -139,33 +135,6 @@ func (c *Client) addOperationBatchEvaluateGeofencesMiddlewares(stack *middleware return nil } -type endpointPrefix_opBatchEvaluateGeofencesMiddleware struct { -} - -func (*endpointPrefix_opBatchEvaluateGeofencesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opBatchEvaluateGeofencesMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "geofencing." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opBatchEvaluateGeofencesMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opBatchEvaluateGeofencesMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opBatchEvaluateGeofences(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_BatchGetDevicePosition.go b/service/location/api_op_BatchGetDevicePosition.go index 066c1a32ec5..897f912e212 100644 --- a/service/location/api_op_BatchGetDevicePosition.go +++ b/service/location/api_op_BatchGetDevicePosition.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -111,9 +110,6 @@ func (c *Client) addOperationBatchGetDevicePositionMiddlewares(stack *middleware if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opBatchGetDevicePositionMiddleware(stack); err != nil { - return err - } if err = addOpBatchGetDevicePositionValidationMiddleware(stack); err != nil { return err } @@ -132,33 +128,6 @@ func (c *Client) addOperationBatchGetDevicePositionMiddlewares(stack *middleware return nil } -type endpointPrefix_opBatchGetDevicePositionMiddleware struct { -} - -func (*endpointPrefix_opBatchGetDevicePositionMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opBatchGetDevicePositionMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opBatchGetDevicePositionMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opBatchGetDevicePositionMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opBatchGetDevicePosition(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_BatchPutGeofence.go b/service/location/api_op_BatchPutGeofence.go index 2de4da7972f..bee6989fb01 100644 --- a/service/location/api_op_BatchPutGeofence.go +++ b/service/location/api_op_BatchPutGeofence.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -109,9 +108,6 @@ func (c *Client) addOperationBatchPutGeofenceMiddlewares(stack *middleware.Stack if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opBatchPutGeofenceMiddleware(stack); err != nil { - return err - } if err = addOpBatchPutGeofenceValidationMiddleware(stack); err != nil { return err } @@ -130,33 +126,6 @@ func (c *Client) addOperationBatchPutGeofenceMiddlewares(stack *middleware.Stack return nil } -type endpointPrefix_opBatchPutGeofenceMiddleware struct { -} - -func (*endpointPrefix_opBatchPutGeofenceMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opBatchPutGeofenceMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "geofencing." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opBatchPutGeofenceMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opBatchPutGeofenceMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opBatchPutGeofence(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_BatchUpdateDevicePosition.go b/service/location/api_op_BatchUpdateDevicePosition.go index f428b7f1791..3e1b24d88f3 100644 --- a/service/location/api_op_BatchUpdateDevicePosition.go +++ b/service/location/api_op_BatchUpdateDevicePosition.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -111,9 +110,6 @@ func (c *Client) addOperationBatchUpdateDevicePositionMiddlewares(stack *middlew if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opBatchUpdateDevicePositionMiddleware(stack); err != nil { - return err - } if err = addOpBatchUpdateDevicePositionValidationMiddleware(stack); err != nil { return err } @@ -132,33 +128,6 @@ func (c *Client) addOperationBatchUpdateDevicePositionMiddlewares(stack *middlew return nil } -type endpointPrefix_opBatchUpdateDevicePositionMiddleware struct { -} - -func (*endpointPrefix_opBatchUpdateDevicePositionMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opBatchUpdateDevicePositionMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opBatchUpdateDevicePositionMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opBatchUpdateDevicePositionMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opBatchUpdateDevicePosition(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_CalculateRoute.go b/service/location/api_op_CalculateRoute.go index 7cc79fcdac8..6ccc315cb95 100644 --- a/service/location/api_op_CalculateRoute.go +++ b/service/location/api_op_CalculateRoute.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -240,9 +239,6 @@ func (c *Client) addOperationCalculateRouteMiddlewares(stack *middleware.Stack, if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opCalculateRouteMiddleware(stack); err != nil { - return err - } if err = addOpCalculateRouteValidationMiddleware(stack); err != nil { return err } @@ -261,33 +257,6 @@ func (c *Client) addOperationCalculateRouteMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opCalculateRouteMiddleware struct { -} - -func (*endpointPrefix_opCalculateRouteMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opCalculateRouteMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "routes." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opCalculateRouteMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opCalculateRouteMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opCalculateRoute(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_CreateGeofenceCollection.go b/service/location/api_op_CreateGeofenceCollection.go index d5c24f98629..3b1d44aef78 100644 --- a/service/location/api_op_CreateGeofenceCollection.go +++ b/service/location/api_op_CreateGeofenceCollection.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -173,9 +172,6 @@ func (c *Client) addOperationCreateGeofenceCollectionMiddlewares(stack *middlewa if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opCreateGeofenceCollectionMiddleware(stack); err != nil { - return err - } if err = addOpCreateGeofenceCollectionValidationMiddleware(stack); err != nil { return err } @@ -194,33 +190,6 @@ func (c *Client) addOperationCreateGeofenceCollectionMiddlewares(stack *middlewa return nil } -type endpointPrefix_opCreateGeofenceCollectionMiddleware struct { -} - -func (*endpointPrefix_opCreateGeofenceCollectionMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opCreateGeofenceCollectionMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "geofencing." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opCreateGeofenceCollectionMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opCreateGeofenceCollectionMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opCreateGeofenceCollection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_CreateMap.go b/service/location/api_op_CreateMap.go index e3af864938a..7522774796f 100644 --- a/service/location/api_op_CreateMap.go +++ b/service/location/api_op_CreateMap.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -158,9 +157,6 @@ func (c *Client) addOperationCreateMapMiddlewares(stack *middleware.Stack, optio if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opCreateMapMiddleware(stack); err != nil { - return err - } if err = addOpCreateMapValidationMiddleware(stack); err != nil { return err } @@ -179,33 +175,6 @@ func (c *Client) addOperationCreateMapMiddlewares(stack *middleware.Stack, optio return nil } -type endpointPrefix_opCreateMapMiddleware struct { -} - -func (*endpointPrefix_opCreateMapMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opCreateMapMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "maps." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opCreateMapMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opCreateMapMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opCreateMap(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_CreatePlaceIndex.go b/service/location/api_op_CreatePlaceIndex.go index d78f0856d63..e71a04bb9be 100644 --- a/service/location/api_op_CreatePlaceIndex.go +++ b/service/location/api_op_CreatePlaceIndex.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -189,9 +188,6 @@ func (c *Client) addOperationCreatePlaceIndexMiddlewares(stack *middleware.Stack if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opCreatePlaceIndexMiddleware(stack); err != nil { - return err - } if err = addOpCreatePlaceIndexValidationMiddleware(stack); err != nil { return err } @@ -210,33 +206,6 @@ func (c *Client) addOperationCreatePlaceIndexMiddlewares(stack *middleware.Stack return nil } -type endpointPrefix_opCreatePlaceIndexMiddleware struct { -} - -func (*endpointPrefix_opCreatePlaceIndexMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opCreatePlaceIndexMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "places." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opCreatePlaceIndexMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opCreatePlaceIndexMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opCreatePlaceIndex(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_CreateRouteCalculator.go b/service/location/api_op_CreateRouteCalculator.go index 10bdc59975f..ae4e971f1ba 100644 --- a/service/location/api_op_CreateRouteCalculator.go +++ b/service/location/api_op_CreateRouteCalculator.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -194,9 +193,6 @@ func (c *Client) addOperationCreateRouteCalculatorMiddlewares(stack *middleware. if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opCreateRouteCalculatorMiddleware(stack); err != nil { - return err - } if err = addOpCreateRouteCalculatorValidationMiddleware(stack); err != nil { return err } @@ -215,33 +211,6 @@ func (c *Client) addOperationCreateRouteCalculatorMiddlewares(stack *middleware. return nil } -type endpointPrefix_opCreateRouteCalculatorMiddleware struct { -} - -func (*endpointPrefix_opCreateRouteCalculatorMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opCreateRouteCalculatorMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "routes." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opCreateRouteCalculatorMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opCreateRouteCalculatorMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opCreateRouteCalculator(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_CreateTracker.go b/service/location/api_op_CreateTracker.go index e6cf41cbf39..4bac8500b85 100644 --- a/service/location/api_op_CreateTracker.go +++ b/service/location/api_op_CreateTracker.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -193,9 +192,6 @@ func (c *Client) addOperationCreateTrackerMiddlewares(stack *middleware.Stack, o if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opCreateTrackerMiddleware(stack); err != nil { - return err - } if err = addOpCreateTrackerValidationMiddleware(stack); err != nil { return err } @@ -214,33 +210,6 @@ func (c *Client) addOperationCreateTrackerMiddlewares(stack *middleware.Stack, o return nil } -type endpointPrefix_opCreateTrackerMiddleware struct { -} - -func (*endpointPrefix_opCreateTrackerMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opCreateTrackerMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opCreateTrackerMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opCreateTrackerMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opCreateTracker(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_DeleteGeofenceCollection.go b/service/location/api_op_DeleteGeofenceCollection.go index ee280ae9c32..89f6858de26 100644 --- a/service/location/api_op_DeleteGeofenceCollection.go +++ b/service/location/api_op_DeleteGeofenceCollection.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -91,9 +90,6 @@ func (c *Client) addOperationDeleteGeofenceCollectionMiddlewares(stack *middlewa if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opDeleteGeofenceCollectionMiddleware(stack); err != nil { - return err - } if err = addOpDeleteGeofenceCollectionValidationMiddleware(stack); err != nil { return err } @@ -112,33 +108,6 @@ func (c *Client) addOperationDeleteGeofenceCollectionMiddlewares(stack *middlewa return nil } -type endpointPrefix_opDeleteGeofenceCollectionMiddleware struct { -} - -func (*endpointPrefix_opDeleteGeofenceCollectionMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDeleteGeofenceCollectionMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "geofencing." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opDeleteGeofenceCollectionMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opDeleteGeofenceCollectionMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opDeleteGeofenceCollection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_DeleteMap.go b/service/location/api_op_DeleteMap.go index 3ec457d5035..88f5c1101fa 100644 --- a/service/location/api_op_DeleteMap.go +++ b/service/location/api_op_DeleteMap.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -91,9 +90,6 @@ func (c *Client) addOperationDeleteMapMiddlewares(stack *middleware.Stack, optio if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opDeleteMapMiddleware(stack); err != nil { - return err - } if err = addOpDeleteMapValidationMiddleware(stack); err != nil { return err } @@ -112,33 +108,6 @@ func (c *Client) addOperationDeleteMapMiddlewares(stack *middleware.Stack, optio return nil } -type endpointPrefix_opDeleteMapMiddleware struct { -} - -func (*endpointPrefix_opDeleteMapMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDeleteMapMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "maps." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opDeleteMapMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opDeleteMapMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opDeleteMap(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_DeletePlaceIndex.go b/service/location/api_op_DeletePlaceIndex.go index 8c2d7112e40..c3e96a4bd6d 100644 --- a/service/location/api_op_DeletePlaceIndex.go +++ b/service/location/api_op_DeletePlaceIndex.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -90,9 +89,6 @@ func (c *Client) addOperationDeletePlaceIndexMiddlewares(stack *middleware.Stack if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opDeletePlaceIndexMiddleware(stack); err != nil { - return err - } if err = addOpDeletePlaceIndexValidationMiddleware(stack); err != nil { return err } @@ -111,33 +107,6 @@ func (c *Client) addOperationDeletePlaceIndexMiddlewares(stack *middleware.Stack return nil } -type endpointPrefix_opDeletePlaceIndexMiddleware struct { -} - -func (*endpointPrefix_opDeletePlaceIndexMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDeletePlaceIndexMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "places." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opDeletePlaceIndexMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opDeletePlaceIndexMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opDeletePlaceIndex(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_DeleteRouteCalculator.go b/service/location/api_op_DeleteRouteCalculator.go index e381bbba113..07abdc127b2 100644 --- a/service/location/api_op_DeleteRouteCalculator.go +++ b/service/location/api_op_DeleteRouteCalculator.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -90,9 +89,6 @@ func (c *Client) addOperationDeleteRouteCalculatorMiddlewares(stack *middleware. if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opDeleteRouteCalculatorMiddleware(stack); err != nil { - return err - } if err = addOpDeleteRouteCalculatorValidationMiddleware(stack); err != nil { return err } @@ -111,33 +107,6 @@ func (c *Client) addOperationDeleteRouteCalculatorMiddlewares(stack *middleware. return nil } -type endpointPrefix_opDeleteRouteCalculatorMiddleware struct { -} - -func (*endpointPrefix_opDeleteRouteCalculatorMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDeleteRouteCalculatorMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "routes." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opDeleteRouteCalculatorMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opDeleteRouteCalculatorMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opDeleteRouteCalculator(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_DeleteTracker.go b/service/location/api_op_DeleteTracker.go index 238aa24bfa7..9784fc3d2af 100644 --- a/service/location/api_op_DeleteTracker.go +++ b/service/location/api_op_DeleteTracker.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -92,9 +91,6 @@ func (c *Client) addOperationDeleteTrackerMiddlewares(stack *middleware.Stack, o if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opDeleteTrackerMiddleware(stack); err != nil { - return err - } if err = addOpDeleteTrackerValidationMiddleware(stack); err != nil { return err } @@ -113,33 +109,6 @@ func (c *Client) addOperationDeleteTrackerMiddlewares(stack *middleware.Stack, o return nil } -type endpointPrefix_opDeleteTrackerMiddleware struct { -} - -func (*endpointPrefix_opDeleteTrackerMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDeleteTrackerMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opDeleteTrackerMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opDeleteTrackerMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opDeleteTracker(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_DescribeGeofenceCollection.go b/service/location/api_op_DescribeGeofenceCollection.go index c393efc679f..13a9050a63d 100644 --- a/service/location/api_op_DescribeGeofenceCollection.go +++ b/service/location/api_op_DescribeGeofenceCollection.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -143,9 +142,6 @@ func (c *Client) addOperationDescribeGeofenceCollectionMiddlewares(stack *middle if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opDescribeGeofenceCollectionMiddleware(stack); err != nil { - return err - } if err = addOpDescribeGeofenceCollectionValidationMiddleware(stack); err != nil { return err } @@ -164,33 +160,6 @@ func (c *Client) addOperationDescribeGeofenceCollectionMiddlewares(stack *middle return nil } -type endpointPrefix_opDescribeGeofenceCollectionMiddleware struct { -} - -func (*endpointPrefix_opDescribeGeofenceCollectionMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeGeofenceCollectionMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "geofencing." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opDescribeGeofenceCollectionMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opDescribeGeofenceCollectionMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opDescribeGeofenceCollection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_DescribeMap.go b/service/location/api_op_DescribeMap.go index 67268b6c4d4..aaaac3d561f 100644 --- a/service/location/api_op_DescribeMap.go +++ b/service/location/api_op_DescribeMap.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -144,9 +143,6 @@ func (c *Client) addOperationDescribeMapMiddlewares(stack *middleware.Stack, opt if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opDescribeMapMiddleware(stack); err != nil { - return err - } if err = addOpDescribeMapValidationMiddleware(stack); err != nil { return err } @@ -165,33 +161,6 @@ func (c *Client) addOperationDescribeMapMiddlewares(stack *middleware.Stack, opt return nil } -type endpointPrefix_opDescribeMapMiddleware struct { -} - -func (*endpointPrefix_opDescribeMapMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeMapMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "maps." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opDescribeMapMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opDescribeMapMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opDescribeMap(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_DescribePlaceIndex.go b/service/location/api_op_DescribePlaceIndex.go index 80dc22312e0..3ad02926e18 100644 --- a/service/location/api_op_DescribePlaceIndex.go +++ b/service/location/api_op_DescribePlaceIndex.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -154,9 +153,6 @@ func (c *Client) addOperationDescribePlaceIndexMiddlewares(stack *middleware.Sta if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opDescribePlaceIndexMiddleware(stack); err != nil { - return err - } if err = addOpDescribePlaceIndexValidationMiddleware(stack); err != nil { return err } @@ -175,33 +171,6 @@ func (c *Client) addOperationDescribePlaceIndexMiddlewares(stack *middleware.Sta return nil } -type endpointPrefix_opDescribePlaceIndexMiddleware struct { -} - -func (*endpointPrefix_opDescribePlaceIndexMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribePlaceIndexMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "places." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opDescribePlaceIndexMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opDescribePlaceIndexMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opDescribePlaceIndex(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_DescribeRouteCalculator.go b/service/location/api_op_DescribeRouteCalculator.go index 99420142c1a..c583650de51 100644 --- a/service/location/api_op_DescribeRouteCalculator.go +++ b/service/location/api_op_DescribeRouteCalculator.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -153,9 +152,6 @@ func (c *Client) addOperationDescribeRouteCalculatorMiddlewares(stack *middlewar if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opDescribeRouteCalculatorMiddleware(stack); err != nil { - return err - } if err = addOpDescribeRouteCalculatorValidationMiddleware(stack); err != nil { return err } @@ -174,33 +170,6 @@ func (c *Client) addOperationDescribeRouteCalculatorMiddlewares(stack *middlewar return nil } -type endpointPrefix_opDescribeRouteCalculatorMiddleware struct { -} - -func (*endpointPrefix_opDescribeRouteCalculatorMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeRouteCalculatorMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "routes." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opDescribeRouteCalculatorMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opDescribeRouteCalculatorMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opDescribeRouteCalculator(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_DescribeTracker.go b/service/location/api_op_DescribeTracker.go index 40f90a754eb..f02f115fad1 100644 --- a/service/location/api_op_DescribeTracker.go +++ b/service/location/api_op_DescribeTracker.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -146,9 +145,6 @@ func (c *Client) addOperationDescribeTrackerMiddlewares(stack *middleware.Stack, if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opDescribeTrackerMiddleware(stack); err != nil { - return err - } if err = addOpDescribeTrackerValidationMiddleware(stack); err != nil { return err } @@ -167,33 +163,6 @@ func (c *Client) addOperationDescribeTrackerMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opDescribeTrackerMiddleware struct { -} - -func (*endpointPrefix_opDescribeTrackerMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeTrackerMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opDescribeTrackerMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opDescribeTrackerMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opDescribeTracker(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_DisassociateTrackerConsumer.go b/service/location/api_op_DisassociateTrackerConsumer.go index ab3d9309c88..7ed24503f0c 100644 --- a/service/location/api_op_DisassociateTrackerConsumer.go +++ b/service/location/api_op_DisassociateTrackerConsumer.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -101,9 +100,6 @@ func (c *Client) addOperationDisassociateTrackerConsumerMiddlewares(stack *middl if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opDisassociateTrackerConsumerMiddleware(stack); err != nil { - return err - } if err = addOpDisassociateTrackerConsumerValidationMiddleware(stack); err != nil { return err } @@ -122,33 +118,6 @@ func (c *Client) addOperationDisassociateTrackerConsumerMiddlewares(stack *middl return nil } -type endpointPrefix_opDisassociateTrackerConsumerMiddleware struct { -} - -func (*endpointPrefix_opDisassociateTrackerConsumerMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDisassociateTrackerConsumerMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opDisassociateTrackerConsumerMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opDisassociateTrackerConsumerMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opDisassociateTrackerConsumer(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_GetDevicePosition.go b/service/location/api_op_GetDevicePosition.go index 088af2caa2f..0e9c5b25cf0 100644 --- a/service/location/api_op_GetDevicePosition.go +++ b/service/location/api_op_GetDevicePosition.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -119,9 +118,6 @@ func (c *Client) addOperationGetDevicePositionMiddlewares(stack *middleware.Stac if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opGetDevicePositionMiddleware(stack); err != nil { - return err - } if err = addOpGetDevicePositionValidationMiddleware(stack); err != nil { return err } @@ -140,33 +136,6 @@ func (c *Client) addOperationGetDevicePositionMiddlewares(stack *middleware.Stac return nil } -type endpointPrefix_opGetDevicePositionMiddleware struct { -} - -func (*endpointPrefix_opGetDevicePositionMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetDevicePositionMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opGetDevicePositionMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opGetDevicePositionMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opGetDevicePosition(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_GetDevicePositionHistory.go b/service/location/api_op_GetDevicePositionHistory.go index c4cabeb169d..987d6c514af 100644 --- a/service/location/api_op_GetDevicePositionHistory.go +++ b/service/location/api_op_GetDevicePositionHistory.go @@ -129,9 +129,6 @@ func (c *Client) addOperationGetDevicePositionHistoryMiddlewares(stack *middlewa if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opGetDevicePositionHistoryMiddleware(stack); err != nil { - return err - } if err = addOpGetDevicePositionHistoryValidationMiddleware(stack); err != nil { return err } @@ -150,33 +147,6 @@ func (c *Client) addOperationGetDevicePositionHistoryMiddlewares(stack *middlewa return nil } -type endpointPrefix_opGetDevicePositionHistoryMiddleware struct { -} - -func (*endpointPrefix_opGetDevicePositionHistoryMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetDevicePositionHistoryMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opGetDevicePositionHistoryMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opGetDevicePositionHistoryMiddleware{}, `OperationSerializer`, middleware.After) -} - // GetDevicePositionHistoryAPIClient is a client that implements the // GetDevicePositionHistory operation. type GetDevicePositionHistoryAPIClient interface { diff --git a/service/location/api_op_GetGeofence.go b/service/location/api_op_GetGeofence.go index 00d765ea7b0..14ff242cb6f 100644 --- a/service/location/api_op_GetGeofence.go +++ b/service/location/api_op_GetGeofence.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -140,9 +139,6 @@ func (c *Client) addOperationGetGeofenceMiddlewares(stack *middleware.Stack, opt if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opGetGeofenceMiddleware(stack); err != nil { - return err - } if err = addOpGetGeofenceValidationMiddleware(stack); err != nil { return err } @@ -161,33 +157,6 @@ func (c *Client) addOperationGetGeofenceMiddlewares(stack *middleware.Stack, opt return nil } -type endpointPrefix_opGetGeofenceMiddleware struct { -} - -func (*endpointPrefix_opGetGeofenceMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetGeofenceMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "geofencing." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opGetGeofenceMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opGetGeofenceMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opGetGeofence(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_GetMapGlyphs.go b/service/location/api_op_GetMapGlyphs.go index 792694fb5c4..e81f90f87fd 100644 --- a/service/location/api_op_GetMapGlyphs.go +++ b/service/location/api_op_GetMapGlyphs.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -133,9 +132,6 @@ func (c *Client) addOperationGetMapGlyphsMiddlewares(stack *middleware.Stack, op if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opGetMapGlyphsMiddleware(stack); err != nil { - return err - } if err = addOpGetMapGlyphsValidationMiddleware(stack); err != nil { return err } @@ -154,33 +150,6 @@ func (c *Client) addOperationGetMapGlyphsMiddlewares(stack *middleware.Stack, op return nil } -type endpointPrefix_opGetMapGlyphsMiddleware struct { -} - -func (*endpointPrefix_opGetMapGlyphsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetMapGlyphsMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "maps." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opGetMapGlyphsMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opGetMapGlyphsMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opGetMapGlyphs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_GetMapSprites.go b/service/location/api_op_GetMapSprites.go index 66268c4b26a..fa00d5e1c81 100644 --- a/service/location/api_op_GetMapSprites.go +++ b/service/location/api_op_GetMapSprites.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -118,9 +117,6 @@ func (c *Client) addOperationGetMapSpritesMiddlewares(stack *middleware.Stack, o if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opGetMapSpritesMiddleware(stack); err != nil { - return err - } if err = addOpGetMapSpritesValidationMiddleware(stack); err != nil { return err } @@ -139,33 +135,6 @@ func (c *Client) addOperationGetMapSpritesMiddlewares(stack *middleware.Stack, o return nil } -type endpointPrefix_opGetMapSpritesMiddleware struct { -} - -func (*endpointPrefix_opGetMapSpritesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetMapSpritesMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "maps." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opGetMapSpritesMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opGetMapSpritesMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opGetMapSprites(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_GetMapStyleDescriptor.go b/service/location/api_op_GetMapStyleDescriptor.go index 0fa0ff1f287..99d41fecc20 100644 --- a/service/location/api_op_GetMapStyleDescriptor.go +++ b/service/location/api_op_GetMapStyleDescriptor.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -99,9 +98,6 @@ func (c *Client) addOperationGetMapStyleDescriptorMiddlewares(stack *middleware. if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opGetMapStyleDescriptorMiddleware(stack); err != nil { - return err - } if err = addOpGetMapStyleDescriptorValidationMiddleware(stack); err != nil { return err } @@ -120,33 +116,6 @@ func (c *Client) addOperationGetMapStyleDescriptorMiddlewares(stack *middleware. return nil } -type endpointPrefix_opGetMapStyleDescriptorMiddleware struct { -} - -func (*endpointPrefix_opGetMapStyleDescriptorMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetMapStyleDescriptorMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "maps." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opGetMapStyleDescriptorMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opGetMapStyleDescriptorMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opGetMapStyleDescriptor(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_GetMapTile.go b/service/location/api_op_GetMapTile.go index 7232d8dfa4b..6af5dea50ff 100644 --- a/service/location/api_op_GetMapTile.go +++ b/service/location/api_op_GetMapTile.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -116,9 +115,6 @@ func (c *Client) addOperationGetMapTileMiddlewares(stack *middleware.Stack, opti if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opGetMapTileMiddleware(stack); err != nil { - return err - } if err = addOpGetMapTileValidationMiddleware(stack); err != nil { return err } @@ -137,33 +133,6 @@ func (c *Client) addOperationGetMapTileMiddlewares(stack *middleware.Stack, opti return nil } -type endpointPrefix_opGetMapTileMiddleware struct { -} - -func (*endpointPrefix_opGetMapTileMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetMapTileMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "maps." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opGetMapTileMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opGetMapTileMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opGetMapTile(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_ListDevicePositions.go b/service/location/api_op_ListDevicePositions.go index 8ae0d26d0ce..74fadc59392 100644 --- a/service/location/api_op_ListDevicePositions.go +++ b/service/location/api_op_ListDevicePositions.go @@ -110,9 +110,6 @@ func (c *Client) addOperationListDevicePositionsMiddlewares(stack *middleware.St if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opListDevicePositionsMiddleware(stack); err != nil { - return err - } if err = addOpListDevicePositionsValidationMiddleware(stack); err != nil { return err } @@ -131,33 +128,6 @@ func (c *Client) addOperationListDevicePositionsMiddlewares(stack *middleware.St return nil } -type endpointPrefix_opListDevicePositionsMiddleware struct { -} - -func (*endpointPrefix_opListDevicePositionsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListDevicePositionsMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opListDevicePositionsMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opListDevicePositionsMiddleware{}, `OperationSerializer`, middleware.After) -} - // ListDevicePositionsAPIClient is a client that implements the ListDevicePositions // operation. type ListDevicePositionsAPIClient interface { diff --git a/service/location/api_op_ListGeofenceCollections.go b/service/location/api_op_ListGeofenceCollections.go index 403ee574c3b..9996990afcf 100644 --- a/service/location/api_op_ListGeofenceCollections.go +++ b/service/location/api_op_ListGeofenceCollections.go @@ -103,9 +103,6 @@ func (c *Client) addOperationListGeofenceCollectionsMiddlewares(stack *middlewar if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opListGeofenceCollectionsMiddleware(stack); err != nil { - return err - } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGeofenceCollections(options.Region), middleware.Before); err != nil { return err } @@ -121,33 +118,6 @@ func (c *Client) addOperationListGeofenceCollectionsMiddlewares(stack *middlewar return nil } -type endpointPrefix_opListGeofenceCollectionsMiddleware struct { -} - -func (*endpointPrefix_opListGeofenceCollectionsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListGeofenceCollectionsMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "geofencing." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opListGeofenceCollectionsMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opListGeofenceCollectionsMiddleware{}, `OperationSerializer`, middleware.After) -} - // ListGeofenceCollectionsAPIClient is a client that implements the // ListGeofenceCollections operation. type ListGeofenceCollectionsAPIClient interface { diff --git a/service/location/api_op_ListGeofences.go b/service/location/api_op_ListGeofences.go index c0b68baf503..d1df3861611 100644 --- a/service/location/api_op_ListGeofences.go +++ b/service/location/api_op_ListGeofences.go @@ -104,9 +104,6 @@ func (c *Client) addOperationListGeofencesMiddlewares(stack *middleware.Stack, o if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opListGeofencesMiddleware(stack); err != nil { - return err - } if err = addOpListGeofencesValidationMiddleware(stack); err != nil { return err } @@ -125,33 +122,6 @@ func (c *Client) addOperationListGeofencesMiddlewares(stack *middleware.Stack, o return nil } -type endpointPrefix_opListGeofencesMiddleware struct { -} - -func (*endpointPrefix_opListGeofencesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListGeofencesMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "geofencing." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opListGeofencesMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opListGeofencesMiddleware{}, `OperationSerializer`, middleware.After) -} - // ListGeofencesAPIClient is a client that implements the ListGeofences operation. type ListGeofencesAPIClient interface { ListGeofences(context.Context, *ListGeofencesInput, ...func(*Options)) (*ListGeofencesOutput, error) diff --git a/service/location/api_op_ListMaps.go b/service/location/api_op_ListMaps.go index 533c1685186..077e00e4262 100644 --- a/service/location/api_op_ListMaps.go +++ b/service/location/api_op_ListMaps.go @@ -103,9 +103,6 @@ func (c *Client) addOperationListMapsMiddlewares(stack *middleware.Stack, option if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opListMapsMiddleware(stack); err != nil { - return err - } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMaps(options.Region), middleware.Before); err != nil { return err } @@ -121,33 +118,6 @@ func (c *Client) addOperationListMapsMiddlewares(stack *middleware.Stack, option return nil } -type endpointPrefix_opListMapsMiddleware struct { -} - -func (*endpointPrefix_opListMapsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListMapsMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "maps." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opListMapsMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opListMapsMiddleware{}, `OperationSerializer`, middleware.After) -} - // ListMapsAPIClient is a client that implements the ListMaps operation. type ListMapsAPIClient interface { ListMaps(context.Context, *ListMapsInput, ...func(*Options)) (*ListMapsOutput, error) diff --git a/service/location/api_op_ListPlaceIndexes.go b/service/location/api_op_ListPlaceIndexes.go index ccb2d1c21df..69520943ce0 100644 --- a/service/location/api_op_ListPlaceIndexes.go +++ b/service/location/api_op_ListPlaceIndexes.go @@ -103,9 +103,6 @@ func (c *Client) addOperationListPlaceIndexesMiddlewares(stack *middleware.Stack if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opListPlaceIndexesMiddleware(stack); err != nil { - return err - } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPlaceIndexes(options.Region), middleware.Before); err != nil { return err } @@ -121,33 +118,6 @@ func (c *Client) addOperationListPlaceIndexesMiddlewares(stack *middleware.Stack return nil } -type endpointPrefix_opListPlaceIndexesMiddleware struct { -} - -func (*endpointPrefix_opListPlaceIndexesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListPlaceIndexesMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "places." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opListPlaceIndexesMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opListPlaceIndexesMiddleware{}, `OperationSerializer`, middleware.After) -} - // ListPlaceIndexesAPIClient is a client that implements the ListPlaceIndexes // operation. type ListPlaceIndexesAPIClient interface { diff --git a/service/location/api_op_ListRouteCalculators.go b/service/location/api_op_ListRouteCalculators.go index 69c7c208f6d..29bbb81aa77 100644 --- a/service/location/api_op_ListRouteCalculators.go +++ b/service/location/api_op_ListRouteCalculators.go @@ -103,9 +103,6 @@ func (c *Client) addOperationListRouteCalculatorsMiddlewares(stack *middleware.S if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opListRouteCalculatorsMiddleware(stack); err != nil { - return err - } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRouteCalculators(options.Region), middleware.Before); err != nil { return err } @@ -121,33 +118,6 @@ func (c *Client) addOperationListRouteCalculatorsMiddlewares(stack *middleware.S return nil } -type endpointPrefix_opListRouteCalculatorsMiddleware struct { -} - -func (*endpointPrefix_opListRouteCalculatorsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListRouteCalculatorsMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "routes." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opListRouteCalculatorsMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opListRouteCalculatorsMiddleware{}, `OperationSerializer`, middleware.After) -} - // ListRouteCalculatorsAPIClient is a client that implements the // ListRouteCalculators operation. type ListRouteCalculatorsAPIClient interface { diff --git a/service/location/api_op_ListTagsForResource.go b/service/location/api_op_ListTagsForResource.go index d820fc73c07..ef06fb47327 100644 --- a/service/location/api_op_ListTagsForResource.go +++ b/service/location/api_op_ListTagsForResource.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -102,9 +101,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opListTagsForResourceMiddleware(stack); err != nil { - return err - } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -123,33 +119,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -type endpointPrefix_opListTagsForResourceMiddleware struct { -} - -func (*endpointPrefix_opListTagsForResourceMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListTagsForResourceMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "metadata." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opListTagsForResourceMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opListTagsForResourceMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_ListTrackerConsumers.go b/service/location/api_op_ListTrackerConsumers.go index 34e21089d87..99360292eb3 100644 --- a/service/location/api_op_ListTrackerConsumers.go +++ b/service/location/api_op_ListTrackerConsumers.go @@ -108,9 +108,6 @@ func (c *Client) addOperationListTrackerConsumersMiddlewares(stack *middleware.S if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opListTrackerConsumersMiddleware(stack); err != nil { - return err - } if err = addOpListTrackerConsumersValidationMiddleware(stack); err != nil { return err } @@ -129,33 +126,6 @@ func (c *Client) addOperationListTrackerConsumersMiddlewares(stack *middleware.S return nil } -type endpointPrefix_opListTrackerConsumersMiddleware struct { -} - -func (*endpointPrefix_opListTrackerConsumersMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListTrackerConsumersMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opListTrackerConsumersMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opListTrackerConsumersMiddleware{}, `OperationSerializer`, middleware.After) -} - // ListTrackerConsumersAPIClient is a client that implements the // ListTrackerConsumers operation. type ListTrackerConsumersAPIClient interface { diff --git a/service/location/api_op_ListTrackers.go b/service/location/api_op_ListTrackers.go index c75aaf01c00..7d92f8983a3 100644 --- a/service/location/api_op_ListTrackers.go +++ b/service/location/api_op_ListTrackers.go @@ -104,9 +104,6 @@ func (c *Client) addOperationListTrackersMiddlewares(stack *middleware.Stack, op if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opListTrackersMiddleware(stack); err != nil { - return err - } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrackers(options.Region), middleware.Before); err != nil { return err } @@ -122,33 +119,6 @@ func (c *Client) addOperationListTrackersMiddlewares(stack *middleware.Stack, op return nil } -type endpointPrefix_opListTrackersMiddleware struct { -} - -func (*endpointPrefix_opListTrackersMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListTrackersMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opListTrackersMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opListTrackersMiddleware{}, `OperationSerializer`, middleware.After) -} - // ListTrackersAPIClient is a client that implements the ListTrackers operation. type ListTrackersAPIClient interface { ListTrackers(context.Context, *ListTrackersInput, ...func(*Options)) (*ListTrackersOutput, error) diff --git a/service/location/api_op_PutGeofence.go b/service/location/api_op_PutGeofence.go index b769e5df8a6..8cc8d812397 100644 --- a/service/location/api_op_PutGeofence.go +++ b/service/location/api_op_PutGeofence.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -125,9 +124,6 @@ func (c *Client) addOperationPutGeofenceMiddlewares(stack *middleware.Stack, opt if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opPutGeofenceMiddleware(stack); err != nil { - return err - } if err = addOpPutGeofenceValidationMiddleware(stack); err != nil { return err } @@ -146,33 +142,6 @@ func (c *Client) addOperationPutGeofenceMiddlewares(stack *middleware.Stack, opt return nil } -type endpointPrefix_opPutGeofenceMiddleware struct { -} - -func (*endpointPrefix_opPutGeofenceMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opPutGeofenceMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "geofencing." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opPutGeofenceMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opPutGeofenceMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opPutGeofence(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_SearchPlaceIndexForPosition.go b/service/location/api_op_SearchPlaceIndexForPosition.go index 3a4dbbd3e85..f9eaca75964 100644 --- a/service/location/api_op_SearchPlaceIndexForPosition.go +++ b/service/location/api_op_SearchPlaceIndexForPosition.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -124,9 +123,6 @@ func (c *Client) addOperationSearchPlaceIndexForPositionMiddlewares(stack *middl if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opSearchPlaceIndexForPositionMiddleware(stack); err != nil { - return err - } if err = addOpSearchPlaceIndexForPositionValidationMiddleware(stack); err != nil { return err } @@ -145,33 +141,6 @@ func (c *Client) addOperationSearchPlaceIndexForPositionMiddlewares(stack *middl return nil } -type endpointPrefix_opSearchPlaceIndexForPositionMiddleware struct { -} - -func (*endpointPrefix_opSearchPlaceIndexForPositionMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opSearchPlaceIndexForPositionMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "places." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opSearchPlaceIndexForPositionMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opSearchPlaceIndexForPositionMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opSearchPlaceIndexForPosition(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_SearchPlaceIndexForText.go b/service/location/api_op_SearchPlaceIndexForText.go index 847182d1f65..bdb646132bb 100644 --- a/service/location/api_op_SearchPlaceIndexForText.go +++ b/service/location/api_op_SearchPlaceIndexForText.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -158,9 +157,6 @@ func (c *Client) addOperationSearchPlaceIndexForTextMiddlewares(stack *middlewar if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opSearchPlaceIndexForTextMiddleware(stack); err != nil { - return err - } if err = addOpSearchPlaceIndexForTextValidationMiddleware(stack); err != nil { return err } @@ -179,33 +175,6 @@ func (c *Client) addOperationSearchPlaceIndexForTextMiddlewares(stack *middlewar return nil } -type endpointPrefix_opSearchPlaceIndexForTextMiddleware struct { -} - -func (*endpointPrefix_opSearchPlaceIndexForTextMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opSearchPlaceIndexForTextMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "places." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opSearchPlaceIndexForTextMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opSearchPlaceIndexForTextMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opSearchPlaceIndexForText(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_TagResource.go b/service/location/api_op_TagResource.go index 63daf697563..9c8a63f9caf 100644 --- a/service/location/api_op_TagResource.go +++ b/service/location/api_op_TagResource.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -124,9 +123,6 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opTagResourceMiddleware(stack); err != nil { - return err - } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } @@ -145,33 +141,6 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt return nil } -type endpointPrefix_opTagResourceMiddleware struct { -} - -func (*endpointPrefix_opTagResourceMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opTagResourceMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "metadata." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opTagResourceMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opTagResourceMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_UntagResource.go b/service/location/api_op_UntagResource.go index 3ac6b4f62b0..29af7a87d77 100644 --- a/service/location/api_op_UntagResource.go +++ b/service/location/api_op_UntagResource.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -98,9 +97,6 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opUntagResourceMiddleware(stack); err != nil { - return err - } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } @@ -119,33 +115,6 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o return nil } -type endpointPrefix_opUntagResourceMiddleware struct { -} - -func (*endpointPrefix_opUntagResourceMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opUntagResourceMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "metadata." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opUntagResourceMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opUntagResourceMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_UpdateGeofenceCollection.go b/service/location/api_op_UpdateGeofenceCollection.go index d9f80104d33..6300b8de36a 100644 --- a/service/location/api_op_UpdateGeofenceCollection.go +++ b/service/location/api_op_UpdateGeofenceCollection.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -132,9 +131,6 @@ func (c *Client) addOperationUpdateGeofenceCollectionMiddlewares(stack *middlewa if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opUpdateGeofenceCollectionMiddleware(stack); err != nil { - return err - } if err = addOpUpdateGeofenceCollectionValidationMiddleware(stack); err != nil { return err } @@ -153,33 +149,6 @@ func (c *Client) addOperationUpdateGeofenceCollectionMiddlewares(stack *middlewa return nil } -type endpointPrefix_opUpdateGeofenceCollectionMiddleware struct { -} - -func (*endpointPrefix_opUpdateGeofenceCollectionMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opUpdateGeofenceCollectionMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "geofencing." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opUpdateGeofenceCollectionMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opUpdateGeofenceCollectionMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opUpdateGeofenceCollection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_UpdateMap.go b/service/location/api_op_UpdateMap.go index 6af12bc7074..8e80558f5af 100644 --- a/service/location/api_op_UpdateMap.go +++ b/service/location/api_op_UpdateMap.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -121,9 +120,6 @@ func (c *Client) addOperationUpdateMapMiddlewares(stack *middleware.Stack, optio if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opUpdateMapMiddleware(stack); err != nil { - return err - } if err = addOpUpdateMapValidationMiddleware(stack); err != nil { return err } @@ -142,33 +138,6 @@ func (c *Client) addOperationUpdateMapMiddlewares(stack *middleware.Stack, optio return nil } -type endpointPrefix_opUpdateMapMiddleware struct { -} - -func (*endpointPrefix_opUpdateMapMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opUpdateMapMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "maps." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opUpdateMapMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opUpdateMapMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opUpdateMap(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_UpdatePlaceIndex.go b/service/location/api_op_UpdatePlaceIndex.go index d7596eafc80..81b8c704425 100644 --- a/service/location/api_op_UpdatePlaceIndex.go +++ b/service/location/api_op_UpdatePlaceIndex.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -124,9 +123,6 @@ func (c *Client) addOperationUpdatePlaceIndexMiddlewares(stack *middleware.Stack if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opUpdatePlaceIndexMiddleware(stack); err != nil { - return err - } if err = addOpUpdatePlaceIndexValidationMiddleware(stack); err != nil { return err } @@ -145,33 +141,6 @@ func (c *Client) addOperationUpdatePlaceIndexMiddlewares(stack *middleware.Stack return nil } -type endpointPrefix_opUpdatePlaceIndexMiddleware struct { -} - -func (*endpointPrefix_opUpdatePlaceIndexMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opUpdatePlaceIndexMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "places." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opUpdatePlaceIndexMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opUpdatePlaceIndexMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opUpdatePlaceIndex(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_UpdateRouteCalculator.go b/service/location/api_op_UpdateRouteCalculator.go index 027d4b1ded5..eaf941ee0f9 100644 --- a/service/location/api_op_UpdateRouteCalculator.go +++ b/service/location/api_op_UpdateRouteCalculator.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -121,9 +120,6 @@ func (c *Client) addOperationUpdateRouteCalculatorMiddlewares(stack *middleware. if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opUpdateRouteCalculatorMiddleware(stack); err != nil { - return err - } if err = addOpUpdateRouteCalculatorValidationMiddleware(stack); err != nil { return err } @@ -142,33 +138,6 @@ func (c *Client) addOperationUpdateRouteCalculatorMiddlewares(stack *middleware. return nil } -type endpointPrefix_opUpdateRouteCalculatorMiddleware struct { -} - -func (*endpointPrefix_opUpdateRouteCalculatorMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opUpdateRouteCalculatorMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "routes." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opUpdateRouteCalculatorMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opUpdateRouteCalculatorMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opUpdateRouteCalculator(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_UpdateTracker.go b/service/location/api_op_UpdateTracker.go index 2c7b2911947..d3b51585910 100644 --- a/service/location/api_op_UpdateTracker.go +++ b/service/location/api_op_UpdateTracker.go @@ -4,7 +4,6 @@ package location import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/location/types" @@ -148,9 +147,6 @@ func (c *Client) addOperationUpdateTrackerMiddlewares(stack *middleware.Stack, o if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addEndpointPrefix_opUpdateTrackerMiddleware(stack); err != nil { - return err - } if err = addOpUpdateTrackerValidationMiddleware(stack); err != nil { return err } @@ -169,33 +165,6 @@ func (c *Client) addOperationUpdateTrackerMiddlewares(stack *middleware.Stack, o return nil } -type endpointPrefix_opUpdateTrackerMiddleware struct { -} - -func (*endpointPrefix_opUpdateTrackerMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opUpdateTrackerMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(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) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleSerialize(ctx, in) -} -func addEndpointPrefix_opUpdateTrackerMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&endpointPrefix_opUpdateTrackerMiddleware{}, `OperationSerializer`, middleware.After) -} - func newServiceMetadataMiddleware_opUpdateTracker(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_client.go b/service/networkmanager/api_client.go index c857b885a6e..cc3409e23da 100644 --- a/service/networkmanager/api_client.go +++ b/service/networkmanager/api_client.go @@ -4,6 +4,7 @@ package networkmanager import ( "context" + cryptorand "crypto/rand" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" @@ -14,6 +15,7 @@ import ( smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "time" @@ -43,6 +45,8 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveDefaultEndpointConfiguration(&options) + resolveIdempotencyTokenProvider(&options) + for _, fn := range optFns { fn(&options) } @@ -75,6 +79,10 @@ type Options struct { // 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 @@ -240,6 +248,13 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, @@ -278,6 +293,11 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/networkmanager/api_op_AcceptAttachment.go b/service/networkmanager/api_op_AcceptAttachment.go new file mode 100644 index 00000000000..3298bb72020 --- /dev/null +++ b/service/networkmanager/api_op_AcceptAttachment.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Accepts a core network attachment request. Once the attachment request is +// accepted by a core network owner, the attachment is created and connected to a +// core network. +func (c *Client) AcceptAttachment(ctx context.Context, params *AcceptAttachmentInput, optFns ...func(*Options)) (*AcceptAttachmentOutput, error) { + if params == nil { + params = &AcceptAttachmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AcceptAttachment", params, optFns, c.addOperationAcceptAttachmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AcceptAttachmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AcceptAttachmentInput struct { + + // The ID of the attachment. + // + // This member is required. + AttachmentId *string + + noSmithyDocumentSerde +} + +type AcceptAttachmentOutput struct { + + // The response to the attachment request. + Attachment *types.Attachment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAcceptAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpAcceptAttachment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAcceptAttachment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpAcceptAttachmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptAttachment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAcceptAttachment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "AcceptAttachment", + } +} diff --git a/service/networkmanager/api_op_AssociateConnectPeer.go b/service/networkmanager/api_op_AssociateConnectPeer.go new file mode 100644 index 00000000000..9defbd7950d --- /dev/null +++ b/service/networkmanager/api_op_AssociateConnectPeer.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Associates a core network Connect peer with a device and optionally, with a +// link. If you specify a link, it must be associated with the specified device. +// You can only associate core network Connect peers that have been created on a +// core network Connect attachment on a core network. +func (c *Client) AssociateConnectPeer(ctx context.Context, params *AssociateConnectPeerInput, optFns ...func(*Options)) (*AssociateConnectPeerOutput, error) { + if params == nil { + params = &AssociateConnectPeerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociateConnectPeer", params, optFns, c.addOperationAssociateConnectPeerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociateConnectPeerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AssociateConnectPeerInput struct { + + // The ID of the Connect peer. + // + // This member is required. + ConnectPeerId *string + + // The ID of the device. + // + // This member is required. + DeviceId *string + + // The ID of your global network. + // + // This member is required. + GlobalNetworkId *string + + // The ID of the link. + LinkId *string + + noSmithyDocumentSerde +} + +type AssociateConnectPeerOutput struct { + + // The response to the Connect peer request. + ConnectPeerAssociation *types.ConnectPeerAssociation + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociateConnectPeerMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateConnectPeer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateConnectPeer{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpAssociateConnectPeerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateConnectPeer(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAssociateConnectPeer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "AssociateConnectPeer", + } +} diff --git a/service/networkmanager/api_op_CreateConnectAttachment.go b/service/networkmanager/api_op_CreateConnectAttachment.go new file mode 100644 index 00000000000..b86cf6e71a9 --- /dev/null +++ b/service/networkmanager/api_op_CreateConnectAttachment.go @@ -0,0 +1,183 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a core network Connect attachment from a specified core network +// attachment. A core network Connect attachment is a GRE-based tunnel attachment +// that you can use to establish a connection between a core network and an +// appliance. A core network Connect attachment uses an existing VPC attachment as +// the underlying transport mechanism. +func (c *Client) CreateConnectAttachment(ctx context.Context, params *CreateConnectAttachmentInput, optFns ...func(*Options)) (*CreateConnectAttachmentOutput, error) { + if params == nil { + params = &CreateConnectAttachmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateConnectAttachment", params, optFns, c.addOperationCreateConnectAttachmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateConnectAttachmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateConnectAttachmentInput struct { + + // The ID of a core network where you want to create the attachment. + // + // This member is required. + CoreNetworkId *string + + // The Region where the edge is located. + // + // This member is required. + EdgeLocation *string + + // Options for creating an attachment. + // + // This member is required. + Options *types.ConnectAttachmentOptions + + // The ID of the attachment between the two connections. + // + // This member is required. + TransportAttachmentId *string + + // The client token associated with the request. + ClientToken *string + + // The list of key-value tags associated with the request. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateConnectAttachmentOutput struct { + + // The response to a Connect attachment request. + ConnectAttachment *types.ConnectAttachment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateConnectAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateConnectAttachment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateConnectAttachment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateConnectAttachmentMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateConnectAttachmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateConnectAttachment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateConnectAttachment struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateConnectAttachment) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateConnectAttachment) 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.(*CreateConnectAttachmentInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateConnectAttachmentInput ") + } + + 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_opCreateConnectAttachmentMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateConnectAttachment{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateConnectAttachment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "CreateConnectAttachment", + } +} diff --git a/service/networkmanager/api_op_CreateConnectPeer.go b/service/networkmanager/api_op_CreateConnectPeer.go new file mode 100644 index 00000000000..757b1507c42 --- /dev/null +++ b/service/networkmanager/api_op_CreateConnectPeer.go @@ -0,0 +1,182 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a core network connect peer for a specified core network connect +// attachment between a core network and an appliance. The peer address and transit +// gateway address must be the same IP address family (IPv4 or IPv6). +func (c *Client) CreateConnectPeer(ctx context.Context, params *CreateConnectPeerInput, optFns ...func(*Options)) (*CreateConnectPeerOutput, error) { + if params == nil { + params = &CreateConnectPeerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateConnectPeer", params, optFns, c.addOperationCreateConnectPeerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateConnectPeerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateConnectPeerInput struct { + + // The ID of the connection attachment. + // + // This member is required. + ConnectAttachmentId *string + + // The inside IP addresses used for BGP peering. + // + // This member is required. + InsideCidrBlocks []string + + // The Connect peer address. + // + // This member is required. + PeerAddress *string + + // The Connect peer BGP options. + BgpOptions *types.BgpOptions + + // The client token associated with the request. + ClientToken *string + + // A Connect peer core network address. + CoreNetworkAddress *string + + // The tags associated with the peer request. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateConnectPeerOutput struct { + + // The response to the request. + ConnectPeer *types.ConnectPeer + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateConnectPeerMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateConnectPeer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateConnectPeer{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateConnectPeerMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateConnectPeerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateConnectPeer(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateConnectPeer struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateConnectPeer) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateConnectPeer) 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.(*CreateConnectPeerInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateConnectPeerInput ") + } + + 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_opCreateConnectPeerMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateConnectPeer{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateConnectPeer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "CreateConnectPeer", + } +} diff --git a/service/networkmanager/api_op_CreateCoreNetwork.go b/service/networkmanager/api_op_CreateCoreNetwork.go new file mode 100644 index 00000000000..43581fc90aa --- /dev/null +++ b/service/networkmanager/api_op_CreateCoreNetwork.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a core network as part of your global network, and optionally, with a +// core network policy. +func (c *Client) CreateCoreNetwork(ctx context.Context, params *CreateCoreNetworkInput, optFns ...func(*Options)) (*CreateCoreNetworkOutput, error) { + if params == nil { + params = &CreateCoreNetworkInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateCoreNetwork", params, optFns, c.addOperationCreateCoreNetworkMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateCoreNetworkOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateCoreNetworkInput struct { + + // The ID of the global network that a core network will be a part of. + // + // This member is required. + GlobalNetworkId *string + + // The client token associated with a core network request. + ClientToken *string + + // The description of a core network. + Description *string + + // The policy document for creating a core network. + PolicyDocument *string + + // Key-value tags associated with a core network request. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateCoreNetworkOutput struct { + + // Returns details about a core network. + CoreNetwork *types.CoreNetwork + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateCoreNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateCoreNetwork{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateCoreNetwork{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateCoreNetworkMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateCoreNetworkValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCoreNetwork(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateCoreNetwork struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateCoreNetwork) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateCoreNetwork) 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.(*CreateCoreNetworkInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateCoreNetworkInput ") + } + + 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_opCreateCoreNetworkMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateCoreNetwork{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateCoreNetwork(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "CreateCoreNetwork", + } +} diff --git a/service/networkmanager/api_op_CreateSiteToSiteVpnAttachment.go b/service/networkmanager/api_op_CreateSiteToSiteVpnAttachment.go new file mode 100644 index 00000000000..2da53acbcd9 --- /dev/null +++ b/service/networkmanager/api_op_CreateSiteToSiteVpnAttachment.go @@ -0,0 +1,169 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a site-to-site VPN attachment on an edge location of a core network. +func (c *Client) CreateSiteToSiteVpnAttachment(ctx context.Context, params *CreateSiteToSiteVpnAttachmentInput, optFns ...func(*Options)) (*CreateSiteToSiteVpnAttachmentOutput, error) { + if params == nil { + params = &CreateSiteToSiteVpnAttachmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateSiteToSiteVpnAttachment", params, optFns, c.addOperationCreateSiteToSiteVpnAttachmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateSiteToSiteVpnAttachmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateSiteToSiteVpnAttachmentInput struct { + + // The ID of a core network where you're creating a site-to-site VPN attachment. + // + // This member is required. + CoreNetworkId *string + + // The ARN identifying the VPN attachment. + // + // This member is required. + VpnConnectionArn *string + + // The client token associated with the request. + ClientToken *string + + // The tags associated with the request. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateSiteToSiteVpnAttachmentOutput struct { + + // Details about a site-to-site VPN attachment. + SiteToSiteVpnAttachment *types.SiteToSiteVpnAttachment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateSiteToSiteVpnAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateSiteToSiteVpnAttachment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateSiteToSiteVpnAttachment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateSiteToSiteVpnAttachmentMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateSiteToSiteVpnAttachmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSiteToSiteVpnAttachment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateSiteToSiteVpnAttachment struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateSiteToSiteVpnAttachment) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateSiteToSiteVpnAttachment) 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.(*CreateSiteToSiteVpnAttachmentInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateSiteToSiteVpnAttachmentInput ") + } + + 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_opCreateSiteToSiteVpnAttachmentMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateSiteToSiteVpnAttachment{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateSiteToSiteVpnAttachment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "CreateSiteToSiteVpnAttachment", + } +} diff --git a/service/networkmanager/api_op_CreateVpcAttachment.go b/service/networkmanager/api_op_CreateVpcAttachment.go new file mode 100644 index 00000000000..fa731bda4da --- /dev/null +++ b/service/networkmanager/api_op_CreateVpcAttachment.go @@ -0,0 +1,177 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a VPC attachment on an edge location of a core network. +func (c *Client) CreateVpcAttachment(ctx context.Context, params *CreateVpcAttachmentInput, optFns ...func(*Options)) (*CreateVpcAttachmentOutput, error) { + if params == nil { + params = &CreateVpcAttachmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateVpcAttachment", params, optFns, c.addOperationCreateVpcAttachmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateVpcAttachmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateVpcAttachmentInput struct { + + // The ID of a core network for the VPC attachment. + // + // This member is required. + CoreNetworkId *string + + // The subnet ARN of the VPC attachment. + // + // This member is required. + SubnetArns []string + + // The ARN of the VPC. + // + // This member is required. + VpcArn *string + + // The client token associated with the request. + ClientToken *string + + // Options for the VPC attachment. + Options *types.VpcOptions + + // The key-value tags associated with the request. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateVpcAttachmentOutput struct { + + // Provides details about the VPC attachment. + VpcAttachment *types.VpcAttachment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateVpcAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateVpcAttachment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateVpcAttachment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opCreateVpcAttachmentMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateVpcAttachmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpcAttachment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateVpcAttachment struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateVpcAttachment) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateVpcAttachment) 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.(*CreateVpcAttachmentInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateVpcAttachmentInput ") + } + + 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_opCreateVpcAttachmentMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateVpcAttachment{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateVpcAttachment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "CreateVpcAttachment", + } +} diff --git a/service/networkmanager/api_op_DeleteAttachment.go b/service/networkmanager/api_op_DeleteAttachment.go new file mode 100644 index 00000000000..f5e0b207f8e --- /dev/null +++ b/service/networkmanager/api_op_DeleteAttachment.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes an attachment. Supports all attachment types. +func (c *Client) DeleteAttachment(ctx context.Context, params *DeleteAttachmentInput, optFns ...func(*Options)) (*DeleteAttachmentOutput, error) { + if params == nil { + params = &DeleteAttachmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAttachment", params, optFns, c.addOperationDeleteAttachmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAttachmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAttachmentInput struct { + + // The ID of the attachment to delete. + // + // This member is required. + AttachmentId *string + + noSmithyDocumentSerde +} + +type DeleteAttachmentOutput struct { + + // Information about the deleted attachment. + Attachment *types.Attachment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAttachment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAttachment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteAttachmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAttachment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteAttachment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "DeleteAttachment", + } +} diff --git a/service/networkmanager/api_op_DeleteConnectPeer.go b/service/networkmanager/api_op_DeleteConnectPeer.go new file mode 100644 index 00000000000..70f00a1d4b3 --- /dev/null +++ b/service/networkmanager/api_op_DeleteConnectPeer.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a Connect peer. +func (c *Client) DeleteConnectPeer(ctx context.Context, params *DeleteConnectPeerInput, optFns ...func(*Options)) (*DeleteConnectPeerOutput, error) { + if params == nil { + params = &DeleteConnectPeerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteConnectPeer", params, optFns, c.addOperationDeleteConnectPeerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteConnectPeerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteConnectPeerInput struct { + + // The ID of the deleted Connect peer. + // + // This member is required. + ConnectPeerId *string + + noSmithyDocumentSerde +} + +type DeleteConnectPeerOutput struct { + + // Information about the deleted Connect peer. + ConnectPeer *types.ConnectPeer + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteConnectPeerMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteConnectPeer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteConnectPeer{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteConnectPeerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteConnectPeer(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteConnectPeer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "DeleteConnectPeer", + } +} diff --git a/service/networkmanager/api_op_DeleteCoreNetwork.go b/service/networkmanager/api_op_DeleteCoreNetwork.go new file mode 100644 index 00000000000..aa93bd7fa13 --- /dev/null +++ b/service/networkmanager/api_op_DeleteCoreNetwork.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a core network along with all core network policies. This can only be +// done if there are no attachments on a core network. +func (c *Client) DeleteCoreNetwork(ctx context.Context, params *DeleteCoreNetworkInput, optFns ...func(*Options)) (*DeleteCoreNetworkOutput, error) { + if params == nil { + params = &DeleteCoreNetworkInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteCoreNetwork", params, optFns, c.addOperationDeleteCoreNetworkMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteCoreNetworkOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteCoreNetworkInput struct { + + // The network ID of the deleted core network. + // + // This member is required. + CoreNetworkId *string + + noSmithyDocumentSerde +} + +type DeleteCoreNetworkOutput struct { + + // Information about the deleted core network. + CoreNetwork *types.CoreNetwork + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteCoreNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteCoreNetwork{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteCoreNetwork{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteCoreNetworkValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCoreNetwork(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteCoreNetwork(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "DeleteCoreNetwork", + } +} diff --git a/service/networkmanager/api_op_DeleteCoreNetworkPolicyVersion.go b/service/networkmanager/api_op_DeleteCoreNetworkPolicyVersion.go new file mode 100644 index 00000000000..7f20a4ad985 --- /dev/null +++ b/service/networkmanager/api_op_DeleteCoreNetworkPolicyVersion.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a policy version from a core network. You can't delete the current LIVE +// policy. +func (c *Client) DeleteCoreNetworkPolicyVersion(ctx context.Context, params *DeleteCoreNetworkPolicyVersionInput, optFns ...func(*Options)) (*DeleteCoreNetworkPolicyVersionOutput, error) { + if params == nil { + params = &DeleteCoreNetworkPolicyVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteCoreNetworkPolicyVersion", params, optFns, c.addOperationDeleteCoreNetworkPolicyVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteCoreNetworkPolicyVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteCoreNetworkPolicyVersionInput struct { + + // The ID of a core network for the deleted policy. + // + // This member is required. + CoreNetworkId *string + + // The version ID of the deleted policy. + // + // This member is required. + PolicyVersionId *int32 + + noSmithyDocumentSerde +} + +type DeleteCoreNetworkPolicyVersionOutput struct { + + // Returns information about the deleted policy version. + CoreNetworkPolicy *types.CoreNetworkPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteCoreNetworkPolicyVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteCoreNetworkPolicyVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteCoreNetworkPolicyVersion{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteCoreNetworkPolicyVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCoreNetworkPolicyVersion(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteCoreNetworkPolicyVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "DeleteCoreNetworkPolicyVersion", + } +} diff --git a/service/networkmanager/api_op_DeleteResourcePolicy.go b/service/networkmanager/api_op_DeleteResourcePolicy.go new file mode 100644 index 00000000000..b7caade1ebf --- /dev/null +++ b/service/networkmanager/api_op_DeleteResourcePolicy.go @@ -0,0 +1,117 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a resource policy for the specified resource. This revokes the access of +// the principals specified in the resource policy. +func (c *Client) DeleteResourcePolicy(ctx context.Context, params *DeleteResourcePolicyInput, optFns ...func(*Options)) (*DeleteResourcePolicyOutput, error) { + if params == nil { + params = &DeleteResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePolicy", params, optFns, c.addOperationDeleteResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteResourcePolicyInput struct { + + // The ARN of the policy to delete. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type DeleteResourcePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "DeleteResourcePolicy", + } +} diff --git a/service/networkmanager/api_op_DisassociateConnectPeer.go b/service/networkmanager/api_op_DisassociateConnectPeer.go new file mode 100644 index 00000000000..d075f13855b --- /dev/null +++ b/service/networkmanager/api_op_DisassociateConnectPeer.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Disassociates a core network Connect peer from a device and a link. +func (c *Client) DisassociateConnectPeer(ctx context.Context, params *DisassociateConnectPeerInput, optFns ...func(*Options)) (*DisassociateConnectPeerOutput, error) { + if params == nil { + params = &DisassociateConnectPeerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DisassociateConnectPeer", params, optFns, c.addOperationDisassociateConnectPeerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DisassociateConnectPeerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DisassociateConnectPeerInput struct { + + // The ID of the Connect peer to disassociate from a device. + // + // This member is required. + ConnectPeerId *string + + // The ID of the global network. + // + // This member is required. + GlobalNetworkId *string + + noSmithyDocumentSerde +} + +type DisassociateConnectPeerOutput struct { + + // Describes the Connect peer association. + ConnectPeerAssociation *types.ConnectPeerAssociation + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDisassociateConnectPeerMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDisassociateConnectPeer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDisassociateConnectPeer{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDisassociateConnectPeerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateConnectPeer(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDisassociateConnectPeer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "DisassociateConnectPeer", + } +} diff --git a/service/networkmanager/api_op_ExecuteCoreNetworkChangeSet.go b/service/networkmanager/api_op_ExecuteCoreNetworkChangeSet.go new file mode 100644 index 00000000000..c5a84fdc760 --- /dev/null +++ b/service/networkmanager/api_op_ExecuteCoreNetworkChangeSet.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Executes a change set on your core network. Deploys changes globally based on +// the policy submitted.. +func (c *Client) ExecuteCoreNetworkChangeSet(ctx context.Context, params *ExecuteCoreNetworkChangeSetInput, optFns ...func(*Options)) (*ExecuteCoreNetworkChangeSetOutput, error) { + if params == nil { + params = &ExecuteCoreNetworkChangeSetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ExecuteCoreNetworkChangeSet", params, optFns, c.addOperationExecuteCoreNetworkChangeSetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ExecuteCoreNetworkChangeSetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ExecuteCoreNetworkChangeSetInput struct { + + // The ID of a core network. + // + // This member is required. + CoreNetworkId *string + + // The ID of the policy version. + // + // This member is required. + PolicyVersionId *int32 + + noSmithyDocumentSerde +} + +type ExecuteCoreNetworkChangeSetOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationExecuteCoreNetworkChangeSetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpExecuteCoreNetworkChangeSet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpExecuteCoreNetworkChangeSet{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpExecuteCoreNetworkChangeSetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExecuteCoreNetworkChangeSet(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opExecuteCoreNetworkChangeSet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "ExecuteCoreNetworkChangeSet", + } +} diff --git a/service/networkmanager/api_op_GetConnectAttachment.go b/service/networkmanager/api_op_GetConnectAttachment.go new file mode 100644 index 00000000000..b2ab2e11ee5 --- /dev/null +++ b/service/networkmanager/api_op_GetConnectAttachment.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about a core network Connect attachment. +func (c *Client) GetConnectAttachment(ctx context.Context, params *GetConnectAttachmentInput, optFns ...func(*Options)) (*GetConnectAttachmentOutput, error) { + if params == nil { + params = &GetConnectAttachmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetConnectAttachment", params, optFns, c.addOperationGetConnectAttachmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetConnectAttachmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetConnectAttachmentInput struct { + + // The ID of the attachment. + // + // This member is required. + AttachmentId *string + + noSmithyDocumentSerde +} + +type GetConnectAttachmentOutput struct { + + // Details about the Connect attachment. + ConnectAttachment *types.ConnectAttachment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetConnectAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetConnectAttachment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetConnectAttachment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetConnectAttachmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConnectAttachment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetConnectAttachment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "GetConnectAttachment", + } +} diff --git a/service/networkmanager/api_op_GetConnectPeer.go b/service/networkmanager/api_op_GetConnectPeer.go new file mode 100644 index 00000000000..3ef1cc84768 --- /dev/null +++ b/service/networkmanager/api_op_GetConnectPeer.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about a core network Connect peer. +func (c *Client) GetConnectPeer(ctx context.Context, params *GetConnectPeerInput, optFns ...func(*Options)) (*GetConnectPeerOutput, error) { + if params == nil { + params = &GetConnectPeerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetConnectPeer", params, optFns, c.addOperationGetConnectPeerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetConnectPeerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetConnectPeerInput struct { + + // The ID of the Connect peer. + // + // This member is required. + ConnectPeerId *string + + noSmithyDocumentSerde +} + +type GetConnectPeerOutput struct { + + // Returns information about a core network Connect peer. + ConnectPeer *types.ConnectPeer + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetConnectPeerMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetConnectPeer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetConnectPeer{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetConnectPeerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConnectPeer(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetConnectPeer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "GetConnectPeer", + } +} diff --git a/service/networkmanager/api_op_GetConnectPeerAssociations.go b/service/networkmanager/api_op_GetConnectPeerAssociations.go new file mode 100644 index 00000000000..60bbb55fe83 --- /dev/null +++ b/service/networkmanager/api_op_GetConnectPeerAssociations.go @@ -0,0 +1,223 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about a core network Connect peer associations. +func (c *Client) GetConnectPeerAssociations(ctx context.Context, params *GetConnectPeerAssociationsInput, optFns ...func(*Options)) (*GetConnectPeerAssociationsOutput, error) { + if params == nil { + params = &GetConnectPeerAssociationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetConnectPeerAssociations", params, optFns, c.addOperationGetConnectPeerAssociationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetConnectPeerAssociationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetConnectPeerAssociationsInput struct { + + // The ID of the global network. + // + // This member is required. + GlobalNetworkId *string + + // The IDs of the Connect peers. + ConnectPeerIds []string + + // The maximum number of results to return. + MaxResults *int32 + + // The token for the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type GetConnectPeerAssociationsOutput struct { + + // Displays a list of Connect peer associations. + ConnectPeerAssociations []types.ConnectPeerAssociation + + // The token for the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetConnectPeerAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetConnectPeerAssociations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetConnectPeerAssociations{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetConnectPeerAssociationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConnectPeerAssociations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// GetConnectPeerAssociationsAPIClient is a client that implements the +// GetConnectPeerAssociations operation. +type GetConnectPeerAssociationsAPIClient interface { + GetConnectPeerAssociations(context.Context, *GetConnectPeerAssociationsInput, ...func(*Options)) (*GetConnectPeerAssociationsOutput, error) +} + +var _ GetConnectPeerAssociationsAPIClient = (*Client)(nil) + +// GetConnectPeerAssociationsPaginatorOptions is the paginator options for +// GetConnectPeerAssociations +type GetConnectPeerAssociationsPaginatorOptions struct { + // The maximum number of results to return. + 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 +} + +// GetConnectPeerAssociationsPaginator is a paginator for +// GetConnectPeerAssociations +type GetConnectPeerAssociationsPaginator struct { + options GetConnectPeerAssociationsPaginatorOptions + client GetConnectPeerAssociationsAPIClient + params *GetConnectPeerAssociationsInput + nextToken *string + firstPage bool +} + +// NewGetConnectPeerAssociationsPaginator returns a new +// GetConnectPeerAssociationsPaginator +func NewGetConnectPeerAssociationsPaginator(client GetConnectPeerAssociationsAPIClient, params *GetConnectPeerAssociationsInput, optFns ...func(*GetConnectPeerAssociationsPaginatorOptions)) *GetConnectPeerAssociationsPaginator { + if params == nil { + params = &GetConnectPeerAssociationsInput{} + } + + options := GetConnectPeerAssociationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetConnectPeerAssociationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetConnectPeerAssociationsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetConnectPeerAssociations page. +func (p *GetConnectPeerAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetConnectPeerAssociationsOutput, 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 + + result, err := p.client.GetConnectPeerAssociations(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 +} + +func newServiceMetadataMiddleware_opGetConnectPeerAssociations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "GetConnectPeerAssociations", + } +} diff --git a/service/networkmanager/api_op_GetCoreNetwork.go b/service/networkmanager/api_op_GetCoreNetwork.go new file mode 100644 index 00000000000..7edbd2d1eda --- /dev/null +++ b/service/networkmanager/api_op_GetCoreNetwork.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about a core network. By default it returns the LIVE policy. +func (c *Client) GetCoreNetwork(ctx context.Context, params *GetCoreNetworkInput, optFns ...func(*Options)) (*GetCoreNetworkOutput, error) { + if params == nil { + params = &GetCoreNetworkInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCoreNetwork", params, optFns, c.addOperationGetCoreNetworkMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCoreNetworkOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetCoreNetworkInput struct { + + // The ID of a core network. + // + // This member is required. + CoreNetworkId *string + + noSmithyDocumentSerde +} + +type GetCoreNetworkOutput struct { + + // Details about a core network. + CoreNetwork *types.CoreNetwork + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCoreNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetCoreNetwork{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetCoreNetwork{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetCoreNetworkValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCoreNetwork(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetCoreNetwork(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "GetCoreNetwork", + } +} diff --git a/service/networkmanager/api_op_GetCoreNetworkChangeSet.go b/service/networkmanager/api_op_GetCoreNetworkChangeSet.go new file mode 100644 index 00000000000..f8f0119895a --- /dev/null +++ b/service/networkmanager/api_op_GetCoreNetworkChangeSet.go @@ -0,0 +1,225 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a change set between the LIVE core network policy and a submitted +// policy. +func (c *Client) GetCoreNetworkChangeSet(ctx context.Context, params *GetCoreNetworkChangeSetInput, optFns ...func(*Options)) (*GetCoreNetworkChangeSetOutput, error) { + if params == nil { + params = &GetCoreNetworkChangeSetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCoreNetworkChangeSet", params, optFns, c.addOperationGetCoreNetworkChangeSetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCoreNetworkChangeSetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetCoreNetworkChangeSetInput struct { + + // The ID of a core network. + // + // This member is required. + CoreNetworkId *string + + // The ID of the policy version. + // + // This member is required. + PolicyVersionId *int32 + + // The maximum number of results to return. + MaxResults *int32 + + // The token for the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type GetCoreNetworkChangeSetOutput struct { + + // Describes a core network changes. + CoreNetworkChanges []types.CoreNetworkChange + + // The token for the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCoreNetworkChangeSetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetCoreNetworkChangeSet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetCoreNetworkChangeSet{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetCoreNetworkChangeSetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCoreNetworkChangeSet(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// GetCoreNetworkChangeSetAPIClient is a client that implements the +// GetCoreNetworkChangeSet operation. +type GetCoreNetworkChangeSetAPIClient interface { + GetCoreNetworkChangeSet(context.Context, *GetCoreNetworkChangeSetInput, ...func(*Options)) (*GetCoreNetworkChangeSetOutput, error) +} + +var _ GetCoreNetworkChangeSetAPIClient = (*Client)(nil) + +// GetCoreNetworkChangeSetPaginatorOptions is the paginator options for +// GetCoreNetworkChangeSet +type GetCoreNetworkChangeSetPaginatorOptions struct { + // The maximum number of results to return. + 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 +} + +// GetCoreNetworkChangeSetPaginator is a paginator for GetCoreNetworkChangeSet +type GetCoreNetworkChangeSetPaginator struct { + options GetCoreNetworkChangeSetPaginatorOptions + client GetCoreNetworkChangeSetAPIClient + params *GetCoreNetworkChangeSetInput + nextToken *string + firstPage bool +} + +// NewGetCoreNetworkChangeSetPaginator returns a new +// GetCoreNetworkChangeSetPaginator +func NewGetCoreNetworkChangeSetPaginator(client GetCoreNetworkChangeSetAPIClient, params *GetCoreNetworkChangeSetInput, optFns ...func(*GetCoreNetworkChangeSetPaginatorOptions)) *GetCoreNetworkChangeSetPaginator { + if params == nil { + params = &GetCoreNetworkChangeSetInput{} + } + + options := GetCoreNetworkChangeSetPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetCoreNetworkChangeSetPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetCoreNetworkChangeSetPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetCoreNetworkChangeSet page. +func (p *GetCoreNetworkChangeSetPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetCoreNetworkChangeSetOutput, 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 + + result, err := p.client.GetCoreNetworkChangeSet(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 +} + +func newServiceMetadataMiddleware_opGetCoreNetworkChangeSet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "GetCoreNetworkChangeSet", + } +} diff --git a/service/networkmanager/api_op_GetCoreNetworkPolicy.go b/service/networkmanager/api_op_GetCoreNetworkPolicy.go new file mode 100644 index 00000000000..02509df631e --- /dev/null +++ b/service/networkmanager/api_op_GetCoreNetworkPolicy.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets details about a core network policy. You can get details about your current +// live policy or any previous policy version. +func (c *Client) GetCoreNetworkPolicy(ctx context.Context, params *GetCoreNetworkPolicyInput, optFns ...func(*Options)) (*GetCoreNetworkPolicyOutput, error) { + if params == nil { + params = &GetCoreNetworkPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCoreNetworkPolicy", params, optFns, c.addOperationGetCoreNetworkPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCoreNetworkPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetCoreNetworkPolicyInput struct { + + // The ID of a core network. + // + // This member is required. + CoreNetworkId *string + + // The alias of a core network policy + Alias types.CoreNetworkPolicyAlias + + // The ID of a core network policy version. + PolicyVersionId *int32 + + noSmithyDocumentSerde +} + +type GetCoreNetworkPolicyOutput struct { + + // The details about a core network policy. + CoreNetworkPolicy *types.CoreNetworkPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCoreNetworkPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetCoreNetworkPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetCoreNetworkPolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetCoreNetworkPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCoreNetworkPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetCoreNetworkPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "GetCoreNetworkPolicy", + } +} diff --git a/service/networkmanager/api_op_GetNetworkResourceRelationships.go b/service/networkmanager/api_op_GetNetworkResourceRelationships.go index 5c2a8b72a36..12604edb54c 100644 --- a/service/networkmanager/api_op_GetNetworkResourceRelationships.go +++ b/service/networkmanager/api_op_GetNetworkResourceRelationships.go @@ -41,6 +41,9 @@ type GetNetworkResourceRelationshipsInput struct { // The Amazon Web Services Region. AwsRegion *string + // The ID of a core network. + CoreNetworkId *string + // The maximum number of results to return. MaxResults *int32 diff --git a/service/networkmanager/api_op_GetNetworkResources.go b/service/networkmanager/api_op_GetNetworkResources.go index e7da8cedc3e..fb19b639a95 100644 --- a/service/networkmanager/api_op_GetNetworkResources.go +++ b/service/networkmanager/api_op_GetNetworkResources.go @@ -43,6 +43,9 @@ type GetNetworkResourcesInput struct { // The Amazon Web Services Region. AwsRegion *string + // The ID of a core network. + CoreNetworkId *string + // The maximum number of results to return. MaxResults *int32 diff --git a/service/networkmanager/api_op_GetNetworkRoutes.go b/service/networkmanager/api_op_GetNetworkRoutes.go index 3cc4e362a9d..3f326a5b04e 100644 --- a/service/networkmanager/api_op_GetNetworkRoutes.go +++ b/service/networkmanager/api_op_GetNetworkRoutes.go @@ -71,6 +71,9 @@ type GetNetworkRoutesInput struct { type GetNetworkRoutesOutput struct { + // Describes a core network segment edge. + CoreNetworkSegmentEdge *types.CoreNetworkSegmentEdgeIdentifier + // The network routes. NetworkRoutes []types.NetworkRoute diff --git a/service/networkmanager/api_op_GetNetworkTelemetry.go b/service/networkmanager/api_op_GetNetworkTelemetry.go index f9cbdb29bf9..7df251fed6d 100644 --- a/service/networkmanager/api_op_GetNetworkTelemetry.go +++ b/service/networkmanager/api_op_GetNetworkTelemetry.go @@ -41,6 +41,9 @@ type GetNetworkTelemetryInput struct { // The Amazon Web Services Region. AwsRegion *string + // The ID of a core network. + CoreNetworkId *string + // The maximum number of results to return. MaxResults *int32 diff --git a/service/networkmanager/api_op_GetResourcePolicy.go b/service/networkmanager/api_op_GetResourcePolicy.go new file mode 100644 index 00000000000..777828d245b --- /dev/null +++ b/service/networkmanager/api_op_GetResourcePolicy.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about a resource policy. +func (c *Client) GetResourcePolicy(ctx context.Context, params *GetResourcePolicyInput, optFns ...func(*Options)) (*GetResourcePolicyOutput, error) { + if params == nil { + params = &GetResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetResourcePolicy", params, optFns, c.addOperationGetResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetResourcePolicyInput struct { + + // The ARN of the resource. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type GetResourcePolicyOutput struct { + + // The resource policy document. + // + // This value conforms to the media type: application/json + PolicyDocument *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "GetResourcePolicy", + } +} diff --git a/service/networkmanager/api_op_GetSiteToSiteVpnAttachment.go b/service/networkmanager/api_op_GetSiteToSiteVpnAttachment.go new file mode 100644 index 00000000000..d012896f99e --- /dev/null +++ b/service/networkmanager/api_op_GetSiteToSiteVpnAttachment.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about a site-to-site VPN attachment. +func (c *Client) GetSiteToSiteVpnAttachment(ctx context.Context, params *GetSiteToSiteVpnAttachmentInput, optFns ...func(*Options)) (*GetSiteToSiteVpnAttachmentOutput, error) { + if params == nil { + params = &GetSiteToSiteVpnAttachmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetSiteToSiteVpnAttachment", params, optFns, c.addOperationGetSiteToSiteVpnAttachmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetSiteToSiteVpnAttachmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetSiteToSiteVpnAttachmentInput struct { + + // The ID of the attachment. + // + // This member is required. + AttachmentId *string + + noSmithyDocumentSerde +} + +type GetSiteToSiteVpnAttachmentOutput struct { + + // Describes the site-to-site attachment. + SiteToSiteVpnAttachment *types.SiteToSiteVpnAttachment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetSiteToSiteVpnAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetSiteToSiteVpnAttachment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetSiteToSiteVpnAttachment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetSiteToSiteVpnAttachmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSiteToSiteVpnAttachment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetSiteToSiteVpnAttachment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "GetSiteToSiteVpnAttachment", + } +} diff --git a/service/networkmanager/api_op_GetVpcAttachment.go b/service/networkmanager/api_op_GetVpcAttachment.go new file mode 100644 index 00000000000..70fae0a0b4f --- /dev/null +++ b/service/networkmanager/api_op_GetVpcAttachment.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about a VPC attachment. +func (c *Client) GetVpcAttachment(ctx context.Context, params *GetVpcAttachmentInput, optFns ...func(*Options)) (*GetVpcAttachmentOutput, error) { + if params == nil { + params = &GetVpcAttachmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetVpcAttachment", params, optFns, c.addOperationGetVpcAttachmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetVpcAttachmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetVpcAttachmentInput struct { + + // The ID of the attachment. + // + // This member is required. + AttachmentId *string + + noSmithyDocumentSerde +} + +type GetVpcAttachmentOutput struct { + + // Returns details about a VPC attachment. + VpcAttachment *types.VpcAttachment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetVpcAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetVpcAttachment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetVpcAttachment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetVpcAttachmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVpcAttachment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetVpcAttachment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "GetVpcAttachment", + } +} diff --git a/service/networkmanager/api_op_ListAttachments.go b/service/networkmanager/api_op_ListAttachments.go new file mode 100644 index 00000000000..93319bcfd02 --- /dev/null +++ b/service/networkmanager/api_op_ListAttachments.go @@ -0,0 +1,221 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of core network attachments. +func (c *Client) ListAttachments(ctx context.Context, params *ListAttachmentsInput, optFns ...func(*Options)) (*ListAttachmentsOutput, error) { + if params == nil { + params = &ListAttachmentsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAttachments", params, optFns, c.addOperationListAttachmentsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAttachmentsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAttachmentsInput struct { + + // The type of attachment. + AttachmentType types.AttachmentType + + // The ID of a core network. + CoreNetworkId *string + + // The Region where the edge is located. + EdgeLocation *string + + // The maximum number of results to return. + MaxResults *int32 + + // The token for the next page of results. + NextToken *string + + // The state of the attachment. + State types.AttachmentState + + noSmithyDocumentSerde +} + +type ListAttachmentsOutput struct { + + // Describes the list of attachments. + Attachments []types.Attachment + + // The token for the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAttachmentsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAttachments{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAttachments{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAttachments(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListAttachmentsAPIClient is a client that implements the ListAttachments +// operation. +type ListAttachmentsAPIClient interface { + ListAttachments(context.Context, *ListAttachmentsInput, ...func(*Options)) (*ListAttachmentsOutput, error) +} + +var _ ListAttachmentsAPIClient = (*Client)(nil) + +// ListAttachmentsPaginatorOptions is the paginator options for ListAttachments +type ListAttachmentsPaginatorOptions struct { + // The maximum number of results to return. + 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 +} + +// ListAttachmentsPaginator is a paginator for ListAttachments +type ListAttachmentsPaginator struct { + options ListAttachmentsPaginatorOptions + client ListAttachmentsAPIClient + params *ListAttachmentsInput + nextToken *string + firstPage bool +} + +// NewListAttachmentsPaginator returns a new ListAttachmentsPaginator +func NewListAttachmentsPaginator(client ListAttachmentsAPIClient, params *ListAttachmentsInput, optFns ...func(*ListAttachmentsPaginatorOptions)) *ListAttachmentsPaginator { + if params == nil { + params = &ListAttachmentsInput{} + } + + options := ListAttachmentsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAttachmentsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAttachmentsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListAttachments page. +func (p *ListAttachmentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAttachmentsOutput, 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 + + result, err := p.client.ListAttachments(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 +} + +func newServiceMetadataMiddleware_opListAttachments(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "ListAttachments", + } +} diff --git a/service/networkmanager/api_op_ListConnectPeers.go b/service/networkmanager/api_op_ListConnectPeers.go new file mode 100644 index 00000000000..1a844d3cb6d --- /dev/null +++ b/service/networkmanager/api_op_ListConnectPeers.go @@ -0,0 +1,215 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of core network Connect peers. +func (c *Client) ListConnectPeers(ctx context.Context, params *ListConnectPeersInput, optFns ...func(*Options)) (*ListConnectPeersOutput, error) { + if params == nil { + params = &ListConnectPeersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListConnectPeers", params, optFns, c.addOperationListConnectPeersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListConnectPeersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListConnectPeersInput struct { + + // The ID of the attachment. + ConnectAttachmentId *string + + // The ID of a core network. + CoreNetworkId *string + + // The maximum number of results to return. + MaxResults *int32 + + // The token for the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListConnectPeersOutput struct { + + // Describes the Connect peers. + ConnectPeers []types.ConnectPeerSummary + + // The token for the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListConnectPeersMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListConnectPeers{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListConnectPeers{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConnectPeers(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListConnectPeersAPIClient is a client that implements the ListConnectPeers +// operation. +type ListConnectPeersAPIClient interface { + ListConnectPeers(context.Context, *ListConnectPeersInput, ...func(*Options)) (*ListConnectPeersOutput, error) +} + +var _ ListConnectPeersAPIClient = (*Client)(nil) + +// ListConnectPeersPaginatorOptions is the paginator options for ListConnectPeers +type ListConnectPeersPaginatorOptions struct { + // The maximum number of results to return. + 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 +} + +// ListConnectPeersPaginator is a paginator for ListConnectPeers +type ListConnectPeersPaginator struct { + options ListConnectPeersPaginatorOptions + client ListConnectPeersAPIClient + params *ListConnectPeersInput + nextToken *string + firstPage bool +} + +// NewListConnectPeersPaginator returns a new ListConnectPeersPaginator +func NewListConnectPeersPaginator(client ListConnectPeersAPIClient, params *ListConnectPeersInput, optFns ...func(*ListConnectPeersPaginatorOptions)) *ListConnectPeersPaginator { + if params == nil { + params = &ListConnectPeersInput{} + } + + options := ListConnectPeersPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListConnectPeersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListConnectPeersPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListConnectPeers page. +func (p *ListConnectPeersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListConnectPeersOutput, 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 + + result, err := p.client.ListConnectPeers(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 +} + +func newServiceMetadataMiddleware_opListConnectPeers(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "ListConnectPeers", + } +} diff --git a/service/networkmanager/api_op_ListCoreNetworkPolicyVersions.go b/service/networkmanager/api_op_ListCoreNetworkPolicyVersions.go new file mode 100644 index 00000000000..288ac3bdbd6 --- /dev/null +++ b/service/networkmanager/api_op_ListCoreNetworkPolicyVersions.go @@ -0,0 +1,220 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of core network policy versions. +func (c *Client) ListCoreNetworkPolicyVersions(ctx context.Context, params *ListCoreNetworkPolicyVersionsInput, optFns ...func(*Options)) (*ListCoreNetworkPolicyVersionsOutput, error) { + if params == nil { + params = &ListCoreNetworkPolicyVersionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCoreNetworkPolicyVersions", params, optFns, c.addOperationListCoreNetworkPolicyVersionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCoreNetworkPolicyVersionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCoreNetworkPolicyVersionsInput struct { + + // The ID of a core network. + // + // This member is required. + CoreNetworkId *string + + // The maximum number of results to return. + MaxResults *int32 + + // The token for the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListCoreNetworkPolicyVersionsOutput struct { + + // Describes core network policy versions. + CoreNetworkPolicyVersions []types.CoreNetworkPolicyVersion + + // The token for the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCoreNetworkPolicyVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListCoreNetworkPolicyVersions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListCoreNetworkPolicyVersions{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListCoreNetworkPolicyVersionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCoreNetworkPolicyVersions(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListCoreNetworkPolicyVersionsAPIClient is a client that implements the +// ListCoreNetworkPolicyVersions operation. +type ListCoreNetworkPolicyVersionsAPIClient interface { + ListCoreNetworkPolicyVersions(context.Context, *ListCoreNetworkPolicyVersionsInput, ...func(*Options)) (*ListCoreNetworkPolicyVersionsOutput, error) +} + +var _ ListCoreNetworkPolicyVersionsAPIClient = (*Client)(nil) + +// ListCoreNetworkPolicyVersionsPaginatorOptions is the paginator options for +// ListCoreNetworkPolicyVersions +type ListCoreNetworkPolicyVersionsPaginatorOptions struct { + // The maximum number of results to return. + 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 +} + +// ListCoreNetworkPolicyVersionsPaginator is a paginator for +// ListCoreNetworkPolicyVersions +type ListCoreNetworkPolicyVersionsPaginator struct { + options ListCoreNetworkPolicyVersionsPaginatorOptions + client ListCoreNetworkPolicyVersionsAPIClient + params *ListCoreNetworkPolicyVersionsInput + nextToken *string + firstPage bool +} + +// NewListCoreNetworkPolicyVersionsPaginator returns a new +// ListCoreNetworkPolicyVersionsPaginator +func NewListCoreNetworkPolicyVersionsPaginator(client ListCoreNetworkPolicyVersionsAPIClient, params *ListCoreNetworkPolicyVersionsInput, optFns ...func(*ListCoreNetworkPolicyVersionsPaginatorOptions)) *ListCoreNetworkPolicyVersionsPaginator { + if params == nil { + params = &ListCoreNetworkPolicyVersionsInput{} + } + + options := ListCoreNetworkPolicyVersionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCoreNetworkPolicyVersionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCoreNetworkPolicyVersionsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListCoreNetworkPolicyVersions page. +func (p *ListCoreNetworkPolicyVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCoreNetworkPolicyVersionsOutput, 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 + + result, err := p.client.ListCoreNetworkPolicyVersions(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 +} + +func newServiceMetadataMiddleware_opListCoreNetworkPolicyVersions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "ListCoreNetworkPolicyVersions", + } +} diff --git a/service/networkmanager/api_op_ListCoreNetworks.go b/service/networkmanager/api_op_ListCoreNetworks.go new file mode 100644 index 00000000000..c012ff17091 --- /dev/null +++ b/service/networkmanager/api_op_ListCoreNetworks.go @@ -0,0 +1,209 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of owned and shared core networks. +func (c *Client) ListCoreNetworks(ctx context.Context, params *ListCoreNetworksInput, optFns ...func(*Options)) (*ListCoreNetworksOutput, error) { + if params == nil { + params = &ListCoreNetworksInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCoreNetworks", params, optFns, c.addOperationListCoreNetworksMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCoreNetworksOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCoreNetworksInput struct { + + // The maximum number of results to return. + MaxResults *int32 + + // The token for the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListCoreNetworksOutput struct { + + // Describes the list of core networks. + CoreNetworks []types.CoreNetworkSummary + + // The token for the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCoreNetworksMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListCoreNetworks{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListCoreNetworks{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCoreNetworks(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +// ListCoreNetworksAPIClient is a client that implements the ListCoreNetworks +// operation. +type ListCoreNetworksAPIClient interface { + ListCoreNetworks(context.Context, *ListCoreNetworksInput, ...func(*Options)) (*ListCoreNetworksOutput, error) +} + +var _ ListCoreNetworksAPIClient = (*Client)(nil) + +// ListCoreNetworksPaginatorOptions is the paginator options for ListCoreNetworks +type ListCoreNetworksPaginatorOptions struct { + // The maximum number of results to return. + 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 +} + +// ListCoreNetworksPaginator is a paginator for ListCoreNetworks +type ListCoreNetworksPaginator struct { + options ListCoreNetworksPaginatorOptions + client ListCoreNetworksAPIClient + params *ListCoreNetworksInput + nextToken *string + firstPage bool +} + +// NewListCoreNetworksPaginator returns a new ListCoreNetworksPaginator +func NewListCoreNetworksPaginator(client ListCoreNetworksAPIClient, params *ListCoreNetworksInput, optFns ...func(*ListCoreNetworksPaginatorOptions)) *ListCoreNetworksPaginator { + if params == nil { + params = &ListCoreNetworksInput{} + } + + options := ListCoreNetworksPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCoreNetworksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCoreNetworksPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListCoreNetworks page. +func (p *ListCoreNetworksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCoreNetworksOutput, 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 + + result, err := p.client.ListCoreNetworks(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 +} + +func newServiceMetadataMiddleware_opListCoreNetworks(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "ListCoreNetworks", + } +} diff --git a/service/networkmanager/api_op_PutCoreNetworkPolicy.go b/service/networkmanager/api_op_PutCoreNetworkPolicy.go new file mode 100644 index 00000000000..838b807731f --- /dev/null +++ b/service/networkmanager/api_op_PutCoreNetworkPolicy.go @@ -0,0 +1,176 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new, immutable version of a core network policy. A subsequent change +// set is created showing the differences between the LIVE policy and the submitted +// policy. +func (c *Client) PutCoreNetworkPolicy(ctx context.Context, params *PutCoreNetworkPolicyInput, optFns ...func(*Options)) (*PutCoreNetworkPolicyOutput, error) { + if params == nil { + params = &PutCoreNetworkPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutCoreNetworkPolicy", params, optFns, c.addOperationPutCoreNetworkPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutCoreNetworkPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutCoreNetworkPolicyInput struct { + + // The ID of a core network. + // + // This member is required. + CoreNetworkId *string + + // The policy document. + // + // This value conforms to the media type: application/json + // + // This member is required. + PolicyDocument *string + + // The client token associated with the request. + ClientToken *string + + // a core network policy description. + Description *string + + // The ID of a core network policy. + LatestVersionId *int32 + + noSmithyDocumentSerde +} + +type PutCoreNetworkPolicyOutput struct { + + // Describes the changed core network policy. + CoreNetworkPolicy *types.CoreNetworkPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutCoreNetworkPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutCoreNetworkPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutCoreNetworkPolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addIdempotencyToken_opPutCoreNetworkPolicyMiddleware(stack, options); err != nil { + return err + } + if err = addOpPutCoreNetworkPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutCoreNetworkPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpPutCoreNetworkPolicy struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpPutCoreNetworkPolicy) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpPutCoreNetworkPolicy) 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.(*PutCoreNetworkPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *PutCoreNetworkPolicyInput ") + } + + 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_opPutCoreNetworkPolicyMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpPutCoreNetworkPolicy{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opPutCoreNetworkPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "PutCoreNetworkPolicy", + } +} diff --git a/service/networkmanager/api_op_PutResourcePolicy.go b/service/networkmanager/api_op_PutResourcePolicy.go new file mode 100644 index 00000000000..9bd5aa05893 --- /dev/null +++ b/service/networkmanager/api_op_PutResourcePolicy.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates or updates a resource policy. +func (c *Client) PutResourcePolicy(ctx context.Context, params *PutResourcePolicyInput, optFns ...func(*Options)) (*PutResourcePolicyOutput, error) { + if params == nil { + params = &PutResourcePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutResourcePolicy", params, optFns, c.addOperationPutResourcePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutResourcePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutResourcePolicyInput struct { + + // The JSON resource policy document. + // + // This value conforms to the media type: application/json + // + // This member is required. + PolicyDocument *string + + // The ARN of the resource policy. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type PutResourcePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutResourcePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "PutResourcePolicy", + } +} diff --git a/service/networkmanager/api_op_RejectAttachment.go b/service/networkmanager/api_op_RejectAttachment.go new file mode 100644 index 00000000000..a79edf84c30 --- /dev/null +++ b/service/networkmanager/api_op_RejectAttachment.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Rejects a core network attachment request. +func (c *Client) RejectAttachment(ctx context.Context, params *RejectAttachmentInput, optFns ...func(*Options)) (*RejectAttachmentOutput, error) { + if params == nil { + params = &RejectAttachmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RejectAttachment", params, optFns, c.addOperationRejectAttachmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RejectAttachmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RejectAttachmentInput struct { + + // The ID of the attachment. + // + // This member is required. + AttachmentId *string + + noSmithyDocumentSerde +} + +type RejectAttachmentOutput struct { + + // Describes the rejected attachment request. + Attachment *types.Attachment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRejectAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpRejectAttachment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRejectAttachment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpRejectAttachmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectAttachment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRejectAttachment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "RejectAttachment", + } +} diff --git a/service/networkmanager/api_op_RestoreCoreNetworkPolicyVersion.go b/service/networkmanager/api_op_RestoreCoreNetworkPolicyVersion.go new file mode 100644 index 00000000000..3f0b923b00f --- /dev/null +++ b/service/networkmanager/api_op_RestoreCoreNetworkPolicyVersion.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Restores a previous policy version as a new, immutable version of a core network +// policy. A subsequent change set is created showing the differences between the +// LIVE policy and restored policy. +func (c *Client) RestoreCoreNetworkPolicyVersion(ctx context.Context, params *RestoreCoreNetworkPolicyVersionInput, optFns ...func(*Options)) (*RestoreCoreNetworkPolicyVersionOutput, error) { + if params == nil { + params = &RestoreCoreNetworkPolicyVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RestoreCoreNetworkPolicyVersion", params, optFns, c.addOperationRestoreCoreNetworkPolicyVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RestoreCoreNetworkPolicyVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RestoreCoreNetworkPolicyVersionInput struct { + + // The ID of a core network. + // + // This member is required. + CoreNetworkId *string + + // The ID of the policy version to restore. + // + // This member is required. + PolicyVersionId *int32 + + noSmithyDocumentSerde +} + +type RestoreCoreNetworkPolicyVersionOutput struct { + + // Describes the restored core network policy. + CoreNetworkPolicy *types.CoreNetworkPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRestoreCoreNetworkPolicyVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpRestoreCoreNetworkPolicyVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRestoreCoreNetworkPolicyVersion{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpRestoreCoreNetworkPolicyVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreCoreNetworkPolicyVersion(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRestoreCoreNetworkPolicyVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "RestoreCoreNetworkPolicyVersion", + } +} diff --git a/service/networkmanager/api_op_UpdateCoreNetwork.go b/service/networkmanager/api_op_UpdateCoreNetwork.go new file mode 100644 index 00000000000..4ccce4e7bfe --- /dev/null +++ b/service/networkmanager/api_op_UpdateCoreNetwork.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the description of a core network. +func (c *Client) UpdateCoreNetwork(ctx context.Context, params *UpdateCoreNetworkInput, optFns ...func(*Options)) (*UpdateCoreNetworkOutput, error) { + if params == nil { + params = &UpdateCoreNetworkInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateCoreNetwork", params, optFns, c.addOperationUpdateCoreNetworkMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateCoreNetworkOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateCoreNetworkInput struct { + + // The ID of a core network. + // + // This member is required. + CoreNetworkId *string + + // The description of the update. + Description *string + + noSmithyDocumentSerde +} + +type UpdateCoreNetworkOutput struct { + + // Returns information about a core network update. + CoreNetwork *types.CoreNetwork + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateCoreNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateCoreNetwork{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateCoreNetwork{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateCoreNetworkValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCoreNetwork(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateCoreNetwork(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "UpdateCoreNetwork", + } +} diff --git a/service/networkmanager/api_op_UpdateVpcAttachment.go b/service/networkmanager/api_op_UpdateVpcAttachment.go new file mode 100644 index 00000000000..1fbf1658eac --- /dev/null +++ b/service/networkmanager/api_op_UpdateVpcAttachment.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package networkmanager + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/networkmanager/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a VPC attachment. +func (c *Client) UpdateVpcAttachment(ctx context.Context, params *UpdateVpcAttachmentInput, optFns ...func(*Options)) (*UpdateVpcAttachmentOutput, error) { + if params == nil { + params = &UpdateVpcAttachmentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateVpcAttachment", params, optFns, c.addOperationUpdateVpcAttachmentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateVpcAttachmentOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateVpcAttachmentInput struct { + + // The ID of the attachment. + // + // This member is required. + AttachmentId *string + + // Adds a subnet ARN to the VPC attachment. + AddSubnetArns []string + + // Additional options for updating the VPC attachment. + Options *types.VpcOptions + + // Removes a subnet ARN from the attachment. + RemoveSubnetArns []string + + noSmithyDocumentSerde +} + +type UpdateVpcAttachmentOutput struct { + + // Describes the updated VPC attachment. + VpcAttachment *types.VpcAttachment + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateVpcAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateVpcAttachment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateVpcAttachment{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateVpcAttachmentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateVpcAttachment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateVpcAttachment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "networkmanager", + OperationName: "UpdateVpcAttachment", + } +} diff --git a/service/networkmanager/deserializers.go b/service/networkmanager/deserializers.go index 8d61b61afcf..e4a2e1737e3 100644 --- a/service/networkmanager/deserializers.go +++ b/service/networkmanager/deserializers.go @@ -20,14 +20,14 @@ import ( "strings" ) -type awsRestjson1_deserializeOpAssociateCustomerGateway struct { +type awsRestjson1_deserializeOpAcceptAttachment struct { } -func (*awsRestjson1_deserializeOpAssociateCustomerGateway) ID() string { +func (*awsRestjson1_deserializeOpAcceptAttachment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpAssociateCustomerGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAcceptAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -41,9 +41,9 @@ func (m *awsRestjson1_deserializeOpAssociateCustomerGateway) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorAssociateCustomerGateway(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAcceptAttachment(response, &metadata) } - output := &AssociateCustomerGatewayOutput{} + output := &AcceptAttachmentOutput{} out.Result = output var buff [1024]byte @@ -64,7 +64,7 @@ func (m *awsRestjson1_deserializeOpAssociateCustomerGateway) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentAssociateCustomerGatewayOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentAcceptAttachmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -77,7 +77,7 @@ func (m *awsRestjson1_deserializeOpAssociateCustomerGateway) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorAssociateCustomerGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAcceptAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -130,9 +130,6 @@ func awsRestjson1_deserializeOpErrorAssociateCustomerGateway(response *smithyhtt 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) @@ -149,7 +146,7 @@ func awsRestjson1_deserializeOpErrorAssociateCustomerGateway(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentAssociateCustomerGatewayOutput(v **AssociateCustomerGatewayOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentAcceptAttachmentOutput(v **AcceptAttachmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -162,17 +159,17 @@ func awsRestjson1_deserializeOpDocumentAssociateCustomerGatewayOutput(v **Associ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *AssociateCustomerGatewayOutput + var sv *AcceptAttachmentOutput if *v == nil { - sv = &AssociateCustomerGatewayOutput{} + sv = &AcceptAttachmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CustomerGatewayAssociation": - if err := awsRestjson1_deserializeDocumentCustomerGatewayAssociation(&sv.CustomerGatewayAssociation, value); err != nil { + case "Attachment": + if err := awsRestjson1_deserializeDocumentAttachment(&sv.Attachment, value); err != nil { return err } @@ -185,14 +182,14 @@ func awsRestjson1_deserializeOpDocumentAssociateCustomerGatewayOutput(v **Associ return nil } -type awsRestjson1_deserializeOpAssociateLink struct { +type awsRestjson1_deserializeOpAssociateConnectPeer struct { } -func (*awsRestjson1_deserializeOpAssociateLink) ID() string { +func (*awsRestjson1_deserializeOpAssociateConnectPeer) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpAssociateLink) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAssociateConnectPeer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -206,9 +203,9 @@ func (m *awsRestjson1_deserializeOpAssociateLink) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorAssociateLink(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAssociateConnectPeer(response, &metadata) } - output := &AssociateLinkOutput{} + output := &AssociateConnectPeerOutput{} out.Result = output var buff [1024]byte @@ -229,7 +226,7 @@ func (m *awsRestjson1_deserializeOpAssociateLink) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentAssociateLinkOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentAssociateConnectPeerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -242,7 +239,7 @@ func (m *awsRestjson1_deserializeOpAssociateLink) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorAssociateLink(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAssociateConnectPeer(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -314,7 +311,7 @@ func awsRestjson1_deserializeOpErrorAssociateLink(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentAssociateLinkOutput(v **AssociateLinkOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentAssociateConnectPeerOutput(v **AssociateConnectPeerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -327,17 +324,17 @@ func awsRestjson1_deserializeOpDocumentAssociateLinkOutput(v **AssociateLinkOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *AssociateLinkOutput + var sv *AssociateConnectPeerOutput if *v == nil { - sv = &AssociateLinkOutput{} + sv = &AssociateConnectPeerOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "LinkAssociation": - if err := awsRestjson1_deserializeDocumentLinkAssociation(&sv.LinkAssociation, value); err != nil { + case "ConnectPeerAssociation": + if err := awsRestjson1_deserializeDocumentConnectPeerAssociation(&sv.ConnectPeerAssociation, value); err != nil { return err } @@ -350,14 +347,14 @@ func awsRestjson1_deserializeOpDocumentAssociateLinkOutput(v **AssociateLinkOutp return nil } -type awsRestjson1_deserializeOpAssociateTransitGatewayConnectPeer struct { +type awsRestjson1_deserializeOpAssociateCustomerGateway struct { } -func (*awsRestjson1_deserializeOpAssociateTransitGatewayConnectPeer) ID() string { +func (*awsRestjson1_deserializeOpAssociateCustomerGateway) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpAssociateTransitGatewayConnectPeer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAssociateCustomerGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -371,9 +368,9 @@ func (m *awsRestjson1_deserializeOpAssociateTransitGatewayConnectPeer) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorAssociateTransitGatewayConnectPeer(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAssociateCustomerGateway(response, &metadata) } - output := &AssociateTransitGatewayConnectPeerOutput{} + output := &AssociateCustomerGatewayOutput{} out.Result = output var buff [1024]byte @@ -394,7 +391,7 @@ func (m *awsRestjson1_deserializeOpAssociateTransitGatewayConnectPeer) HandleDes return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentAssociateTransitGatewayConnectPeerOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentAssociateCustomerGatewayOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -407,7 +404,7 @@ func (m *awsRestjson1_deserializeOpAssociateTransitGatewayConnectPeer) HandleDes return out, metadata, err } -func awsRestjson1_deserializeOpErrorAssociateTransitGatewayConnectPeer(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAssociateCustomerGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -479,7 +476,7 @@ func awsRestjson1_deserializeOpErrorAssociateTransitGatewayConnectPeer(response } } -func awsRestjson1_deserializeOpDocumentAssociateTransitGatewayConnectPeerOutput(v **AssociateTransitGatewayConnectPeerOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentAssociateCustomerGatewayOutput(v **AssociateCustomerGatewayOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -492,17 +489,17 @@ func awsRestjson1_deserializeOpDocumentAssociateTransitGatewayConnectPeerOutput( return fmt.Errorf("unexpected JSON type %v", value) } - var sv *AssociateTransitGatewayConnectPeerOutput + var sv *AssociateCustomerGatewayOutput if *v == nil { - sv = &AssociateTransitGatewayConnectPeerOutput{} + sv = &AssociateCustomerGatewayOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "TransitGatewayConnectPeerAssociation": - if err := awsRestjson1_deserializeDocumentTransitGatewayConnectPeerAssociation(&sv.TransitGatewayConnectPeerAssociation, value); err != nil { + case "CustomerGatewayAssociation": + if err := awsRestjson1_deserializeDocumentCustomerGatewayAssociation(&sv.CustomerGatewayAssociation, value); err != nil { return err } @@ -515,14 +512,14 @@ func awsRestjson1_deserializeOpDocumentAssociateTransitGatewayConnectPeerOutput( return nil } -type awsRestjson1_deserializeOpCreateConnection struct { +type awsRestjson1_deserializeOpAssociateLink struct { } -func (*awsRestjson1_deserializeOpCreateConnection) ID() string { +func (*awsRestjson1_deserializeOpAssociateLink) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAssociateLink) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -536,9 +533,9 @@ func (m *awsRestjson1_deserializeOpCreateConnection) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateConnection(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAssociateLink(response, &metadata) } - output := &CreateConnectionOutput{} + output := &AssociateLinkOutput{} out.Result = output var buff [1024]byte @@ -559,7 +556,7 @@ func (m *awsRestjson1_deserializeOpCreateConnection) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateConnectionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentAssociateLinkOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -572,7 +569,7 @@ func (m *awsRestjson1_deserializeOpCreateConnection) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAssociateLink(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -622,6 +619,9 @@ func awsRestjson1_deserializeOpErrorCreateConnection(response *smithyhttp.Respon case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -641,7 +641,7 @@ func awsRestjson1_deserializeOpErrorCreateConnection(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentCreateConnectionOutput(v **CreateConnectionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentAssociateLinkOutput(v **AssociateLinkOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -654,17 +654,17 @@ func awsRestjson1_deserializeOpDocumentCreateConnectionOutput(v **CreateConnecti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateConnectionOutput + var sv *AssociateLinkOutput if *v == nil { - sv = &CreateConnectionOutput{} + sv = &AssociateLinkOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Connection": - if err := awsRestjson1_deserializeDocumentConnection(&sv.Connection, value); err != nil { + case "LinkAssociation": + if err := awsRestjson1_deserializeDocumentLinkAssociation(&sv.LinkAssociation, value); err != nil { return err } @@ -677,14 +677,14 @@ func awsRestjson1_deserializeOpDocumentCreateConnectionOutput(v **CreateConnecti return nil } -type awsRestjson1_deserializeOpCreateDevice struct { +type awsRestjson1_deserializeOpAssociateTransitGatewayConnectPeer struct { } -func (*awsRestjson1_deserializeOpCreateDevice) ID() string { +func (*awsRestjson1_deserializeOpAssociateTransitGatewayConnectPeer) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAssociateTransitGatewayConnectPeer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -698,9 +698,9 @@ func (m *awsRestjson1_deserializeOpCreateDevice) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateDevice(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAssociateTransitGatewayConnectPeer(response, &metadata) } - output := &CreateDeviceOutput{} + output := &AssociateTransitGatewayConnectPeerOutput{} out.Result = output var buff [1024]byte @@ -721,7 +721,7 @@ func (m *awsRestjson1_deserializeOpCreateDevice) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateDeviceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentAssociateTransitGatewayConnectPeerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -734,7 +734,7 @@ func (m *awsRestjson1_deserializeOpCreateDevice) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAssociateTransitGatewayConnectPeer(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -806,7 +806,7 @@ func awsRestjson1_deserializeOpErrorCreateDevice(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentCreateDeviceOutput(v **CreateDeviceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentAssociateTransitGatewayConnectPeerOutput(v **AssociateTransitGatewayConnectPeerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -819,17 +819,17 @@ func awsRestjson1_deserializeOpDocumentCreateDeviceOutput(v **CreateDeviceOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateDeviceOutput + var sv *AssociateTransitGatewayConnectPeerOutput if *v == nil { - sv = &CreateDeviceOutput{} + sv = &AssociateTransitGatewayConnectPeerOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Device": - if err := awsRestjson1_deserializeDocumentDevice(&sv.Device, value); err != nil { + case "TransitGatewayConnectPeerAssociation": + if err := awsRestjson1_deserializeDocumentTransitGatewayConnectPeerAssociation(&sv.TransitGatewayConnectPeerAssociation, value); err != nil { return err } @@ -842,14 +842,14 @@ func awsRestjson1_deserializeOpDocumentCreateDeviceOutput(v **CreateDeviceOutput return nil } -type awsRestjson1_deserializeOpCreateGlobalNetwork struct { +type awsRestjson1_deserializeOpCreateConnectAttachment struct { } -func (*awsRestjson1_deserializeOpCreateGlobalNetwork) ID() string { +func (*awsRestjson1_deserializeOpCreateConnectAttachment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateGlobalNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateConnectAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -863,9 +863,9 @@ func (m *awsRestjson1_deserializeOpCreateGlobalNetwork) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateGlobalNetwork(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateConnectAttachment(response, &metadata) } - output := &CreateGlobalNetworkOutput{} + output := &CreateConnectAttachmentOutput{} out.Result = output var buff [1024]byte @@ -886,7 +886,7 @@ func (m *awsRestjson1_deserializeOpCreateGlobalNetwork) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateGlobalNetworkOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateConnectAttachmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -899,7 +899,7 @@ func (m *awsRestjson1_deserializeOpCreateGlobalNetwork) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateGlobalNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateConnectAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -949,8 +949,8 @@ func awsRestjson1_deserializeOpErrorCreateGlobalNetwork(response *smithyhttp.Res case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -968,7 +968,7 @@ func awsRestjson1_deserializeOpErrorCreateGlobalNetwork(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentCreateGlobalNetworkOutput(v **CreateGlobalNetworkOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateConnectAttachmentOutput(v **CreateConnectAttachmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -981,17 +981,17 @@ func awsRestjson1_deserializeOpDocumentCreateGlobalNetworkOutput(v **CreateGloba return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateGlobalNetworkOutput + var sv *CreateConnectAttachmentOutput if *v == nil { - sv = &CreateGlobalNetworkOutput{} + sv = &CreateConnectAttachmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "GlobalNetwork": - if err := awsRestjson1_deserializeDocumentGlobalNetwork(&sv.GlobalNetwork, value); err != nil { + case "ConnectAttachment": + if err := awsRestjson1_deserializeDocumentConnectAttachment(&sv.ConnectAttachment, value); err != nil { return err } @@ -1004,14 +1004,14 @@ func awsRestjson1_deserializeOpDocumentCreateGlobalNetworkOutput(v **CreateGloba return nil } -type awsRestjson1_deserializeOpCreateLink struct { +type awsRestjson1_deserializeOpCreateConnection struct { } -func (*awsRestjson1_deserializeOpCreateLink) ID() string { +func (*awsRestjson1_deserializeOpCreateConnection) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateLink) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1025,9 +1025,9 @@ func (m *awsRestjson1_deserializeOpCreateLink) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateLink(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateConnection(response, &metadata) } - output := &CreateLinkOutput{} + output := &CreateConnectionOutput{} out.Result = output var buff [1024]byte @@ -1048,7 +1048,7 @@ func (m *awsRestjson1_deserializeOpCreateLink) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateLinkOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateConnectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1061,7 +1061,7 @@ func (m *awsRestjson1_deserializeOpCreateLink) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateLink(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1111,9 +1111,6 @@ func awsRestjson1_deserializeOpErrorCreateLink(response *smithyhttp.Response, me case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -1133,7 +1130,7 @@ func awsRestjson1_deserializeOpErrorCreateLink(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentCreateLinkOutput(v **CreateLinkOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateConnectionOutput(v **CreateConnectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1146,17 +1143,17 @@ func awsRestjson1_deserializeOpDocumentCreateLinkOutput(v **CreateLinkOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateLinkOutput + var sv *CreateConnectionOutput if *v == nil { - sv = &CreateLinkOutput{} + sv = &CreateConnectionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Link": - if err := awsRestjson1_deserializeDocumentLink(&sv.Link, value); err != nil { + case "Connection": + if err := awsRestjson1_deserializeDocumentConnection(&sv.Connection, value); err != nil { return err } @@ -1169,14 +1166,14 @@ func awsRestjson1_deserializeOpDocumentCreateLinkOutput(v **CreateLinkOutput, va return nil } -type awsRestjson1_deserializeOpCreateSite struct { +type awsRestjson1_deserializeOpCreateConnectPeer struct { } -func (*awsRestjson1_deserializeOpCreateSite) ID() string { +func (*awsRestjson1_deserializeOpCreateConnectPeer) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateConnectPeer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1190,9 +1187,9 @@ func (m *awsRestjson1_deserializeOpCreateSite) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateSite(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateConnectPeer(response, &metadata) } - output := &CreateSiteOutput{} + output := &CreateConnectPeerOutput{} out.Result = output var buff [1024]byte @@ -1213,7 +1210,7 @@ func (m *awsRestjson1_deserializeOpCreateSite) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateSiteOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateConnectPeerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1226,7 +1223,7 @@ func (m *awsRestjson1_deserializeOpCreateSite) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateConnectPeer(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1279,9 +1276,6 @@ func awsRestjson1_deserializeOpErrorCreateSite(response *smithyhttp.Response, me 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) @@ -1298,7 +1292,7 @@ func awsRestjson1_deserializeOpErrorCreateSite(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentCreateSiteOutput(v **CreateSiteOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateConnectPeerOutput(v **CreateConnectPeerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1311,17 +1305,17 @@ func awsRestjson1_deserializeOpDocumentCreateSiteOutput(v **CreateSiteOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateSiteOutput + var sv *CreateConnectPeerOutput if *v == nil { - sv = &CreateSiteOutput{} + sv = &CreateConnectPeerOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Site": - if err := awsRestjson1_deserializeDocumentSite(&sv.Site, value); err != nil { + case "ConnectPeer": + if err := awsRestjson1_deserializeDocumentConnectPeer(&sv.ConnectPeer, value); err != nil { return err } @@ -1334,14 +1328,14 @@ func awsRestjson1_deserializeOpDocumentCreateSiteOutput(v **CreateSiteOutput, va return nil } -type awsRestjson1_deserializeOpDeleteConnection struct { +type awsRestjson1_deserializeOpCreateCoreNetwork struct { } -func (*awsRestjson1_deserializeOpDeleteConnection) ID() string { +func (*awsRestjson1_deserializeOpCreateCoreNetwork) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateCoreNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1355,9 +1349,9 @@ func (m *awsRestjson1_deserializeOpDeleteConnection) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteConnection(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateCoreNetwork(response, &metadata) } - output := &DeleteConnectionOutput{} + output := &CreateCoreNetworkOutput{} out.Result = output var buff [1024]byte @@ -1378,7 +1372,7 @@ func (m *awsRestjson1_deserializeOpDeleteConnection) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteConnectionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateCoreNetworkOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1391,7 +1385,7 @@ func (m *awsRestjson1_deserializeOpDeleteConnection) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateCoreNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1438,11 +1432,14 @@ func awsRestjson1_deserializeOpErrorDeleteConnection(response *smithyhttp.Respon case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("CoreNetworkPolicyException", errorCode): + return awsRestjson1_deserializeErrorCoreNetworkPolicyException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(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) @@ -1460,7 +1457,7 @@ func awsRestjson1_deserializeOpErrorDeleteConnection(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentDeleteConnectionOutput(v **DeleteConnectionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateCoreNetworkOutput(v **CreateCoreNetworkOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1473,17 +1470,17 @@ func awsRestjson1_deserializeOpDocumentDeleteConnectionOutput(v **DeleteConnecti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteConnectionOutput + var sv *CreateCoreNetworkOutput if *v == nil { - sv = &DeleteConnectionOutput{} + sv = &CreateCoreNetworkOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Connection": - if err := awsRestjson1_deserializeDocumentConnection(&sv.Connection, value); err != nil { + case "CoreNetwork": + if err := awsRestjson1_deserializeDocumentCoreNetwork(&sv.CoreNetwork, value); err != nil { return err } @@ -1496,14 +1493,14 @@ func awsRestjson1_deserializeOpDocumentDeleteConnectionOutput(v **DeleteConnecti return nil } -type awsRestjson1_deserializeOpDeleteDevice struct { +type awsRestjson1_deserializeOpCreateDevice struct { } -func (*awsRestjson1_deserializeOpDeleteDevice) ID() string { +func (*awsRestjson1_deserializeOpCreateDevice) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1517,9 +1514,9 @@ func (m *awsRestjson1_deserializeOpDeleteDevice) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteDevice(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateDevice(response, &metadata) } - output := &DeleteDeviceOutput{} + output := &CreateDeviceOutput{} out.Result = output var buff [1024]byte @@ -1540,7 +1537,7 @@ func (m *awsRestjson1_deserializeOpDeleteDevice) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteDeviceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateDeviceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1553,7 +1550,7 @@ func (m *awsRestjson1_deserializeOpDeleteDevice) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1606,6 +1603,9 @@ func awsRestjson1_deserializeOpErrorDeleteDevice(response *smithyhttp.Response, 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) @@ -1622,7 +1622,7 @@ func awsRestjson1_deserializeOpErrorDeleteDevice(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentDeleteDeviceOutput(v **DeleteDeviceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateDeviceOutput(v **CreateDeviceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1635,9 +1635,9 @@ func awsRestjson1_deserializeOpDocumentDeleteDeviceOutput(v **DeleteDeviceOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteDeviceOutput + var sv *CreateDeviceOutput if *v == nil { - sv = &DeleteDeviceOutput{} + sv = &CreateDeviceOutput{} } else { sv = *v } @@ -1658,14 +1658,14 @@ func awsRestjson1_deserializeOpDocumentDeleteDeviceOutput(v **DeleteDeviceOutput return nil } -type awsRestjson1_deserializeOpDeleteGlobalNetwork struct { +type awsRestjson1_deserializeOpCreateGlobalNetwork struct { } -func (*awsRestjson1_deserializeOpDeleteGlobalNetwork) ID() string { +func (*awsRestjson1_deserializeOpCreateGlobalNetwork) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteGlobalNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateGlobalNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1679,9 +1679,9 @@ func (m *awsRestjson1_deserializeOpDeleteGlobalNetwork) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteGlobalNetwork(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateGlobalNetwork(response, &metadata) } - output := &DeleteGlobalNetworkOutput{} + output := &CreateGlobalNetworkOutput{} out.Result = output var buff [1024]byte @@ -1702,7 +1702,7 @@ func (m *awsRestjson1_deserializeOpDeleteGlobalNetwork) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteGlobalNetworkOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateGlobalNetworkOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1715,7 +1715,7 @@ func (m *awsRestjson1_deserializeOpDeleteGlobalNetwork) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteGlobalNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateGlobalNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1765,8 +1765,8 @@ func awsRestjson1_deserializeOpErrorDeleteGlobalNetwork(response *smithyhttp.Res case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(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) @@ -1784,7 +1784,7 @@ func awsRestjson1_deserializeOpErrorDeleteGlobalNetwork(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentDeleteGlobalNetworkOutput(v **DeleteGlobalNetworkOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateGlobalNetworkOutput(v **CreateGlobalNetworkOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1797,9 +1797,9 @@ func awsRestjson1_deserializeOpDocumentDeleteGlobalNetworkOutput(v **DeleteGloba return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteGlobalNetworkOutput + var sv *CreateGlobalNetworkOutput if *v == nil { - sv = &DeleteGlobalNetworkOutput{} + sv = &CreateGlobalNetworkOutput{} } else { sv = *v } @@ -1820,14 +1820,14 @@ func awsRestjson1_deserializeOpDocumentDeleteGlobalNetworkOutput(v **DeleteGloba return nil } -type awsRestjson1_deserializeOpDeleteLink struct { +type awsRestjson1_deserializeOpCreateLink struct { } -func (*awsRestjson1_deserializeOpDeleteLink) ID() string { +func (*awsRestjson1_deserializeOpCreateLink) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteLink) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateLink) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1841,9 +1841,9 @@ func (m *awsRestjson1_deserializeOpDeleteLink) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteLink(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateLink(response, &metadata) } - output := &DeleteLinkOutput{} + output := &CreateLinkOutput{} out.Result = output var buff [1024]byte @@ -1864,7 +1864,7 @@ func (m *awsRestjson1_deserializeOpDeleteLink) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteLinkOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateLinkOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1877,7 +1877,7 @@ func (m *awsRestjson1_deserializeOpDeleteLink) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteLink(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateLink(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1930,6 +1930,9 @@ func awsRestjson1_deserializeOpErrorDeleteLink(response *smithyhttp.Response, me 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) @@ -1946,7 +1949,7 @@ func awsRestjson1_deserializeOpErrorDeleteLink(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentDeleteLinkOutput(v **DeleteLinkOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateLinkOutput(v **CreateLinkOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1959,9 +1962,9 @@ func awsRestjson1_deserializeOpDocumentDeleteLinkOutput(v **DeleteLinkOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteLinkOutput + var sv *CreateLinkOutput if *v == nil { - sv = &DeleteLinkOutput{} + sv = &CreateLinkOutput{} } else { sv = *v } @@ -1982,14 +1985,14 @@ func awsRestjson1_deserializeOpDocumentDeleteLinkOutput(v **DeleteLinkOutput, va return nil } -type awsRestjson1_deserializeOpDeleteSite struct { +type awsRestjson1_deserializeOpCreateSite struct { } -func (*awsRestjson1_deserializeOpDeleteSite) ID() string { +func (*awsRestjson1_deserializeOpCreateSite) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2003,9 +2006,9 @@ func (m *awsRestjson1_deserializeOpDeleteSite) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteSite(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateSite(response, &metadata) } - output := &DeleteSiteOutput{} + output := &CreateSiteOutput{} out.Result = output var buff [1024]byte @@ -2026,7 +2029,7 @@ func (m *awsRestjson1_deserializeOpDeleteSite) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteSiteOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateSiteOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2039,7 +2042,7 @@ func (m *awsRestjson1_deserializeOpDeleteSite) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2092,6 +2095,9 @@ func awsRestjson1_deserializeOpErrorDeleteSite(response *smithyhttp.Response, me 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) @@ -2108,7 +2114,7 @@ func awsRestjson1_deserializeOpErrorDeleteSite(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentDeleteSiteOutput(v **DeleteSiteOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateSiteOutput(v **CreateSiteOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2121,9 +2127,9 @@ func awsRestjson1_deserializeOpDocumentDeleteSiteOutput(v **DeleteSiteOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteSiteOutput + var sv *CreateSiteOutput if *v == nil { - sv = &DeleteSiteOutput{} + sv = &CreateSiteOutput{} } else { sv = *v } @@ -2144,14 +2150,14 @@ func awsRestjson1_deserializeOpDocumentDeleteSiteOutput(v **DeleteSiteOutput, va return nil } -type awsRestjson1_deserializeOpDeregisterTransitGateway struct { +type awsRestjson1_deserializeOpCreateSiteToSiteVpnAttachment struct { } -func (*awsRestjson1_deserializeOpDeregisterTransitGateway) ID() string { +func (*awsRestjson1_deserializeOpCreateSiteToSiteVpnAttachment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeregisterTransitGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateSiteToSiteVpnAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2165,9 +2171,9 @@ func (m *awsRestjson1_deserializeOpDeregisterTransitGateway) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeregisterTransitGateway(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateSiteToSiteVpnAttachment(response, &metadata) } - output := &DeregisterTransitGatewayOutput{} + output := &CreateSiteToSiteVpnAttachmentOutput{} out.Result = output var buff [1024]byte @@ -2188,7 +2194,7 @@ func (m *awsRestjson1_deserializeOpDeregisterTransitGateway) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeregisterTransitGatewayOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateSiteToSiteVpnAttachmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2201,7 +2207,7 @@ func (m *awsRestjson1_deserializeOpDeregisterTransitGateway) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeregisterTransitGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateSiteToSiteVpnAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2270,7 +2276,7 @@ func awsRestjson1_deserializeOpErrorDeregisterTransitGateway(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentDeregisterTransitGatewayOutput(v **DeregisterTransitGatewayOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateSiteToSiteVpnAttachmentOutput(v **CreateSiteToSiteVpnAttachmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2283,17 +2289,17 @@ func awsRestjson1_deserializeOpDocumentDeregisterTransitGatewayOutput(v **Deregi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeregisterTransitGatewayOutput + var sv *CreateSiteToSiteVpnAttachmentOutput if *v == nil { - sv = &DeregisterTransitGatewayOutput{} + sv = &CreateSiteToSiteVpnAttachmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "TransitGatewayRegistration": - if err := awsRestjson1_deserializeDocumentTransitGatewayRegistration(&sv.TransitGatewayRegistration, value); err != nil { + case "SiteToSiteVpnAttachment": + if err := awsRestjson1_deserializeDocumentSiteToSiteVpnAttachment(&sv.SiteToSiteVpnAttachment, value); err != nil { return err } @@ -2306,14 +2312,14 @@ func awsRestjson1_deserializeOpDocumentDeregisterTransitGatewayOutput(v **Deregi return nil } -type awsRestjson1_deserializeOpDescribeGlobalNetworks struct { +type awsRestjson1_deserializeOpCreateVpcAttachment struct { } -func (*awsRestjson1_deserializeOpDescribeGlobalNetworks) ID() string { +func (*awsRestjson1_deserializeOpCreateVpcAttachment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeGlobalNetworks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateVpcAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2327,9 +2333,9 @@ func (m *awsRestjson1_deserializeOpDescribeGlobalNetworks) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeGlobalNetworks(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateVpcAttachment(response, &metadata) } - output := &DescribeGlobalNetworksOutput{} + output := &CreateVpcAttachmentOutput{} out.Result = output var buff [1024]byte @@ -2350,7 +2356,7 @@ func (m *awsRestjson1_deserializeOpDescribeGlobalNetworks) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeGlobalNetworksOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateVpcAttachmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2363,7 +2369,7 @@ func (m *awsRestjson1_deserializeOpDescribeGlobalNetworks) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeGlobalNetworks(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateVpcAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2407,6 +2413,9 @@ func awsRestjson1_deserializeOpErrorDescribeGlobalNetworks(response *smithyhttp. case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -2429,7 +2438,7 @@ func awsRestjson1_deserializeOpErrorDescribeGlobalNetworks(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentDescribeGlobalNetworksOutput(v **DescribeGlobalNetworksOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateVpcAttachmentOutput(v **CreateVpcAttachmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2442,29 +2451,20 @@ func awsRestjson1_deserializeOpDocumentDescribeGlobalNetworksOutput(v **Describe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeGlobalNetworksOutput + var sv *CreateVpcAttachmentOutput if *v == nil { - sv = &DescribeGlobalNetworksOutput{} + sv = &CreateVpcAttachmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "GlobalNetworks": - if err := awsRestjson1_deserializeDocumentGlobalNetworkList(&sv.GlobalNetworks, value); err != nil { + case "VpcAttachment": + if err := awsRestjson1_deserializeDocumentVpcAttachment(&sv.VpcAttachment, 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 @@ -2474,14 +2474,14 @@ func awsRestjson1_deserializeOpDocumentDescribeGlobalNetworksOutput(v **Describe return nil } -type awsRestjson1_deserializeOpDisassociateCustomerGateway struct { +type awsRestjson1_deserializeOpDeleteAttachment struct { } -func (*awsRestjson1_deserializeOpDisassociateCustomerGateway) ID() string { +func (*awsRestjson1_deserializeOpDeleteAttachment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisassociateCustomerGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2495,9 +2495,9 @@ func (m *awsRestjson1_deserializeOpDisassociateCustomerGateway) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociateCustomerGateway(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteAttachment(response, &metadata) } - output := &DisassociateCustomerGatewayOutput{} + output := &DeleteAttachmentOutput{} out.Result = output var buff [1024]byte @@ -2518,7 +2518,7 @@ func (m *awsRestjson1_deserializeOpDisassociateCustomerGateway) HandleDeserializ return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDisassociateCustomerGatewayOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteAttachmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2531,7 +2531,7 @@ func (m *awsRestjson1_deserializeOpDisassociateCustomerGateway) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisassociateCustomerGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2600,7 +2600,7 @@ func awsRestjson1_deserializeOpErrorDisassociateCustomerGateway(response *smithy } } -func awsRestjson1_deserializeOpDocumentDisassociateCustomerGatewayOutput(v **DisassociateCustomerGatewayOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteAttachmentOutput(v **DeleteAttachmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2613,17 +2613,17 @@ func awsRestjson1_deserializeOpDocumentDisassociateCustomerGatewayOutput(v **Dis return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DisassociateCustomerGatewayOutput + var sv *DeleteAttachmentOutput if *v == nil { - sv = &DisassociateCustomerGatewayOutput{} + sv = &DeleteAttachmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CustomerGatewayAssociation": - if err := awsRestjson1_deserializeDocumentCustomerGatewayAssociation(&sv.CustomerGatewayAssociation, value); err != nil { + case "Attachment": + if err := awsRestjson1_deserializeDocumentAttachment(&sv.Attachment, value); err != nil { return err } @@ -2636,14 +2636,14 @@ func awsRestjson1_deserializeOpDocumentDisassociateCustomerGatewayOutput(v **Dis return nil } -type awsRestjson1_deserializeOpDisassociateLink struct { +type awsRestjson1_deserializeOpDeleteConnection struct { } -func (*awsRestjson1_deserializeOpDisassociateLink) ID() string { +func (*awsRestjson1_deserializeOpDeleteConnection) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisassociateLink) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2657,9 +2657,9 @@ func (m *awsRestjson1_deserializeOpDisassociateLink) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociateLink(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteConnection(response, &metadata) } - output := &DisassociateLinkOutput{} + output := &DeleteConnectionOutput{} out.Result = output var buff [1024]byte @@ -2680,7 +2680,7 @@ func (m *awsRestjson1_deserializeOpDisassociateLink) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDisassociateLinkOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteConnectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2693,7 +2693,7 @@ func (m *awsRestjson1_deserializeOpDisassociateLink) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisassociateLink(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2762,7 +2762,7 @@ func awsRestjson1_deserializeOpErrorDisassociateLink(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentDisassociateLinkOutput(v **DisassociateLinkOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteConnectionOutput(v **DeleteConnectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2775,17 +2775,17 @@ func awsRestjson1_deserializeOpDocumentDisassociateLinkOutput(v **DisassociateLi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DisassociateLinkOutput + var sv *DeleteConnectionOutput if *v == nil { - sv = &DisassociateLinkOutput{} + sv = &DeleteConnectionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "LinkAssociation": - if err := awsRestjson1_deserializeDocumentLinkAssociation(&sv.LinkAssociation, value); err != nil { + case "Connection": + if err := awsRestjson1_deserializeDocumentConnection(&sv.Connection, value); err != nil { return err } @@ -2798,14 +2798,14 @@ func awsRestjson1_deserializeOpDocumentDisassociateLinkOutput(v **DisassociateLi return nil } -type awsRestjson1_deserializeOpDisassociateTransitGatewayConnectPeer struct { +type awsRestjson1_deserializeOpDeleteConnectPeer struct { } -func (*awsRestjson1_deserializeOpDisassociateTransitGatewayConnectPeer) ID() string { +func (*awsRestjson1_deserializeOpDeleteConnectPeer) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisassociateTransitGatewayConnectPeer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteConnectPeer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2819,9 +2819,9 @@ func (m *awsRestjson1_deserializeOpDisassociateTransitGatewayConnectPeer) Handle } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociateTransitGatewayConnectPeer(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteConnectPeer(response, &metadata) } - output := &DisassociateTransitGatewayConnectPeerOutput{} + output := &DeleteConnectPeerOutput{} out.Result = output var buff [1024]byte @@ -2842,7 +2842,7 @@ func (m *awsRestjson1_deserializeOpDisassociateTransitGatewayConnectPeer) Handle return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDisassociateTransitGatewayConnectPeerOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteConnectPeerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2855,7 +2855,7 @@ func (m *awsRestjson1_deserializeOpDisassociateTransitGatewayConnectPeer) Handle return out, metadata, err } -func awsRestjson1_deserializeOpErrorDisassociateTransitGatewayConnectPeer(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteConnectPeer(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2924,7 +2924,7 @@ func awsRestjson1_deserializeOpErrorDisassociateTransitGatewayConnectPeer(respon } } -func awsRestjson1_deserializeOpDocumentDisassociateTransitGatewayConnectPeerOutput(v **DisassociateTransitGatewayConnectPeerOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteConnectPeerOutput(v **DeleteConnectPeerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2937,17 +2937,17 @@ func awsRestjson1_deserializeOpDocumentDisassociateTransitGatewayConnectPeerOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DisassociateTransitGatewayConnectPeerOutput + var sv *DeleteConnectPeerOutput if *v == nil { - sv = &DisassociateTransitGatewayConnectPeerOutput{} + sv = &DeleteConnectPeerOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "TransitGatewayConnectPeerAssociation": - if err := awsRestjson1_deserializeDocumentTransitGatewayConnectPeerAssociation(&sv.TransitGatewayConnectPeerAssociation, value); err != nil { + case "ConnectPeer": + if err := awsRestjson1_deserializeDocumentConnectPeer(&sv.ConnectPeer, value); err != nil { return err } @@ -2960,14 +2960,14 @@ func awsRestjson1_deserializeOpDocumentDisassociateTransitGatewayConnectPeerOutp return nil } -type awsRestjson1_deserializeOpGetConnections struct { +type awsRestjson1_deserializeOpDeleteCoreNetwork struct { } -func (*awsRestjson1_deserializeOpGetConnections) ID() string { +func (*awsRestjson1_deserializeOpDeleteCoreNetwork) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteCoreNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2981,9 +2981,9 @@ func (m *awsRestjson1_deserializeOpGetConnections) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetConnections(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteCoreNetwork(response, &metadata) } - output := &GetConnectionsOutput{} + output := &DeleteCoreNetworkOutput{} out.Result = output var buff [1024]byte @@ -3004,7 +3004,7 @@ func (m *awsRestjson1_deserializeOpGetConnections) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetConnectionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteCoreNetworkOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3017,7 +3017,7 @@ func (m *awsRestjson1_deserializeOpGetConnections) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteCoreNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3061,6 +3061,9 @@ func awsRestjson1_deserializeOpErrorGetConnections(response *smithyhttp.Response case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -3083,7 +3086,7 @@ func awsRestjson1_deserializeOpErrorGetConnections(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentGetConnectionsOutput(v **GetConnectionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteCoreNetworkOutput(v **DeleteCoreNetworkOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3096,29 +3099,20 @@ func awsRestjson1_deserializeOpDocumentGetConnectionsOutput(v **GetConnectionsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetConnectionsOutput + var sv *DeleteCoreNetworkOutput if *v == nil { - sv = &GetConnectionsOutput{} + sv = &DeleteCoreNetworkOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Connections": - if err := awsRestjson1_deserializeDocumentConnectionList(&sv.Connections, value); err != nil { + case "CoreNetwork": + if err := awsRestjson1_deserializeDocumentCoreNetwork(&sv.CoreNetwork, 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 @@ -3128,14 +3122,14 @@ func awsRestjson1_deserializeOpDocumentGetConnectionsOutput(v **GetConnectionsOu return nil } -type awsRestjson1_deserializeOpGetCustomerGatewayAssociations struct { +type awsRestjson1_deserializeOpDeleteCoreNetworkPolicyVersion struct { } -func (*awsRestjson1_deserializeOpGetCustomerGatewayAssociations) ID() string { +func (*awsRestjson1_deserializeOpDeleteCoreNetworkPolicyVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetCustomerGatewayAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteCoreNetworkPolicyVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3149,9 +3143,9 @@ func (m *awsRestjson1_deserializeOpGetCustomerGatewayAssociations) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetCustomerGatewayAssociations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteCoreNetworkPolicyVersion(response, &metadata) } - output := &GetCustomerGatewayAssociationsOutput{} + output := &DeleteCoreNetworkPolicyVersionOutput{} out.Result = output var buff [1024]byte @@ -3172,7 +3166,7 @@ func (m *awsRestjson1_deserializeOpGetCustomerGatewayAssociations) HandleDeseria return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetCustomerGatewayAssociationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteCoreNetworkPolicyVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3185,7 +3179,7 @@ func (m *awsRestjson1_deserializeOpGetCustomerGatewayAssociations) HandleDeseria return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetCustomerGatewayAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteCoreNetworkPolicyVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3254,7 +3248,7 @@ func awsRestjson1_deserializeOpErrorGetCustomerGatewayAssociations(response *smi } } -func awsRestjson1_deserializeOpDocumentGetCustomerGatewayAssociationsOutput(v **GetCustomerGatewayAssociationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteCoreNetworkPolicyVersionOutput(v **DeleteCoreNetworkPolicyVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3267,29 +3261,20 @@ func awsRestjson1_deserializeOpDocumentGetCustomerGatewayAssociationsOutput(v ** return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetCustomerGatewayAssociationsOutput + var sv *DeleteCoreNetworkPolicyVersionOutput if *v == nil { - sv = &GetCustomerGatewayAssociationsOutput{} + sv = &DeleteCoreNetworkPolicyVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "CustomerGatewayAssociations": - if err := awsRestjson1_deserializeDocumentCustomerGatewayAssociationList(&sv.CustomerGatewayAssociations, value); err != nil { + case "CoreNetworkPolicy": + if err := awsRestjson1_deserializeDocumentCoreNetworkPolicy(&sv.CoreNetworkPolicy, 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 @@ -3299,14 +3284,14 @@ func awsRestjson1_deserializeOpDocumentGetCustomerGatewayAssociationsOutput(v ** return nil } -type awsRestjson1_deserializeOpGetDevices struct { +type awsRestjson1_deserializeOpDeleteDevice struct { } -func (*awsRestjson1_deserializeOpGetDevices) ID() string { +func (*awsRestjson1_deserializeOpDeleteDevice) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetDevices) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3320,9 +3305,9 @@ func (m *awsRestjson1_deserializeOpGetDevices) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetDevices(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteDevice(response, &metadata) } - output := &GetDevicesOutput{} + output := &DeleteDeviceOutput{} out.Result = output var buff [1024]byte @@ -3343,7 +3328,7 @@ func (m *awsRestjson1_deserializeOpGetDevices) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetDevicesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteDeviceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3356,7 +3341,7 @@ func (m *awsRestjson1_deserializeOpGetDevices) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetDevices(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3400,6 +3385,9 @@ func awsRestjson1_deserializeOpErrorGetDevices(response *smithyhttp.Response, me case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -3422,7 +3410,7 @@ func awsRestjson1_deserializeOpErrorGetDevices(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentGetDevicesOutput(v **GetDevicesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteDeviceOutput(v **DeleteDeviceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3435,29 +3423,20 @@ func awsRestjson1_deserializeOpDocumentGetDevicesOutput(v **GetDevicesOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetDevicesOutput + var sv *DeleteDeviceOutput if *v == nil { - sv = &GetDevicesOutput{} + sv = &DeleteDeviceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Devices": - if err := awsRestjson1_deserializeDocumentDeviceList(&sv.Devices, value); err != nil { + case "Device": + if err := awsRestjson1_deserializeDocumentDevice(&sv.Device, 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 @@ -3467,14 +3446,14 @@ func awsRestjson1_deserializeOpDocumentGetDevicesOutput(v **GetDevicesOutput, va return nil } -type awsRestjson1_deserializeOpGetLinkAssociations struct { +type awsRestjson1_deserializeOpDeleteGlobalNetwork struct { } -func (*awsRestjson1_deserializeOpGetLinkAssociations) ID() string { +func (*awsRestjson1_deserializeOpDeleteGlobalNetwork) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetLinkAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteGlobalNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3488,9 +3467,9 @@ func (m *awsRestjson1_deserializeOpGetLinkAssociations) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetLinkAssociations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteGlobalNetwork(response, &metadata) } - output := &GetLinkAssociationsOutput{} + output := &DeleteGlobalNetworkOutput{} out.Result = output var buff [1024]byte @@ -3511,7 +3490,7 @@ func (m *awsRestjson1_deserializeOpGetLinkAssociations) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetLinkAssociationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteGlobalNetworkOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3524,7 +3503,7 @@ func (m *awsRestjson1_deserializeOpGetLinkAssociations) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetLinkAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteGlobalNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3568,6 +3547,9 @@ func awsRestjson1_deserializeOpErrorGetLinkAssociations(response *smithyhttp.Res case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -3590,7 +3572,7 @@ func awsRestjson1_deserializeOpErrorGetLinkAssociations(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentGetLinkAssociationsOutput(v **GetLinkAssociationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteGlobalNetworkOutput(v **DeleteGlobalNetworkOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3603,29 +3585,20 @@ func awsRestjson1_deserializeOpDocumentGetLinkAssociationsOutput(v **GetLinkAsso return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetLinkAssociationsOutput + var sv *DeleteGlobalNetworkOutput if *v == nil { - sv = &GetLinkAssociationsOutput{} + sv = &DeleteGlobalNetworkOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "LinkAssociations": - if err := awsRestjson1_deserializeDocumentLinkAssociationList(&sv.LinkAssociations, value); err != nil { + case "GlobalNetwork": + if err := awsRestjson1_deserializeDocumentGlobalNetwork(&sv.GlobalNetwork, 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 @@ -3635,14 +3608,14 @@ func awsRestjson1_deserializeOpDocumentGetLinkAssociationsOutput(v **GetLinkAsso return nil } -type awsRestjson1_deserializeOpGetLinks struct { +type awsRestjson1_deserializeOpDeleteLink struct { } -func (*awsRestjson1_deserializeOpGetLinks) ID() string { +func (*awsRestjson1_deserializeOpDeleteLink) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetLinks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteLink) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3656,9 +3629,9 @@ func (m *awsRestjson1_deserializeOpGetLinks) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetLinks(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteLink(response, &metadata) } - output := &GetLinksOutput{} + output := &DeleteLinkOutput{} out.Result = output var buff [1024]byte @@ -3679,7 +3652,7 @@ func (m *awsRestjson1_deserializeOpGetLinks) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetLinksOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteLinkOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3692,7 +3665,7 @@ func (m *awsRestjson1_deserializeOpGetLinks) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetLinks(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteLink(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3736,6 +3709,9 @@ func awsRestjson1_deserializeOpErrorGetLinks(response *smithyhttp.Response, meta case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -3758,7 +3734,7 @@ func awsRestjson1_deserializeOpErrorGetLinks(response *smithyhttp.Response, meta } } -func awsRestjson1_deserializeOpDocumentGetLinksOutput(v **GetLinksOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteLinkOutput(v **DeleteLinkOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3771,29 +3747,20 @@ func awsRestjson1_deserializeOpDocumentGetLinksOutput(v **GetLinksOutput, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetLinksOutput + var sv *DeleteLinkOutput if *v == nil { - sv = &GetLinksOutput{} + sv = &DeleteLinkOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Links": - if err := awsRestjson1_deserializeDocumentLinkList(&sv.Links, value); err != nil { + case "Link": + if err := awsRestjson1_deserializeDocumentLink(&sv.Link, 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 @@ -3803,14 +3770,14 @@ func awsRestjson1_deserializeOpDocumentGetLinksOutput(v **GetLinksOutput, value return nil } -type awsRestjson1_deserializeOpGetNetworkResourceCounts struct { +type awsRestjson1_deserializeOpDeleteResourcePolicy struct { } -func (*awsRestjson1_deserializeOpGetNetworkResourceCounts) ID() string { +func (*awsRestjson1_deserializeOpDeleteResourcePolicy) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetNetworkResourceCounts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3824,43 +3791,15 @@ func (m *awsRestjson1_deserializeOpGetNetworkResourceCounts) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetNetworkResourceCounts(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteResourcePolicy(response, &metadata) } - output := &GetNetworkResourceCountsOutput{} + output := &DeleteResourcePolicyOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) + return out, metadata, err +} - 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_deserializeOpDocumentGetNetworkResourceCountsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetNetworkResourceCounts(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3904,6 +3843,9 @@ func awsRestjson1_deserializeOpErrorGetNetworkResourceCounts(response *smithyhtt case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -3923,59 +3865,14 @@ func awsRestjson1_deserializeOpErrorGetNetworkResourceCounts(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentGetNetworkResourceCountsOutput(v **GetNetworkResourceCountsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetNetworkResourceCountsOutput - if *v == nil { - sv = &GetNetworkResourceCountsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "NetworkResourceCounts": - if err := awsRestjson1_deserializeDocumentNetworkResourceCountList(&sv.NetworkResourceCounts, 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_deserializeOpGetNetworkResourceRelationships struct { +type awsRestjson1_deserializeOpDeleteSite struct { } -func (*awsRestjson1_deserializeOpGetNetworkResourceRelationships) ID() string { +func (*awsRestjson1_deserializeOpDeleteSite) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetNetworkResourceRelationships) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3989,9 +3886,9 @@ func (m *awsRestjson1_deserializeOpGetNetworkResourceRelationships) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetNetworkResourceRelationships(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteSite(response, &metadata) } - output := &GetNetworkResourceRelationshipsOutput{} + output := &DeleteSiteOutput{} out.Result = output var buff [1024]byte @@ -4012,7 +3909,7 @@ func (m *awsRestjson1_deserializeOpGetNetworkResourceRelationships) HandleDeseri return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetNetworkResourceRelationshipsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteSiteOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4025,7 +3922,7 @@ func (m *awsRestjson1_deserializeOpGetNetworkResourceRelationships) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetNetworkResourceRelationships(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4069,6 +3966,9 @@ func awsRestjson1_deserializeOpErrorGetNetworkResourceRelationships(response *sm case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -4091,7 +3991,7 @@ func awsRestjson1_deserializeOpErrorGetNetworkResourceRelationships(response *sm } } -func awsRestjson1_deserializeOpDocumentGetNetworkResourceRelationshipsOutput(v **GetNetworkResourceRelationshipsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteSiteOutput(v **DeleteSiteOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4104,26 +4004,17 @@ func awsRestjson1_deserializeOpDocumentGetNetworkResourceRelationshipsOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetNetworkResourceRelationshipsOutput + var sv *DeleteSiteOutput if *v == nil { - sv = &GetNetworkResourceRelationshipsOutput{} + sv = &DeleteSiteOutput{} } 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 "Relationships": - if err := awsRestjson1_deserializeDocumentRelationshipList(&sv.Relationships, value); err != nil { + case "Site": + if err := awsRestjson1_deserializeDocumentSite(&sv.Site, value); err != nil { return err } @@ -4136,14 +4027,14 @@ func awsRestjson1_deserializeOpDocumentGetNetworkResourceRelationshipsOutput(v * return nil } -type awsRestjson1_deserializeOpGetNetworkResources struct { +type awsRestjson1_deserializeOpDeregisterTransitGateway struct { } -func (*awsRestjson1_deserializeOpGetNetworkResources) ID() string { +func (*awsRestjson1_deserializeOpDeregisterTransitGateway) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetNetworkResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeregisterTransitGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4157,9 +4048,9 @@ func (m *awsRestjson1_deserializeOpGetNetworkResources) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetNetworkResources(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeregisterTransitGateway(response, &metadata) } - output := &GetNetworkResourcesOutput{} + output := &DeregisterTransitGatewayOutput{} out.Result = output var buff [1024]byte @@ -4180,7 +4071,7 @@ func (m *awsRestjson1_deserializeOpGetNetworkResources) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetNetworkResourcesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeregisterTransitGatewayOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4193,7 +4084,7 @@ func (m *awsRestjson1_deserializeOpGetNetworkResources) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetNetworkResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeregisterTransitGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4237,6 +4128,9 @@ func awsRestjson1_deserializeOpErrorGetNetworkResources(response *smithyhttp.Res case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -4259,7 +4153,7 @@ func awsRestjson1_deserializeOpErrorGetNetworkResources(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentGetNetworkResourcesOutput(v **GetNetworkResourcesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeregisterTransitGatewayOutput(v **DeregisterTransitGatewayOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4272,29 +4166,20 @@ func awsRestjson1_deserializeOpDocumentGetNetworkResourcesOutput(v **GetNetworkR return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetNetworkResourcesOutput + var sv *DeregisterTransitGatewayOutput if *v == nil { - sv = &GetNetworkResourcesOutput{} + sv = &DeregisterTransitGatewayOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "NetworkResources": - if err := awsRestjson1_deserializeDocumentNetworkResourceList(&sv.NetworkResources, value); err != nil { + case "TransitGatewayRegistration": + if err := awsRestjson1_deserializeDocumentTransitGatewayRegistration(&sv.TransitGatewayRegistration, 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 @@ -4304,14 +4189,14 @@ func awsRestjson1_deserializeOpDocumentGetNetworkResourcesOutput(v **GetNetworkR return nil } -type awsRestjson1_deserializeOpGetNetworkRoutes struct { +type awsRestjson1_deserializeOpDescribeGlobalNetworks struct { } -func (*awsRestjson1_deserializeOpGetNetworkRoutes) ID() string { +func (*awsRestjson1_deserializeOpDescribeGlobalNetworks) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetNetworkRoutes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeGlobalNetworks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4325,9 +4210,9 @@ func (m *awsRestjson1_deserializeOpGetNetworkRoutes) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetNetworkRoutes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeGlobalNetworks(response, &metadata) } - output := &GetNetworkRoutesOutput{} + output := &DescribeGlobalNetworksOutput{} out.Result = output var buff [1024]byte @@ -4348,7 +4233,7 @@ func (m *awsRestjson1_deserializeOpGetNetworkRoutes) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetNetworkRoutesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeGlobalNetworksOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4361,7 +4246,7 @@ func (m *awsRestjson1_deserializeOpGetNetworkRoutes) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetNetworkRoutes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeGlobalNetworks(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4427,7 +4312,7 @@ func awsRestjson1_deserializeOpErrorGetNetworkRoutes(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentGetNetworkRoutesOutput(v **GetNetworkRoutesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeGlobalNetworksOutput(v **DescribeGlobalNetworksOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4440,52 +4325,27 @@ func awsRestjson1_deserializeOpDocumentGetNetworkRoutesOutput(v **GetNetworkRout return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetNetworkRoutesOutput + var sv *DescribeGlobalNetworksOutput if *v == nil { - sv = &GetNetworkRoutesOutput{} + sv = &DescribeGlobalNetworksOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "NetworkRoutes": - if err := awsRestjson1_deserializeDocumentNetworkRouteList(&sv.NetworkRoutes, value); err != nil { + case "GlobalNetworks": + if err := awsRestjson1_deserializeDocumentGlobalNetworkList(&sv.GlobalNetworks, value); err != nil { return err } - case "RouteTableArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.RouteTableArn = ptr.String(jtv) - } - - case "RouteTableTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.RouteTableTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) - - } - } - - case "RouteTableType": + case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RouteTableType to be of type string, got %T instead", value) + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } - sv.RouteTableType = types.RouteTableType(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -4497,14 +4357,14 @@ func awsRestjson1_deserializeOpDocumentGetNetworkRoutesOutput(v **GetNetworkRout return nil } -type awsRestjson1_deserializeOpGetNetworkTelemetry struct { +type awsRestjson1_deserializeOpDisassociateConnectPeer struct { } -func (*awsRestjson1_deserializeOpGetNetworkTelemetry) ID() string { +func (*awsRestjson1_deserializeOpDisassociateConnectPeer) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetNetworkTelemetry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDisassociateConnectPeer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4518,9 +4378,9 @@ func (m *awsRestjson1_deserializeOpGetNetworkTelemetry) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetNetworkTelemetry(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateConnectPeer(response, &metadata) } - output := &GetNetworkTelemetryOutput{} + output := &DisassociateConnectPeerOutput{} out.Result = output var buff [1024]byte @@ -4541,7 +4401,7 @@ func (m *awsRestjson1_deserializeOpGetNetworkTelemetry) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetNetworkTelemetryOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDisassociateConnectPeerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4554,7 +4414,7 @@ func (m *awsRestjson1_deserializeOpGetNetworkTelemetry) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetNetworkTelemetry(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDisassociateConnectPeer(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4598,6 +4458,9 @@ func awsRestjson1_deserializeOpErrorGetNetworkTelemetry(response *smithyhttp.Res case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -4620,7 +4483,7 @@ func awsRestjson1_deserializeOpErrorGetNetworkTelemetry(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentGetNetworkTelemetryOutput(v **GetNetworkTelemetryOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDisassociateConnectPeerOutput(v **DisassociateConnectPeerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4633,29 +4496,20 @@ func awsRestjson1_deserializeOpDocumentGetNetworkTelemetryOutput(v **GetNetworkT return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetNetworkTelemetryOutput + var sv *DisassociateConnectPeerOutput if *v == nil { - sv = &GetNetworkTelemetryOutput{} + sv = &DisassociateConnectPeerOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "NetworkTelemetry": - if err := awsRestjson1_deserializeDocumentNetworkTelemetryList(&sv.NetworkTelemetry, value); err != nil { + case "ConnectPeerAssociation": + if err := awsRestjson1_deserializeDocumentConnectPeerAssociation(&sv.ConnectPeerAssociation, 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 @@ -4665,14 +4519,14 @@ func awsRestjson1_deserializeOpDocumentGetNetworkTelemetryOutput(v **GetNetworkT return nil } -type awsRestjson1_deserializeOpGetRouteAnalysis struct { +type awsRestjson1_deserializeOpDisassociateCustomerGateway struct { } -func (*awsRestjson1_deserializeOpGetRouteAnalysis) ID() string { +func (*awsRestjson1_deserializeOpDisassociateCustomerGateway) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetRouteAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDisassociateCustomerGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4686,9 +4540,9 @@ func (m *awsRestjson1_deserializeOpGetRouteAnalysis) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetRouteAnalysis(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateCustomerGateway(response, &metadata) } - output := &GetRouteAnalysisOutput{} + output := &DisassociateCustomerGatewayOutput{} out.Result = output var buff [1024]byte @@ -4709,7 +4563,7 @@ func (m *awsRestjson1_deserializeOpGetRouteAnalysis) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetRouteAnalysisOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDisassociateCustomerGatewayOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4722,7 +4576,7 @@ func (m *awsRestjson1_deserializeOpGetRouteAnalysis) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetRouteAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDisassociateCustomerGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4766,6 +4620,9 @@ func awsRestjson1_deserializeOpErrorGetRouteAnalysis(response *smithyhttp.Respon case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -4788,7 +4645,7 @@ func awsRestjson1_deserializeOpErrorGetRouteAnalysis(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentGetRouteAnalysisOutput(v **GetRouteAnalysisOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDisassociateCustomerGatewayOutput(v **DisassociateCustomerGatewayOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4801,17 +4658,17 @@ func awsRestjson1_deserializeOpDocumentGetRouteAnalysisOutput(v **GetRouteAnalys return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetRouteAnalysisOutput + var sv *DisassociateCustomerGatewayOutput if *v == nil { - sv = &GetRouteAnalysisOutput{} + sv = &DisassociateCustomerGatewayOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "RouteAnalysis": - if err := awsRestjson1_deserializeDocumentRouteAnalysis(&sv.RouteAnalysis, value); err != nil { + case "CustomerGatewayAssociation": + if err := awsRestjson1_deserializeDocumentCustomerGatewayAssociation(&sv.CustomerGatewayAssociation, value); err != nil { return err } @@ -4824,14 +4681,14 @@ func awsRestjson1_deserializeOpDocumentGetRouteAnalysisOutput(v **GetRouteAnalys return nil } -type awsRestjson1_deserializeOpGetSites struct { +type awsRestjson1_deserializeOpDisassociateLink struct { } -func (*awsRestjson1_deserializeOpGetSites) ID() string { +func (*awsRestjson1_deserializeOpDisassociateLink) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSites) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDisassociateLink) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4845,9 +4702,9 @@ func (m *awsRestjson1_deserializeOpGetSites) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSites(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateLink(response, &metadata) } - output := &GetSitesOutput{} + output := &DisassociateLinkOutput{} out.Result = output var buff [1024]byte @@ -4868,7 +4725,7 @@ func (m *awsRestjson1_deserializeOpGetSites) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSitesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDisassociateLinkOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4881,7 +4738,7 @@ func (m *awsRestjson1_deserializeOpGetSites) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSites(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDisassociateLink(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4925,6 +4782,9 @@ func awsRestjson1_deserializeOpErrorGetSites(response *smithyhttp.Response, meta case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -4947,7 +4807,7 @@ func awsRestjson1_deserializeOpErrorGetSites(response *smithyhttp.Response, meta } } -func awsRestjson1_deserializeOpDocumentGetSitesOutput(v **GetSitesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDisassociateLinkOutput(v **DisassociateLinkOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4960,26 +4820,17 @@ func awsRestjson1_deserializeOpDocumentGetSitesOutput(v **GetSitesOutput, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSitesOutput + var sv *DisassociateLinkOutput if *v == nil { - sv = &GetSitesOutput{} + sv = &DisassociateLinkOutput{} } 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 "Sites": - if err := awsRestjson1_deserializeDocumentSiteList(&sv.Sites, value); err != nil { + case "LinkAssociation": + if err := awsRestjson1_deserializeDocumentLinkAssociation(&sv.LinkAssociation, value); err != nil { return err } @@ -4992,14 +4843,14 @@ func awsRestjson1_deserializeOpDocumentGetSitesOutput(v **GetSitesOutput, value return nil } -type awsRestjson1_deserializeOpGetTransitGatewayConnectPeerAssociations struct { +type awsRestjson1_deserializeOpDisassociateTransitGatewayConnectPeer struct { } -func (*awsRestjson1_deserializeOpGetTransitGatewayConnectPeerAssociations) ID() string { +func (*awsRestjson1_deserializeOpDisassociateTransitGatewayConnectPeer) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetTransitGatewayConnectPeerAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDisassociateTransitGatewayConnectPeer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5013,9 +4864,9 @@ func (m *awsRestjson1_deserializeOpGetTransitGatewayConnectPeerAssociations) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetTransitGatewayConnectPeerAssociations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateTransitGatewayConnectPeer(response, &metadata) } - output := &GetTransitGatewayConnectPeerAssociationsOutput{} + output := &DisassociateTransitGatewayConnectPeerOutput{} out.Result = output var buff [1024]byte @@ -5036,7 +4887,7 @@ func (m *awsRestjson1_deserializeOpGetTransitGatewayConnectPeerAssociations) Han return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetTransitGatewayConnectPeerAssociationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDisassociateTransitGatewayConnectPeerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5049,7 +4900,7 @@ func (m *awsRestjson1_deserializeOpGetTransitGatewayConnectPeerAssociations) Han return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetTransitGatewayConnectPeerAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDisassociateTransitGatewayConnectPeer(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5118,7 +4969,7 @@ func awsRestjson1_deserializeOpErrorGetTransitGatewayConnectPeerAssociations(res } } -func awsRestjson1_deserializeOpDocumentGetTransitGatewayConnectPeerAssociationsOutput(v **GetTransitGatewayConnectPeerAssociationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDisassociateTransitGatewayConnectPeerOutput(v **DisassociateTransitGatewayConnectPeerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5131,26 +4982,17 @@ func awsRestjson1_deserializeOpDocumentGetTransitGatewayConnectPeerAssociationsO return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetTransitGatewayConnectPeerAssociationsOutput + var sv *DisassociateTransitGatewayConnectPeerOutput if *v == nil { - sv = &GetTransitGatewayConnectPeerAssociationsOutput{} + sv = &DisassociateTransitGatewayConnectPeerOutput{} } 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 "TransitGatewayConnectPeerAssociations": - if err := awsRestjson1_deserializeDocumentTransitGatewayConnectPeerAssociationList(&sv.TransitGatewayConnectPeerAssociations, value); err != nil { + case "TransitGatewayConnectPeerAssociation": + if err := awsRestjson1_deserializeDocumentTransitGatewayConnectPeerAssociation(&sv.TransitGatewayConnectPeerAssociation, value); err != nil { return err } @@ -5163,14 +5005,14 @@ func awsRestjson1_deserializeOpDocumentGetTransitGatewayConnectPeerAssociationsO return nil } -type awsRestjson1_deserializeOpGetTransitGatewayRegistrations struct { +type awsRestjson1_deserializeOpExecuteCoreNetworkChangeSet struct { } -func (*awsRestjson1_deserializeOpGetTransitGatewayRegistrations) ID() string { +func (*awsRestjson1_deserializeOpExecuteCoreNetworkChangeSet) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetTransitGatewayRegistrations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpExecuteCoreNetworkChangeSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5184,43 +5026,15 @@ func (m *awsRestjson1_deserializeOpGetTransitGatewayRegistrations) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetTransitGatewayRegistrations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorExecuteCoreNetworkChangeSet(response, &metadata) } - output := &GetTransitGatewayRegistrationsOutput{} + output := &ExecuteCoreNetworkChangeSetOutput{} 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_deserializeOpDocumentGetTransitGatewayRegistrationsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetTransitGatewayRegistrations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorExecuteCoreNetworkChangeSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5264,6 +5078,9 @@ func awsRestjson1_deserializeOpErrorGetTransitGatewayRegistrations(response *smi case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -5286,59 +5103,14 @@ func awsRestjson1_deserializeOpErrorGetTransitGatewayRegistrations(response *smi } } -func awsRestjson1_deserializeOpDocumentGetTransitGatewayRegistrationsOutput(v **GetTransitGatewayRegistrationsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetTransitGatewayRegistrationsOutput - if *v == nil { - sv = &GetTransitGatewayRegistrationsOutput{} - } 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 "TransitGatewayRegistrations": - if err := awsRestjson1_deserializeDocumentTransitGatewayRegistrationList(&sv.TransitGatewayRegistrations, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpGetConnectAttachment struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpGetConnectAttachment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetConnectAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5352,9 +5124,9 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetConnectAttachment(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &GetConnectAttachmentOutput{} out.Result = output var buff [1024]byte @@ -5375,7 +5147,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetConnectAttachmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5388,7 +5160,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetConnectAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5454,7 +5226,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetConnectAttachmentOutput(v **GetConnectAttachmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5467,17 +5239,17 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *GetConnectAttachmentOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &GetConnectAttachmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "TagList": - if err := awsRestjson1_deserializeDocumentTagList(&sv.TagList, value); err != nil { + case "ConnectAttachment": + if err := awsRestjson1_deserializeDocumentConnectAttachment(&sv.ConnectAttachment, value); err != nil { return err } @@ -5490,14 +5262,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpRegisterTransitGateway struct { +type awsRestjson1_deserializeOpGetConnections struct { } -func (*awsRestjson1_deserializeOpRegisterTransitGateway) ID() string { +func (*awsRestjson1_deserializeOpGetConnections) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRegisterTransitGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5511,9 +5283,9 @@ func (m *awsRestjson1_deserializeOpRegisterTransitGateway) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRegisterTransitGateway(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetConnections(response, &metadata) } - output := &RegisterTransitGatewayOutput{} + output := &GetConnectionsOutput{} out.Result = output var buff [1024]byte @@ -5534,7 +5306,7 @@ func (m *awsRestjson1_deserializeOpRegisterTransitGateway) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentRegisterTransitGatewayOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetConnectionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5547,7 +5319,7 @@ func (m *awsRestjson1_deserializeOpRegisterTransitGateway) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorRegisterTransitGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5591,9 +5363,6 @@ func awsRestjson1_deserializeOpErrorRegisterTransitGateway(response *smithyhttp. case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -5616,7 +5385,7 @@ func awsRestjson1_deserializeOpErrorRegisterTransitGateway(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentRegisterTransitGatewayOutput(v **RegisterTransitGatewayOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetConnectionsOutput(v **GetConnectionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5629,20 +5398,29 @@ func awsRestjson1_deserializeOpDocumentRegisterTransitGatewayOutput(v **Register return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RegisterTransitGatewayOutput + var sv *GetConnectionsOutput if *v == nil { - sv = &RegisterTransitGatewayOutput{} + sv = &GetConnectionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "TransitGatewayRegistration": - if err := awsRestjson1_deserializeDocumentTransitGatewayRegistration(&sv.TransitGatewayRegistration, value); err != nil { + case "Connections": + if err := awsRestjson1_deserializeDocumentConnectionList(&sv.Connections, value); err != nil { return err } + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -5652,14 +5430,14 @@ func awsRestjson1_deserializeOpDocumentRegisterTransitGatewayOutput(v **Register return nil } -type awsRestjson1_deserializeOpStartRouteAnalysis struct { +type awsRestjson1_deserializeOpGetConnectPeer struct { } -func (*awsRestjson1_deserializeOpStartRouteAnalysis) ID() string { +func (*awsRestjson1_deserializeOpGetConnectPeer) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartRouteAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetConnectPeer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5673,9 +5451,9 @@ func (m *awsRestjson1_deserializeOpStartRouteAnalysis) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartRouteAnalysis(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetConnectPeer(response, &metadata) } - output := &StartRouteAnalysisOutput{} + output := &GetConnectPeerOutput{} out.Result = output var buff [1024]byte @@ -5696,7 +5474,7 @@ func (m *awsRestjson1_deserializeOpStartRouteAnalysis) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartRouteAnalysisOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetConnectPeerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5709,7 +5487,7 @@ func (m *awsRestjson1_deserializeOpStartRouteAnalysis) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartRouteAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetConnectPeer(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5753,9 +5531,6 @@ func awsRestjson1_deserializeOpErrorStartRouteAnalysis(response *smithyhttp.Resp case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -5778,7 +5553,7 @@ func awsRestjson1_deserializeOpErrorStartRouteAnalysis(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentStartRouteAnalysisOutput(v **StartRouteAnalysisOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetConnectPeerOutput(v **GetConnectPeerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5791,17 +5566,17 @@ func awsRestjson1_deserializeOpDocumentStartRouteAnalysisOutput(v **StartRouteAn return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartRouteAnalysisOutput + var sv *GetConnectPeerOutput if *v == nil { - sv = &StartRouteAnalysisOutput{} + sv = &GetConnectPeerOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "RouteAnalysis": - if err := awsRestjson1_deserializeDocumentRouteAnalysis(&sv.RouteAnalysis, value); err != nil { + case "ConnectPeer": + if err := awsRestjson1_deserializeDocumentConnectPeer(&sv.ConnectPeer, value); err != nil { return err } @@ -5814,14 +5589,14 @@ func awsRestjson1_deserializeOpDocumentStartRouteAnalysisOutput(v **StartRouteAn return nil } -type awsRestjson1_deserializeOpTagResource struct { +type awsRestjson1_deserializeOpGetConnectPeerAssociations struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpGetConnectPeerAssociations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetConnectPeerAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5835,15 +5610,43 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetConnectPeerAssociations(response, &metadata) } - output := &TagResourceOutput{} + output := &GetConnectPeerAssociationsOutput{} 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_deserializeOpDocumentGetConnectPeerAssociationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetConnectPeerAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5896,9 +5699,6 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m 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) @@ -5915,112 +5715,59 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -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 +func awsRestjson1_deserializeOpDocumentGetConnectPeerAssociationsOutput(v **GetConnectPeerAssociationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - response, ok := out.RawResponse.(*smithyhttp.Response) + shape, ok := value.(map[string]interface{}) if !ok { - 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 - - 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 - - code := response.Header.Get("X-Amzn-ErrorType") - if len(code) != 0 { - errorCode = restjson.SanitizeErrorCode(code) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - code, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return fmt.Errorf("unexpected JSON type %v", value) } - errorBody.Seek(0, io.SeekStart) - if len(code) != 0 { - errorCode = restjson.SanitizeErrorCode(code) - } - if len(message) != 0 { - errorMessage = message + var sv *GetConnectPeerAssociationsOutput + if *v == nil { + sv = &GetConnectPeerAssociationsOutput{} + } else { + sv = *v } - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + for key, value := range shape { + switch key { + case "ConnectPeerAssociations": + if err := awsRestjson1_deserializeDocumentConnectPeerAssociationList(&sv.ConnectPeerAssociations, value); err != nil { + return err + } - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: + _, _ = key, value - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, } - return genericError - } + *v = sv + return nil } -type awsRestjson1_deserializeOpUpdateConnection struct { +type awsRestjson1_deserializeOpGetCoreNetwork struct { } -func (*awsRestjson1_deserializeOpUpdateConnection) ID() string { +func (*awsRestjson1_deserializeOpGetCoreNetwork) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetCoreNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6034,9 +5781,9 @@ func (m *awsRestjson1_deserializeOpUpdateConnection) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateConnection(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetCoreNetwork(response, &metadata) } - output := &UpdateConnectionOutput{} + output := &GetCoreNetworkOutput{} out.Result = output var buff [1024]byte @@ -6057,7 +5804,7 @@ func (m *awsRestjson1_deserializeOpUpdateConnection) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateConnectionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetCoreNetworkOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6070,7 +5817,7 @@ func (m *awsRestjson1_deserializeOpUpdateConnection) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetCoreNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6114,9 +5861,6 @@ func awsRestjson1_deserializeOpErrorUpdateConnection(response *smithyhttp.Respon case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -6139,7 +5883,7 @@ func awsRestjson1_deserializeOpErrorUpdateConnection(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentUpdateConnectionOutput(v **UpdateConnectionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetCoreNetworkOutput(v **GetCoreNetworkOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6152,17 +5896,17 @@ func awsRestjson1_deserializeOpDocumentUpdateConnectionOutput(v **UpdateConnecti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateConnectionOutput + var sv *GetCoreNetworkOutput if *v == nil { - sv = &UpdateConnectionOutput{} + sv = &GetCoreNetworkOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Connection": - if err := awsRestjson1_deserializeDocumentConnection(&sv.Connection, value); err != nil { + case "CoreNetwork": + if err := awsRestjson1_deserializeDocumentCoreNetwork(&sv.CoreNetwork, value); err != nil { return err } @@ -6175,14 +5919,14 @@ func awsRestjson1_deserializeOpDocumentUpdateConnectionOutput(v **UpdateConnecti return nil } -type awsRestjson1_deserializeOpUpdateDevice struct { +type awsRestjson1_deserializeOpGetCoreNetworkChangeSet struct { } -func (*awsRestjson1_deserializeOpUpdateDevice) ID() string { +func (*awsRestjson1_deserializeOpGetCoreNetworkChangeSet) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetCoreNetworkChangeSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6196,9 +5940,9 @@ func (m *awsRestjson1_deserializeOpUpdateDevice) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateDevice(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetCoreNetworkChangeSet(response, &metadata) } - output := &UpdateDeviceOutput{} + output := &GetCoreNetworkChangeSetOutput{} out.Result = output var buff [1024]byte @@ -6219,7 +5963,7 @@ func (m *awsRestjson1_deserializeOpUpdateDevice) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateDeviceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetCoreNetworkChangeSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6232,7 +5976,7 @@ func (m *awsRestjson1_deserializeOpUpdateDevice) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetCoreNetworkChangeSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6276,9 +6020,6 @@ func awsRestjson1_deserializeOpErrorUpdateDevice(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -6301,7 +6042,7 @@ func awsRestjson1_deserializeOpErrorUpdateDevice(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentUpdateDeviceOutput(v **UpdateDeviceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetCoreNetworkChangeSetOutput(v **GetCoreNetworkChangeSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6314,20 +6055,29 @@ func awsRestjson1_deserializeOpDocumentUpdateDeviceOutput(v **UpdateDeviceOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateDeviceOutput + var sv *GetCoreNetworkChangeSetOutput if *v == nil { - sv = &UpdateDeviceOutput{} + sv = &GetCoreNetworkChangeSetOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Device": - if err := awsRestjson1_deserializeDocumentDevice(&sv.Device, value); err != nil { + case "CoreNetworkChanges": + if err := awsRestjson1_deserializeDocumentCoreNetworkChangeList(&sv.CoreNetworkChanges, value); err != nil { return err } + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -6337,14 +6087,14 @@ func awsRestjson1_deserializeOpDocumentUpdateDeviceOutput(v **UpdateDeviceOutput return nil } -type awsRestjson1_deserializeOpUpdateGlobalNetwork struct { +type awsRestjson1_deserializeOpGetCoreNetworkPolicy struct { } -func (*awsRestjson1_deserializeOpUpdateGlobalNetwork) ID() string { +func (*awsRestjson1_deserializeOpGetCoreNetworkPolicy) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateGlobalNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetCoreNetworkPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6358,9 +6108,9 @@ func (m *awsRestjson1_deserializeOpUpdateGlobalNetwork) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateGlobalNetwork(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetCoreNetworkPolicy(response, &metadata) } - output := &UpdateGlobalNetworkOutput{} + output := &GetCoreNetworkPolicyOutput{} out.Result = output var buff [1024]byte @@ -6381,7 +6131,7 @@ func (m *awsRestjson1_deserializeOpUpdateGlobalNetwork) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateGlobalNetworkOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetCoreNetworkPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6394,7 +6144,7 @@ func (m *awsRestjson1_deserializeOpUpdateGlobalNetwork) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateGlobalNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetCoreNetworkPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6438,9 +6188,6 @@ func awsRestjson1_deserializeOpErrorUpdateGlobalNetwork(response *smithyhttp.Res case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -6463,7 +6210,7 @@ func awsRestjson1_deserializeOpErrorUpdateGlobalNetwork(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentUpdateGlobalNetworkOutput(v **UpdateGlobalNetworkOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetCoreNetworkPolicyOutput(v **GetCoreNetworkPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6476,17 +6223,17 @@ func awsRestjson1_deserializeOpDocumentUpdateGlobalNetworkOutput(v **UpdateGloba return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateGlobalNetworkOutput + var sv *GetCoreNetworkPolicyOutput if *v == nil { - sv = &UpdateGlobalNetworkOutput{} + sv = &GetCoreNetworkPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "GlobalNetwork": - if err := awsRestjson1_deserializeDocumentGlobalNetwork(&sv.GlobalNetwork, value); err != nil { + case "CoreNetworkPolicy": + if err := awsRestjson1_deserializeDocumentCoreNetworkPolicy(&sv.CoreNetworkPolicy, value); err != nil { return err } @@ -6499,14 +6246,14 @@ func awsRestjson1_deserializeOpDocumentUpdateGlobalNetworkOutput(v **UpdateGloba return nil } -type awsRestjson1_deserializeOpUpdateLink struct { +type awsRestjson1_deserializeOpGetCustomerGatewayAssociations struct { } -func (*awsRestjson1_deserializeOpUpdateLink) ID() string { +func (*awsRestjson1_deserializeOpGetCustomerGatewayAssociations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateLink) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetCustomerGatewayAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6520,9 +6267,9 @@ func (m *awsRestjson1_deserializeOpUpdateLink) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateLink(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetCustomerGatewayAssociations(response, &metadata) } - output := &UpdateLinkOutput{} + output := &GetCustomerGatewayAssociationsOutput{} out.Result = output var buff [1024]byte @@ -6543,7 +6290,7 @@ func (m *awsRestjson1_deserializeOpUpdateLink) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateLinkOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetCustomerGatewayAssociationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6556,7 +6303,7 @@ func (m *awsRestjson1_deserializeOpUpdateLink) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateLink(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetCustomerGatewayAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6609,9 +6356,6 @@ func awsRestjson1_deserializeOpErrorUpdateLink(response *smithyhttp.Response, me 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) @@ -6628,7 +6372,7 @@ func awsRestjson1_deserializeOpErrorUpdateLink(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentUpdateLinkOutput(v **UpdateLinkOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetCustomerGatewayAssociationsOutput(v **GetCustomerGatewayAssociationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6641,20 +6385,29 @@ func awsRestjson1_deserializeOpDocumentUpdateLinkOutput(v **UpdateLinkOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateLinkOutput + var sv *GetCustomerGatewayAssociationsOutput if *v == nil { - sv = &UpdateLinkOutput{} + sv = &GetCustomerGatewayAssociationsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Link": - if err := awsRestjson1_deserializeDocumentLink(&sv.Link, value); err != nil { + case "CustomerGatewayAssociations": + if err := awsRestjson1_deserializeDocumentCustomerGatewayAssociationList(&sv.CustomerGatewayAssociations, value); err != nil { return err } + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -6664,14 +6417,14 @@ func awsRestjson1_deserializeOpDocumentUpdateLinkOutput(v **UpdateLinkOutput, va return nil } -type awsRestjson1_deserializeOpUpdateNetworkResourceMetadata struct { +type awsRestjson1_deserializeOpGetDevices struct { } -func (*awsRestjson1_deserializeOpUpdateNetworkResourceMetadata) ID() string { +func (*awsRestjson1_deserializeOpGetDevices) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateNetworkResourceMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetDevices) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6685,9 +6438,9 @@ func (m *awsRestjson1_deserializeOpUpdateNetworkResourceMetadata) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateNetworkResourceMetadata(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetDevices(response, &metadata) } - output := &UpdateNetworkResourceMetadataOutput{} + output := &GetDevicesOutput{} out.Result = output var buff [1024]byte @@ -6708,7 +6461,7 @@ func (m *awsRestjson1_deserializeOpUpdateNetworkResourceMetadata) HandleDeserial return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateNetworkResourceMetadataOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetDevicesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6721,7 +6474,7 @@ func (m *awsRestjson1_deserializeOpUpdateNetworkResourceMetadata) HandleDeserial return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateNetworkResourceMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetDevices(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6765,9 +6518,6 @@ func awsRestjson1_deserializeOpErrorUpdateNetworkResourceMetadata(response *smit case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -6790,7 +6540,7 @@ func awsRestjson1_deserializeOpErrorUpdateNetworkResourceMetadata(response *smit } } -func awsRestjson1_deserializeOpDocumentUpdateNetworkResourceMetadataOutput(v **UpdateNetworkResourceMetadataOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetDevicesOutput(v **GetDevicesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6803,27 +6553,27 @@ func awsRestjson1_deserializeOpDocumentUpdateNetworkResourceMetadataOutput(v **U return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateNetworkResourceMetadataOutput + var sv *GetDevicesOutput if *v == nil { - sv = &UpdateNetworkResourceMetadataOutput{} + sv = &GetDevicesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Metadata": - if err := awsRestjson1_deserializeDocumentNetworkResourceMetadataMap(&sv.Metadata, value); err != nil { + case "Devices": + if err := awsRestjson1_deserializeDocumentDeviceList(&sv.Devices, value); err != nil { return err } - case "ResourceArn": + 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) + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } - sv.ResourceArn = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -6835,14 +6585,14 @@ func awsRestjson1_deserializeOpDocumentUpdateNetworkResourceMetadataOutput(v **U return nil } -type awsRestjson1_deserializeOpUpdateSite struct { +type awsRestjson1_deserializeOpGetLinkAssociations struct { } -func (*awsRestjson1_deserializeOpUpdateSite) ID() string { +func (*awsRestjson1_deserializeOpGetLinkAssociations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetLinkAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6856,9 +6606,9 @@ func (m *awsRestjson1_deserializeOpUpdateSite) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateSite(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetLinkAssociations(response, &metadata) } - output := &UpdateSiteOutput{} + output := &GetLinkAssociationsOutput{} out.Result = output var buff [1024]byte @@ -6879,7 +6629,7 @@ func (m *awsRestjson1_deserializeOpUpdateSite) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateSiteOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetLinkAssociationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6892,7 +6642,7 @@ func (m *awsRestjson1_deserializeOpUpdateSite) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetLinkAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6936,9 +6686,6 @@ func awsRestjson1_deserializeOpErrorUpdateSite(response *smithyhttp.Response, me case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -6961,7 +6708,7 @@ func awsRestjson1_deserializeOpErrorUpdateSite(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentUpdateSiteOutput(v **UpdateSiteOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetLinkAssociationsOutput(v **GetLinkAssociationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6974,20 +6721,29 @@ func awsRestjson1_deserializeOpDocumentUpdateSiteOutput(v **UpdateSiteOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateSiteOutput + var sv *GetLinkAssociationsOutput if *v == nil { - sv = &UpdateSiteOutput{} + sv = &GetLinkAssociationsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Site": - if err := awsRestjson1_deserializeDocumentSite(&sv.Site, value); err != nil { + case "LinkAssociations": + if err := awsRestjson1_deserializeDocumentLinkAssociationList(&sv.LinkAssociations, value); err != nil { return err } + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -6997,44 +6753,37 @@ func awsRestjson1_deserializeOpDocumentUpdateSiteOutput(v **UpdateSiteOutput, va return nil } -func awsRestjson1_deserializeOpHttpBindingsInternalServerException(v *types.InternalServerException, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } +type awsRestjson1_deserializeOpGetLinks struct { +} - if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - vv, err := strconv.ParseInt(headerValues[0], 0, 32) - if err != nil { - return err - } - v.RetryAfterSeconds = ptr.Int32(int32(vv)) +func (*awsRestjson1_deserializeOpGetLinks) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetLinks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err } - return nil -} -func awsRestjson1_deserializeOpHttpBindingsThrottlingException(v *types.ThrottlingException, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } - if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - vv, err := strconv.ParseInt(headerValues[0], 0, 32) - if err != nil { - return err - } - v.RetryAfterSeconds = ptr.Int32(int32(vv)) + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetLinks(response, &metadata) } + output := &GetLinksOutput{} + out.Result = output - 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) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -7045,36 +6794,45 @@ func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentGetLinksOutput(&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), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + return out, metadata, err } -func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ConflictException{} +func awsRestjson1_deserializeOpErrorGetLinks(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -7084,69 +6842,116 @@ func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Respons return err } - err := awsRestjson1_deserializeDocumentConflictException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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 err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) +func awsRestjson1_deserializeOpDocumentGetLinksOutput(v **GetLinksOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - return output -} + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } -func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServerException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + var sv *GetLinksOutput + if *v == nil { + sv = &GetLinksOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Links": + if err := awsRestjson1_deserializeDocumentLinkList(&sv.Links, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value - 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 } + *v = sv + return nil +} - err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) +type awsRestjson1_deserializeOpGetNetworkResourceCounts struct { +} + +func (*awsRestjson1_deserializeOpGetNetworkResourceCounts) ID() string { + return "OperationDeserializer" +} +func (m *awsRestjson1_deserializeOpGetNetworkResourceCounts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - - if err := awsRestjson1_deserializeOpHttpBindingsInternalServerException(output, response); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response error with invalid HTTP bindings, %w", err)} + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } - return output -} + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetNetworkResourceCounts(response, &metadata) + } + output := &GetNetworkResourceCountsOutput{} + out.Result = 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) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -7157,47 +6962,44 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentGetNetworkResourceCountsOutput(&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), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + return out, metadata, err } -func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ServiceQuotaExceededException{} +func awsRestjson1_deserializeOpErrorGetNetworkResourceCounts(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - 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) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7209,16 +7011,112 @@ func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithy } errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - return output + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ThrottlingException{} +func awsRestjson1_deserializeOpDocumentGetNetworkResourceCountsOutput(v **GetNetworkResourceCountsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetNetworkResourceCountsOutput + if *v == nil { + sv = &GetNetworkResourceCountsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NetworkResourceCounts": + if err := awsRestjson1_deserializeDocumentNetworkResourceCountList(&sv.NetworkResourceCounts, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetNetworkResourceRelationships struct { +} + +func (*awsRestjson1_deserializeOpGetNetworkResourceRelationships) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetNetworkResourceRelationships) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetNetworkResourceRelationships(response, &metadata) + } + output := &GetNetworkResourceRelationshipsOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -7229,51 +7127,44 @@ func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Respo Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentGetNetworkResourceRelationshipsOutput(&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), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) + return out, metadata, err +} - if err := awsRestjson1_deserializeOpHttpBindingsThrottlingException(output, response); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response error with invalid HTTP bindings, %w", err)} +func awsRestjson1_deserializeOpErrorGetNetworkResourceRelationships(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } + errorBody := bytes.NewReader(errorBuffer.Bytes()) - return output -} + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } -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) - + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7285,11 +7176,40 @@ func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Respo } errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - return output + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetNetworkResourceRelationshipsOutput(v **GetNetworkResourceRelationshipsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7302,22 +7222,27 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessDeniedException + var sv *GetNetworkResourceRelationshipsOutput if *v == nil { - sv = &types.AccessDeniedException{} + sv = &GetNetworkResourceRelationshipsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": + 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) + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) + } + + case "Relationships": + if err := awsRestjson1_deserializeDocumentRelationshipList(&sv.Relationships, value); err != nil { + return err } default: @@ -7329,44 +7254,7158 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } -func awsRestjson1_deserializeDocumentAWSLocation(v **types.AWSLocation, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil +type awsRestjson1_deserializeOpGetNetworkResources struct { +} + +func (*awsRestjson1_deserializeOpGetNetworkResources) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetNetworkResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err } - shape, ok := value.(map[string]interface{}) + response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { - return fmt.Errorf("unexpected JSON type %v", value) + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } - var sv *types.AWSLocation - if *v == nil { - sv = &types.AWSLocation{} - } else { - sv = *v + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetNetworkResources(response, &metadata) } + output := &GetNetworkResourcesOutput{} + out.Result = output - for key, value := range shape { - switch key { - case "SubnetArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.SubnetArn = ptr.String(jtv) + 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_deserializeOpDocumentGetNetworkResourcesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetNetworkResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentGetNetworkResourcesOutput(v **GetNetworkResourcesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetNetworkResourcesOutput + if *v == nil { + sv = &GetNetworkResourcesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NetworkResources": + if err := awsRestjson1_deserializeDocumentNetworkResourceList(&sv.NetworkResources, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetNetworkRoutes struct { +} + +func (*awsRestjson1_deserializeOpGetNetworkRoutes) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetNetworkRoutes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetNetworkRoutes(response, &metadata) + } + output := &GetNetworkRoutesOutput{} + 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_deserializeOpDocumentGetNetworkRoutesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetNetworkRoutes(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentGetNetworkRoutesOutput(v **GetNetworkRoutesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetNetworkRoutesOutput + if *v == nil { + sv = &GetNetworkRoutesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CoreNetworkSegmentEdge": + if err := awsRestjson1_deserializeDocumentCoreNetworkSegmentEdgeIdentifier(&sv.CoreNetworkSegmentEdge, value); err != nil { + return err + } + + case "NetworkRoutes": + if err := awsRestjson1_deserializeDocumentNetworkRouteList(&sv.NetworkRoutes, value); err != nil { + return err + } + + case "RouteTableArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.RouteTableArn = ptr.String(jtv) + } + + case "RouteTableTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RouteTableTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "RouteTableType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RouteTableType to be of type string, got %T instead", value) + } + sv.RouteTableType = types.RouteTableType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetNetworkTelemetry struct { +} + +func (*awsRestjson1_deserializeOpGetNetworkTelemetry) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetNetworkTelemetry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetNetworkTelemetry(response, &metadata) + } + output := &GetNetworkTelemetryOutput{} + 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_deserializeOpDocumentGetNetworkTelemetryOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetNetworkTelemetry(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentGetNetworkTelemetryOutput(v **GetNetworkTelemetryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetNetworkTelemetryOutput + if *v == nil { + sv = &GetNetworkTelemetryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NetworkTelemetry": + if err := awsRestjson1_deserializeDocumentNetworkTelemetryList(&sv.NetworkTelemetry, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetResourcePolicy struct { +} + +func (*awsRestjson1_deserializeOpGetResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetResourcePolicy(response, &metadata) + } + output := &GetResourcePolicyOutput{} + 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_deserializeOpDocumentGetResourcePolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentGetResourcePolicyOutput(v **GetResourcePolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetResourcePolicyOutput + if *v == nil { + sv = &GetResourcePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PolicyDocument": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SynthesizedJsonResourcePolicyDocument to be of type string, got %T instead", value) + } + sv.PolicyDocument = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetRouteAnalysis struct { +} + +func (*awsRestjson1_deserializeOpGetRouteAnalysis) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetRouteAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetRouteAnalysis(response, &metadata) + } + output := &GetRouteAnalysisOutput{} + 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_deserializeOpDocumentGetRouteAnalysisOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetRouteAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentGetRouteAnalysisOutput(v **GetRouteAnalysisOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetRouteAnalysisOutput + if *v == nil { + sv = &GetRouteAnalysisOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RouteAnalysis": + if err := awsRestjson1_deserializeDocumentRouteAnalysis(&sv.RouteAnalysis, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetSites struct { +} + +func (*awsRestjson1_deserializeOpGetSites) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetSites) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetSites(response, &metadata) + } + output := &GetSitesOutput{} + 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_deserializeOpDocumentGetSitesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetSites(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentGetSitesOutput(v **GetSitesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetSitesOutput + if *v == nil { + sv = &GetSitesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Sites": + if err := awsRestjson1_deserializeDocumentSiteList(&sv.Sites, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetSiteToSiteVpnAttachment struct { +} + +func (*awsRestjson1_deserializeOpGetSiteToSiteVpnAttachment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetSiteToSiteVpnAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetSiteToSiteVpnAttachment(response, &metadata) + } + output := &GetSiteToSiteVpnAttachmentOutput{} + 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_deserializeOpDocumentGetSiteToSiteVpnAttachmentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetSiteToSiteVpnAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentGetSiteToSiteVpnAttachmentOutput(v **GetSiteToSiteVpnAttachmentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetSiteToSiteVpnAttachmentOutput + if *v == nil { + sv = &GetSiteToSiteVpnAttachmentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SiteToSiteVpnAttachment": + if err := awsRestjson1_deserializeDocumentSiteToSiteVpnAttachment(&sv.SiteToSiteVpnAttachment, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetTransitGatewayConnectPeerAssociations struct { +} + +func (*awsRestjson1_deserializeOpGetTransitGatewayConnectPeerAssociations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetTransitGatewayConnectPeerAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetTransitGatewayConnectPeerAssociations(response, &metadata) + } + output := &GetTransitGatewayConnectPeerAssociationsOutput{} + 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_deserializeOpDocumentGetTransitGatewayConnectPeerAssociationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetTransitGatewayConnectPeerAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentGetTransitGatewayConnectPeerAssociationsOutput(v **GetTransitGatewayConnectPeerAssociationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetTransitGatewayConnectPeerAssociationsOutput + if *v == nil { + sv = &GetTransitGatewayConnectPeerAssociationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "TransitGatewayConnectPeerAssociations": + if err := awsRestjson1_deserializeDocumentTransitGatewayConnectPeerAssociationList(&sv.TransitGatewayConnectPeerAssociations, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetTransitGatewayRegistrations struct { +} + +func (*awsRestjson1_deserializeOpGetTransitGatewayRegistrations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetTransitGatewayRegistrations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetTransitGatewayRegistrations(response, &metadata) + } + output := &GetTransitGatewayRegistrationsOutput{} + 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_deserializeOpDocumentGetTransitGatewayRegistrationsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetTransitGatewayRegistrations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentGetTransitGatewayRegistrationsOutput(v **GetTransitGatewayRegistrationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetTransitGatewayRegistrationsOutput + if *v == nil { + sv = &GetTransitGatewayRegistrationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "TransitGatewayRegistrations": + if err := awsRestjson1_deserializeDocumentTransitGatewayRegistrationList(&sv.TransitGatewayRegistrations, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetVpcAttachment struct { +} + +func (*awsRestjson1_deserializeOpGetVpcAttachment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetVpcAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetVpcAttachment(response, &metadata) + } + output := &GetVpcAttachmentOutput{} + 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_deserializeOpDocumentGetVpcAttachmentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetVpcAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentGetVpcAttachmentOutput(v **GetVpcAttachmentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetVpcAttachmentOutput + if *v == nil { + sv = &GetVpcAttachmentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "VpcAttachment": + if err := awsRestjson1_deserializeDocumentVpcAttachment(&sv.VpcAttachment, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListAttachments struct { +} + +func (*awsRestjson1_deserializeOpListAttachments) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListAttachments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListAttachments(response, &metadata) + } + output := &ListAttachmentsOutput{} + 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_deserializeOpDocumentListAttachmentsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListAttachments(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentListAttachmentsOutput(v **ListAttachmentsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListAttachmentsOutput + if *v == nil { + sv = &ListAttachmentsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Attachments": + if err := awsRestjson1_deserializeDocumentAttachmentList(&sv.Attachments, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListConnectPeers struct { +} + +func (*awsRestjson1_deserializeOpListConnectPeers) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListConnectPeers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListConnectPeers(response, &metadata) + } + output := &ListConnectPeersOutput{} + 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_deserializeOpDocumentListConnectPeersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListConnectPeers(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentListConnectPeersOutput(v **ListConnectPeersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListConnectPeersOutput + if *v == nil { + sv = &ListConnectPeersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConnectPeers": + if err := awsRestjson1_deserializeDocumentConnectPeerSummaryList(&sv.ConnectPeers, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListCoreNetworkPolicyVersions struct { +} + +func (*awsRestjson1_deserializeOpListCoreNetworkPolicyVersions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListCoreNetworkPolicyVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListCoreNetworkPolicyVersions(response, &metadata) + } + output := &ListCoreNetworkPolicyVersionsOutput{} + 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_deserializeOpDocumentListCoreNetworkPolicyVersionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListCoreNetworkPolicyVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentListCoreNetworkPolicyVersionsOutput(v **ListCoreNetworkPolicyVersionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListCoreNetworkPolicyVersionsOutput + if *v == nil { + sv = &ListCoreNetworkPolicyVersionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CoreNetworkPolicyVersions": + if err := awsRestjson1_deserializeDocumentCoreNetworkPolicyVersionList(&sv.CoreNetworkPolicyVersions, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListCoreNetworks struct { +} + +func (*awsRestjson1_deserializeOpListCoreNetworks) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListCoreNetworks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListCoreNetworks(response, &metadata) + } + output := &ListCoreNetworksOutput{} + 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_deserializeOpDocumentListCoreNetworksOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListCoreNetworks(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentListCoreNetworksOutput(v **ListCoreNetworksOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListCoreNetworksOutput + if *v == nil { + sv = &ListCoreNetworksOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CoreNetworks": + if err := awsRestjson1_deserializeDocumentCoreNetworkSummaryList(&sv.CoreNetworks, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +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 + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + 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(), + } + } + + 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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_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 "TagList": + if err := awsRestjson1_deserializeDocumentTagList(&sv.TagList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutCoreNetworkPolicy struct { +} + +func (*awsRestjson1_deserializeOpPutCoreNetworkPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutCoreNetworkPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorPutCoreNetworkPolicy(response, &metadata) + } + output := &PutCoreNetworkPolicyOutput{} + 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_deserializeOpDocumentPutCoreNetworkPolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutCoreNetworkPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("CoreNetworkPolicyException", errorCode): + return awsRestjson1_deserializeErrorCoreNetworkPolicyException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentPutCoreNetworkPolicyOutput(v **PutCoreNetworkPolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutCoreNetworkPolicyOutput + if *v == nil { + sv = &PutCoreNetworkPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CoreNetworkPolicy": + if err := awsRestjson1_deserializeDocumentCoreNetworkPolicy(&sv.CoreNetworkPolicy, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutResourcePolicy struct { +} + +func (*awsRestjson1_deserializeOpPutResourcePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorPutResourcePolicy(response, &metadata) + } + output := &PutResourcePolicyOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpRegisterTransitGateway struct { +} + +func (*awsRestjson1_deserializeOpRegisterTransitGateway) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRegisterTransitGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorRegisterTransitGateway(response, &metadata) + } + output := &RegisterTransitGatewayOutput{} + 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_deserializeOpDocumentRegisterTransitGatewayOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorRegisterTransitGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentRegisterTransitGatewayOutput(v **RegisterTransitGatewayOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RegisterTransitGatewayOutput + if *v == nil { + sv = &RegisterTransitGatewayOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "TransitGatewayRegistration": + if err := awsRestjson1_deserializeDocumentTransitGatewayRegistration(&sv.TransitGatewayRegistration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpRejectAttachment struct { +} + +func (*awsRestjson1_deserializeOpRejectAttachment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRejectAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorRejectAttachment(response, &metadata) + } + output := &RejectAttachmentOutput{} + 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_deserializeOpDocumentRejectAttachmentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorRejectAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentRejectAttachmentOutput(v **RejectAttachmentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RejectAttachmentOutput + if *v == nil { + sv = &RejectAttachmentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Attachment": + if err := awsRestjson1_deserializeDocumentAttachment(&sv.Attachment, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpRestoreCoreNetworkPolicyVersion struct { +} + +func (*awsRestjson1_deserializeOpRestoreCoreNetworkPolicyVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRestoreCoreNetworkPolicyVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorRestoreCoreNetworkPolicyVersion(response, &metadata) + } + output := &RestoreCoreNetworkPolicyVersionOutput{} + 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_deserializeOpDocumentRestoreCoreNetworkPolicyVersionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorRestoreCoreNetworkPolicyVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentRestoreCoreNetworkPolicyVersionOutput(v **RestoreCoreNetworkPolicyVersionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RestoreCoreNetworkPolicyVersionOutput + if *v == nil { + sv = &RestoreCoreNetworkPolicyVersionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CoreNetworkPolicy": + if err := awsRestjson1_deserializeDocumentCoreNetworkPolicy(&sv.CoreNetworkPolicy, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpStartRouteAnalysis struct { +} + +func (*awsRestjson1_deserializeOpStartRouteAnalysis) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStartRouteAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorStartRouteAnalysis(response, &metadata) + } + output := &StartRouteAnalysisOutput{} + 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_deserializeOpDocumentStartRouteAnalysisOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStartRouteAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentStartRouteAnalysisOutput(v **StartRouteAnalysisOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartRouteAnalysisOutput + if *v == nil { + sv = &StartRouteAnalysisOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RouteAnalysis": + if err := awsRestjson1_deserializeDocumentRouteAnalysis(&sv.RouteAnalysis, 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 + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + 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 + + 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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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 + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + 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 + + 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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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 + + } +} + +type awsRestjson1_deserializeOpUpdateConnection struct { +} + +func (*awsRestjson1_deserializeOpUpdateConnection) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateConnection(response, &metadata) + } + output := &UpdateConnectionOutput{} + 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_deserializeOpDocumentUpdateConnectionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentUpdateConnectionOutput(v **UpdateConnectionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateConnectionOutput + if *v == nil { + sv = &UpdateConnectionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Connection": + if err := awsRestjson1_deserializeDocumentConnection(&sv.Connection, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateCoreNetwork struct { +} + +func (*awsRestjson1_deserializeOpUpdateCoreNetwork) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateCoreNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateCoreNetwork(response, &metadata) + } + output := &UpdateCoreNetworkOutput{} + 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_deserializeOpDocumentUpdateCoreNetworkOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateCoreNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentUpdateCoreNetworkOutput(v **UpdateCoreNetworkOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateCoreNetworkOutput + if *v == nil { + sv = &UpdateCoreNetworkOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CoreNetwork": + if err := awsRestjson1_deserializeDocumentCoreNetwork(&sv.CoreNetwork, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateDevice struct { +} + +func (*awsRestjson1_deserializeOpUpdateDevice) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateDevice(response, &metadata) + } + output := &UpdateDeviceOutput{} + 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_deserializeOpDocumentUpdateDeviceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentUpdateDeviceOutput(v **UpdateDeviceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateDeviceOutput + if *v == nil { + sv = &UpdateDeviceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Device": + if err := awsRestjson1_deserializeDocumentDevice(&sv.Device, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateGlobalNetwork struct { +} + +func (*awsRestjson1_deserializeOpUpdateGlobalNetwork) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateGlobalNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateGlobalNetwork(response, &metadata) + } + output := &UpdateGlobalNetworkOutput{} + 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_deserializeOpDocumentUpdateGlobalNetworkOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateGlobalNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentUpdateGlobalNetworkOutput(v **UpdateGlobalNetworkOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateGlobalNetworkOutput + if *v == nil { + sv = &UpdateGlobalNetworkOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "GlobalNetwork": + if err := awsRestjson1_deserializeDocumentGlobalNetwork(&sv.GlobalNetwork, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateLink struct { +} + +func (*awsRestjson1_deserializeOpUpdateLink) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateLink) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateLink(response, &metadata) + } + output := &UpdateLinkOutput{} + 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_deserializeOpDocumentUpdateLinkOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateLink(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentUpdateLinkOutput(v **UpdateLinkOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateLinkOutput + if *v == nil { + sv = &UpdateLinkOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Link": + if err := awsRestjson1_deserializeDocumentLink(&sv.Link, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateNetworkResourceMetadata struct { +} + +func (*awsRestjson1_deserializeOpUpdateNetworkResourceMetadata) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateNetworkResourceMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateNetworkResourceMetadata(response, &metadata) + } + output := &UpdateNetworkResourceMetadataOutput{} + 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_deserializeOpDocumentUpdateNetworkResourceMetadataOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateNetworkResourceMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentUpdateNetworkResourceMetadataOutput(v **UpdateNetworkResourceMetadataOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateNetworkResourceMetadataOutput + if *v == nil { + sv = &UpdateNetworkResourceMetadataOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Metadata": + if err := awsRestjson1_deserializeDocumentNetworkResourceMetadataMap(&sv.Metadata, value); err != nil { + return err + } + + case "ResourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.ResourceArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateSite struct { +} + +func (*awsRestjson1_deserializeOpUpdateSite) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateSite) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateSite(response, &metadata) + } + output := &UpdateSiteOutput{} + 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_deserializeOpDocumentUpdateSiteOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateSite(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentUpdateSiteOutput(v **UpdateSiteOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateSiteOutput + if *v == nil { + sv = &UpdateSiteOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Site": + if err := awsRestjson1_deserializeDocumentSite(&sv.Site, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateVpcAttachment struct { +} + +func (*awsRestjson1_deserializeOpUpdateVpcAttachment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateVpcAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateVpcAttachment(response, &metadata) + } + output := &UpdateVpcAttachmentOutput{} + 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_deserializeOpDocumentUpdateVpcAttachmentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateVpcAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(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_deserializeOpDocumentUpdateVpcAttachmentOutput(v **UpdateVpcAttachmentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateVpcAttachmentOutput + if *v == nil { + sv = &UpdateVpcAttachmentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "VpcAttachment": + if err := awsRestjson1_deserializeDocumentVpcAttachment(&sv.VpcAttachment, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeOpHttpBindingsInternalServerException(v *types.InternalServerException, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseInt(headerValues[0], 0, 32) + if err != nil { + return err + } + v.RetryAfterSeconds = ptr.Int32(int32(vv)) + } + + return nil +} +func awsRestjson1_deserializeOpHttpBindingsThrottlingException(v *types.ThrottlingException, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseInt(headerValues[0], 0, 32) + if err != nil { + return err + } + v.RetryAfterSeconds = ptr.Int32(int32(vv)) + } + + 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_deserializeErrorCoreNetworkPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CoreNetworkPolicyException{} + 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_deserializeDocumentCoreNetworkPolicyException(&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_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + 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_deserializeDocumentInternalServerException(&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) + + if err := awsRestjson1_deserializeOpHttpBindingsInternalServerException(output, response); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response error with invalid HTTP bindings, %w", err)} + } + + 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) + + if err := awsRestjson1_deserializeOpHttpBindingsThrottlingException(output, response); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response error with invalid HTTP bindings, %w", err)} + } + + 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 "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAttachment(v **types.Attachment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Attachment + if *v == nil { + sv = &types.Attachment{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AttachmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachmentId to be of type string, got %T instead", value) + } + sv.AttachmentId = ptr.String(jtv) + } + + case "AttachmentPolicyRuleNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AttachmentPolicyRuleNumber = ptr.Int32(int32(i64)) + } + + case "AttachmentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachmentType to be of type string, got %T instead", value) + } + sv.AttachmentType = types.AttachmentType(jtv) + } + + case "CoreNetworkArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CoreNetworkArn to be of type string, got %T instead", value) + } + sv.CoreNetworkArn = ptr.String(jtv) + } + + case "CoreNetworkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CoreNetworkId to be of type string, got %T instead", value) + } + sv.CoreNetworkId = ptr.String(jtv) + } + + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "EdgeLocation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExternalRegionCode to be of type string, got %T instead", value) + } + sv.EdgeLocation = ptr.String(jtv) + } + + case "OwnerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AWSAccountId to be of type string, got %T instead", value) + } + sv.OwnerAccountId = ptr.String(jtv) + } + + case "ProposedSegmentChange": + if err := awsRestjson1_deserializeDocumentProposedSegmentChange(&sv.ProposedSegmentChange, value); err != nil { + return err + } + + case "ResourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) + } + sv.ResourceArn = ptr.String(jtv) + } + + case "SegmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) + } + sv.SegmentName = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachmentState to be of type string, got %T instead", value) + } + sv.State = types.AttachmentState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + case "UpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAttachmentList(v *[]types.Attachment, 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.Attachment + if *v == nil { + cv = []types.Attachment{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Attachment + destAddr := &col + if err := awsRestjson1_deserializeDocumentAttachment(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAWSLocation(v **types.AWSLocation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AWSLocation + if *v == nil { + sv = &types.AWSLocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SubnetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubnetArn to be of type string, got %T instead", value) + } + sv.SubnetArn = ptr.String(jtv) + } + + case "Zone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) + } + sv.Zone = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBandwidth(v **types.Bandwidth, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Bandwidth + if *v == nil { + sv = &types.Bandwidth{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DownloadSpeed": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DownloadSpeed = ptr.Int32(int32(i64)) + } + + case "UploadSpeed": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.UploadSpeed = ptr.Int32(int32(i64)) + } + + 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 "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "ResourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConnectAttachment(v **types.ConnectAttachment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConnectAttachment + if *v == nil { + sv = &types.ConnectAttachment{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Attachment": + if err := awsRestjson1_deserializeDocumentAttachment(&sv.Attachment, value); err != nil { + return err + } + + case "Options": + if err := awsRestjson1_deserializeDocumentConnectAttachmentOptions(&sv.Options, value); err != nil { + return err + } + + case "TransportAttachmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachmentId to be of type string, got %T instead", value) + } + sv.TransportAttachmentId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConnectAttachmentOptions(v **types.ConnectAttachmentOptions, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConnectAttachmentOptions + if *v == nil { + sv = &types.ConnectAttachmentOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Protocol": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TunnelProtocol to be of type string, got %T instead", value) + } + sv.Protocol = types.TunnelProtocol(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConnection(v **types.Connection, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.Connection + if *v == nil { + sv = &types.Connection{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConnectedDeviceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeviceId to be of type string, got %T instead", value) + } + sv.ConnectedDeviceId = ptr.String(jtv) + } + + case "ConnectedLinkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LinkId to be of type string, got %T instead", value) + } + sv.ConnectedLinkId = ptr.String(jtv) + } + + case "ConnectionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectionArn to be of type string, got %T instead", value) + } + sv.ConnectionArn = ptr.String(jtv) + } + + case "ConnectionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value) + } + sv.ConnectionId = ptr.String(jtv) + } + + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "DeviceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeviceId to be of type string, got %T instead", value) + } + sv.DeviceId = ptr.String(jtv) + } + + case "GlobalNetworkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GlobalNetworkId to be of type string, got %T instead", value) + } + sv.GlobalNetworkId = ptr.String(jtv) + } + + case "LinkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LinkId to be of type string, got %T instead", value) + } + sv.LinkId = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectionState to be of type string, got %T instead", value) + } + sv.State = types.ConnectionState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConnectionHealth(v **types.ConnectionHealth, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConnectionHealth + if *v == nil { + sv = &types.ConnectionHealth{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectionStatus to be of type string, got %T instead", value) + } + sv.Status = types.ConnectionStatus(jtv) + } + + case "Timestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Timestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectionType to be of type string, got %T instead", value) + } + sv.Type = types.ConnectionType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConnectionList(v *[]types.Connection, 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.Connection + if *v == nil { + cv = []types.Connection{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Connection + destAddr := &col + if err := awsRestjson1_deserializeDocumentConnection(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConnectPeer(v **types.ConnectPeer, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConnectPeer + if *v == nil { + sv = &types.ConnectPeer{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Configuration": + if err := awsRestjson1_deserializeDocumentConnectPeerConfiguration(&sv.Configuration, value); err != nil { + return err + } + + case "ConnectAttachmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachmentId to be of type string, got %T instead", value) + } + sv.ConnectAttachmentId = ptr.String(jtv) + } + + case "ConnectPeerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectPeerId to be of type string, got %T instead", value) + } + sv.ConnectPeerId = ptr.String(jtv) + } + + case "CoreNetworkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CoreNetworkId to be of type string, got %T instead", value) + } + sv.CoreNetworkId = ptr.String(jtv) + } + + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "EdgeLocation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExternalRegionCode to be of type string, got %T instead", value) + } + sv.EdgeLocation = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectPeerState to be of type string, got %T instead", value) + } + sv.State = types.ConnectPeerState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConnectPeerAssociation(v **types.ConnectPeerAssociation, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConnectPeerAssociation + if *v == nil { + sv = &types.ConnectPeerAssociation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConnectPeerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectPeerId to be of type string, got %T instead", value) + } + sv.ConnectPeerId = ptr.String(jtv) + } + + case "DeviceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeviceId to be of type string, got %T instead", value) + } + sv.DeviceId = ptr.String(jtv) + } + + case "GlobalNetworkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GlobalNetworkId to be of type string, got %T instead", value) + } + sv.GlobalNetworkId = ptr.String(jtv) + } + + case "LinkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LinkId to be of type string, got %T instead", value) + } + sv.LinkId = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectPeerAssociationState to be of type string, got %T instead", value) + } + sv.State = types.ConnectPeerAssociationState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConnectPeerAssociationList(v *[]types.ConnectPeerAssociation, 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.ConnectPeerAssociation + if *v == nil { + cv = []types.ConnectPeerAssociation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ConnectPeerAssociation + destAddr := &col + if err := awsRestjson1_deserializeDocumentConnectPeerAssociation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConnectPeerBgpConfiguration(v **types.ConnectPeerBgpConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConnectPeerBgpConfiguration + if *v == nil { + sv = &types.ConnectPeerBgpConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CoreNetworkAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IPAddress to be of type string, got %T instead", value) + } + sv.CoreNetworkAddress = ptr.String(jtv) + } + + case "CoreNetworkAsn": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CoreNetworkAsn = ptr.Int64(i64) + } + + case "PeerAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IPAddress to be of type string, got %T instead", value) + } + sv.PeerAddress = ptr.String(jtv) + } + + case "PeerAsn": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PeerAsn = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConnectPeerBgpConfigurationList(v *[]types.ConnectPeerBgpConfiguration, 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.ConnectPeerBgpConfiguration + if *v == nil { + cv = []types.ConnectPeerBgpConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ConnectPeerBgpConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentConnectPeerBgpConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConnectPeerConfiguration(v **types.ConnectPeerConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConnectPeerConfiguration + if *v == nil { + sv = &types.ConnectPeerConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BgpConfigurations": + if err := awsRestjson1_deserializeDocumentConnectPeerBgpConfigurationList(&sv.BgpConfigurations, value); err != nil { + return err + } + + case "CoreNetworkAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IPAddress to be of type string, got %T instead", value) + } + sv.CoreNetworkAddress = ptr.String(jtv) + } + + case "InsideCidrBlocks": + if err := awsRestjson1_deserializeDocumentConstrainedStringList(&sv.InsideCidrBlocks, value); err != nil { + return err + } + + case "PeerAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IPAddress to be of type string, got %T instead", value) + } + sv.PeerAddress = ptr.String(jtv) + } + + case "Protocol": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TunnelProtocol to be of type string, got %T instead", value) + } + sv.Protocol = types.TunnelProtocol(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConnectPeerSummary(v **types.ConnectPeerSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConnectPeerSummary + if *v == nil { + sv = &types.ConnectPeerSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConnectAttachmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachmentId to be of type string, got %T instead", value) + } + sv.ConnectAttachmentId = ptr.String(jtv) + } + + case "ConnectPeerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectPeerId to be of type string, got %T instead", value) + } + sv.ConnectPeerId = ptr.String(jtv) + } + + case "ConnectPeerState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectPeerState to be of type string, got %T instead", value) + } + sv.ConnectPeerState = types.ConnectPeerState(jtv) + } + + case "CoreNetworkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CoreNetworkId to be of type string, got %T instead", value) + } + sv.CoreNetworkId = ptr.String(jtv) + } + + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "EdgeLocation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExternalRegionCode to be of type string, got %T instead", value) + } + sv.EdgeLocation = ptr.String(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConnectPeerSummaryList(v *[]types.ConnectPeerSummary, 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.ConnectPeerSummary + if *v == nil { + cv = []types.ConnectPeerSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ConnectPeerSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentConnectPeerSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConstrainedStringList(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 ConstrainedString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCoreNetwork(v **types.CoreNetwork, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CoreNetwork + if *v == nil { + sv = &types.CoreNetwork{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CoreNetworkArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CoreNetworkArn to be of type string, got %T instead", value) + } + sv.CoreNetworkArn = ptr.String(jtv) + } + + case "CoreNetworkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CoreNetworkId to be of type string, got %T instead", value) + } + sv.CoreNetworkId = ptr.String(jtv) + } + + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "Edges": + if err := awsRestjson1_deserializeDocumentCoreNetworkEdgeList(&sv.Edges, value); err != nil { + return err + } + + case "GlobalNetworkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GlobalNetworkId to be of type string, got %T instead", value) + } + sv.GlobalNetworkId = ptr.String(jtv) + } + + case "Segments": + if err := awsRestjson1_deserializeDocumentCoreNetworkSegmentList(&sv.Segments, value); err != nil { + return err + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CoreNetworkState to be of type string, got %T instead", value) + } + sv.State = types.CoreNetworkState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCoreNetworkChange(v **types.CoreNetworkChange, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CoreNetworkChange + if *v == nil { + sv = &types.CoreNetworkChange{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Action": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangeAction to be of type string, got %T instead", value) + } + sv.Action = types.ChangeAction(jtv) + } + + case "Identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + case "NewValues": + if err := awsRestjson1_deserializeDocumentCoreNetworkChangeValues(&sv.NewValues, value); err != nil { + return err + } + + case "PreviousValues": + if err := awsRestjson1_deserializeDocumentCoreNetworkChangeValues(&sv.PreviousValues, value); err != nil { + return err + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangeType to be of type string, got %T instead", value) + } + sv.Type = types.ChangeType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCoreNetworkChangeList(v *[]types.CoreNetworkChange, 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.CoreNetworkChange + if *v == nil { + cv = []types.CoreNetworkChange{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CoreNetworkChange + destAddr := &col + if err := awsRestjson1_deserializeDocumentCoreNetworkChange(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCoreNetworkChangeValues(v **types.CoreNetworkChangeValues, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CoreNetworkChangeValues + if *v == nil { + sv = &types.CoreNetworkChangeValues{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Asn": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Asn = ptr.Int64(i64) + } + + case "Cidr": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) + } + sv.Cidr = ptr.String(jtv) + } + + case "DestinationIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) + } + sv.DestinationIdentifier = ptr.String(jtv) + } + + case "EdgeLocations": + if err := awsRestjson1_deserializeDocumentExternalRegionCodeList(&sv.EdgeLocations, value); err != nil { + return err + } + + case "InsideCidrBlocks": + if err := awsRestjson1_deserializeDocumentConstrainedStringList(&sv.InsideCidrBlocks, value); err != nil { + return err + } + + case "SegmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) + } + sv.SegmentName = ptr.String(jtv) + } + + case "SharedSegments": + if err := awsRestjson1_deserializeDocumentConstrainedStringList(&sv.SharedSegments, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCoreNetworkEdge(v **types.CoreNetworkEdge, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CoreNetworkEdge + if *v == nil { + sv = &types.CoreNetworkEdge{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Asn": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Asn = ptr.Int64(i64) + } + + case "EdgeLocation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExternalRegionCode to be of type string, got %T instead", value) + } + sv.EdgeLocation = ptr.String(jtv) + } + + case "InsideCidrBlocks": + if err := awsRestjson1_deserializeDocumentConstrainedStringList(&sv.InsideCidrBlocks, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCoreNetworkEdgeList(v *[]types.CoreNetworkEdge, 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.CoreNetworkEdge + if *v == nil { + cv = []types.CoreNetworkEdge{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CoreNetworkEdge + destAddr := &col + if err := awsRestjson1_deserializeDocumentCoreNetworkEdge(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCoreNetworkPolicy(v **types.CoreNetworkPolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CoreNetworkPolicy + if *v == nil { + sv = &types.CoreNetworkPolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Alias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CoreNetworkPolicyAlias to be of type string, got %T instead", value) + } + sv.Alias = types.CoreNetworkPolicyAlias(jtv) + } + + case "ChangeSetState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangeSetState to be of type string, got %T instead", value) + } + sv.ChangeSetState = types.ChangeSetState(jtv) + } + + case "CoreNetworkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CoreNetworkId to be of type string, got %T instead", value) + } + sv.CoreNetworkId = ptr.String(jtv) + } + + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "PolicyDocument": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SynthesizedJsonCoreNetworkPolicyDocument to be of type string, got %T instead", value) + } + sv.PolicyDocument = ptr.String(jtv) + } + + case "PolicyErrors": + if err := awsRestjson1_deserializeDocumentCoreNetworkPolicyErrorList(&sv.PolicyErrors, value); err != nil { + return err + } + + case "PolicyVersionId": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PolicyVersionId = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCoreNetworkPolicyError(v **types.CoreNetworkPolicyError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CoreNetworkPolicyError + if *v == nil { + sv = &types.CoreNetworkPolicyError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) + } + sv.ErrorCode = ptr.String(jtv) + } + + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "Path": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) + } + sv.Path = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCoreNetworkPolicyErrorList(v *[]types.CoreNetworkPolicyError, 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.CoreNetworkPolicyError + if *v == nil { + cv = []types.CoreNetworkPolicyError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CoreNetworkPolicyError + destAddr := &col + if err := awsRestjson1_deserializeDocumentCoreNetworkPolicyError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCoreNetworkPolicyException(v **types.CoreNetworkPolicyException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CoreNetworkPolicyException + if *v == nil { + sv = &types.CoreNetworkPolicyException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Errors": + if err := awsRestjson1_deserializeDocumentCoreNetworkPolicyErrorList(&sv.Errors, value); err != nil { + return err } - case "Zone": + 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) + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) } - sv.Zone = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -7378,7 +14417,7 @@ func awsRestjson1_deserializeDocumentAWSLocation(v **types.AWSLocation, value in return nil } -func awsRestjson1_deserializeDocumentBandwidth(v **types.Bandwidth, value interface{}) error { +func awsRestjson1_deserializeDocumentCoreNetworkPolicyVersion(v **types.CoreNetworkPolicyVersion, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7391,29 +14430,68 @@ func awsRestjson1_deserializeDocumentBandwidth(v **types.Bandwidth, value interf return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Bandwidth + var sv *types.CoreNetworkPolicyVersion if *v == nil { - sv = &types.Bandwidth{} + sv = &types.CoreNetworkPolicyVersion{} } else { sv = *v } for key, value := range shape { switch key { - case "DownloadSpeed": + case "Alias": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + return fmt.Errorf("expected CoreNetworkPolicyAlias to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err + sv.Alias = types.CoreNetworkPolicyAlias(jtv) + } + + case "ChangeSetState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChangeSetState to be of type string, got %T instead", value) } - sv.DownloadSpeed = ptr.Int32(int32(i64)) + sv.ChangeSetState = types.ChangeSetState(jtv) } - case "UploadSpeed": + case "CoreNetworkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CoreNetworkId to be of type string, got %T instead", value) + } + sv.CoreNetworkId = ptr.String(jtv) + } + + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + + } + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "PolicyVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { @@ -7423,7 +14501,7 @@ func awsRestjson1_deserializeDocumentBandwidth(v **types.Bandwidth, value interf if err != nil { return err } - sv.UploadSpeed = ptr.Int32(int32(i64)) + sv.PolicyVersionId = ptr.Int32(int32(i64)) } default: @@ -7435,7 +14513,41 @@ func awsRestjson1_deserializeDocumentBandwidth(v **types.Bandwidth, value interf return nil } -func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { +func awsRestjson1_deserializeDocumentCoreNetworkPolicyVersionList(v *[]types.CoreNetworkPolicyVersion, 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.CoreNetworkPolicyVersion + if *v == nil { + cv = []types.CoreNetworkPolicyVersion{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CoreNetworkPolicyVersion + destAddr := &col + if err := awsRestjson1_deserializeDocumentCoreNetworkPolicyVersion(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCoreNetworkSegment(v **types.CoreNetworkSegment, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7448,40 +14560,32 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConflictException + var sv *types.CoreNetworkSegment if *v == nil { - sv = &types.ConflictException{} + sv = &types.CoreNetworkSegment{} } else { sv = *v } for key, value := range shape { switch key { - case "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + case "EdgeLocations": + if err := awsRestjson1_deserializeDocumentExternalRegionCodeList(&sv.EdgeLocations, value); err != nil { + return err } - case "ResourceId": + case "Name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } - sv.ResourceId = ptr.String(jtv) + sv.Name = ptr.String(jtv) } - case "ResourceType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ResourceType = ptr.String(jtv) + case "SharedSegments": + if err := awsRestjson1_deserializeDocumentConstrainedStringList(&sv.SharedSegments, value); err != nil { + return err } default: @@ -7493,7 +14597,7 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } -func awsRestjson1_deserializeDocumentConnection(v **types.Connection, value interface{}) error { +func awsRestjson1_deserializeDocumentCoreNetworkSegmentEdgeIdentifier(v **types.CoreNetworkSegmentEdgeIdentifier, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7506,127 +14610,86 @@ func awsRestjson1_deserializeDocumentConnection(v **types.Connection, value inte return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Connection + var sv *types.CoreNetworkSegmentEdgeIdentifier if *v == nil { - sv = &types.Connection{} + sv = &types.CoreNetworkSegmentEdgeIdentifier{} } else { sv = *v } for key, value := range shape { switch key { - case "ConnectedDeviceId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ConnectedDeviceId = ptr.String(jtv) - } - - case "ConnectedLinkId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ConnectedLinkId = ptr.String(jtv) - } - - case "ConnectionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ConnectionArn = ptr.String(jtv) - } - - case "ConnectionId": + case "CoreNetworkId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ConnectionId = ptr.String(jtv) - } - - case "CreatedAt": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) - + return fmt.Errorf("expected CoreNetworkId to be of type string, got %T instead", value) } + sv.CoreNetworkId = ptr.String(jtv) } - case "Description": + case "EdgeLocation": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ExternalRegionCode to be of type string, got %T instead", value) } - sv.Description = ptr.String(jtv) + sv.EdgeLocation = ptr.String(jtv) } - case "DeviceId": + case "SegmentName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } - sv.DeviceId = ptr.String(jtv) + sv.SegmentName = ptr.String(jtv) } - case "GlobalNetworkId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.GlobalNetworkId = ptr.String(jtv) - } + default: + _, _ = key, value - case "LinkId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.LinkId = ptr.String(jtv) - } + } + } + *v = sv + return nil +} - case "State": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ConnectionState to be of type string, got %T instead", value) - } - sv.State = types.ConnectionState(jtv) - } +func awsRestjson1_deserializeDocumentCoreNetworkSegmentList(v *[]types.CoreNetworkSegment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "Tags": - if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { - return err - } + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - default: - _, _ = key, value + var cv []types.CoreNetworkSegment + if *v == nil { + cv = []types.CoreNetworkSegment{} + } else { + cv = *v + } + for _, value := range shape { + var col types.CoreNetworkSegment + destAddr := &col + if err := awsRestjson1_deserializeDocumentCoreNetworkSegment(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentConnectionHealth(v **types.ConnectionHealth, value interface{}) error { +func awsRestjson1_deserializeDocumentCoreNetworkSummary(v **types.CoreNetworkSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7639,47 +14702,72 @@ func awsRestjson1_deserializeDocumentConnectionHealth(v **types.ConnectionHealth return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConnectionHealth + var sv *types.CoreNetworkSummary if *v == nil { - sv = &types.ConnectionHealth{} + sv = &types.CoreNetworkSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "Status": + case "CoreNetworkArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ConnectionStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected CoreNetworkArn to be of type string, got %T instead", value) } - sv.Status = types.ConnectionStatus(jtv) + sv.CoreNetworkArn = ptr.String(jtv) } - case "Timestamp": + case "CoreNetworkId": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.Timestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CoreNetworkId to be of type string, got %T instead", value) + } + sv.CoreNetworkId = ptr.String(jtv) + } - default: - return fmt.Errorf("expected DateTime to be a JSON Number, got %T instead", value) + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "GlobalNetworkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GlobalNetworkId to be of type string, got %T instead", value) + } + sv.GlobalNetworkId = ptr.String(jtv) + } + case "OwnerAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AWSAccountId to be of type string, got %T instead", value) } + sv.OwnerAccountId = ptr.String(jtv) } - case "Type": + case "State": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ConnectionType to be of type string, got %T instead", value) + return fmt.Errorf("expected CoreNetworkState to be of type string, got %T instead", value) } - sv.Type = types.ConnectionType(jtv) + sv.State = types.CoreNetworkState(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err } default: @@ -7691,7 +14779,7 @@ func awsRestjson1_deserializeDocumentConnectionHealth(v **types.ConnectionHealth return nil } -func awsRestjson1_deserializeDocumentConnectionList(v *[]types.Connection, value interface{}) error { +func awsRestjson1_deserializeDocumentCoreNetworkSummaryList(v *[]types.CoreNetworkSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7704,17 +14792,17 @@ func awsRestjson1_deserializeDocumentConnectionList(v *[]types.Connection, value return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Connection + var cv []types.CoreNetworkSummary if *v == nil { - cv = []types.Connection{} + cv = []types.CoreNetworkSummary{} } else { cv = *v } for _, value := range shape { - var col types.Connection + var col types.CoreNetworkSummary destAddr := &col - if err := awsRestjson1_deserializeDocumentConnection(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentCoreNetworkSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -7751,7 +14839,7 @@ func awsRestjson1_deserializeDocumentCustomerGatewayAssociation(v **types.Custom if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected CustomerGatewayArn to be of type string, got %T instead", value) } sv.CustomerGatewayArn = ptr.String(jtv) } @@ -7760,7 +14848,7 @@ func awsRestjson1_deserializeDocumentCustomerGatewayAssociation(v **types.Custom if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected DeviceId to be of type string, got %T instead", value) } sv.DeviceId = ptr.String(jtv) } @@ -7769,7 +14857,7 @@ func awsRestjson1_deserializeDocumentCustomerGatewayAssociation(v **types.Custom if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected GlobalNetworkId to be of type string, got %T instead", value) } sv.GlobalNetworkId = ptr.String(jtv) } @@ -7778,7 +14866,7 @@ func awsRestjson1_deserializeDocumentCustomerGatewayAssociation(v **types.Custom if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected LinkId to be of type string, got %T instead", value) } sv.LinkId = ptr.String(jtv) } @@ -7882,7 +14970,7 @@ func awsRestjson1_deserializeDocumentDevice(v **types.Device, value interface{}) if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -7891,7 +14979,7 @@ func awsRestjson1_deserializeDocumentDevice(v **types.Device, value interface{}) if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected DeviceArn to be of type string, got %T instead", value) } sv.DeviceArn = ptr.String(jtv) } @@ -7900,7 +14988,7 @@ func awsRestjson1_deserializeDocumentDevice(v **types.Device, value interface{}) if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected DeviceId to be of type string, got %T instead", value) } sv.DeviceId = ptr.String(jtv) } @@ -7909,7 +14997,7 @@ func awsRestjson1_deserializeDocumentDevice(v **types.Device, value interface{}) if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected GlobalNetworkId to be of type string, got %T instead", value) } sv.GlobalNetworkId = ptr.String(jtv) } @@ -7923,7 +15011,7 @@ func awsRestjson1_deserializeDocumentDevice(v **types.Device, value interface{}) if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Model = ptr.String(jtv) } @@ -7932,7 +15020,7 @@ func awsRestjson1_deserializeDocumentDevice(v **types.Device, value interface{}) if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.SerialNumber = ptr.String(jtv) } @@ -7941,7 +15029,7 @@ func awsRestjson1_deserializeDocumentDevice(v **types.Device, value interface{}) if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected SiteId to be of type string, got %T instead", value) } sv.SiteId = ptr.String(jtv) } @@ -7964,7 +15052,7 @@ func awsRestjson1_deserializeDocumentDevice(v **types.Device, value interface{}) if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Type = ptr.String(jtv) } @@ -7973,7 +15061,7 @@ func awsRestjson1_deserializeDocumentDevice(v **types.Device, value interface{}) if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Vendor = ptr.String(jtv) } @@ -8057,6 +15145,42 @@ func awsRestjson1_deserializeDocumentExceptionContextMap(v *map[string]string, v return nil } +func awsRestjson1_deserializeDocumentExternalRegionCodeList(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 ExternalRegionCode to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentGlobalNetwork(v **types.GlobalNetwork, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8099,7 +15223,7 @@ func awsRestjson1_deserializeDocumentGlobalNetwork(v **types.GlobalNetwork, valu if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -8108,7 +15232,7 @@ func awsRestjson1_deserializeDocumentGlobalNetwork(v **types.GlobalNetwork, valu if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected GlobalNetworkArn to be of type string, got %T instead", value) } sv.GlobalNetworkArn = ptr.String(jtv) } @@ -8117,7 +15241,7 @@ func awsRestjson1_deserializeDocumentGlobalNetwork(v **types.GlobalNetwork, valu if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected GlobalNetworkId to be of type string, got %T instead", value) } sv.GlobalNetworkId = ptr.String(jtv) } @@ -8205,7 +15329,7 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } @@ -8279,7 +15403,7 @@ func awsRestjson1_deserializeDocumentLink(v **types.Link, value interface{}) err if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -8288,7 +15412,7 @@ func awsRestjson1_deserializeDocumentLink(v **types.Link, value interface{}) err if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected GlobalNetworkId to be of type string, got %T instead", value) } sv.GlobalNetworkId = ptr.String(jtv) } @@ -8297,7 +15421,7 @@ func awsRestjson1_deserializeDocumentLink(v **types.Link, value interface{}) err if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected LinkArn to be of type string, got %T instead", value) } sv.LinkArn = ptr.String(jtv) } @@ -8306,7 +15430,7 @@ func awsRestjson1_deserializeDocumentLink(v **types.Link, value interface{}) err if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected LinkId to be of type string, got %T instead", value) } sv.LinkId = ptr.String(jtv) } @@ -8315,7 +15439,7 @@ func awsRestjson1_deserializeDocumentLink(v **types.Link, value interface{}) err if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Provider = ptr.String(jtv) } @@ -8324,7 +15448,7 @@ func awsRestjson1_deserializeDocumentLink(v **types.Link, value interface{}) err if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected SiteId to be of type string, got %T instead", value) } sv.SiteId = ptr.String(jtv) } @@ -8347,7 +15471,7 @@ func awsRestjson1_deserializeDocumentLink(v **types.Link, value interface{}) err if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Type = ptr.String(jtv) } @@ -8387,7 +15511,7 @@ func awsRestjson1_deserializeDocumentLinkAssociation(v **types.LinkAssociation, if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected DeviceId to be of type string, got %T instead", value) } sv.DeviceId = ptr.String(jtv) } @@ -8396,7 +15520,7 @@ func awsRestjson1_deserializeDocumentLinkAssociation(v **types.LinkAssociation, if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected GlobalNetworkId to be of type string, got %T instead", value) } sv.GlobalNetworkId = ptr.String(jtv) } @@ -8414,7 +15538,7 @@ func awsRestjson1_deserializeDocumentLinkAssociation(v **types.LinkAssociation, if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected LinkId to be of type string, got %T instead", value) } sv.LinkId = ptr.String(jtv) } @@ -8522,7 +15646,7 @@ func awsRestjson1_deserializeDocumentLocation(v **types.Location, value interfac if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Address = ptr.String(jtv) } @@ -8531,7 +15655,7 @@ func awsRestjson1_deserializeDocumentLocation(v **types.Location, value interfac if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Latitude = ptr.String(jtv) } @@ -8540,7 +15664,7 @@ func awsRestjson1_deserializeDocumentLocation(v **types.Location, value interfac if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Longitude = ptr.String(jtv) } @@ -8580,7 +15704,7 @@ func awsRestjson1_deserializeDocumentNetworkResource(v **types.NetworkResource, if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected AWSAccountId to be of type string, got %T instead", value) } sv.AccountId = ptr.String(jtv) } @@ -8589,16 +15713,25 @@ func awsRestjson1_deserializeDocumentNetworkResource(v **types.NetworkResource, if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ExternalRegionCode to be of type string, got %T instead", value) } sv.AwsRegion = ptr.String(jtv) } + case "CoreNetworkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CoreNetworkId to be of type string, got %T instead", value) + } + sv.CoreNetworkId = ptr.String(jtv) + } + case "Definition": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Definition = ptr.String(jtv) } @@ -8628,7 +15761,7 @@ func awsRestjson1_deserializeDocumentNetworkResource(v **types.NetworkResource, if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.RegisteredGatewayArn = ptr.String(jtv) } @@ -8637,7 +15770,7 @@ func awsRestjson1_deserializeDocumentNetworkResource(v **types.NetworkResource, if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.ResourceArn = ptr.String(jtv) } @@ -8646,7 +15779,7 @@ func awsRestjson1_deserializeDocumentNetworkResource(v **types.NetworkResource, if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } @@ -8655,7 +15788,7 @@ func awsRestjson1_deserializeDocumentNetworkResource(v **types.NetworkResource, if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.ResourceType = ptr.String(jtv) } @@ -8713,7 +15846,7 @@ func awsRestjson1_deserializeDocumentNetworkResourceCount(v **types.NetworkResou if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.ResourceType = ptr.String(jtv) } @@ -8820,7 +15953,7 @@ func awsRestjson1_deserializeDocumentNetworkResourceMetadataMap(v *map[string]st if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NetworkResourceMetadataValue to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } parsedVal = jtv } @@ -8857,7 +15990,7 @@ func awsRestjson1_deserializeDocumentNetworkResourceSummary(v **types.NetworkRes if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Definition = ptr.String(jtv) } @@ -8875,7 +16008,7 @@ func awsRestjson1_deserializeDocumentNetworkResourceSummary(v **types.NetworkRes if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.NameTag = ptr.String(jtv) } @@ -8884,7 +16017,7 @@ func awsRestjson1_deserializeDocumentNetworkResourceSummary(v **types.NetworkRes if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.RegisteredGatewayArn = ptr.String(jtv) } @@ -8893,7 +16026,7 @@ func awsRestjson1_deserializeDocumentNetworkResourceSummary(v **types.NetworkRes if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.ResourceArn = ptr.String(jtv) } @@ -8902,7 +16035,7 @@ func awsRestjson1_deserializeDocumentNetworkResourceSummary(v **types.NetworkRes if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.ResourceType = ptr.String(jtv) } @@ -8942,7 +16075,7 @@ func awsRestjson1_deserializeDocumentNetworkRoute(v **types.NetworkRoute, value if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.DestinationCidrBlock = ptr.String(jtv) } @@ -8956,7 +16089,7 @@ func awsRestjson1_deserializeDocumentNetworkRoute(v **types.NetworkRoute, value if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.PrefixListId = ptr.String(jtv) } @@ -9010,11 +16143,29 @@ func awsRestjson1_deserializeDocumentNetworkRouteDestination(v **types.NetworkRo for key, value := range shape { switch key { + case "CoreNetworkAttachmentId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AttachmentId to be of type string, got %T instead", value) + } + sv.CoreNetworkAttachmentId = ptr.String(jtv) + } + + case "EdgeLocation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExternalRegionCode to be of type string, got %T instead", value) + } + sv.EdgeLocation = ptr.String(jtv) + } + case "ResourceId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } @@ -9023,16 +16174,25 @@ func awsRestjson1_deserializeDocumentNetworkRouteDestination(v **types.NetworkRo if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.ResourceType = ptr.String(jtv) } + case "SegmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) + } + sv.SegmentName = ptr.String(jtv) + } + case "TransitGatewayAttachmentId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected TransitGatewayAttachmentId to be of type string, got %T instead", value) } sv.TransitGatewayAttachmentId = ptr.String(jtv) } @@ -9140,7 +16300,7 @@ func awsRestjson1_deserializeDocumentNetworkTelemetry(v **types.NetworkTelemetry if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected AWSAccountId to be of type string, got %T instead", value) } sv.AccountId = ptr.String(jtv) } @@ -9149,7 +16309,7 @@ func awsRestjson1_deserializeDocumentNetworkTelemetry(v **types.NetworkTelemetry if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Address = ptr.String(jtv) } @@ -9158,11 +16318,20 @@ func awsRestjson1_deserializeDocumentNetworkTelemetry(v **types.NetworkTelemetry if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ExternalRegionCode to be of type string, got %T instead", value) } sv.AwsRegion = ptr.String(jtv) } + case "CoreNetworkId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CoreNetworkId to be of type string, got %T instead", value) + } + sv.CoreNetworkId = ptr.String(jtv) + } + case "Health": if err := awsRestjson1_deserializeDocumentConnectionHealth(&sv.Health, value); err != nil { return err @@ -9172,7 +16341,7 @@ func awsRestjson1_deserializeDocumentNetworkTelemetry(v **types.NetworkTelemetry if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.RegisteredGatewayArn = ptr.String(jtv) } @@ -9181,7 +16350,7 @@ func awsRestjson1_deserializeDocumentNetworkTelemetry(v **types.NetworkTelemetry if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.ResourceArn = ptr.String(jtv) } @@ -9190,7 +16359,7 @@ func awsRestjson1_deserializeDocumentNetworkTelemetry(v **types.NetworkTelemetry if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } @@ -9199,7 +16368,7 @@ func awsRestjson1_deserializeDocumentNetworkTelemetry(v **types.NetworkTelemetry if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.ResourceType = ptr.String(jtv) } @@ -9273,7 +16442,7 @@ func awsRestjson1_deserializeDocumentPathComponent(v **types.PathComponent, valu if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.DestinationCidrBlock = ptr.String(jtv) } @@ -9339,6 +16508,64 @@ func awsRestjson1_deserializeDocumentPathComponentList(v *[]types.PathComponent, return nil } +func awsRestjson1_deserializeDocumentProposedSegmentChange(v **types.ProposedSegmentChange, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ProposedSegmentChange + if *v == nil { + sv = &types.ProposedSegmentChange{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AttachmentPolicyRuleNumber": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AttachmentPolicyRuleNumber = ptr.Int32(int32(i64)) + } + + case "SegmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) + } + sv.SegmentName = ptr.String(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentReasonContextMap(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9401,7 +16628,7 @@ func awsRestjson1_deserializeDocumentRelationship(v **types.Relationship, value if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.From = ptr.String(jtv) } @@ -9410,7 +16637,7 @@ func awsRestjson1_deserializeDocumentRelationship(v **types.Relationship, value if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.To = ptr.String(jtv) } @@ -9489,7 +16716,7 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } @@ -9498,7 +16725,7 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } @@ -9507,7 +16734,7 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) } sv.ResourceType = ptr.String(jtv) } @@ -9557,7 +16784,7 @@ func awsRestjson1_deserializeDocumentRouteAnalysis(v **types.RouteAnalysis, valu if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected GlobalNetworkId to be of type string, got %T instead", value) } sv.GlobalNetworkId = ptr.String(jtv) } @@ -9575,7 +16802,7 @@ func awsRestjson1_deserializeDocumentRouteAnalysis(v **types.RouteAnalysis, valu if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected AWSAccountId to be of type string, got %T instead", value) } sv.OwnerAccountId = ptr.String(jtv) } @@ -9589,7 +16816,7 @@ func awsRestjson1_deserializeDocumentRouteAnalysis(v **types.RouteAnalysis, valu if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.RouteAnalysisId = ptr.String(jtv) } @@ -9722,7 +16949,7 @@ func awsRestjson1_deserializeDocumentRouteAnalysisEndpointOptions(v **types.Rout if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected IPAddress to be of type string, got %T instead", value) } sv.IpAddress = ptr.String(jtv) } @@ -9731,7 +16958,7 @@ func awsRestjson1_deserializeDocumentRouteAnalysisEndpointOptions(v **types.Rout if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected TransitGatewayArn to be of type string, got %T instead", value) } sv.TransitGatewayArn = ptr.String(jtv) } @@ -9740,7 +16967,7 @@ func awsRestjson1_deserializeDocumentRouteAnalysisEndpointOptions(v **types.Rout if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected TransitGatewayAttachmentArn to be of type string, got %T instead", value) } sv.TransitGatewayAttachmentArn = ptr.String(jtv) } @@ -9821,7 +17048,7 @@ func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.Ser if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) } sv.LimitCode = ptr.String(jtv) } @@ -9830,7 +17057,7 @@ func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.Ser if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } @@ -9839,7 +17066,7 @@ func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.Ser if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) } sv.ResourceId = ptr.String(jtv) } @@ -9848,7 +17075,7 @@ func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.Ser if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) } sv.ResourceType = ptr.String(jtv) } @@ -9857,7 +17084,7 @@ func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.Ser if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) } sv.ServiceCode = ptr.String(jtv) } @@ -9913,7 +17140,7 @@ func awsRestjson1_deserializeDocumentSite(v **types.Site, value interface{}) err if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -9922,7 +17149,7 @@ func awsRestjson1_deserializeDocumentSite(v **types.Site, value interface{}) err if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected GlobalNetworkId to be of type string, got %T instead", value) } sv.GlobalNetworkId = ptr.String(jtv) } @@ -9936,7 +17163,7 @@ func awsRestjson1_deserializeDocumentSite(v **types.Site, value interface{}) err if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected SiteArn to be of type string, got %T instead", value) } sv.SiteArn = ptr.String(jtv) } @@ -9945,7 +17172,7 @@ func awsRestjson1_deserializeDocumentSite(v **types.Site, value interface{}) err if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected SiteId to be of type string, got %T instead", value) } sv.SiteId = ptr.String(jtv) } @@ -10007,6 +17234,87 @@ func awsRestjson1_deserializeDocumentSiteList(v *[]types.Site, value interface{} return nil } +func awsRestjson1_deserializeDocumentSiteToSiteVpnAttachment(v **types.SiteToSiteVpnAttachment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SiteToSiteVpnAttachment + if *v == nil { + sv = &types.SiteToSiteVpnAttachment{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Attachment": + if err := awsRestjson1_deserializeDocumentAttachment(&sv.Attachment, value); err != nil { + return err + } + + case "VpnConnectionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpnConnectionArn to be of type string, got %T instead", value) + } + sv.VpnConnectionArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSubnetArnList(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 SubnetArn to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentTag(v **types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10116,7 +17424,7 @@ func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingExc if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } @@ -10169,7 +17477,7 @@ func awsRestjson1_deserializeDocumentTransitGatewayConnectPeerAssociation(v **ty if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected DeviceId to be of type string, got %T instead", value) } sv.DeviceId = ptr.String(jtv) } @@ -10178,7 +17486,7 @@ func awsRestjson1_deserializeDocumentTransitGatewayConnectPeerAssociation(v **ty if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected GlobalNetworkId to be of type string, got %T instead", value) } sv.GlobalNetworkId = ptr.String(jtv) } @@ -10187,7 +17495,7 @@ func awsRestjson1_deserializeDocumentTransitGatewayConnectPeerAssociation(v **ty if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected LinkId to be of type string, got %T instead", value) } sv.LinkId = ptr.String(jtv) } @@ -10205,7 +17513,7 @@ func awsRestjson1_deserializeDocumentTransitGatewayConnectPeerAssociation(v **ty if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected TransitGatewayConnectPeerArn to be of type string, got %T instead", value) } sv.TransitGatewayConnectPeerArn = ptr.String(jtv) } @@ -10279,7 +17587,7 @@ func awsRestjson1_deserializeDocumentTransitGatewayRegistration(v **types.Transi if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected GlobalNetworkId to be of type string, got %T instead", value) } sv.GlobalNetworkId = ptr.String(jtv) } @@ -10293,7 +17601,7 @@ func awsRestjson1_deserializeDocumentTransitGatewayRegistration(v **types.Transi if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected TransitGatewayArn to be of type string, got %T instead", value) } sv.TransitGatewayArn = ptr.String(jtv) } @@ -10376,7 +17684,7 @@ func awsRestjson1_deserializeDocumentTransitGatewayRegistrationStateReason(v **t if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ConstrainedString to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } @@ -10421,7 +17729,7 @@ func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationExc if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } @@ -10470,7 +17778,7 @@ func awsRestjson1_deserializeDocumentValidationExceptionField(v **types.Validati if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } @@ -10479,7 +17787,7 @@ func awsRestjson1_deserializeDocumentValidationExceptionField(v **types.Validati if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ServerSideString to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } @@ -10526,3 +17834,89 @@ func awsRestjson1_deserializeDocumentValidationExceptionFieldList(v *[]types.Val *v = cv return nil } + +func awsRestjson1_deserializeDocumentVpcAttachment(v **types.VpcAttachment, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.VpcAttachment + if *v == nil { + sv = &types.VpcAttachment{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Attachment": + if err := awsRestjson1_deserializeDocumentAttachment(&sv.Attachment, value); err != nil { + return err + } + + case "Options": + if err := awsRestjson1_deserializeDocumentVpcOptions(&sv.Options, value); err != nil { + return err + } + + case "SubnetArns": + if err := awsRestjson1_deserializeDocumentSubnetArnList(&sv.SubnetArns, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentVpcOptions(v **types.VpcOptions, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.VpcOptions + if *v == nil { + sv = &types.VpcOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Ipv6Support": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Ipv6Support = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/service/networkmanager/generated.json b/service/networkmanager/generated.json index 64a787159d9..5998fd62cea 100644 --- a/service/networkmanager/generated.json +++ b/service/networkmanager/generated.json @@ -7,25 +7,45 @@ }, "files": [ "api_client.go", + "api_op_AcceptAttachment.go", + "api_op_AssociateConnectPeer.go", "api_op_AssociateCustomerGateway.go", "api_op_AssociateLink.go", "api_op_AssociateTransitGatewayConnectPeer.go", + "api_op_CreateConnectAttachment.go", + "api_op_CreateConnectPeer.go", "api_op_CreateConnection.go", + "api_op_CreateCoreNetwork.go", "api_op_CreateDevice.go", "api_op_CreateGlobalNetwork.go", "api_op_CreateLink.go", "api_op_CreateSite.go", + "api_op_CreateSiteToSiteVpnAttachment.go", + "api_op_CreateVpcAttachment.go", + "api_op_DeleteAttachment.go", + "api_op_DeleteConnectPeer.go", "api_op_DeleteConnection.go", + "api_op_DeleteCoreNetwork.go", + "api_op_DeleteCoreNetworkPolicyVersion.go", "api_op_DeleteDevice.go", "api_op_DeleteGlobalNetwork.go", "api_op_DeleteLink.go", + "api_op_DeleteResourcePolicy.go", "api_op_DeleteSite.go", "api_op_DeregisterTransitGateway.go", "api_op_DescribeGlobalNetworks.go", + "api_op_DisassociateConnectPeer.go", "api_op_DisassociateCustomerGateway.go", "api_op_DisassociateLink.go", "api_op_DisassociateTransitGatewayConnectPeer.go", + "api_op_ExecuteCoreNetworkChangeSet.go", + "api_op_GetConnectAttachment.go", + "api_op_GetConnectPeer.go", + "api_op_GetConnectPeerAssociations.go", "api_op_GetConnections.go", + "api_op_GetCoreNetwork.go", + "api_op_GetCoreNetworkChangeSet.go", + "api_op_GetCoreNetworkPolicy.go", "api_op_GetCustomerGatewayAssociations.go", "api_op_GetDevices.go", "api_op_GetLinkAssociations.go", @@ -35,21 +55,34 @@ "api_op_GetNetworkResources.go", "api_op_GetNetworkRoutes.go", "api_op_GetNetworkTelemetry.go", + "api_op_GetResourcePolicy.go", "api_op_GetRouteAnalysis.go", + "api_op_GetSiteToSiteVpnAttachment.go", "api_op_GetSites.go", "api_op_GetTransitGatewayConnectPeerAssociations.go", "api_op_GetTransitGatewayRegistrations.go", + "api_op_GetVpcAttachment.go", + "api_op_ListAttachments.go", + "api_op_ListConnectPeers.go", + "api_op_ListCoreNetworkPolicyVersions.go", + "api_op_ListCoreNetworks.go", "api_op_ListTagsForResource.go", + "api_op_PutCoreNetworkPolicy.go", + "api_op_PutResourcePolicy.go", "api_op_RegisterTransitGateway.go", + "api_op_RejectAttachment.go", + "api_op_RestoreCoreNetworkPolicyVersion.go", "api_op_StartRouteAnalysis.go", "api_op_TagResource.go", "api_op_UntagResource.go", "api_op_UpdateConnection.go", + "api_op_UpdateCoreNetwork.go", "api_op_UpdateDevice.go", "api_op_UpdateGlobalNetwork.go", "api_op_UpdateLink.go", "api_op_UpdateNetworkResourceMetadata.go", "api_op_UpdateSite.go", + "api_op_UpdateVpcAttachment.go", "deserializers.go", "doc.go", "endpoints.go", diff --git a/service/networkmanager/serializers.go b/service/networkmanager/serializers.go index 6a64163f591..cee6189546c 100644 --- a/service/networkmanager/serializers.go +++ b/service/networkmanager/serializers.go @@ -14,14 +14,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -type awsRestjson1_serializeOpAssociateCustomerGateway struct { +type awsRestjson1_serializeOpAcceptAttachment struct { } -func (*awsRestjson1_serializeOpAssociateCustomerGateway) ID() string { +func (*awsRestjson1_serializeOpAcceptAttachment) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpAssociateCustomerGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpAcceptAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -29,13 +29,13 @@ func (m *awsRestjson1_serializeOpAssociateCustomerGateway) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*AssociateCustomerGatewayInput) + input, ok := in.Parameters.(*AcceptAttachmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/customer-gateway-associations") + opPath, opQuery := httpbinding.SplitURI("/attachments/{AttachmentId}/accept") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -44,18 +44,7 @@ func (m *awsRestjson1_serializeOpAssociateCustomerGateway) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsAssociateCustomerGatewayInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentAssociateCustomerGatewayInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsAcceptAttachmentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -66,16 +55,16 @@ func (m *awsRestjson1_serializeOpAssociateCustomerGateway) HandleSerialize(ctx c return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsAssociateCustomerGatewayInput(v *AssociateCustomerGatewayInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsAcceptAttachmentInput(v *AcceptAttachmentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + if v.AttachmentId == nil || len(*v.AttachmentId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AttachmentId must not be empty")} } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + if v.AttachmentId != nil { + if err := encoder.SetURI("AttachmentId").String(*v.AttachmentId); err != nil { return err } } @@ -83,36 +72,14 @@ func awsRestjson1_serializeOpHttpBindingsAssociateCustomerGatewayInput(v *Associ return nil } -func awsRestjson1_serializeOpDocumentAssociateCustomerGatewayInput(v *AssociateCustomerGatewayInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.CustomerGatewayArn != nil { - ok := object.Key("CustomerGatewayArn") - ok.String(*v.CustomerGatewayArn) - } - - if v.DeviceId != nil { - ok := object.Key("DeviceId") - ok.String(*v.DeviceId) - } - - if v.LinkId != nil { - ok := object.Key("LinkId") - ok.String(*v.LinkId) - } - - return nil -} - -type awsRestjson1_serializeOpAssociateLink struct { +type awsRestjson1_serializeOpAssociateConnectPeer struct { } -func (*awsRestjson1_serializeOpAssociateLink) ID() string { +func (*awsRestjson1_serializeOpAssociateConnectPeer) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpAssociateLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpAssociateConnectPeer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -120,13 +87,13 @@ func (m *awsRestjson1_serializeOpAssociateLink) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*AssociateLinkInput) + input, ok := in.Parameters.(*AssociateConnectPeerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/link-associations") + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/connect-peer-associations") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -135,14 +102,14 @@ func (m *awsRestjson1_serializeOpAssociateLink) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsAssociateLinkInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsAssociateConnectPeerInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentAssociateLinkInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentAssociateConnectPeerInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -157,7 +124,7 @@ func (m *awsRestjson1_serializeOpAssociateLink) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsAssociateLinkInput(v *AssociateLinkInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsAssociateConnectPeerInput(v *AssociateConnectPeerInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -174,10 +141,15 @@ func awsRestjson1_serializeOpHttpBindingsAssociateLinkInput(v *AssociateLinkInpu return nil } -func awsRestjson1_serializeOpDocumentAssociateLinkInput(v *AssociateLinkInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentAssociateConnectPeerInput(v *AssociateConnectPeerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() + if v.ConnectPeerId != nil { + ok := object.Key("ConnectPeerId") + ok.String(*v.ConnectPeerId) + } + if v.DeviceId != nil { ok := object.Key("DeviceId") ok.String(*v.DeviceId) @@ -191,14 +163,14 @@ func awsRestjson1_serializeOpDocumentAssociateLinkInput(v *AssociateLinkInput, v return nil } -type awsRestjson1_serializeOpAssociateTransitGatewayConnectPeer struct { +type awsRestjson1_serializeOpAssociateCustomerGateway struct { } -func (*awsRestjson1_serializeOpAssociateTransitGatewayConnectPeer) ID() string { +func (*awsRestjson1_serializeOpAssociateCustomerGateway) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpAssociateTransitGatewayConnectPeer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpAssociateCustomerGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -206,13 +178,13 @@ func (m *awsRestjson1_serializeOpAssociateTransitGatewayConnectPeer) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*AssociateTransitGatewayConnectPeerInput) + input, ok := in.Parameters.(*AssociateCustomerGatewayInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/transit-gateway-connect-peer-associations") + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/customer-gateway-associations") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -221,14 +193,14 @@ func (m *awsRestjson1_serializeOpAssociateTransitGatewayConnectPeer) HandleSeria return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsAssociateTransitGatewayConnectPeerInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsAssociateCustomerGatewayInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentAssociateTransitGatewayConnectPeerInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentAssociateCustomerGatewayInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -243,7 +215,7 @@ func (m *awsRestjson1_serializeOpAssociateTransitGatewayConnectPeer) HandleSeria return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsAssociateTransitGatewayConnectPeerInput(v *AssociateTransitGatewayConnectPeerInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsAssociateCustomerGatewayInput(v *AssociateCustomerGatewayInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -260,10 +232,15 @@ func awsRestjson1_serializeOpHttpBindingsAssociateTransitGatewayConnectPeerInput return nil } -func awsRestjson1_serializeOpDocumentAssociateTransitGatewayConnectPeerInput(v *AssociateTransitGatewayConnectPeerInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentAssociateCustomerGatewayInput(v *AssociateCustomerGatewayInput, value smithyjson.Value) error { object := value.Object() defer object.Close() + if v.CustomerGatewayArn != nil { + ok := object.Key("CustomerGatewayArn") + ok.String(*v.CustomerGatewayArn) + } + if v.DeviceId != nil { ok := object.Key("DeviceId") ok.String(*v.DeviceId) @@ -274,22 +251,17 @@ func awsRestjson1_serializeOpDocumentAssociateTransitGatewayConnectPeerInput(v * ok.String(*v.LinkId) } - if v.TransitGatewayConnectPeerArn != nil { - ok := object.Key("TransitGatewayConnectPeerArn") - ok.String(*v.TransitGatewayConnectPeerArn) - } - return nil } -type awsRestjson1_serializeOpCreateConnection struct { +type awsRestjson1_serializeOpAssociateLink struct { } -func (*awsRestjson1_serializeOpCreateConnection) ID() string { +func (*awsRestjson1_serializeOpAssociateLink) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpAssociateLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -297,13 +269,13 @@ func (m *awsRestjson1_serializeOpCreateConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateConnectionInput) + input, ok := in.Parameters.(*AssociateLinkInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/connections") + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/link-associations") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -312,14 +284,14 @@ func (m *awsRestjson1_serializeOpCreateConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateConnectionInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsAssociateLinkInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateConnectionInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentAssociateLinkInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -334,7 +306,7 @@ func (m *awsRestjson1_serializeOpCreateConnection) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateConnectionInput(v *CreateConnectionInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsAssociateLinkInput(v *AssociateLinkInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -351,25 +323,10 @@ func awsRestjson1_serializeOpHttpBindingsCreateConnectionInput(v *CreateConnecti return nil } -func awsRestjson1_serializeOpDocumentCreateConnectionInput(v *CreateConnectionInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentAssociateLinkInput(v *AssociateLinkInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.ConnectedDeviceId != nil { - ok := object.Key("ConnectedDeviceId") - ok.String(*v.ConnectedDeviceId) - } - - if v.ConnectedLinkId != nil { - ok := object.Key("ConnectedLinkId") - ok.String(*v.ConnectedLinkId) - } - - if v.Description != nil { - ok := object.Key("Description") - ok.String(*v.Description) - } - if v.DeviceId != nil { ok := object.Key("DeviceId") ok.String(*v.DeviceId) @@ -380,24 +337,17 @@ func awsRestjson1_serializeOpDocumentCreateConnectionInput(v *CreateConnectionIn ok.String(*v.LinkId) } - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { - return err - } - } - return nil } -type awsRestjson1_serializeOpCreateDevice struct { +type awsRestjson1_serializeOpAssociateTransitGatewayConnectPeer struct { } -func (*awsRestjson1_serializeOpCreateDevice) ID() string { +func (*awsRestjson1_serializeOpAssociateTransitGatewayConnectPeer) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateDevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpAssociateTransitGatewayConnectPeer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -405,13 +355,13 @@ func (m *awsRestjson1_serializeOpCreateDevice) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateDeviceInput) + input, ok := in.Parameters.(*AssociateTransitGatewayConnectPeerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/devices") + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/transit-gateway-connect-peer-associations") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -420,14 +370,14 @@ func (m *awsRestjson1_serializeOpCreateDevice) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateDeviceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsAssociateTransitGatewayConnectPeerInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateDeviceInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentAssociateTransitGatewayConnectPeerInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -442,7 +392,7 @@ func (m *awsRestjson1_serializeOpCreateDevice) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateDeviceInput(v *CreateDeviceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsAssociateTransitGatewayConnectPeerInput(v *AssociateTransitGatewayConnectPeerInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -459,72 +409,36 @@ func awsRestjson1_serializeOpHttpBindingsCreateDeviceInput(v *CreateDeviceInput, return nil } -func awsRestjson1_serializeOpDocumentCreateDeviceInput(v *CreateDeviceInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentAssociateTransitGatewayConnectPeerInput(v *AssociateTransitGatewayConnectPeerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.AWSLocation != nil { - ok := object.Key("AWSLocation") - if err := awsRestjson1_serializeDocumentAWSLocation(v.AWSLocation, ok); err != nil { - return err - } - } - - if v.Description != nil { - ok := object.Key("Description") - ok.String(*v.Description) - } - - if v.Location != nil { - ok := object.Key("Location") - if err := awsRestjson1_serializeDocumentLocation(v.Location, ok); err != nil { - return err - } - } - - if v.Model != nil { - ok := object.Key("Model") - ok.String(*v.Model) - } - - if v.SerialNumber != nil { - ok := object.Key("SerialNumber") - ok.String(*v.SerialNumber) - } - - if v.SiteId != nil { - ok := object.Key("SiteId") - ok.String(*v.SiteId) - } - - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { - return err - } + if v.DeviceId != nil { + ok := object.Key("DeviceId") + ok.String(*v.DeviceId) } - if v.Type != nil { - ok := object.Key("Type") - ok.String(*v.Type) + if v.LinkId != nil { + ok := object.Key("LinkId") + ok.String(*v.LinkId) } - if v.Vendor != nil { - ok := object.Key("Vendor") - ok.String(*v.Vendor) + if v.TransitGatewayConnectPeerArn != nil { + ok := object.Key("TransitGatewayConnectPeerArn") + ok.String(*v.TransitGatewayConnectPeerArn) } return nil } -type awsRestjson1_serializeOpCreateGlobalNetwork struct { +type awsRestjson1_serializeOpCreateConnectAttachment struct { } -func (*awsRestjson1_serializeOpCreateGlobalNetwork) ID() string { +func (*awsRestjson1_serializeOpCreateConnectAttachment) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateGlobalNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateConnectAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -532,13 +446,13 @@ func (m *awsRestjson1_serializeOpCreateGlobalNetwork) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateGlobalNetworkInput) + input, ok := in.Parameters.(*CreateConnectAttachmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks") + opPath, opQuery := httpbinding.SplitURI("/connect-attachments") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -550,7 +464,7 @@ func (m *awsRestjson1_serializeOpCreateGlobalNetwork) HandleSerialize(ctx contex restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateGlobalNetworkInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateConnectAttachmentInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -565,7 +479,7 @@ func (m *awsRestjson1_serializeOpCreateGlobalNetwork) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateGlobalNetworkInput(v *CreateGlobalNetworkInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateConnectAttachmentInput(v *CreateConnectAttachmentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -573,13 +487,30 @@ func awsRestjson1_serializeOpHttpBindingsCreateGlobalNetworkInput(v *CreateGloba return nil } -func awsRestjson1_serializeOpDocumentCreateGlobalNetworkInput(v *CreateGlobalNetworkInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateConnectAttachmentInput(v *CreateConnectAttachmentInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Description != nil { - ok := object.Key("Description") - ok.String(*v.Description) + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.CoreNetworkId != nil { + ok := object.Key("CoreNetworkId") + ok.String(*v.CoreNetworkId) + } + + if v.EdgeLocation != nil { + ok := object.Key("EdgeLocation") + ok.String(*v.EdgeLocation) + } + + if v.Options != nil { + ok := object.Key("Options") + if err := awsRestjson1_serializeDocumentConnectAttachmentOptions(v.Options, ok); err != nil { + return err + } } if v.Tags != nil { @@ -589,17 +520,22 @@ func awsRestjson1_serializeOpDocumentCreateGlobalNetworkInput(v *CreateGlobalNet } } + if v.TransportAttachmentId != nil { + ok := object.Key("TransportAttachmentId") + ok.String(*v.TransportAttachmentId) + } + return nil } -type awsRestjson1_serializeOpCreateLink struct { +type awsRestjson1_serializeOpCreateConnection struct { } -func (*awsRestjson1_serializeOpCreateLink) ID() string { +func (*awsRestjson1_serializeOpCreateConnection) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -607,13 +543,13 @@ func (m *awsRestjson1_serializeOpCreateLink) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateLinkInput) + input, ok := in.Parameters.(*CreateConnectionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/links") + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/connections") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -622,14 +558,14 @@ func (m *awsRestjson1_serializeOpCreateLink) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateLinkInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsCreateConnectionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateLinkInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateConnectionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -644,7 +580,7 @@ func (m *awsRestjson1_serializeOpCreateLink) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateLinkInput(v *CreateLinkInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateConnectionInput(v *CreateConnectionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -661,15 +597,18 @@ func awsRestjson1_serializeOpHttpBindingsCreateLinkInput(v *CreateLinkInput, enc return nil } -func awsRestjson1_serializeOpDocumentCreateLinkInput(v *CreateLinkInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateConnectionInput(v *CreateConnectionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Bandwidth != nil { - ok := object.Key("Bandwidth") - if err := awsRestjson1_serializeDocumentBandwidth(v.Bandwidth, ok); err != nil { - return err - } + if v.ConnectedDeviceId != nil { + ok := object.Key("ConnectedDeviceId") + ok.String(*v.ConnectedDeviceId) + } + + if v.ConnectedLinkId != nil { + ok := object.Key("ConnectedLinkId") + ok.String(*v.ConnectedLinkId) } if v.Description != nil { @@ -677,14 +616,14 @@ func awsRestjson1_serializeOpDocumentCreateLinkInput(v *CreateLinkInput, value s ok.String(*v.Description) } - if v.Provider != nil { - ok := object.Key("Provider") - ok.String(*v.Provider) + if v.DeviceId != nil { + ok := object.Key("DeviceId") + ok.String(*v.DeviceId) } - if v.SiteId != nil { - ok := object.Key("SiteId") - ok.String(*v.SiteId) + if v.LinkId != nil { + ok := object.Key("LinkId") + ok.String(*v.LinkId) } if v.Tags != nil { @@ -694,22 +633,17 @@ func awsRestjson1_serializeOpDocumentCreateLinkInput(v *CreateLinkInput, value s } } - if v.Type != nil { - ok := object.Key("Type") - ok.String(*v.Type) - } - return nil } -type awsRestjson1_serializeOpCreateSite struct { +type awsRestjson1_serializeOpCreateConnectPeer struct { } -func (*awsRestjson1_serializeOpCreateSite) ID() string { +func (*awsRestjson1_serializeOpCreateConnectPeer) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateSite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateConnectPeer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -717,13 +651,13 @@ func (m *awsRestjson1_serializeOpCreateSite) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateSiteInput) + input, ok := in.Parameters.(*CreateConnectPeerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/sites") + opPath, opQuery := httpbinding.SplitURI("/connect-peers") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -732,14 +666,10 @@ func (m *awsRestjson1_serializeOpCreateSite) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateSiteInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateSiteInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateConnectPeerInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -754,39 +684,52 @@ func (m *awsRestjson1_serializeOpCreateSite) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateSiteInput(v *CreateSiteInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateConnectPeerInput(v *CreateConnectPeerInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} - } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { - return err - } - } - return nil } -func awsRestjson1_serializeOpDocumentCreateSiteInput(v *CreateSiteInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateConnectPeerInput(v *CreateConnectPeerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Description != nil { - ok := object.Key("Description") - ok.String(*v.Description) + if v.BgpOptions != nil { + ok := object.Key("BgpOptions") + if err := awsRestjson1_serializeDocumentBgpOptions(v.BgpOptions, ok); err != nil { + return err + } } - if v.Location != nil { - ok := object.Key("Location") - if err := awsRestjson1_serializeDocumentLocation(v.Location, ok); err != nil { + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.ConnectAttachmentId != nil { + ok := object.Key("ConnectAttachmentId") + ok.String(*v.ConnectAttachmentId) + } + + if v.CoreNetworkAddress != nil { + ok := object.Key("CoreNetworkAddress") + ok.String(*v.CoreNetworkAddress) + } + + if v.InsideCidrBlocks != nil { + ok := object.Key("InsideCidrBlocks") + if err := awsRestjson1_serializeDocumentConstrainedStringList(v.InsideCidrBlocks, ok); err != nil { return err } } + if v.PeerAddress != nil { + ok := object.Key("PeerAddress") + ok.String(*v.PeerAddress) + } + if v.Tags != nil { ok := object.Key("Tags") if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { @@ -797,14 +740,14 @@ func awsRestjson1_serializeOpDocumentCreateSiteInput(v *CreateSiteInput, value s return nil } -type awsRestjson1_serializeOpDeleteConnection struct { +type awsRestjson1_serializeOpCreateCoreNetwork struct { } -func (*awsRestjson1_serializeOpDeleteConnection) ID() string { +func (*awsRestjson1_serializeOpCreateCoreNetwork) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateCoreNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -812,22 +755,29 @@ func (m *awsRestjson1_serializeOpDeleteConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteConnectionInput) + input, ok := in.Parameters.(*CreateCoreNetworkInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/connections/{ConnectionId}") + opPath, opQuery := httpbinding.SplitURI("/core-networks") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteConnectionInput(input, restEncoder); err != nil { + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateCoreNetworkInput(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} } @@ -838,25 +788,41 @@ func (m *awsRestjson1_serializeOpDeleteConnection) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteConnectionInput(v *DeleteConnectionInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateCoreNetworkInput(v *CreateCoreNetworkInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ConnectionId == nil || len(*v.ConnectionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ConnectionId must not be empty")} - } - if v.ConnectionId != nil { - if err := encoder.SetURI("ConnectionId").String(*v.ConnectionId); err != nil { - return err - } + return nil +} + +func awsRestjson1_serializeOpDocumentCreateCoreNetworkInput(v *CreateCoreNetworkInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) } + if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + ok := object.Key("GlobalNetworkId") + ok.String(*v.GlobalNetworkId) + } + + if v.PolicyDocument != nil { + ok := object.Key("PolicyDocument") + ok.String(*v.PolicyDocument) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } @@ -864,14 +830,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteConnectionInput(v *DeleteConnecti return nil } -type awsRestjson1_serializeOpDeleteDevice struct { +type awsRestjson1_serializeOpCreateDevice struct { } -func (*awsRestjson1_serializeOpDeleteDevice) ID() string { +func (*awsRestjson1_serializeOpCreateDevice) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteDevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateDevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -879,22 +845,33 @@ func (m *awsRestjson1_serializeOpDeleteDevice) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteDeviceInput) + input, ok := in.Parameters.(*CreateDeviceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/devices/{DeviceId}") + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/devices") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteDeviceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsCreateDeviceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateDeviceInput(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} } @@ -905,40 +882,89 @@ func (m *awsRestjson1_serializeOpDeleteDevice) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteDeviceInput(v *DeleteDeviceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateDeviceInput(v *CreateDeviceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.DeviceId == nil || len(*v.DeviceId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DeviceId must not be empty")} + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} } - if v.DeviceId != nil { - if err := encoder.SetURI("DeviceId").String(*v.DeviceId); err != nil { + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { return err } } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + return nil +} + +func awsRestjson1_serializeOpDocumentCreateDeviceInput(v *CreateDeviceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AWSLocation != nil { + ok := object.Key("AWSLocation") + if err := awsRestjson1_serializeDocumentAWSLocation(v.AWSLocation, ok); err != nil { + return err + } } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Location != nil { + ok := object.Key("Location") + if err := awsRestjson1_serializeDocumentLocation(v.Location, ok); err != nil { + return err + } + } + + if v.Model != nil { + ok := object.Key("Model") + ok.String(*v.Model) + } + + if v.SerialNumber != nil { + ok := object.Key("SerialNumber") + ok.String(*v.SerialNumber) + } + + if v.SiteId != nil { + ok := object.Key("SiteId") + ok.String(*v.SiteId) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } + if v.Type != nil { + ok := object.Key("Type") + ok.String(*v.Type) + } + + if v.Vendor != nil { + ok := object.Key("Vendor") + ok.String(*v.Vendor) + } + return nil } -type awsRestjson1_serializeOpDeleteGlobalNetwork struct { +type awsRestjson1_serializeOpCreateGlobalNetwork struct { } -func (*awsRestjson1_serializeOpDeleteGlobalNetwork) ID() string { +func (*awsRestjson1_serializeOpCreateGlobalNetwork) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteGlobalNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateGlobalNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -946,22 +972,29 @@ func (m *awsRestjson1_serializeOpDeleteGlobalNetwork) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteGlobalNetworkInput) + input, ok := in.Parameters.(*CreateGlobalNetworkInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}") + opPath, opQuery := httpbinding.SplitURI("/global-networks") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteGlobalNetworkInput(input, restEncoder); err != nil { + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateGlobalNetworkInput(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} } @@ -972,16 +1005,26 @@ func (m *awsRestjson1_serializeOpDeleteGlobalNetwork) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteGlobalNetworkInput(v *DeleteGlobalNetworkInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateGlobalNetworkInput(v *CreateGlobalNetworkInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + return nil +} + +func awsRestjson1_serializeOpDocumentCreateGlobalNetworkInput(v *CreateGlobalNetworkInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } @@ -989,14 +1032,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteGlobalNetworkInput(v *DeleteGloba return nil } -type awsRestjson1_serializeOpDeleteLink struct { +type awsRestjson1_serializeOpCreateLink struct { } -func (*awsRestjson1_serializeOpDeleteLink) ID() string { +func (*awsRestjson1_serializeOpCreateLink) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1004,22 +1047,33 @@ func (m *awsRestjson1_serializeOpDeleteLink) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteLinkInput) + input, ok := in.Parameters.(*CreateLinkInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/links/{LinkId}") + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/links") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteLinkInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsCreateLinkInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateLinkInput(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} } @@ -1030,7 +1084,7 @@ func (m *awsRestjson1_serializeOpDeleteLink) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteLinkInput(v *DeleteLinkInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateLinkInput(v *CreateLinkInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1044,26 +1098,58 @@ func awsRestjson1_serializeOpHttpBindingsDeleteLinkInput(v *DeleteLinkInput, enc } } - if v.LinkId == nil || len(*v.LinkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member LinkId must not be empty")} - } - if v.LinkId != nil { - if err := encoder.SetURI("LinkId").String(*v.LinkId); err != nil { - return err - } - } + return nil +} + +func awsRestjson1_serializeOpDocumentCreateLinkInput(v *CreateLinkInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Bandwidth != nil { + ok := object.Key("Bandwidth") + if err := awsRestjson1_serializeDocumentBandwidth(v.Bandwidth, ok); err != nil { + return err + } + } + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + if v.Provider != nil { + ok := object.Key("Provider") + ok.String(*v.Provider) + } + + if v.SiteId != nil { + ok := object.Key("SiteId") + ok.String(*v.SiteId) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if v.Type != nil { + ok := object.Key("Type") + ok.String(*v.Type) + } return nil } -type awsRestjson1_serializeOpDeleteSite struct { +type awsRestjson1_serializeOpCreateSite struct { } -func (*awsRestjson1_serializeOpDeleteSite) ID() string { +func (*awsRestjson1_serializeOpCreateSite) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteSite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateSite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1071,22 +1157,33 @@ func (m *awsRestjson1_serializeOpDeleteSite) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteSiteInput) + input, ok := in.Parameters.(*CreateSiteInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/sites/{SiteId}") + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/sites") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteSiteInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsCreateSiteInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateSiteInput(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} } @@ -1097,7 +1194,7 @@ func (m *awsRestjson1_serializeOpDeleteSite) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteSiteInput(v *DeleteSiteInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateSiteInput(v *CreateSiteInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1111,11 +1208,28 @@ func awsRestjson1_serializeOpHttpBindingsDeleteSiteInput(v *DeleteSiteInput, enc } } - if v.SiteId == nil || len(*v.SiteId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member SiteId must not be empty")} + return nil +} + +func awsRestjson1_serializeOpDocumentCreateSiteInput(v *CreateSiteInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) } - if v.SiteId != nil { - if err := encoder.SetURI("SiteId").String(*v.SiteId); err != nil { + + if v.Location != nil { + ok := object.Key("Location") + if err := awsRestjson1_serializeDocumentLocation(v.Location, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } @@ -1123,14 +1237,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteSiteInput(v *DeleteSiteInput, enc return nil } -type awsRestjson1_serializeOpDeregisterTransitGateway struct { +type awsRestjson1_serializeOpCreateSiteToSiteVpnAttachment struct { } -func (*awsRestjson1_serializeOpDeregisterTransitGateway) ID() string { +func (*awsRestjson1_serializeOpCreateSiteToSiteVpnAttachment) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeregisterTransitGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateSiteToSiteVpnAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1138,22 +1252,29 @@ func (m *awsRestjson1_serializeOpDeregisterTransitGateway) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeregisterTransitGatewayInput) + input, ok := in.Parameters.(*CreateSiteToSiteVpnAttachmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/transit-gateway-registrations/{TransitGatewayArn}") + opPath, opQuery := httpbinding.SplitURI("/site-to-site-vpn-attachments") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeregisterTransitGatewayInput(input, restEncoder); err != nil { + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateSiteToSiteVpnAttachmentInput(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} } @@ -1164,40 +1285,51 @@ func (m *awsRestjson1_serializeOpDeregisterTransitGateway) HandleSerialize(ctx c return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeregisterTransitGatewayInput(v *DeregisterTransitGatewayInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateSiteToSiteVpnAttachmentInput(v *CreateSiteToSiteVpnAttachmentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} - } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { - return err - } + return nil +} + +func awsRestjson1_serializeOpDocumentCreateSiteToSiteVpnAttachmentInput(v *CreateSiteToSiteVpnAttachmentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) } - if v.TransitGatewayArn == nil || len(*v.TransitGatewayArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member TransitGatewayArn must not be empty")} + if v.CoreNetworkId != nil { + ok := object.Key("CoreNetworkId") + ok.String(*v.CoreNetworkId) } - if v.TransitGatewayArn != nil { - if err := encoder.SetURI("TransitGatewayArn").String(*v.TransitGatewayArn); err != nil { + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } + if v.VpnConnectionArn != nil { + ok := object.Key("VpnConnectionArn") + ok.String(*v.VpnConnectionArn) + } + return nil } -type awsRestjson1_serializeOpDescribeGlobalNetworks struct { +type awsRestjson1_serializeOpCreateVpcAttachment struct { } -func (*awsRestjson1_serializeOpDescribeGlobalNetworks) ID() string { +func (*awsRestjson1_serializeOpCreateVpcAttachment) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeGlobalNetworks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateVpcAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1205,22 +1337,29 @@ func (m *awsRestjson1_serializeOpDescribeGlobalNetworks) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeGlobalNetworksInput) + input, ok := in.Parameters.(*CreateVpcAttachmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks") + opPath, opQuery := httpbinding.SplitURI("/vpc-attachments") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeGlobalNetworksInput(input, restEncoder); err != nil { + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateVpcAttachmentInput(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} } @@ -1231,36 +1370,65 @@ func (m *awsRestjson1_serializeOpDescribeGlobalNetworks) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeGlobalNetworksInput(v *DescribeGlobalNetworksInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateVpcAttachmentInput(v *CreateVpcAttachmentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.GlobalNetworkIds != nil { - for i := range v.GlobalNetworkIds { - encoder.AddQuery("globalNetworkIds").String(v.GlobalNetworkIds[i]) + return nil +} + +func awsRestjson1_serializeOpDocumentCreateVpcAttachmentInput(v *CreateVpcAttachmentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.CoreNetworkId != nil { + ok := object.Key("CoreNetworkId") + ok.String(*v.CoreNetworkId) + } + + if v.Options != nil { + ok := object.Key("Options") + if err := awsRestjson1_serializeDocumentVpcOptions(v.Options, ok); err != nil { + return err } } - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) + if v.SubnetArns != nil { + ok := object.Key("SubnetArns") + if err := awsRestjson1_serializeDocumentSubnetArnList(v.SubnetArns, ok); err != nil { + return err + } } - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if v.VpcArn != nil { + ok := object.Key("VpcArn") + ok.String(*v.VpcArn) } return nil } -type awsRestjson1_serializeOpDisassociateCustomerGateway struct { +type awsRestjson1_serializeOpDeleteAttachment struct { } -func (*awsRestjson1_serializeOpDisassociateCustomerGateway) ID() string { +func (*awsRestjson1_serializeOpDeleteAttachment) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDisassociateCustomerGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1268,13 +1436,13 @@ func (m *awsRestjson1_serializeOpDisassociateCustomerGateway) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DisassociateCustomerGatewayInput) + input, ok := in.Parameters.(*DeleteAttachmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/customer-gateway-associations/{CustomerGatewayArn}") + opPath, opQuery := httpbinding.SplitURI("/attachments/{AttachmentId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -1283,7 +1451,7 @@ func (m *awsRestjson1_serializeOpDisassociateCustomerGateway) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDisassociateCustomerGatewayInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteAttachmentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1294,25 +1462,16 @@ func (m *awsRestjson1_serializeOpDisassociateCustomerGateway) HandleSerialize(ct return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDisassociateCustomerGatewayInput(v *DisassociateCustomerGatewayInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteAttachmentInput(v *DeleteAttachmentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.CustomerGatewayArn == nil || len(*v.CustomerGatewayArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member CustomerGatewayArn must not be empty")} - } - if v.CustomerGatewayArn != nil { - if err := encoder.SetURI("CustomerGatewayArn").String(*v.CustomerGatewayArn); err != nil { - return err - } - } - - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + if v.AttachmentId == nil || len(*v.AttachmentId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AttachmentId must not be empty")} } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + if v.AttachmentId != nil { + if err := encoder.SetURI("AttachmentId").String(*v.AttachmentId); err != nil { return err } } @@ -1320,14 +1479,14 @@ func awsRestjson1_serializeOpHttpBindingsDisassociateCustomerGatewayInput(v *Dis return nil } -type awsRestjson1_serializeOpDisassociateLink struct { +type awsRestjson1_serializeOpDeleteConnection struct { } -func (*awsRestjson1_serializeOpDisassociateLink) ID() string { +func (*awsRestjson1_serializeOpDeleteConnection) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDisassociateLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1335,13 +1494,13 @@ func (m *awsRestjson1_serializeOpDisassociateLink) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DisassociateLinkInput) + input, ok := in.Parameters.(*DeleteConnectionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/link-associations") + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/connections/{ConnectionId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -1350,7 +1509,7 @@ func (m *awsRestjson1_serializeOpDisassociateLink) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDisassociateLinkInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteConnectionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1361,13 +1520,18 @@ func (m *awsRestjson1_serializeOpDisassociateLink) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDisassociateLinkInput(v *DisassociateLinkInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteConnectionInput(v *DeleteConnectionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.DeviceId != nil { - encoder.SetQuery("deviceId").String(*v.DeviceId) + if v.ConnectionId == nil || len(*v.ConnectionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ConnectionId must not be empty")} + } + if v.ConnectionId != nil { + if err := encoder.SetURI("ConnectionId").String(*v.ConnectionId); err != nil { + return err + } } if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { @@ -1379,21 +1543,17 @@ func awsRestjson1_serializeOpHttpBindingsDisassociateLinkInput(v *DisassociateLi } } - if v.LinkId != nil { - encoder.SetQuery("linkId").String(*v.LinkId) - } - return nil } -type awsRestjson1_serializeOpDisassociateTransitGatewayConnectPeer struct { +type awsRestjson1_serializeOpDeleteConnectPeer struct { } -func (*awsRestjson1_serializeOpDisassociateTransitGatewayConnectPeer) ID() string { +func (*awsRestjson1_serializeOpDeleteConnectPeer) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDisassociateTransitGatewayConnectPeer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteConnectPeer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1401,13 +1561,13 @@ func (m *awsRestjson1_serializeOpDisassociateTransitGatewayConnectPeer) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DisassociateTransitGatewayConnectPeerInput) + input, ok := in.Parameters.(*DeleteConnectPeerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/transit-gateway-connect-peer-associations/{TransitGatewayConnectPeerArn}") + opPath, opQuery := httpbinding.SplitURI("/connect-peers/{ConnectPeerId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -1416,7 +1576,7 @@ func (m *awsRestjson1_serializeOpDisassociateTransitGatewayConnectPeer) HandleSe return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDisassociateTransitGatewayConnectPeerInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteConnectPeerInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1427,25 +1587,16 @@ func (m *awsRestjson1_serializeOpDisassociateTransitGatewayConnectPeer) HandleSe return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDisassociateTransitGatewayConnectPeerInput(v *DisassociateTransitGatewayConnectPeerInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteConnectPeerInput(v *DeleteConnectPeerInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} - } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { - return err - } - } - - if v.TransitGatewayConnectPeerArn == nil || len(*v.TransitGatewayConnectPeerArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member TransitGatewayConnectPeerArn must not be empty")} + if v.ConnectPeerId == nil || len(*v.ConnectPeerId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ConnectPeerId must not be empty")} } - if v.TransitGatewayConnectPeerArn != nil { - if err := encoder.SetURI("TransitGatewayConnectPeerArn").String(*v.TransitGatewayConnectPeerArn); err != nil { + if v.ConnectPeerId != nil { + if err := encoder.SetURI("ConnectPeerId").String(*v.ConnectPeerId); err != nil { return err } } @@ -1453,14 +1604,14 @@ func awsRestjson1_serializeOpHttpBindingsDisassociateTransitGatewayConnectPeerIn return nil } -type awsRestjson1_serializeOpGetConnections struct { +type awsRestjson1_serializeOpDeleteCoreNetwork struct { } -func (*awsRestjson1_serializeOpGetConnections) ID() string { +func (*awsRestjson1_serializeOpDeleteCoreNetwork) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteCoreNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1468,22 +1619,22 @@ func (m *awsRestjson1_serializeOpGetConnections) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetConnectionsInput) + input, ok := in.Parameters.(*DeleteCoreNetworkInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/connections") + opPath, opQuery := httpbinding.SplitURI("/core-networks/{CoreNetworkId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "DELETE" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetConnectionsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteCoreNetworkInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1494,49 +1645,2185 @@ func (m *awsRestjson1_serializeOpGetConnections) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetConnectionsInput(v *GetConnectionsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteCoreNetworkInput(v *DeleteCoreNetworkInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ConnectionIds != nil { - for i := range v.ConnectionIds { - encoder.AddQuery("connectionIds").String(v.ConnectionIds[i]) + if v.CoreNetworkId == nil || len(*v.CoreNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CoreNetworkId must not be empty")} + } + if v.CoreNetworkId != nil { + if err := encoder.SetURI("CoreNetworkId").String(*v.CoreNetworkId); err != nil { + return err } } - if v.DeviceId != nil { + return nil +} + +type awsRestjson1_serializeOpDeleteCoreNetworkPolicyVersion struct { +} + +func (*awsRestjson1_serializeOpDeleteCoreNetworkPolicyVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteCoreNetworkPolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteCoreNetworkPolicyVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/core-networks/{CoreNetworkId}/core-network-policy-versions/{PolicyVersionId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteCoreNetworkPolicyVersionInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteCoreNetworkPolicyVersionInput(v *DeleteCoreNetworkPolicyVersionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CoreNetworkId == nil || len(*v.CoreNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CoreNetworkId must not be empty")} + } + if v.CoreNetworkId != nil { + if err := encoder.SetURI("CoreNetworkId").String(*v.CoreNetworkId); err != nil { + return err + } + } + + if v.PolicyVersionId == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member PolicyVersionId must not be empty")} + } + if v.PolicyVersionId != nil { + if err := encoder.SetURI("PolicyVersionId").Integer(*v.PolicyVersionId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteDevice struct { +} + +func (*awsRestjson1_serializeOpDeleteDevice) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteDevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteDeviceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/devices/{DeviceId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteDeviceInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteDeviceInput(v *DeleteDeviceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DeviceId == nil || len(*v.DeviceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DeviceId must not be empty")} + } + if v.DeviceId != nil { + if err := encoder.SetURI("DeviceId").String(*v.DeviceId); err != nil { + return err + } + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteGlobalNetwork struct { +} + +func (*awsRestjson1_serializeOpDeleteGlobalNetwork) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteGlobalNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteGlobalNetworkInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteGlobalNetworkInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteGlobalNetworkInput(v *DeleteGlobalNetworkInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteLink struct { +} + +func (*awsRestjson1_serializeOpDeleteLink) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteLinkInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/links/{LinkId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteLinkInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteLinkInput(v *DeleteLinkInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + return err + } + } + + if v.LinkId == nil || len(*v.LinkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member LinkId must not be empty")} + } + if v.LinkId != nil { + if err := encoder.SetURI("LinkId").String(*v.LinkId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteResourcePolicy struct { +} + +func (*awsRestjson1_serializeOpDeleteResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/resource-policy/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteResourcePolicyInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteResourcePolicyInput(v *DeleteResourcePolicyInput, 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_serializeOpDeleteSite struct { +} + +func (*awsRestjson1_serializeOpDeleteSite) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteSite) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteSiteInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/sites/{SiteId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteSiteInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteSiteInput(v *DeleteSiteInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + return err + } + } + + if v.SiteId == nil || len(*v.SiteId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SiteId must not be empty")} + } + if v.SiteId != nil { + if err := encoder.SetURI("SiteId").String(*v.SiteId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeregisterTransitGateway struct { +} + +func (*awsRestjson1_serializeOpDeregisterTransitGateway) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeregisterTransitGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeregisterTransitGatewayInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/transit-gateway-registrations/{TransitGatewayArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeregisterTransitGatewayInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeregisterTransitGatewayInput(v *DeregisterTransitGatewayInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + return err + } + } + + if v.TransitGatewayArn == nil || len(*v.TransitGatewayArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TransitGatewayArn must not be empty")} + } + if v.TransitGatewayArn != nil { + if err := encoder.SetURI("TransitGatewayArn").String(*v.TransitGatewayArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeGlobalNetworks struct { +} + +func (*awsRestjson1_serializeOpDescribeGlobalNetworks) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeGlobalNetworks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeGlobalNetworksInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeGlobalNetworksInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeGlobalNetworksInput(v *DescribeGlobalNetworksInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.GlobalNetworkIds != nil { + for i := range v.GlobalNetworkIds { + encoder.AddQuery("globalNetworkIds").String(v.GlobalNetworkIds[i]) + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpDisassociateConnectPeer struct { +} + +func (*awsRestjson1_serializeOpDisassociateConnectPeer) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDisassociateConnectPeer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisassociateConnectPeerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/connect-peer-associations/{ConnectPeerId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDisassociateConnectPeerInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDisassociateConnectPeerInput(v *DisassociateConnectPeerInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ConnectPeerId == nil || len(*v.ConnectPeerId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ConnectPeerId must not be empty")} + } + if v.ConnectPeerId != nil { + if err := encoder.SetURI("ConnectPeerId").String(*v.ConnectPeerId); err != nil { + return err + } + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDisassociateCustomerGateway struct { +} + +func (*awsRestjson1_serializeOpDisassociateCustomerGateway) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDisassociateCustomerGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisassociateCustomerGatewayInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/customer-gateway-associations/{CustomerGatewayArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDisassociateCustomerGatewayInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDisassociateCustomerGatewayInput(v *DisassociateCustomerGatewayInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CustomerGatewayArn == nil || len(*v.CustomerGatewayArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CustomerGatewayArn must not be empty")} + } + if v.CustomerGatewayArn != nil { + if err := encoder.SetURI("CustomerGatewayArn").String(*v.CustomerGatewayArn); err != nil { + return err + } + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDisassociateLink struct { +} + +func (*awsRestjson1_serializeOpDisassociateLink) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDisassociateLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisassociateLinkInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/link-associations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDisassociateLinkInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDisassociateLinkInput(v *DisassociateLinkInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DeviceId != nil { + encoder.SetQuery("deviceId").String(*v.DeviceId) + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + return err + } + } + + if v.LinkId != nil { + encoder.SetQuery("linkId").String(*v.LinkId) + } + + return nil +} + +type awsRestjson1_serializeOpDisassociateTransitGatewayConnectPeer struct { +} + +func (*awsRestjson1_serializeOpDisassociateTransitGatewayConnectPeer) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDisassociateTransitGatewayConnectPeer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DisassociateTransitGatewayConnectPeerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/transit-gateway-connect-peer-associations/{TransitGatewayConnectPeerArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDisassociateTransitGatewayConnectPeerInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDisassociateTransitGatewayConnectPeerInput(v *DisassociateTransitGatewayConnectPeerInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + return err + } + } + + if v.TransitGatewayConnectPeerArn == nil || len(*v.TransitGatewayConnectPeerArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member TransitGatewayConnectPeerArn must not be empty")} + } + if v.TransitGatewayConnectPeerArn != nil { + if err := encoder.SetURI("TransitGatewayConnectPeerArn").String(*v.TransitGatewayConnectPeerArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpExecuteCoreNetworkChangeSet struct { +} + +func (*awsRestjson1_serializeOpExecuteCoreNetworkChangeSet) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpExecuteCoreNetworkChangeSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ExecuteCoreNetworkChangeSetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/core-networks/{CoreNetworkId}/core-network-change-sets/{PolicyVersionId}/execute") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsExecuteCoreNetworkChangeSetInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsExecuteCoreNetworkChangeSetInput(v *ExecuteCoreNetworkChangeSetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CoreNetworkId == nil || len(*v.CoreNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CoreNetworkId must not be empty")} + } + if v.CoreNetworkId != nil { + if err := encoder.SetURI("CoreNetworkId").String(*v.CoreNetworkId); err != nil { + return err + } + } + + if v.PolicyVersionId == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member PolicyVersionId must not be empty")} + } + if v.PolicyVersionId != nil { + if err := encoder.SetURI("PolicyVersionId").Integer(*v.PolicyVersionId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetConnectAttachment struct { +} + +func (*awsRestjson1_serializeOpGetConnectAttachment) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetConnectAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetConnectAttachmentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/connect-attachments/{AttachmentId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetConnectAttachmentInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetConnectAttachmentInput(v *GetConnectAttachmentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AttachmentId == nil || len(*v.AttachmentId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AttachmentId must not be empty")} + } + if v.AttachmentId != nil { + if err := encoder.SetURI("AttachmentId").String(*v.AttachmentId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetConnections struct { +} + +func (*awsRestjson1_serializeOpGetConnections) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetConnectionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/connections") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetConnectionsInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetConnectionsInput(v *GetConnectionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ConnectionIds != nil { + for i := range v.ConnectionIds { + encoder.AddQuery("connectionIds").String(v.ConnectionIds[i]) + } + } + + if v.DeviceId != nil { + encoder.SetQuery("deviceId").String(*v.DeviceId) + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpGetConnectPeer struct { +} + +func (*awsRestjson1_serializeOpGetConnectPeer) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetConnectPeer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetConnectPeerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/connect-peers/{ConnectPeerId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetConnectPeerInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetConnectPeerInput(v *GetConnectPeerInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ConnectPeerId == nil || len(*v.ConnectPeerId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ConnectPeerId must not be empty")} + } + if v.ConnectPeerId != nil { + if err := encoder.SetURI("ConnectPeerId").String(*v.ConnectPeerId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetConnectPeerAssociations struct { +} + +func (*awsRestjson1_serializeOpGetConnectPeerAssociations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetConnectPeerAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetConnectPeerAssociationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/connect-peer-associations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetConnectPeerAssociationsInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetConnectPeerAssociationsInput(v *GetConnectPeerAssociationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ConnectPeerIds != nil { + for i := range v.ConnectPeerIds { + encoder.AddQuery("connectPeerIds").String(v.ConnectPeerIds[i]) + } + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpGetCoreNetwork struct { +} + +func (*awsRestjson1_serializeOpGetCoreNetwork) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetCoreNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetCoreNetworkInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/core-networks/{CoreNetworkId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetCoreNetworkInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetCoreNetworkInput(v *GetCoreNetworkInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CoreNetworkId == nil || len(*v.CoreNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CoreNetworkId must not be empty")} + } + if v.CoreNetworkId != nil { + if err := encoder.SetURI("CoreNetworkId").String(*v.CoreNetworkId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetCoreNetworkChangeSet struct { +} + +func (*awsRestjson1_serializeOpGetCoreNetworkChangeSet) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetCoreNetworkChangeSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetCoreNetworkChangeSetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/core-networks/{CoreNetworkId}/core-network-change-sets/{PolicyVersionId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetCoreNetworkChangeSetInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetCoreNetworkChangeSetInput(v *GetCoreNetworkChangeSetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CoreNetworkId == nil || len(*v.CoreNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CoreNetworkId must not be empty")} + } + if v.CoreNetworkId != nil { + if err := encoder.SetURI("CoreNetworkId").String(*v.CoreNetworkId); 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.PolicyVersionId == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member PolicyVersionId must not be empty")} + } + if v.PolicyVersionId != nil { + if err := encoder.SetURI("PolicyVersionId").Integer(*v.PolicyVersionId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetCoreNetworkPolicy struct { +} + +func (*awsRestjson1_serializeOpGetCoreNetworkPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetCoreNetworkPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetCoreNetworkPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/core-networks/{CoreNetworkId}/core-network-policy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetCoreNetworkPolicyInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetCoreNetworkPolicyInput(v *GetCoreNetworkPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.Alias) > 0 { + encoder.SetQuery("alias").String(string(v.Alias)) + } + + if v.CoreNetworkId == nil || len(*v.CoreNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CoreNetworkId must not be empty")} + } + if v.CoreNetworkId != nil { + if err := encoder.SetURI("CoreNetworkId").String(*v.CoreNetworkId); err != nil { + return err + } + } + + if v.PolicyVersionId != nil { + encoder.SetQuery("policyVersionId").Integer(*v.PolicyVersionId) + } + + return nil +} + +type awsRestjson1_serializeOpGetCustomerGatewayAssociations struct { +} + +func (*awsRestjson1_serializeOpGetCustomerGatewayAssociations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetCustomerGatewayAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetCustomerGatewayAssociationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/customer-gateway-associations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetCustomerGatewayAssociationsInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetCustomerGatewayAssociationsInput(v *GetCustomerGatewayAssociationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CustomerGatewayArns != nil { + for i := range v.CustomerGatewayArns { + encoder.AddQuery("customerGatewayArns").String(v.CustomerGatewayArns[i]) + } + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpGetDevices struct { +} + +func (*awsRestjson1_serializeOpGetDevices) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetDevices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetDevicesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/devices") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetDevicesInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetDevicesInput(v *GetDevicesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DeviceIds != nil { + for i := range v.DeviceIds { + encoder.AddQuery("deviceIds").String(v.DeviceIds[i]) + } + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); 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.SiteId != nil { + encoder.SetQuery("siteId").String(*v.SiteId) + } + + return nil +} + +type awsRestjson1_serializeOpGetLinkAssociations struct { +} + +func (*awsRestjson1_serializeOpGetLinkAssociations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetLinkAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetLinkAssociationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/link-associations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetLinkAssociationsInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetLinkAssociationsInput(v *GetLinkAssociationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DeviceId != nil { encoder.SetQuery("deviceId").String(*v.DeviceId) } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + return err + } + } + + if v.LinkId != nil { + encoder.SetQuery("linkId").String(*v.LinkId) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpGetLinks struct { +} + +func (*awsRestjson1_serializeOpGetLinks) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetLinks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetLinksInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/links") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetLinksInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetLinksInput(v *GetLinksInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + return err + } + } + + if v.LinkIds != nil { + for i := range v.LinkIds { + encoder.AddQuery("linkIds").String(v.LinkIds[i]) + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.Provider != nil { + encoder.SetQuery("provider").String(*v.Provider) + } + + if v.SiteId != nil { + encoder.SetQuery("siteId").String(*v.SiteId) + } + + if v.Type != nil { + encoder.SetQuery("type").String(*v.Type) + } + + return nil +} + +type awsRestjson1_serializeOpGetNetworkResourceCounts struct { +} + +func (*awsRestjson1_serializeOpGetNetworkResourceCounts) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetNetworkResourceCounts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetNetworkResourceCountsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/network-resource-count") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetNetworkResourceCountsInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetNetworkResourceCountsInput(v *GetNetworkResourceCountsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); 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.ResourceType != nil { + encoder.SetQuery("resourceType").String(*v.ResourceType) + } + + return nil +} + +type awsRestjson1_serializeOpGetNetworkResourceRelationships struct { +} + +func (*awsRestjson1_serializeOpGetNetworkResourceRelationships) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetNetworkResourceRelationships) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetNetworkResourceRelationshipsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/network-resource-relationships") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetNetworkResourceRelationshipsInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetNetworkResourceRelationshipsInput(v *GetNetworkResourceRelationshipsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AccountId != nil { + encoder.SetQuery("accountId").String(*v.AccountId) + } + + if v.AwsRegion != nil { + encoder.SetQuery("awsRegion").String(*v.AwsRegion) + } + + if v.CoreNetworkId != nil { + encoder.SetQuery("coreNetworkId").String(*v.CoreNetworkId) + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); 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.RegisteredGatewayArn != nil { + encoder.SetQuery("registeredGatewayArn").String(*v.RegisteredGatewayArn) + } + + if v.ResourceArn != nil { + encoder.SetQuery("resourceArn").String(*v.ResourceArn) + } + + if v.ResourceType != nil { + encoder.SetQuery("resourceType").String(*v.ResourceType) + } + + return nil +} + +type awsRestjson1_serializeOpGetNetworkResources struct { +} + +func (*awsRestjson1_serializeOpGetNetworkResources) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetNetworkResources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetNetworkResourcesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/network-resources") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetNetworkResourcesInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetNetworkResourcesInput(v *GetNetworkResourcesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AccountId != nil { + encoder.SetQuery("accountId").String(*v.AccountId) + } + + if v.AwsRegion != nil { + encoder.SetQuery("awsRegion").String(*v.AwsRegion) + } + + if v.CoreNetworkId != nil { + encoder.SetQuery("coreNetworkId").String(*v.CoreNetworkId) + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); 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.RegisteredGatewayArn != nil { + encoder.SetQuery("registeredGatewayArn").String(*v.RegisteredGatewayArn) + } + + if v.ResourceArn != nil { + encoder.SetQuery("resourceArn").String(*v.ResourceArn) + } + + if v.ResourceType != nil { + encoder.SetQuery("resourceType").String(*v.ResourceType) + } + + return nil +} + +type awsRestjson1_serializeOpGetNetworkRoutes struct { +} + +func (*awsRestjson1_serializeOpGetNetworkRoutes) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetNetworkRoutes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetNetworkRoutesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/network-routes") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetNetworkRoutesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetNetworkRoutesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetNetworkRoutesInput(v *GetNetworkRoutesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetNetworkRoutesInput(v *GetNetworkRoutesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DestinationFilters != nil { + ok := object.Key("DestinationFilters") + if err := awsRestjson1_serializeDocumentFilterMap(v.DestinationFilters, ok); err != nil { + return err + } + } + + if v.ExactCidrMatches != nil { + ok := object.Key("ExactCidrMatches") + if err := awsRestjson1_serializeDocumentConstrainedStringList(v.ExactCidrMatches, ok); err != nil { + return err + } + } + + if v.LongestPrefixMatches != nil { + ok := object.Key("LongestPrefixMatches") + if err := awsRestjson1_serializeDocumentConstrainedStringList(v.LongestPrefixMatches, ok); err != nil { + return err + } + } + + if v.PrefixListIds != nil { + ok := object.Key("PrefixListIds") + if err := awsRestjson1_serializeDocumentConstrainedStringList(v.PrefixListIds, ok); err != nil { + return err + } + } + + if v.RouteTableIdentifier != nil { + ok := object.Key("RouteTableIdentifier") + if err := awsRestjson1_serializeDocumentRouteTableIdentifier(v.RouteTableIdentifier, ok); err != nil { + return err + } + } + + if v.States != nil { + ok := object.Key("States") + if err := awsRestjson1_serializeDocumentRouteStateList(v.States, ok); err != nil { + return err + } + } + + if v.SubnetOfMatches != nil { + ok := object.Key("SubnetOfMatches") + if err := awsRestjson1_serializeDocumentConstrainedStringList(v.SubnetOfMatches, ok); err != nil { + return err + } + } + + if v.SupernetOfMatches != nil { + ok := object.Key("SupernetOfMatches") + if err := awsRestjson1_serializeDocumentConstrainedStringList(v.SupernetOfMatches, ok); err != nil { + return err + } + } + + if v.Types != nil { + ok := object.Key("Types") + if err := awsRestjson1_serializeDocumentRouteTypeList(v.Types, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetNetworkTelemetry struct { +} + +func (*awsRestjson1_serializeOpGetNetworkTelemetry) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetNetworkTelemetry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetNetworkTelemetryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/network-telemetry") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetNetworkTelemetryInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetNetworkTelemetryInput(v *GetNetworkTelemetryInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AccountId != nil { + encoder.SetQuery("accountId").String(*v.AccountId) + } + + if v.AwsRegion != nil { + encoder.SetQuery("awsRegion").String(*v.AwsRegion) + } + + if v.CoreNetworkId != nil { + encoder.SetQuery("coreNetworkId").String(*v.CoreNetworkId) + } + + if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + } + if v.GlobalNetworkId != nil { + if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); 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.RegisteredGatewayArn != nil { + encoder.SetQuery("registeredGatewayArn").String(*v.RegisteredGatewayArn) + } + + if v.ResourceArn != nil { + encoder.SetQuery("resourceArn").String(*v.ResourceArn) + } + + if v.ResourceType != nil { + encoder.SetQuery("resourceType").String(*v.ResourceType) + } + + return nil +} + +type awsRestjson1_serializeOpGetResourcePolicy struct { +} + +func (*awsRestjson1_serializeOpGetResourcePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetResourcePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/resource-policy/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetResourcePolicyInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetResourcePolicyInput(v *GetResourcePolicyInput, 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.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { return err } } - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - return nil } -type awsRestjson1_serializeOpGetCustomerGatewayAssociations struct { +type awsRestjson1_serializeOpGetRouteAnalysis struct { } -func (*awsRestjson1_serializeOpGetCustomerGatewayAssociations) ID() string { +func (*awsRestjson1_serializeOpGetRouteAnalysis) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetCustomerGatewayAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetRouteAnalysis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1544,13 +3831,13 @@ func (m *awsRestjson1_serializeOpGetCustomerGatewayAssociations) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetCustomerGatewayAssociationsInput) + input, ok := in.Parameters.(*GetRouteAnalysisInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/customer-gateway-associations") + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/route-analyses/{RouteAnalysisId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -1559,7 +3846,7 @@ func (m *awsRestjson1_serializeOpGetCustomerGatewayAssociations) HandleSerialize return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetCustomerGatewayAssociationsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetRouteAnalysisInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1570,17 +3857,11 @@ func (m *awsRestjson1_serializeOpGetCustomerGatewayAssociations) HandleSerialize return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetCustomerGatewayAssociationsInput(v *GetCustomerGatewayAssociationsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetRouteAnalysisInput(v *GetRouteAnalysisInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.CustomerGatewayArns != nil { - for i := range v.CustomerGatewayArns { - encoder.AddQuery("customerGatewayArns").String(v.CustomerGatewayArns[i]) - } - } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} } @@ -1590,25 +3871,26 @@ func awsRestjson1_serializeOpHttpBindingsGetCustomerGatewayAssociationsInput(v * } } - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) + if v.RouteAnalysisId == nil || len(*v.RouteAnalysisId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member RouteAnalysisId must not be empty")} } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) + if v.RouteAnalysisId != nil { + if err := encoder.SetURI("RouteAnalysisId").String(*v.RouteAnalysisId); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpGetDevices struct { +type awsRestjson1_serializeOpGetSites struct { } -func (*awsRestjson1_serializeOpGetDevices) ID() string { +func (*awsRestjson1_serializeOpGetSites) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetDevices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetSites) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1616,13 +3898,13 @@ func (m *awsRestjson1_serializeOpGetDevices) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetDevicesInput) + input, ok := in.Parameters.(*GetSitesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/devices") + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/sites") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -1631,7 +3913,7 @@ func (m *awsRestjson1_serializeOpGetDevices) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetDevicesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetSitesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1642,17 +3924,11 @@ func (m *awsRestjson1_serializeOpGetDevices) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetDevicesInput(v *GetDevicesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetSitesInput(v *GetSitesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.DeviceIds != nil { - for i := range v.DeviceIds { - encoder.AddQuery("deviceIds").String(v.DeviceIds[i]) - } - } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} } @@ -1670,21 +3946,23 @@ func awsRestjson1_serializeOpHttpBindingsGetDevicesInput(v *GetDevicesInput, enc encoder.SetQuery("nextToken").String(*v.NextToken) } - if v.SiteId != nil { - encoder.SetQuery("siteId").String(*v.SiteId) + if v.SiteIds != nil { + for i := range v.SiteIds { + encoder.AddQuery("siteIds").String(v.SiteIds[i]) + } } return nil } -type awsRestjson1_serializeOpGetLinkAssociations struct { +type awsRestjson1_serializeOpGetSiteToSiteVpnAttachment struct { } -func (*awsRestjson1_serializeOpGetLinkAssociations) ID() string { +func (*awsRestjson1_serializeOpGetSiteToSiteVpnAttachment) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetLinkAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetSiteToSiteVpnAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1692,13 +3970,13 @@ func (m *awsRestjson1_serializeOpGetLinkAssociations) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetLinkAssociationsInput) + input, ok := in.Parameters.(*GetSiteToSiteVpnAttachmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/link-associations") + opPath, opQuery := httpbinding.SplitURI("/site-to-site-vpn-attachments/{AttachmentId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -1707,7 +3985,7 @@ func (m *awsRestjson1_serializeOpGetLinkAssociations) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetLinkAssociationsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetSiteToSiteVpnAttachmentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1718,47 +3996,31 @@ func (m *awsRestjson1_serializeOpGetLinkAssociations) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetLinkAssociationsInput(v *GetLinkAssociationsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetSiteToSiteVpnAttachmentInput(v *GetSiteToSiteVpnAttachmentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.DeviceId != nil { - encoder.SetQuery("deviceId").String(*v.DeviceId) - } - - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + if v.AttachmentId == nil || len(*v.AttachmentId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AttachmentId must not be empty")} } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + if v.AttachmentId != nil { + if err := encoder.SetURI("AttachmentId").String(*v.AttachmentId); err != nil { return err } } - if v.LinkId != nil { - encoder.SetQuery("linkId").String(*v.LinkId) - } - - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - return nil } -type awsRestjson1_serializeOpGetLinks struct { +type awsRestjson1_serializeOpGetTransitGatewayConnectPeerAssociations struct { } -func (*awsRestjson1_serializeOpGetLinks) ID() string { +func (*awsRestjson1_serializeOpGetTransitGatewayConnectPeerAssociations) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetLinks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetTransitGatewayConnectPeerAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1766,13 +4028,13 @@ func (m *awsRestjson1_serializeOpGetLinks) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetLinksInput) + input, ok := in.Parameters.(*GetTransitGatewayConnectPeerAssociationsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/links") + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/transit-gateway-connect-peer-associations") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -1781,7 +4043,7 @@ func (m *awsRestjson1_serializeOpGetLinks) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetLinksInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetTransitGatewayConnectPeerAssociationsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1792,7 +4054,7 @@ func (m *awsRestjson1_serializeOpGetLinks) HandleSerialize(ctx context.Context, return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetLinksInput(v *GetLinksInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetTransitGatewayConnectPeerAssociationsInput(v *GetTransitGatewayConnectPeerAssociationsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1806,12 +4068,6 @@ func awsRestjson1_serializeOpHttpBindingsGetLinksInput(v *GetLinksInput, encoder } } - if v.LinkIds != nil { - for i := range v.LinkIds { - encoder.AddQuery("linkIds").String(v.LinkIds[i]) - } - } - if v.MaxResults != nil { encoder.SetQuery("maxResults").Integer(*v.MaxResults) } @@ -1820,29 +4076,23 @@ func awsRestjson1_serializeOpHttpBindingsGetLinksInput(v *GetLinksInput, encoder encoder.SetQuery("nextToken").String(*v.NextToken) } - if v.Provider != nil { - encoder.SetQuery("provider").String(*v.Provider) - } - - if v.SiteId != nil { - encoder.SetQuery("siteId").String(*v.SiteId) - } - - if v.Type != nil { - encoder.SetQuery("type").String(*v.Type) + if v.TransitGatewayConnectPeerArns != nil { + for i := range v.TransitGatewayConnectPeerArns { + encoder.AddQuery("transitGatewayConnectPeerArns").String(v.TransitGatewayConnectPeerArns[i]) + } } return nil } -type awsRestjson1_serializeOpGetNetworkResourceCounts struct { +type awsRestjson1_serializeOpGetTransitGatewayRegistrations struct { } -func (*awsRestjson1_serializeOpGetNetworkResourceCounts) ID() string { +func (*awsRestjson1_serializeOpGetTransitGatewayRegistrations) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetNetworkResourceCounts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetTransitGatewayRegistrations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1850,13 +4100,13 @@ func (m *awsRestjson1_serializeOpGetNetworkResourceCounts) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetNetworkResourceCountsInput) + input, ok := in.Parameters.(*GetTransitGatewayRegistrationsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/network-resource-count") + opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/transit-gateway-registrations") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -1865,7 +4115,7 @@ func (m *awsRestjson1_serializeOpGetNetworkResourceCounts) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetNetworkResourceCountsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetTransitGatewayRegistrationsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1876,7 +4126,7 @@ func (m *awsRestjson1_serializeOpGetNetworkResourceCounts) HandleSerialize(ctx c return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetNetworkResourceCountsInput(v *GetNetworkResourceCountsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetTransitGatewayRegistrationsInput(v *GetTransitGatewayRegistrationsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1898,21 +4148,23 @@ func awsRestjson1_serializeOpHttpBindingsGetNetworkResourceCountsInput(v *GetNet encoder.SetQuery("nextToken").String(*v.NextToken) } - if v.ResourceType != nil { - encoder.SetQuery("resourceType").String(*v.ResourceType) + if v.TransitGatewayArns != nil { + for i := range v.TransitGatewayArns { + encoder.AddQuery("transitGatewayArns").String(v.TransitGatewayArns[i]) + } } return nil } -type awsRestjson1_serializeOpGetNetworkResourceRelationships struct { +type awsRestjson1_serializeOpGetVpcAttachment struct { } -func (*awsRestjson1_serializeOpGetNetworkResourceRelationships) ID() string { +func (*awsRestjson1_serializeOpGetVpcAttachment) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetNetworkResourceRelationships) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetVpcAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1920,13 +4172,13 @@ func (m *awsRestjson1_serializeOpGetNetworkResourceRelationships) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetNetworkResourceRelationshipsInput) + input, ok := in.Parameters.(*GetVpcAttachmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/network-resource-relationships") + opPath, opQuery := httpbinding.SplitURI("/vpc-attachments/{AttachmentId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -1935,7 +4187,7 @@ func (m *awsRestjson1_serializeOpGetNetworkResourceRelationships) HandleSerializ return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetNetworkResourceRelationshipsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetVpcAttachmentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1946,59 +4198,31 @@ func (m *awsRestjson1_serializeOpGetNetworkResourceRelationships) HandleSerializ return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetNetworkResourceRelationshipsInput(v *GetNetworkResourceRelationshipsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetVpcAttachmentInput(v *GetVpcAttachmentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccountId != nil { - encoder.SetQuery("accountId").String(*v.AccountId) - } - - if v.AwsRegion != nil { - encoder.SetQuery("awsRegion").String(*v.AwsRegion) - } - - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + if v.AttachmentId == nil || len(*v.AttachmentId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AttachmentId must not be empty")} } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + if v.AttachmentId != nil { + if err := encoder.SetURI("AttachmentId").String(*v.AttachmentId); 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.RegisteredGatewayArn != nil { - encoder.SetQuery("registeredGatewayArn").String(*v.RegisteredGatewayArn) - } - - if v.ResourceArn != nil { - encoder.SetQuery("resourceArn").String(*v.ResourceArn) - } - - if v.ResourceType != nil { - encoder.SetQuery("resourceType").String(*v.ResourceType) - } - return nil } -type awsRestjson1_serializeOpGetNetworkResources struct { +type awsRestjson1_serializeOpListAttachments struct { } -func (*awsRestjson1_serializeOpGetNetworkResources) ID() string { +func (*awsRestjson1_serializeOpListAttachments) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetNetworkResources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListAttachments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2006,13 +4230,13 @@ func (m *awsRestjson1_serializeOpGetNetworkResources) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetNetworkResourcesInput) + input, ok := in.Parameters.(*ListAttachmentsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/network-resources") + opPath, opQuery := httpbinding.SplitURI("/attachments") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2021,7 +4245,7 @@ func (m *awsRestjson1_serializeOpGetNetworkResources) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetNetworkResourcesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListAttachmentsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2032,26 +4256,21 @@ func (m *awsRestjson1_serializeOpGetNetworkResources) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetNetworkResourcesInput(v *GetNetworkResourcesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListAttachmentsInput(v *ListAttachmentsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccountId != nil { - encoder.SetQuery("accountId").String(*v.AccountId) + if len(v.AttachmentType) > 0 { + encoder.SetQuery("attachmentType").String(string(v.AttachmentType)) } - if v.AwsRegion != nil { - encoder.SetQuery("awsRegion").String(*v.AwsRegion) + if v.CoreNetworkId != nil { + encoder.SetQuery("coreNetworkId").String(*v.CoreNetworkId) } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} - } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { - return err - } + if v.EdgeLocation != nil { + encoder.SetQuery("edgeLocation").String(*v.EdgeLocation) } if v.MaxResults != nil { @@ -2062,29 +4281,21 @@ func awsRestjson1_serializeOpHttpBindingsGetNetworkResourcesInput(v *GetNetworkR encoder.SetQuery("nextToken").String(*v.NextToken) } - if v.RegisteredGatewayArn != nil { - encoder.SetQuery("registeredGatewayArn").String(*v.RegisteredGatewayArn) - } - - if v.ResourceArn != nil { - encoder.SetQuery("resourceArn").String(*v.ResourceArn) - } - - if v.ResourceType != nil { - encoder.SetQuery("resourceType").String(*v.ResourceType) + if len(v.State) > 0 { + encoder.SetQuery("state").String(string(v.State)) } return nil } -type awsRestjson1_serializeOpGetNetworkRoutes struct { +type awsRestjson1_serializeOpListConnectPeers struct { } -func (*awsRestjson1_serializeOpGetNetworkRoutes) ID() string { +func (*awsRestjson1_serializeOpListConnectPeers) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetNetworkRoutes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListConnectPeers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2092,33 +4303,22 @@ func (m *awsRestjson1_serializeOpGetNetworkRoutes) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetNetworkRoutesInput) + input, ok := in.Parameters.(*ListConnectPeersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/network-routes") + opPath, opQuery := httpbinding.SplitURI("/connect-peers") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetNetworkRoutesInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentGetNetworkRoutesInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListConnectPeersInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2129,101 +4329,104 @@ func (m *awsRestjson1_serializeOpGetNetworkRoutes) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetNetworkRoutesInput(v *GetNetworkRoutesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListConnectPeersInput(v *ListConnectPeersInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + if v.ConnectAttachmentId != nil { + encoder.SetQuery("connectAttachmentId").String(*v.ConnectAttachmentId) } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { - return err - } + + if v.CoreNetworkId != nil { + encoder.SetQuery("coreNetworkId").String(*v.CoreNetworkId) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } -func awsRestjson1_serializeOpDocumentGetNetworkRoutesInput(v *GetNetworkRoutesInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() +type awsRestjson1_serializeOpListCoreNetworkPolicyVersions struct { +} - if v.DestinationFilters != nil { - ok := object.Key("DestinationFilters") - if err := awsRestjson1_serializeDocumentFilterMap(v.DestinationFilters, ok); err != nil { - return err - } +func (*awsRestjson1_serializeOpListCoreNetworkPolicyVersions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListCoreNetworkPolicyVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - if v.ExactCidrMatches != nil { - ok := object.Key("ExactCidrMatches") - if err := awsRestjson1_serializeDocumentStringList(v.ExactCidrMatches, ok); err != nil { - return err - } + input, ok := in.Parameters.(*ListCoreNetworkPolicyVersionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - if v.LongestPrefixMatches != nil { - ok := object.Key("LongestPrefixMatches") - if err := awsRestjson1_serializeDocumentStringList(v.LongestPrefixMatches, ok); err != nil { - return err - } + opPath, opQuery := httpbinding.SplitURI("/core-networks/{CoreNetworkId}/core-network-policy-versions") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } - if v.PrefixListIds != nil { - ok := object.Key("PrefixListIds") - if err := awsRestjson1_serializeDocumentStringList(v.PrefixListIds, ok); err != nil { - return err - } + if err := awsRestjson1_serializeOpHttpBindingsListCoreNetworkPolicyVersionsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } - if v.RouteTableIdentifier != nil { - ok := object.Key("RouteTableIdentifier") - if err := awsRestjson1_serializeDocumentRouteTableIdentifier(v.RouteTableIdentifier, ok); err != nil { - return err - } + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } + in.Request = request - if v.States != nil { - ok := object.Key("States") - if err := awsRestjson1_serializeDocumentRouteStateList(v.States, ok); err != nil { - return err - } + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListCoreNetworkPolicyVersionsInput(v *ListCoreNetworkPolicyVersionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.SubnetOfMatches != nil { - ok := object.Key("SubnetOfMatches") - if err := awsRestjson1_serializeDocumentStringList(v.SubnetOfMatches, ok); err != nil { + if v.CoreNetworkId == nil || len(*v.CoreNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CoreNetworkId must not be empty")} + } + if v.CoreNetworkId != nil { + if err := encoder.SetURI("CoreNetworkId").String(*v.CoreNetworkId); err != nil { return err } } - if v.SupernetOfMatches != nil { - ok := object.Key("SupernetOfMatches") - if err := awsRestjson1_serializeDocumentStringList(v.SupernetOfMatches, ok); err != nil { - return err - } + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.Types != nil { - ok := object.Key("Types") - if err := awsRestjson1_serializeDocumentRouteTypeList(v.Types, ok); err != nil { - return err - } + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpGetNetworkTelemetry struct { +type awsRestjson1_serializeOpListCoreNetworks struct { } -func (*awsRestjson1_serializeOpGetNetworkTelemetry) ID() string { +func (*awsRestjson1_serializeOpListCoreNetworks) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetNetworkTelemetry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListCoreNetworks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2231,13 +4434,13 @@ func (m *awsRestjson1_serializeOpGetNetworkTelemetry) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetNetworkTelemetryInput) + input, ok := in.Parameters.(*ListCoreNetworksInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/network-telemetry") + opPath, opQuery := httpbinding.SplitURI("/core-networks") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2246,7 +4449,7 @@ func (m *awsRestjson1_serializeOpGetNetworkTelemetry) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetNetworkTelemetryInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListCoreNetworksInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2257,28 +4460,11 @@ func (m *awsRestjson1_serializeOpGetNetworkTelemetry) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetNetworkTelemetryInput(v *GetNetworkTelemetryInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListCoreNetworksInput(v *ListCoreNetworksInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccountId != nil { - encoder.SetQuery("accountId").String(*v.AccountId) - } - - if v.AwsRegion != nil { - encoder.SetQuery("awsRegion").String(*v.AwsRegion) - } - - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} - } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { - return err - } - } - if v.MaxResults != nil { encoder.SetQuery("maxResults").Integer(*v.MaxResults) } @@ -2287,29 +4473,17 @@ func awsRestjson1_serializeOpHttpBindingsGetNetworkTelemetryInput(v *GetNetworkT encoder.SetQuery("nextToken").String(*v.NextToken) } - if v.RegisteredGatewayArn != nil { - encoder.SetQuery("registeredGatewayArn").String(*v.RegisteredGatewayArn) - } - - if v.ResourceArn != nil { - encoder.SetQuery("resourceArn").String(*v.ResourceArn) - } - - if v.ResourceType != nil { - encoder.SetQuery("resourceType").String(*v.ResourceType) - } - return nil } -type awsRestjson1_serializeOpGetRouteAnalysis struct { +type awsRestjson1_serializeOpListTagsForResource struct { } -func (*awsRestjson1_serializeOpGetRouteAnalysis) ID() string { +func (*awsRestjson1_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetRouteAnalysis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2317,13 +4491,13 @@ func (m *awsRestjson1_serializeOpGetRouteAnalysis) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetRouteAnalysisInput) + 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("/global-networks/{GlobalNetworkId}/route-analyses/{RouteAnalysisId}") + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2332,7 +4506,7 @@ func (m *awsRestjson1_serializeOpGetRouteAnalysis) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetRouteAnalysisInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2343,25 +4517,16 @@ func (m *awsRestjson1_serializeOpGetRouteAnalysis) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetRouteAnalysisInput(v *GetRouteAnalysisInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} - } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { - return err - } - } - - if v.RouteAnalysisId == nil || len(*v.RouteAnalysisId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member RouteAnalysisId must not be empty")} + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} } - if v.RouteAnalysisId != nil { - if err := encoder.SetURI("RouteAnalysisId").String(*v.RouteAnalysisId); err != nil { + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { return err } } @@ -2369,14 +4534,14 @@ func awsRestjson1_serializeOpHttpBindingsGetRouteAnalysisInput(v *GetRouteAnalys return nil } -type awsRestjson1_serializeOpGetSites struct { +type awsRestjson1_serializeOpPutCoreNetworkPolicy struct { } -func (*awsRestjson1_serializeOpGetSites) ID() string { +func (*awsRestjson1_serializeOpPutCoreNetworkPolicy) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetSites) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpPutCoreNetworkPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2384,22 +4549,33 @@ func (m *awsRestjson1_serializeOpGetSites) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetSitesInput) + input, ok := in.Parameters.(*PutCoreNetworkPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/sites") + opPath, opQuery := httpbinding.SplitURI("/core-networks/{CoreNetworkId}/core-network-policy") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetSitesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsPutCoreNetworkPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutCoreNetworkPolicyInput(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} } @@ -2410,45 +4586,58 @@ func (m *awsRestjson1_serializeOpGetSites) HandleSerialize(ctx context.Context, return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetSitesInput(v *GetSitesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsPutCoreNetworkPolicyInput(v *PutCoreNetworkPolicyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + if v.CoreNetworkId == nil || len(*v.CoreNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CoreNetworkId must not be empty")} } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + if v.CoreNetworkId != nil { + if err := encoder.SetURI("CoreNetworkId").String(*v.CoreNetworkId); err != nil { return err } } - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) + return nil +} + +func awsRestjson1_serializeOpDocumentPutCoreNetworkPolicyInput(v *PutCoreNetworkPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) } - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) } - if v.SiteIds != nil { - for i := range v.SiteIds { - encoder.AddQuery("siteIds").String(v.SiteIds[i]) - } + if v.LatestVersionId != nil { + ok := object.Key("LatestVersionId") + ok.Integer(*v.LatestVersionId) + } + + if v.PolicyDocument != nil { + ok := object.Key("PolicyDocument") + ok.String(*v.PolicyDocument) } return nil } -type awsRestjson1_serializeOpGetTransitGatewayConnectPeerAssociations struct { +type awsRestjson1_serializeOpPutResourcePolicy struct { } -func (*awsRestjson1_serializeOpGetTransitGatewayConnectPeerAssociations) ID() string { +func (*awsRestjson1_serializeOpPutResourcePolicy) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetTransitGatewayConnectPeerAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpPutResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2456,22 +4645,33 @@ func (m *awsRestjson1_serializeOpGetTransitGatewayConnectPeerAssociations) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetTransitGatewayConnectPeerAssociationsInput) + input, ok := in.Parameters.(*PutResourcePolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/transit-gateway-connect-peer-associations") + opPath, opQuery := httpbinding.SplitURI("/resource-policy/{ResourceArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetTransitGatewayConnectPeerAssociationsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsPutResourcePolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutResourcePolicyInput(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} } @@ -2482,45 +4682,43 @@ func (m *awsRestjson1_serializeOpGetTransitGatewayConnectPeerAssociations) Handl return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetTransitGatewayConnectPeerAssociationsInput(v *GetTransitGatewayConnectPeerAssociationsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsPutResourcePolicyInput(v *PutResourcePolicyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { return err } } - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) - } + return nil +} - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } +func awsRestjson1_serializeOpDocumentPutResourcePolicyInput(v *PutResourcePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() - if v.TransitGatewayConnectPeerArns != nil { - for i := range v.TransitGatewayConnectPeerArns { - encoder.AddQuery("transitGatewayConnectPeerArns").String(v.TransitGatewayConnectPeerArns[i]) - } + if v.PolicyDocument != nil { + ok := object.Key("PolicyDocument") + ok.String(*v.PolicyDocument) } return nil } -type awsRestjson1_serializeOpGetTransitGatewayRegistrations struct { +type awsRestjson1_serializeOpRegisterTransitGateway struct { } -func (*awsRestjson1_serializeOpGetTransitGatewayRegistrations) ID() string { +func (*awsRestjson1_serializeOpRegisterTransitGateway) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetTransitGatewayRegistrations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRegisterTransitGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2528,7 +4726,7 @@ func (m *awsRestjson1_serializeOpGetTransitGatewayRegistrations) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetTransitGatewayRegistrationsInput) + input, ok := in.Parameters.(*RegisterTransitGatewayInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} @@ -2537,13 +4735,24 @@ func (m *awsRestjson1_serializeOpGetTransitGatewayRegistrations) HandleSerialize opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/transit-gateway-registrations") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetTransitGatewayRegistrationsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRegisterTransitGatewayInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentRegisterTransitGatewayInput(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} } @@ -2554,7 +4763,7 @@ func (m *awsRestjson1_serializeOpGetTransitGatewayRegistrations) HandleSerialize return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetTransitGatewayRegistrationsInput(v *GetTransitGatewayRegistrationsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRegisterTransitGatewayInput(v *RegisterTransitGatewayInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -2565,34 +4774,32 @@ func awsRestjson1_serializeOpHttpBindingsGetTransitGatewayRegistrationsInput(v * if v.GlobalNetworkId != nil { if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); 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.TransitGatewayArns != nil { - for i := range v.TransitGatewayArns { - encoder.AddQuery("transitGatewayArns").String(v.TransitGatewayArns[i]) - } + return nil +} + +func awsRestjson1_serializeOpDocumentRegisterTransitGatewayInput(v *RegisterTransitGatewayInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TransitGatewayArn != nil { + ok := object.Key("TransitGatewayArn") + ok.String(*v.TransitGatewayArn) } return nil } -type awsRestjson1_serializeOpListTagsForResource struct { +type awsRestjson1_serializeOpRejectAttachment struct { } -func (*awsRestjson1_serializeOpListTagsForResource) ID() string { +func (*awsRestjson1_serializeOpRejectAttachment) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRejectAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2600,22 +4807,22 @@ func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTagsForResourceInput) + input, ok := in.Parameters.(*RejectAttachmentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + opPath, opQuery := httpbinding.SplitURI("/attachments/{AttachmentId}/reject") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRejectAttachmentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2626,16 +4833,16 @@ func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRejectAttachmentInput(v *RejectAttachmentInput, 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.AttachmentId == nil || len(*v.AttachmentId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AttachmentId must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + if v.AttachmentId != nil { + if err := encoder.SetURI("AttachmentId").String(*v.AttachmentId); err != nil { return err } } @@ -2643,14 +4850,14 @@ func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsFor return nil } -type awsRestjson1_serializeOpRegisterTransitGateway struct { +type awsRestjson1_serializeOpRestoreCoreNetworkPolicyVersion struct { } -func (*awsRestjson1_serializeOpRegisterTransitGateway) ID() string { +func (*awsRestjson1_serializeOpRestoreCoreNetworkPolicyVersion) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpRegisterTransitGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRestoreCoreNetworkPolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2658,13 +4865,13 @@ func (m *awsRestjson1_serializeOpRegisterTransitGateway) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RegisterTransitGatewayInput) + input, ok := in.Parameters.(*RestoreCoreNetworkPolicyVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/global-networks/{GlobalNetworkId}/transit-gateway-registrations") + opPath, opQuery := httpbinding.SplitURI("/core-networks/{CoreNetworkId}/core-network-policy-versions/{PolicyVersionId}/restore") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -2673,18 +4880,7 @@ func (m *awsRestjson1_serializeOpRegisterTransitGateway) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsRegisterTransitGatewayInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentRegisterTransitGatewayInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRestoreCoreNetworkPolicyVersionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2695,30 +4891,27 @@ func (m *awsRestjson1_serializeOpRegisterTransitGateway) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsRegisterTransitGatewayInput(v *RegisterTransitGatewayInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRestoreCoreNetworkPolicyVersionInput(v *RestoreCoreNetworkPolicyVersionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.GlobalNetworkId == nil || len(*v.GlobalNetworkId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member GlobalNetworkId must not be empty")} + if v.CoreNetworkId == nil || len(*v.CoreNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CoreNetworkId must not be empty")} } - if v.GlobalNetworkId != nil { - if err := encoder.SetURI("GlobalNetworkId").String(*v.GlobalNetworkId); err != nil { + if v.CoreNetworkId != nil { + if err := encoder.SetURI("CoreNetworkId").String(*v.CoreNetworkId); err != nil { return err } } - return nil -} - -func awsRestjson1_serializeOpDocumentRegisterTransitGatewayInput(v *RegisterTransitGatewayInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.TransitGatewayArn != nil { - ok := object.Key("TransitGatewayArn") - ok.String(*v.TransitGatewayArn) + if v.PolicyVersionId == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member PolicyVersionId must not be empty")} + } + if v.PolicyVersionId != nil { + if err := encoder.SetURI("PolicyVersionId").Integer(*v.PolicyVersionId); err != nil { + return err + } } return nil @@ -3071,6 +5264,87 @@ func awsRestjson1_serializeOpDocumentUpdateConnectionInput(v *UpdateConnectionIn return nil } +type awsRestjson1_serializeOpUpdateCoreNetwork struct { +} + +func (*awsRestjson1_serializeOpUpdateCoreNetwork) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateCoreNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateCoreNetworkInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/core-networks/{CoreNetworkId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateCoreNetworkInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateCoreNetworkInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateCoreNetworkInput(v *UpdateCoreNetworkInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CoreNetworkId == nil || len(*v.CoreNetworkId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member CoreNetworkId must not be empty")} + } + if v.CoreNetworkId != nil { + if err := encoder.SetURI("CoreNetworkId").String(*v.CoreNetworkId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateCoreNetworkInput(v *UpdateCoreNetworkInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("Description") + ok.String(*v.Description) + } + + return nil +} + type awsRestjson1_serializeOpUpdateDevice struct { } @@ -3577,6 +5851,103 @@ func awsRestjson1_serializeOpDocumentUpdateSiteInput(v *UpdateSiteInput, value s return nil } +type awsRestjson1_serializeOpUpdateVpcAttachment struct { +} + +func (*awsRestjson1_serializeOpUpdateVpcAttachment) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateVpcAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateVpcAttachmentInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/vpc-attachments/{AttachmentId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateVpcAttachmentInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateVpcAttachmentInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateVpcAttachmentInput(v *UpdateVpcAttachmentInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AttachmentId == nil || len(*v.AttachmentId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AttachmentId must not be empty")} + } + if v.AttachmentId != nil { + if err := encoder.SetURI("AttachmentId").String(*v.AttachmentId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateVpcAttachmentInput(v *UpdateVpcAttachmentInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddSubnetArns != nil { + ok := object.Key("AddSubnetArns") + if err := awsRestjson1_serializeDocumentSubnetArnList(v.AddSubnetArns, ok); err != nil { + return err + } + } + + if v.Options != nil { + ok := object.Key("Options") + if err := awsRestjson1_serializeDocumentVpcOptions(v.Options, ok); err != nil { + return err + } + } + + if v.RemoveSubnetArns != nil { + ok := object.Key("RemoveSubnetArns") + if err := awsRestjson1_serializeDocumentSubnetArnList(v.RemoveSubnetArns, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentAWSLocation(v *types.AWSLocation, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3611,6 +5982,63 @@ func awsRestjson1_serializeDocumentBandwidth(v *types.Bandwidth, value smithyjso return nil } +func awsRestjson1_serializeDocumentBgpOptions(v *types.BgpOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PeerAsn != nil { + ok := object.Key("PeerAsn") + ok.Long(*v.PeerAsn) + } + + return nil +} + +func awsRestjson1_serializeDocumentConnectAttachmentOptions(v *types.ConnectAttachmentOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Protocol) > 0 { + ok := object.Key("Protocol") + ok.String(string(v.Protocol)) + } + + return nil +} + +func awsRestjson1_serializeDocumentConstrainedStringList(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_serializeDocumentCoreNetworkSegmentEdgeIdentifier(v *types.CoreNetworkSegmentEdgeIdentifier, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CoreNetworkId != nil { + ok := object.Key("CoreNetworkId") + ok.String(*v.CoreNetworkId) + } + + if v.EdgeLocation != nil { + ok := object.Key("EdgeLocation") + ok.String(*v.EdgeLocation) + } + + if v.SegmentName != nil { + ok := object.Key("SegmentName") + ok.String(*v.SegmentName) + } + + return nil +} + func awsRestjson1_serializeDocumentFilterMap(v map[string][]string, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3703,6 +6131,13 @@ func awsRestjson1_serializeDocumentRouteTableIdentifier(v *types.RouteTableIdent object := value.Object() defer object.Close() + if v.CoreNetworkSegmentEdge != nil { + ok := object.Key("CoreNetworkSegmentEdge") + if err := awsRestjson1_serializeDocumentCoreNetworkSegmentEdgeIdentifier(v.CoreNetworkSegmentEdge, ok); err != nil { + return err + } + } + if v.TransitGatewayRouteTableArn != nil { ok := object.Key("TransitGatewayRouteTableArn") ok.String(*v.TransitGatewayRouteTableArn) @@ -3722,7 +6157,7 @@ func awsRestjson1_serializeDocumentRouteTypeList(v []types.RouteType, value smit return nil } -func awsRestjson1_serializeDocumentStringList(v []string, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentSubnetArnList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -3762,3 +6197,15 @@ func awsRestjson1_serializeDocumentTagList(v []types.Tag, value smithyjson.Value } return nil } + +func awsRestjson1_serializeDocumentVpcOptions(v *types.VpcOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Ipv6Support { + ok := object.Key("Ipv6Support") + ok.Boolean(v.Ipv6Support) + } + + return nil +} diff --git a/service/networkmanager/types/enums.go b/service/networkmanager/types/enums.go index a7acaf43d72..88824101ffe 100644 --- a/service/networkmanager/types/enums.go +++ b/service/networkmanager/types/enums.go @@ -2,6 +2,128 @@ package types +type AttachmentState string + +// Enum values for AttachmentState +const ( + AttachmentStateRejected AttachmentState = "REJECTED" + AttachmentStatePendingAttachmentAcceptance AttachmentState = "PENDING_ATTACHMENT_ACCEPTANCE" + AttachmentStateCreating AttachmentState = "CREATING" + AttachmentStateFailed AttachmentState = "FAILED" + AttachmentStateAvailable AttachmentState = "AVAILABLE" + AttachmentStateUpdating AttachmentState = "UPDATING" + AttachmentStatePendingNetworkUpdate AttachmentState = "PENDING_NETWORK_UPDATE" + AttachmentStatePendingTagAcceptance AttachmentState = "PENDING_TAG_ACCEPTANCE" + AttachmentStateDeleting AttachmentState = "DELETING" +) + +// Values returns all known values for AttachmentState. 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 (AttachmentState) Values() []AttachmentState { + return []AttachmentState{ + "REJECTED", + "PENDING_ATTACHMENT_ACCEPTANCE", + "CREATING", + "FAILED", + "AVAILABLE", + "UPDATING", + "PENDING_NETWORK_UPDATE", + "PENDING_TAG_ACCEPTANCE", + "DELETING", + } +} + +type AttachmentType string + +// Enum values for AttachmentType +const ( + AttachmentTypeConnect AttachmentType = "CONNECT" + AttachmentTypeSiteToSiteVpn AttachmentType = "SITE_TO_SITE_VPN" + AttachmentTypeVpc AttachmentType = "VPC" +) + +// Values returns all known values for AttachmentType. 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 (AttachmentType) Values() []AttachmentType { + return []AttachmentType{ + "CONNECT", + "SITE_TO_SITE_VPN", + "VPC", + } +} + +type ChangeAction string + +// Enum values for ChangeAction +const ( + ChangeActionAdd ChangeAction = "ADD" + ChangeActionModify ChangeAction = "MODIFY" + ChangeActionRemove ChangeAction = "REMOVE" +) + +// Values returns all known values for ChangeAction. 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 (ChangeAction) Values() []ChangeAction { + return []ChangeAction{ + "ADD", + "MODIFY", + "REMOVE", + } +} + +type ChangeSetState string + +// Enum values for ChangeSetState +const ( + ChangeSetStatePendingGeneration ChangeSetState = "PENDING_GENERATION" + ChangeSetStateFailedGeneration ChangeSetState = "FAILED_GENERATION" + ChangeSetStateReadyToExecute ChangeSetState = "READY_TO_EXECUTE" + ChangeSetStateExecuting ChangeSetState = "EXECUTING" + ChangeSetStateExecutionSucceeded ChangeSetState = "EXECUTION_SUCCEEDED" + ChangeSetStateOutOfDate ChangeSetState = "OUT_OF_DATE" +) + +// Values returns all known values for ChangeSetState. 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 (ChangeSetState) Values() []ChangeSetState { + return []ChangeSetState{ + "PENDING_GENERATION", + "FAILED_GENERATION", + "READY_TO_EXECUTE", + "EXECUTING", + "EXECUTION_SUCCEEDED", + "OUT_OF_DATE", + } +} + +type ChangeType string + +// Enum values for ChangeType +const ( + ChangeTypeCoreNetworkSegment ChangeType = "CORE_NETWORK_SEGMENT" + ChangeTypeCoreNetworkEdge ChangeType = "CORE_NETWORK_EDGE" + ChangeTypeAttachmentMapping ChangeType = "ATTACHMENT_MAPPING" + ChangeTypeAttachmentRoutePropagation ChangeType = "ATTACHMENT_ROUTE_PROPAGATION" + ChangeTypeAttachmentRouteStatic ChangeType = "ATTACHMENT_ROUTE_STATIC" +) + +// Values returns all known values for ChangeType. 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 (ChangeType) Values() []ChangeType { + return []ChangeType{ + "CORE_NETWORK_SEGMENT", + "CORE_NETWORK_EDGE", + "ATTACHMENT_MAPPING", + "ATTACHMENT_ROUTE_PROPAGATION", + "ATTACHMENT_ROUTE_STATIC", + } +} + type ConnectionState string // Enum values for ConnectionState @@ -60,6 +182,90 @@ func (ConnectionType) Values() []ConnectionType { } } +type ConnectPeerAssociationState string + +// Enum values for ConnectPeerAssociationState +const ( + ConnectPeerAssociationStatePending ConnectPeerAssociationState = "PENDING" + ConnectPeerAssociationStateAvailable ConnectPeerAssociationState = "AVAILABLE" + ConnectPeerAssociationStateDeleting ConnectPeerAssociationState = "DELETING" + ConnectPeerAssociationStateDeleted ConnectPeerAssociationState = "DELETED" +) + +// Values returns all known values for ConnectPeerAssociationState. 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 (ConnectPeerAssociationState) Values() []ConnectPeerAssociationState { + return []ConnectPeerAssociationState{ + "PENDING", + "AVAILABLE", + "DELETING", + "DELETED", + } +} + +type ConnectPeerState string + +// Enum values for ConnectPeerState +const ( + ConnectPeerStateCreating ConnectPeerState = "CREATING" + ConnectPeerStateFailed ConnectPeerState = "FAILED" + ConnectPeerStateAvailable ConnectPeerState = "AVAILABLE" + ConnectPeerStateDeleting ConnectPeerState = "DELETING" +) + +// Values returns all known values for ConnectPeerState. 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 (ConnectPeerState) Values() []ConnectPeerState { + return []ConnectPeerState{ + "CREATING", + "FAILED", + "AVAILABLE", + "DELETING", + } +} + +type CoreNetworkPolicyAlias string + +// Enum values for CoreNetworkPolicyAlias +const ( + CoreNetworkPolicyAliasLive CoreNetworkPolicyAlias = "LIVE" + CoreNetworkPolicyAliasLatest CoreNetworkPolicyAlias = "LATEST" +) + +// Values returns all known values for CoreNetworkPolicyAlias. 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 (CoreNetworkPolicyAlias) Values() []CoreNetworkPolicyAlias { + return []CoreNetworkPolicyAlias{ + "LIVE", + "LATEST", + } +} + +type CoreNetworkState string + +// Enum values for CoreNetworkState +const ( + CoreNetworkStateCreating CoreNetworkState = "CREATING" + CoreNetworkStateUpdating CoreNetworkState = "UPDATING" + CoreNetworkStateAvailable CoreNetworkState = "AVAILABLE" + CoreNetworkStateDeleting CoreNetworkState = "DELETING" +) + +// Values returns all known values for CoreNetworkState. 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 (CoreNetworkState) Values() []CoreNetworkState { + return []CoreNetworkState{ + "CREATING", + "UPDATING", + "AVAILABLE", + "DELETING", + } +} + type CustomerGatewayAssociationState string // Enum values for CustomerGatewayAssociationState @@ -270,6 +476,7 @@ type RouteTableType string // Enum values for RouteTableType const ( RouteTableTypeTransitGatewayRouteTable RouteTableType = "TRANSIT_GATEWAY_ROUTE_TABLE" + RouteTableTypeCoreNetworkSegment RouteTableType = "CORE_NETWORK_SEGMENT" ) // Values returns all known values for RouteTableType. Note that this can be @@ -278,6 +485,7 @@ const ( func (RouteTableType) Values() []RouteTableType { return []RouteTableType{ "TRANSIT_GATEWAY_ROUTE_TABLE", + "CORE_NETWORK_SEGMENT", } } @@ -369,6 +577,22 @@ func (TransitGatewayRegistrationState) Values() []TransitGatewayRegistrationStat } } +type TunnelProtocol string + +// Enum values for TunnelProtocol +const ( + TunnelProtocolGre TunnelProtocol = "GRE" +) + +// Values returns all known values for TunnelProtocol. 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 (TunnelProtocol) Values() []TunnelProtocol { + return []TunnelProtocol{ + "GRE", + } +} + type ValidationExceptionReason string // Enum values for ValidationExceptionReason diff --git a/service/networkmanager/types/errors.go b/service/networkmanager/types/errors.go index ff86fd988fd..c5ba3985c2c 100644 --- a/service/networkmanager/types/errors.go +++ b/service/networkmanager/types/errors.go @@ -49,6 +49,27 @@ func (e *ConflictException) ErrorMessage() string { func (e *ConflictException) ErrorCode() string { return "ConflictException" } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// Describes a core network policy exception. +type CoreNetworkPolicyException struct { + Message *string + + Errors []CoreNetworkPolicyError + + noSmithyDocumentSerde +} + +func (e *CoreNetworkPolicyException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CoreNetworkPolicyException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CoreNetworkPolicyException) ErrorCode() string { return "CoreNetworkPolicyException" } +func (e *CoreNetworkPolicyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The request has failed due to an internal error. type InternalServerException struct { Message *string diff --git a/service/networkmanager/types/types.go b/service/networkmanager/types/types.go index 9a92a09f42f..36cc4ae45d9 100644 --- a/service/networkmanager/types/types.go +++ b/service/networkmanager/types/types.go @@ -7,6 +7,54 @@ import ( "time" ) +// Describes a core network attachment. +type Attachment struct { + + // The ID of the attachment. + AttachmentId *string + + // The policy rule number associated with the attachment. + AttachmentPolicyRuleNumber *int32 + + // The type of attachment. + AttachmentType AttachmentType + + // The ARN of a core network. + CoreNetworkArn *string + + // A core network ID. + CoreNetworkId *string + + // The timestamp when the attachment was created. + CreatedAt *time.Time + + // The Region where the edge is located. + EdgeLocation *string + + // The ID of the attachment account owner. + OwnerAccountId *string + + // The attachment to move from one segment to another. + ProposedSegmentChange *ProposedSegmentChange + + // The attachment resource ARN. + ResourceArn *string + + // The name of the segment attachment. + SegmentName *string + + // The state of the attachment. + State AttachmentState + + // The tags associated with the attachment. + Tags []Tag + + // The timestamp when the attachment was last updated. + UpdatedAt *time.Time + + noSmithyDocumentSerde +} + // Specifies a location in Amazon Web Services. type AWSLocation struct { @@ -32,6 +80,39 @@ type Bandwidth struct { noSmithyDocumentSerde } +// Describes the BGP options. +type BgpOptions struct { + + // The Peer ASN of the BGP. + PeerAsn *int64 + + noSmithyDocumentSerde +} + +// Describes a core network Connect attachment. +type ConnectAttachment struct { + + // The attachment details. + Attachment *Attachment + + // Options for connecting an attachment. + Options *ConnectAttachmentOptions + + // The ID of the transport attachment. + TransportAttachmentId *string + + noSmithyDocumentSerde +} + +// Describes a core network Connect attachment options. +type ConnectAttachmentOptions struct { + + // The protocol used for the attachment connection. + Protocol TunnelProtocol + + noSmithyDocumentSerde +} + // Describes a connection. type Connection struct { @@ -86,6 +167,354 @@ type ConnectionHealth struct { noSmithyDocumentSerde } +// Describes a core network Connect peer. +type ConnectPeer struct { + + // The configuration of the Connect peer. + Configuration *ConnectPeerConfiguration + + // The ID of the attachment to connect. + ConnectAttachmentId *string + + // The ID of the Connect peer. + ConnectPeerId *string + + // The ID of a core network. + CoreNetworkId *string + + // The timestamp when the Connect peer was created. + CreatedAt *time.Time + + // The Connect peer Regions where edges are located. + EdgeLocation *string + + // The state of the Connect peer. + State ConnectPeerState + + // The tags associated with the Connect peer. + Tags []Tag + + noSmithyDocumentSerde +} + +// Describes a core network Connect peer association. +type ConnectPeerAssociation struct { + + // The ID of the Connect peer. + ConnectPeerId *string + + // The ID of the device to connect to. + DeviceId *string + + // The ID of the global network. + GlobalNetworkId *string + + // The ID of the link. + LinkId *string + + // The state of the Connect peer association. + State ConnectPeerAssociationState + + noSmithyDocumentSerde +} + +// Describes a core network BGP configuration. +type ConnectPeerBgpConfiguration struct { + + // The address of a core network. + CoreNetworkAddress *string + + // The ASN of the Coret Network. + CoreNetworkAsn *int64 + + // The address of a core network Connect peer. + PeerAddress *string + + // The ASN of the Connect peer. + PeerAsn *int64 + + noSmithyDocumentSerde +} + +// Describes a core network Connect peer configuration. +type ConnectPeerConfiguration struct { + + // The Connect peer BGP configurations. + BgpConfigurations []ConnectPeerBgpConfiguration + + // The IP address of a core network. + CoreNetworkAddress *string + + // The inside IP addresses used for a Connect peer configuration. + InsideCidrBlocks []string + + // The IP address of the Connect peer. + PeerAddress *string + + // The protocol used for a Connect peer configuration. + Protocol TunnelProtocol + + noSmithyDocumentSerde +} + +// Summary description of a Connect peer. +type ConnectPeerSummary struct { + + // The ID of a Connect peer attachment. + ConnectAttachmentId *string + + // The ID of a Connect peer. + ConnectPeerId *string + + // The state of a Connect peer. + ConnectPeerState ConnectPeerState + + // The ID of a core network. + CoreNetworkId *string + + // The timestamp when a Connect peer was created. + CreatedAt *time.Time + + // The Region where the edge is located. + EdgeLocation *string + + // The tags associated with a Connect peer summary. + Tags []Tag + + noSmithyDocumentSerde +} + +// Describes a core network. +type CoreNetwork struct { + + // The ARN of a core network. + CoreNetworkArn *string + + // The ID of a core network. + CoreNetworkId *string + + // The timestamp when a core network was created. + CreatedAt *time.Time + + // The description of a core network. + Description *string + + // The edges within a core network. + Edges []CoreNetworkEdge + + // The ID of the global network that your core network is a part of. + GlobalNetworkId *string + + // The segments within a core network. + Segments []CoreNetworkSegment + + // The current state of a core network. + State CoreNetworkState + + // The tags associated with a core network. + Tags []Tag + + noSmithyDocumentSerde +} + +// Details describing a core network change. +type CoreNetworkChange struct { + + // The action to take for a core network. + Action ChangeAction + + // The resource identifier. + Identifier *string + + // The new value for a core network + NewValues *CoreNetworkChangeValues + + // The previous values for a core network. + PreviousValues *CoreNetworkChangeValues + + // The type of change. + Type ChangeType + + noSmithyDocumentSerde +} + +// Describes a core network change. +type CoreNetworkChangeValues struct { + + // The ASN of a core network. + Asn *int64 + + // The IP addresses used for a core network. + Cidr *string + + // The ID of the destination. + DestinationIdentifier *string + + // The Regions where edges are located in a core network. + EdgeLocations []string + + // The inside IP addresses used for core network change values. + InsideCidrBlocks []string + + // The names of the segments in a core network. + SegmentName *string + + // The shared segments for a core network change value. + SharedSegments []string + + noSmithyDocumentSerde +} + +// Describes a core network edge. +type CoreNetworkEdge struct { + + // The ASN of a core network edge. + Asn *int64 + + // The Region where a core network edge is located. + EdgeLocation *string + + // The inside IP addresses used for core network edges. + InsideCidrBlocks []string + + noSmithyDocumentSerde +} + +// Describes a core network policy. You can have only one LIVE Core Policy. +type CoreNetworkPolicy struct { + + // Whether a core network policy is the current LIVE policy or the most recently + // submitted policy. + Alias CoreNetworkPolicyAlias + + // The state of a core network policy. + ChangeSetState ChangeSetState + + // The ID of a core network. + CoreNetworkId *string + + // The timestamp when a core network policy was created. + CreatedAt *time.Time + + // The description of a core network policy. + Description *string + + // Describes a core network policy. + // + // This value conforms to the media type: application/json + PolicyDocument *string + + // Describes any errors in a core network policy. + PolicyErrors []CoreNetworkPolicyError + + // The ID of the policy version. + PolicyVersionId *int32 + + noSmithyDocumentSerde +} + +// Provides details about an error in a core network policy. +type CoreNetworkPolicyError struct { + + // The error code associated with a core network policy error. + // + // This member is required. + ErrorCode *string + + // The message associated with a core network policy error code. + // + // This member is required. + Message *string + + // The JSON path where the error was discovered in the policy document. + Path *string + + noSmithyDocumentSerde +} + +// Describes a core network policy version. +type CoreNetworkPolicyVersion struct { + + // Whether a core network policy is the current policy or the most recently + // submitted policy. + Alias CoreNetworkPolicyAlias + + // The status of the policy version change set. + ChangeSetState ChangeSetState + + // The ID of a core network. + CoreNetworkId *string + + // The timestamp when a core network policy version was created. + CreatedAt *time.Time + + // The description of a core network policy version. + Description *string + + // The ID of the policy version. + PolicyVersionId *int32 + + noSmithyDocumentSerde +} + +// Describes a core network segment, which are dedicated routes. Only attachments +// within this segment can communicate with each other. +type CoreNetworkSegment struct { + + // The Regions where the edges are located. + EdgeLocations []string + + // The name of a core network segment. + Name *string + + // The shared segments of a core network. + SharedSegments []string + + noSmithyDocumentSerde +} + +// Returns details about a core network edge. +type CoreNetworkSegmentEdgeIdentifier struct { + + // The ID of a core network. + CoreNetworkId *string + + // The Region where the segment edge is located. + EdgeLocation *string + + // The name of the segment edge. + SegmentName *string + + noSmithyDocumentSerde +} + +// Returns summary information about a core network. +type CoreNetworkSummary struct { + + // a core network ARN. + CoreNetworkArn *string + + // The ID of a core network. + CoreNetworkId *string + + // The description of a core network. + Description *string + + // The global network ID. + GlobalNetworkId *string + + // The ID of the account owner. + OwnerAccountId *string + + // The state of a core network. + State CoreNetworkState + + // The key-value tags associated with a core network summary. + Tags []Tag + + noSmithyDocumentSerde +} + // Describes the association between a customer gateway, a device, and a link. type CustomerGatewayAssociation struct { @@ -155,7 +584,9 @@ type Device struct { noSmithyDocumentSerde } -// Describes a global network. +// Describes a global network. This is a single private network acting as a +// high-level container for your network objects, including an Amazon Web +// Services-manged Core Network. type GlobalNetwork struct { // The date and time that the global network was created. @@ -260,6 +691,9 @@ type NetworkResource struct { // The Amazon Web Services Region. AwsRegion *string + // a core network ID. + CoreNetworkId *string + // Information about the resource, in JSON format. Network Manager gets this // information by describing the resource using its Describe API call. Definition *string @@ -384,12 +818,21 @@ type NetworkRoute struct { // Describes the destination of a network route. type NetworkRouteDestination struct { + // The ID of a core network attachment. + CoreNetworkAttachmentId *string + + // The edge location for the network destination. + EdgeLocation *string + // The ID of the resource. ResourceId *string // The resource type. ResourceType *string + // The name of the segment. + SegmentName *string + // The ID of the transit gateway attachment. TransitGatewayAttachmentId *string @@ -408,6 +851,9 @@ type NetworkTelemetry struct { // The Amazon Web Services Region. AwsRegion *string + // The ID of a core network. + CoreNetworkId *string + // The connection health. Health *ConnectionHealth @@ -441,6 +887,22 @@ type PathComponent struct { noSmithyDocumentSerde } +// Describes a proposed segment change. In some cases, the segment change must +// first be evaluated and accepted. +type ProposedSegmentChange struct { + + // The rule number in the policy document that applies to this change. + AttachmentPolicyRuleNumber *int32 + + // The name of the segment to change. + SegmentName *string + + // The key-value tags that changed for the segment. + Tags []Tag + + noSmithyDocumentSerde +} + // Describes a resource relationship. type Relationship struct { @@ -582,6 +1044,9 @@ type RouteAnalysisPath struct { // Describes a route table. type RouteTableIdentifier struct { + // The segment edge in a core network. + CoreNetworkSegmentEdge *CoreNetworkSegmentEdgeIdentifier + // The ARN of the transit gateway route table. TransitGatewayRouteTableArn *string @@ -618,6 +1083,18 @@ type Site struct { noSmithyDocumentSerde } +// Creates a site-to-site VPN attachment. +type SiteToSiteVpnAttachment struct { + + // Provides details about a site-to-site VPN attachment. + Attachment *Attachment + + // The ARN of the site-to-site VPN attachment. + VpnConnectionArn *string + + noSmithyDocumentSerde +} + // Describes a tag. type Tag struct { @@ -694,4 +1171,28 @@ type ValidationExceptionField struct { noSmithyDocumentSerde } +// Describes a VPC attachment. +type VpcAttachment struct { + + // Provides details about the VPC attachment. + Attachment *Attachment + + // Provides details about the VPC attachment. + Options *VpcOptions + + // The subnet ARNs. + SubnetArns []string + + noSmithyDocumentSerde +} + +// Describes the VPC options. +type VpcOptions struct { + + // Indicates whether IPv6 is supported. + Ipv6Support bool + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/networkmanager/validators.go b/service/networkmanager/validators.go index f9cc27c2265..084dd102dd2 100644 --- a/service/networkmanager/validators.go +++ b/service/networkmanager/validators.go @@ -9,6 +9,46 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpAcceptAttachment struct { +} + +func (*validateOpAcceptAttachment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAcceptAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AcceptAttachmentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAcceptAttachmentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpAssociateConnectPeer struct { +} + +func (*validateOpAssociateConnectPeer) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociateConnectPeer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociateConnectPeerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociateConnectPeerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpAssociateCustomerGateway struct { } @@ -69,938 +109,1966 @@ func (m *validateOpAssociateTransitGatewayConnectPeer) HandleInitialize(ctx cont return next.HandleInitialize(ctx, in) } -type validateOpCreateConnection struct { +type validateOpCreateConnectAttachment struct { } -func (*validateOpCreateConnection) ID() string { +func (*validateOpCreateConnectAttachment) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpCreateConnectAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateConnectionInput) + input, ok := in.Parameters.(*CreateConnectAttachmentInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateConnectionInput(input); err != nil { + if err := validateOpCreateConnectAttachmentInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateDevice struct { +type validateOpCreateConnection struct { } -func (*validateOpCreateDevice) ID() string { +func (*validateOpCreateConnection) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateDevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpCreateConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateDeviceInput) + input, ok := in.Parameters.(*CreateConnectionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateDeviceInput(input); err != nil { + if err := validateOpCreateConnectionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateLink struct { +type validateOpCreateConnectPeer struct { } -func (*validateOpCreateLink) ID() string { +func (*validateOpCreateConnectPeer) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateLink) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpCreateConnectPeer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateLinkInput) + input, ok := in.Parameters.(*CreateConnectPeerInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateLinkInput(input); err != nil { + if err := validateOpCreateConnectPeerInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateSite struct { +type validateOpCreateCoreNetwork struct { } -func (*validateOpCreateSite) ID() string { +func (*validateOpCreateCoreNetwork) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateSite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpCreateCoreNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateSiteInput) + input, ok := in.Parameters.(*CreateCoreNetworkInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateSiteInput(input); err != nil { + if err := validateOpCreateCoreNetworkInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteConnection struct { +type validateOpCreateDevice struct { } -func (*validateOpDeleteConnection) ID() string { +func (*validateOpCreateDevice) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpCreateDevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteConnectionInput) + input, ok := in.Parameters.(*CreateDeviceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteConnectionInput(input); err != nil { + if err := validateOpCreateDeviceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteDevice struct { +type validateOpCreateLink struct { } -func (*validateOpDeleteDevice) ID() string { +func (*validateOpCreateLink) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteDevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpCreateLink) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteDeviceInput) + input, ok := in.Parameters.(*CreateLinkInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteDeviceInput(input); err != nil { + if err := validateOpCreateLinkInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteGlobalNetwork struct { +type validateOpCreateSite struct { } -func (*validateOpDeleteGlobalNetwork) ID() string { +func (*validateOpCreateSite) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteGlobalNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpCreateSite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteGlobalNetworkInput) + input, ok := in.Parameters.(*CreateSiteInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteGlobalNetworkInput(input); err != nil { + if err := validateOpCreateSiteInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteLink struct { +type validateOpCreateSiteToSiteVpnAttachment struct { } -func (*validateOpDeleteLink) ID() string { +func (*validateOpCreateSiteToSiteVpnAttachment) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteLink) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpCreateSiteToSiteVpnAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteLinkInput) + input, ok := in.Parameters.(*CreateSiteToSiteVpnAttachmentInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteLinkInput(input); err != nil { + if err := validateOpCreateSiteToSiteVpnAttachmentInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteSite struct { +type validateOpCreateVpcAttachment struct { } -func (*validateOpDeleteSite) ID() string { +func (*validateOpCreateVpcAttachment) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteSite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpCreateVpcAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteSiteInput) + input, ok := in.Parameters.(*CreateVpcAttachmentInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteSiteInput(input); err != nil { + if err := validateOpCreateVpcAttachmentInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeregisterTransitGateway struct { +type validateOpDeleteAttachment struct { } -func (*validateOpDeregisterTransitGateway) ID() string { +func (*validateOpDeleteAttachment) ID() string { return "OperationInputValidation" } -func (m *validateOpDeregisterTransitGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeleteAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeregisterTransitGatewayInput) + input, ok := in.Parameters.(*DeleteAttachmentInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeregisterTransitGatewayInput(input); err != nil { + if err := validateOpDeleteAttachmentInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDisassociateCustomerGateway struct { +type validateOpDeleteConnection struct { } -func (*validateOpDisassociateCustomerGateway) ID() string { +func (*validateOpDeleteConnection) ID() string { return "OperationInputValidation" } -func (m *validateOpDisassociateCustomerGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeleteConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DisassociateCustomerGatewayInput) + input, ok := in.Parameters.(*DeleteConnectionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDisassociateCustomerGatewayInput(input); err != nil { + if err := validateOpDeleteConnectionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDisassociateLink struct { +type validateOpDeleteConnectPeer struct { } -func (*validateOpDisassociateLink) ID() string { +func (*validateOpDeleteConnectPeer) ID() string { return "OperationInputValidation" } -func (m *validateOpDisassociateLink) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeleteConnectPeer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DisassociateLinkInput) + input, ok := in.Parameters.(*DeleteConnectPeerInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDisassociateLinkInput(input); err != nil { + if err := validateOpDeleteConnectPeerInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDisassociateTransitGatewayConnectPeer struct { +type validateOpDeleteCoreNetwork struct { } -func (*validateOpDisassociateTransitGatewayConnectPeer) ID() string { +func (*validateOpDeleteCoreNetwork) ID() string { return "OperationInputValidation" } -func (m *validateOpDisassociateTransitGatewayConnectPeer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeleteCoreNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DisassociateTransitGatewayConnectPeerInput) + input, ok := in.Parameters.(*DeleteCoreNetworkInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDisassociateTransitGatewayConnectPeerInput(input); err != nil { + if err := validateOpDeleteCoreNetworkInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpGetConnections struct { +type validateOpDeleteCoreNetworkPolicyVersion struct { } -func (*validateOpGetConnections) ID() string { +func (*validateOpDeleteCoreNetworkPolicyVersion) ID() string { return "OperationInputValidation" } -func (m *validateOpGetConnections) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeleteCoreNetworkPolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*GetConnectionsInput) + input, ok := in.Parameters.(*DeleteCoreNetworkPolicyVersionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpGetConnectionsInput(input); err != nil { + if err := validateOpDeleteCoreNetworkPolicyVersionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpGetCustomerGatewayAssociations struct { +type validateOpDeleteDevice struct { } -func (*validateOpGetCustomerGatewayAssociations) ID() string { +func (*validateOpDeleteDevice) ID() string { return "OperationInputValidation" } -func (m *validateOpGetCustomerGatewayAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeleteDevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*GetCustomerGatewayAssociationsInput) + input, ok := in.Parameters.(*DeleteDeviceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpGetCustomerGatewayAssociationsInput(input); err != nil { + if err := validateOpDeleteDeviceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpGetDevices struct { +type validateOpDeleteGlobalNetwork struct { } -func (*validateOpGetDevices) ID() string { +func (*validateOpDeleteGlobalNetwork) ID() string { return "OperationInputValidation" } -func (m *validateOpGetDevices) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeleteGlobalNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*GetDevicesInput) + input, ok := in.Parameters.(*DeleteGlobalNetworkInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpGetDevicesInput(input); err != nil { + if err := validateOpDeleteGlobalNetworkInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpGetLinkAssociations struct { +type validateOpDeleteLink struct { } -func (*validateOpGetLinkAssociations) ID() string { +func (*validateOpDeleteLink) ID() string { return "OperationInputValidation" } -func (m *validateOpGetLinkAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeleteLink) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*GetLinkAssociationsInput) + input, ok := in.Parameters.(*DeleteLinkInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpGetLinkAssociationsInput(input); err != nil { + if err := validateOpDeleteLinkInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpGetLinks struct { +type validateOpDeleteResourcePolicy struct { } -func (*validateOpGetLinks) ID() string { +func (*validateOpDeleteResourcePolicy) ID() string { return "OperationInputValidation" } -func (m *validateOpGetLinks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeleteResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*GetLinksInput) + input, ok := in.Parameters.(*DeleteResourcePolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpGetLinksInput(input); err != nil { + if err := validateOpDeleteResourcePolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpGetNetworkResourceCounts struct { +type validateOpDeleteSite struct { } -func (*validateOpGetNetworkResourceCounts) ID() string { +func (*validateOpDeleteSite) ID() string { return "OperationInputValidation" } -func (m *validateOpGetNetworkResourceCounts) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeleteSite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*GetNetworkResourceCountsInput) + input, ok := in.Parameters.(*DeleteSiteInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpGetNetworkResourceCountsInput(input); err != nil { + if err := validateOpDeleteSiteInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpGetNetworkResourceRelationships struct { +type validateOpDeregisterTransitGateway struct { } -func (*validateOpGetNetworkResourceRelationships) ID() string { +func (*validateOpDeregisterTransitGateway) ID() string { return "OperationInputValidation" } -func (m *validateOpGetNetworkResourceRelationships) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeregisterTransitGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*GetNetworkResourceRelationshipsInput) + input, ok := in.Parameters.(*DeregisterTransitGatewayInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpGetNetworkResourceRelationshipsInput(input); err != nil { + if err := validateOpDeregisterTransitGatewayInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpGetNetworkResources struct { +type validateOpDisassociateConnectPeer struct { } -func (*validateOpGetNetworkResources) ID() string { +func (*validateOpDisassociateConnectPeer) ID() string { return "OperationInputValidation" } -func (m *validateOpGetNetworkResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDisassociateConnectPeer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*GetNetworkResourcesInput) + input, ok := in.Parameters.(*DisassociateConnectPeerInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpGetNetworkResourcesInput(input); err != nil { + if err := validateOpDisassociateConnectPeerInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpGetNetworkRoutes struct { +type validateOpDisassociateCustomerGateway struct { } -func (*validateOpGetNetworkRoutes) ID() string { +func (*validateOpDisassociateCustomerGateway) ID() string { return "OperationInputValidation" } -func (m *validateOpGetNetworkRoutes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDisassociateCustomerGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*GetNetworkRoutesInput) + input, ok := in.Parameters.(*DisassociateCustomerGatewayInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpGetNetworkRoutesInput(input); err != nil { + if err := validateOpDisassociateCustomerGatewayInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpGetNetworkTelemetry struct { +type validateOpDisassociateLink struct { } -func (*validateOpGetNetworkTelemetry) ID() string { +func (*validateOpDisassociateLink) ID() string { return "OperationInputValidation" } -func (m *validateOpGetNetworkTelemetry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDisassociateLink) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*GetNetworkTelemetryInput) + input, ok := in.Parameters.(*DisassociateLinkInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpGetNetworkTelemetryInput(input); err != nil { + if err := validateOpDisassociateLinkInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpGetRouteAnalysis struct { +type validateOpDisassociateTransitGatewayConnectPeer struct { } -func (*validateOpGetRouteAnalysis) ID() string { +func (*validateOpDisassociateTransitGatewayConnectPeer) ID() string { return "OperationInputValidation" } -func (m *validateOpGetRouteAnalysis) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDisassociateTransitGatewayConnectPeer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*GetRouteAnalysisInput) + input, ok := in.Parameters.(*DisassociateTransitGatewayConnectPeerInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpGetRouteAnalysisInput(input); err != nil { + if err := validateOpDisassociateTransitGatewayConnectPeerInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpGetSites struct { +type validateOpExecuteCoreNetworkChangeSet struct { } -func (*validateOpGetSites) ID() string { +func (*validateOpExecuteCoreNetworkChangeSet) ID() string { return "OperationInputValidation" } -func (m *validateOpGetSites) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpExecuteCoreNetworkChangeSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*GetSitesInput) + input, ok := in.Parameters.(*ExecuteCoreNetworkChangeSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpGetSitesInput(input); err != nil { + if err := validateOpExecuteCoreNetworkChangeSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpGetTransitGatewayConnectPeerAssociations struct { +type validateOpGetConnectAttachment struct { } -func (*validateOpGetTransitGatewayConnectPeerAssociations) ID() string { +func (*validateOpGetConnectAttachment) ID() string { return "OperationInputValidation" } -func (m *validateOpGetTransitGatewayConnectPeerAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetConnectAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*GetTransitGatewayConnectPeerAssociationsInput) + input, ok := in.Parameters.(*GetConnectAttachmentInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpGetTransitGatewayConnectPeerAssociationsInput(input); err != nil { + if err := validateOpGetConnectAttachmentInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpGetTransitGatewayRegistrations struct { +type validateOpGetConnections struct { } -func (*validateOpGetTransitGatewayRegistrations) ID() string { +func (*validateOpGetConnections) ID() string { return "OperationInputValidation" } -func (m *validateOpGetTransitGatewayRegistrations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetConnections) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*GetTransitGatewayRegistrationsInput) + input, ok := in.Parameters.(*GetConnectionsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpGetTransitGatewayRegistrationsInput(input); err != nil { + if err := validateOpGetConnectionsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpListTagsForResource struct { +type validateOpGetConnectPeerAssociations struct { } -func (*validateOpListTagsForResource) ID() string { +func (*validateOpGetConnectPeerAssociations) ID() string { return "OperationInputValidation" } -func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetConnectPeerAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*ListTagsForResourceInput) + input, ok := in.Parameters.(*GetConnectPeerAssociationsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpListTagsForResourceInput(input); err != nil { + if err := validateOpGetConnectPeerAssociationsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpRegisterTransitGateway struct { +type validateOpGetConnectPeer struct { } -func (*validateOpRegisterTransitGateway) ID() string { +func (*validateOpGetConnectPeer) ID() string { return "OperationInputValidation" } -func (m *validateOpRegisterTransitGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetConnectPeer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*RegisterTransitGatewayInput) + input, ok := in.Parameters.(*GetConnectPeerInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpRegisterTransitGatewayInput(input); err != nil { + if err := validateOpGetConnectPeerInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpStartRouteAnalysis struct { +type validateOpGetCoreNetworkChangeSet struct { } -func (*validateOpStartRouteAnalysis) ID() string { +func (*validateOpGetCoreNetworkChangeSet) ID() string { return "OperationInputValidation" } -func (m *validateOpStartRouteAnalysis) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetCoreNetworkChangeSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*StartRouteAnalysisInput) + input, ok := in.Parameters.(*GetCoreNetworkChangeSetInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpStartRouteAnalysisInput(input); err != nil { + if err := validateOpGetCoreNetworkChangeSetInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpTagResource struct { +type validateOpGetCoreNetwork struct { } -func (*validateOpTagResource) ID() string { +func (*validateOpGetCoreNetwork) ID() string { return "OperationInputValidation" } -func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetCoreNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*TagResourceInput) + input, ok := in.Parameters.(*GetCoreNetworkInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpTagResourceInput(input); err != nil { + if err := validateOpGetCoreNetworkInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpUntagResource struct { +type validateOpGetCoreNetworkPolicy struct { } -func (*validateOpUntagResource) ID() string { +func (*validateOpGetCoreNetworkPolicy) ID() string { return "OperationInputValidation" } -func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetCoreNetworkPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*UntagResourceInput) + input, ok := in.Parameters.(*GetCoreNetworkPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpUntagResourceInput(input); err != nil { + if err := validateOpGetCoreNetworkPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpUpdateConnection struct { +type validateOpGetCustomerGatewayAssociations struct { } -func (*validateOpUpdateConnection) ID() string { +func (*validateOpGetCustomerGatewayAssociations) ID() string { return "OperationInputValidation" } -func (m *validateOpUpdateConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetCustomerGatewayAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*UpdateConnectionInput) + input, ok := in.Parameters.(*GetCustomerGatewayAssociationsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpUpdateConnectionInput(input); err != nil { + if err := validateOpGetCustomerGatewayAssociationsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpUpdateDevice struct { +type validateOpGetDevices struct { } -func (*validateOpUpdateDevice) ID() string { +func (*validateOpGetDevices) ID() string { return "OperationInputValidation" } -func (m *validateOpUpdateDevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetDevices) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*UpdateDeviceInput) + input, ok := in.Parameters.(*GetDevicesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpUpdateDeviceInput(input); err != nil { + if err := validateOpGetDevicesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpUpdateGlobalNetwork struct { +type validateOpGetLinkAssociations struct { } -func (*validateOpUpdateGlobalNetwork) ID() string { +func (*validateOpGetLinkAssociations) ID() string { return "OperationInputValidation" } -func (m *validateOpUpdateGlobalNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetLinkAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*UpdateGlobalNetworkInput) + input, ok := in.Parameters.(*GetLinkAssociationsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpUpdateGlobalNetworkInput(input); err != nil { + if err := validateOpGetLinkAssociationsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpUpdateLink struct { +type validateOpGetLinks struct { } -func (*validateOpUpdateLink) ID() string { +func (*validateOpGetLinks) ID() string { return "OperationInputValidation" } -func (m *validateOpUpdateLink) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetLinks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*UpdateLinkInput) + input, ok := in.Parameters.(*GetLinksInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpUpdateLinkInput(input); err != nil { + if err := validateOpGetLinksInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpUpdateNetworkResourceMetadata struct { +type validateOpGetNetworkResourceCounts struct { } -func (*validateOpUpdateNetworkResourceMetadata) ID() string { +func (*validateOpGetNetworkResourceCounts) ID() string { return "OperationInputValidation" } -func (m *validateOpUpdateNetworkResourceMetadata) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetNetworkResourceCounts) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*UpdateNetworkResourceMetadataInput) + input, ok := in.Parameters.(*GetNetworkResourceCountsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpUpdateNetworkResourceMetadataInput(input); err != nil { + if err := validateOpGetNetworkResourceCountsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpUpdateSite struct { +type validateOpGetNetworkResourceRelationships struct { } -func (*validateOpUpdateSite) ID() string { +func (*validateOpGetNetworkResourceRelationships) ID() string { return "OperationInputValidation" } -func (m *validateOpUpdateSite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetNetworkResourceRelationships) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*UpdateSiteInput) + input, ok := in.Parameters.(*GetNetworkResourceRelationshipsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpUpdateSiteInput(input); err != nil { + if err := validateOpGetNetworkResourceRelationshipsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -func addOpAssociateCustomerGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateCustomerGateway{}, middleware.After) +type validateOpGetNetworkResources struct { } -func addOpAssociateLinkValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateLink{}, middleware.After) +func (*validateOpGetNetworkResources) ID() string { + return "OperationInputValidation" } -func addOpAssociateTransitGatewayConnectPeerValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateTransitGatewayConnectPeer{}, middleware.After) +func (m *validateOpGetNetworkResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetNetworkResourcesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetNetworkResourcesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) } -func addOpCreateConnectionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateConnection{}, middleware.After) +type validateOpGetNetworkRoutes struct { } -func addOpCreateDeviceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateDevice{}, middleware.After) +func (*validateOpGetNetworkRoutes) ID() string { + return "OperationInputValidation" } -func addOpCreateLinkValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateLink{}, middleware.After) +func (m *validateOpGetNetworkRoutes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetNetworkRoutesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetNetworkRoutesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) } -func addOpCreateSiteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateSite{}, middleware.After) +type validateOpGetNetworkTelemetry struct { } -func addOpDeleteConnectionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteConnection{}, middleware.After) +func (*validateOpGetNetworkTelemetry) ID() string { + return "OperationInputValidation" } -func addOpDeleteDeviceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteDevice{}, middleware.After) +func (m *validateOpGetNetworkTelemetry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetNetworkTelemetryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetNetworkTelemetryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) } -func addOpDeleteGlobalNetworkValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteGlobalNetwork{}, middleware.After) +type validateOpGetResourcePolicy struct { } -func addOpDeleteLinkValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteLink{}, middleware.After) +func (*validateOpGetResourcePolicy) ID() string { + return "OperationInputValidation" } -func addOpDeleteSiteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteSite{}, middleware.After) +func (m *validateOpGetResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) } -func addOpDeregisterTransitGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeregisterTransitGateway{}, middleware.After) +type validateOpGetRouteAnalysis struct { } -func addOpDisassociateCustomerGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateCustomerGateway{}, middleware.After) +func (*validateOpGetRouteAnalysis) ID() string { + return "OperationInputValidation" } -func addOpDisassociateLinkValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateLink{}, middleware.After) +func (m *validateOpGetRouteAnalysis) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetRouteAnalysisInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetRouteAnalysisInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) } -func addOpDisassociateTransitGatewayConnectPeerValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateTransitGatewayConnectPeer{}, middleware.After) +type validateOpGetSites struct { } -func addOpGetConnectionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetConnections{}, middleware.After) +func (*validateOpGetSites) ID() string { + return "OperationInputValidation" } -func addOpGetCustomerGatewayAssociationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetCustomerGatewayAssociations{}, middleware.After) +func (m *validateOpGetSites) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetSitesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetSitesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) } -func addOpGetDevicesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetDevices{}, middleware.After) +type validateOpGetSiteToSiteVpnAttachment struct { } -func addOpGetLinkAssociationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetLinkAssociations{}, middleware.After) +func (*validateOpGetSiteToSiteVpnAttachment) ID() string { + return "OperationInputValidation" } -func addOpGetLinksValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetLinks{}, middleware.After) +func (m *validateOpGetSiteToSiteVpnAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetSiteToSiteVpnAttachmentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetSiteToSiteVpnAttachmentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) } -func addOpGetNetworkResourceCountsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetNetworkResourceCounts{}, middleware.After) +type validateOpGetTransitGatewayConnectPeerAssociations struct { } -func addOpGetNetworkResourceRelationshipsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetNetworkResourceRelationships{}, middleware.After) +func (*validateOpGetTransitGatewayConnectPeerAssociations) ID() string { + return "OperationInputValidation" } -func addOpGetNetworkResourcesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetNetworkResources{}, middleware.After) +func (m *validateOpGetTransitGatewayConnectPeerAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetTransitGatewayConnectPeerAssociationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetTransitGatewayConnectPeerAssociationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) } -func addOpGetNetworkRoutesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetNetworkRoutes{}, middleware.After) +type validateOpGetTransitGatewayRegistrations struct { } -func addOpGetNetworkTelemetryValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetNetworkTelemetry{}, middleware.After) +func (*validateOpGetTransitGatewayRegistrations) ID() string { + return "OperationInputValidation" } -func addOpGetRouteAnalysisValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetRouteAnalysis{}, middleware.After) +func (m *validateOpGetTransitGatewayRegistrations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetTransitGatewayRegistrationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetTransitGatewayRegistrationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) } -func addOpGetSitesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetSites{}, middleware.After) +type validateOpGetVpcAttachment struct { } -func addOpGetTransitGatewayConnectPeerAssociationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetTransitGatewayConnectPeerAssociations{}, middleware.After) +func (*validateOpGetVpcAttachment) ID() string { + return "OperationInputValidation" } -func addOpGetTransitGatewayRegistrationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetTransitGatewayRegistrations{}, middleware.After) +func (m *validateOpGetVpcAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetVpcAttachmentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetVpcAttachmentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) } -func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +type validateOpListCoreNetworkPolicyVersions struct { } -func addOpRegisterTransitGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRegisterTransitGateway{}, middleware.After) +func (*validateOpListCoreNetworkPolicyVersions) ID() string { + return "OperationInputValidation" } -func addOpStartRouteAnalysisValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStartRouteAnalysis{}, middleware.After) +func (m *validateOpListCoreNetworkPolicyVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListCoreNetworkPolicyVersionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListCoreNetworkPolicyVersionsInput(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 validateOpPutCoreNetworkPolicy struct { +} + +func (*validateOpPutCoreNetworkPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutCoreNetworkPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutCoreNetworkPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutCoreNetworkPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutResourcePolicy struct { +} + +func (*validateOpPutResourcePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutResourcePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutResourcePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRegisterTransitGateway struct { +} + +func (*validateOpRegisterTransitGateway) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRegisterTransitGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RegisterTransitGatewayInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRegisterTransitGatewayInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRejectAttachment struct { +} + +func (*validateOpRejectAttachment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRejectAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RejectAttachmentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRejectAttachmentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRestoreCoreNetworkPolicyVersion struct { +} + +func (*validateOpRestoreCoreNetworkPolicyVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRestoreCoreNetworkPolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RestoreCoreNetworkPolicyVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRestoreCoreNetworkPolicyVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartRouteAnalysis struct { +} + +func (*validateOpStartRouteAnalysis) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartRouteAnalysis) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartRouteAnalysisInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartRouteAnalysisInput(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 validateOpUpdateConnection struct { +} + +func (*validateOpUpdateConnection) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateConnectionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateConnectionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateCoreNetwork struct { +} + +func (*validateOpUpdateCoreNetwork) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateCoreNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateCoreNetworkInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateCoreNetworkInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateDevice struct { +} + +func (*validateOpUpdateDevice) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateDevice) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateDeviceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateDeviceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateGlobalNetwork struct { +} + +func (*validateOpUpdateGlobalNetwork) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateGlobalNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateGlobalNetworkInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateGlobalNetworkInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateLink struct { +} + +func (*validateOpUpdateLink) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateLink) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateLinkInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateLinkInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateNetworkResourceMetadata struct { +} + +func (*validateOpUpdateNetworkResourceMetadata) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateNetworkResourceMetadata) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateNetworkResourceMetadataInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateNetworkResourceMetadataInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateSite struct { +} + +func (*validateOpUpdateSite) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateSite) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateSiteInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateSiteInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateVpcAttachment struct { +} + +func (*validateOpUpdateVpcAttachment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateVpcAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateVpcAttachmentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateVpcAttachmentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAcceptAttachmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAcceptAttachment{}, middleware.After) +} + +func addOpAssociateConnectPeerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateConnectPeer{}, middleware.After) +} + +func addOpAssociateCustomerGatewayValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateCustomerGateway{}, middleware.After) +} + +func addOpAssociateLinkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateLink{}, middleware.After) +} + +func addOpAssociateTransitGatewayConnectPeerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateTransitGatewayConnectPeer{}, middleware.After) +} + +func addOpCreateConnectAttachmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateConnectAttachment{}, middleware.After) +} + +func addOpCreateConnectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateConnection{}, middleware.After) +} + +func addOpCreateConnectPeerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateConnectPeer{}, middleware.After) +} + +func addOpCreateCoreNetworkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateCoreNetwork{}, middleware.After) +} + +func addOpCreateDeviceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateDevice{}, middleware.After) +} + +func addOpCreateLinkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateLink{}, middleware.After) +} + +func addOpCreateSiteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateSite{}, middleware.After) +} + +func addOpCreateSiteToSiteVpnAttachmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateSiteToSiteVpnAttachment{}, middleware.After) +} + +func addOpCreateVpcAttachmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateVpcAttachment{}, middleware.After) +} + +func addOpDeleteAttachmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteAttachment{}, middleware.After) +} + +func addOpDeleteConnectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteConnection{}, middleware.After) +} + +func addOpDeleteConnectPeerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteConnectPeer{}, middleware.After) +} + +func addOpDeleteCoreNetworkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteCoreNetwork{}, middleware.After) +} + +func addOpDeleteCoreNetworkPolicyVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteCoreNetworkPolicyVersion{}, middleware.After) +} + +func addOpDeleteDeviceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteDevice{}, middleware.After) +} + +func addOpDeleteGlobalNetworkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteGlobalNetwork{}, middleware.After) +} + +func addOpDeleteLinkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteLink{}, middleware.After) +} + +func addOpDeleteResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteResourcePolicy{}, middleware.After) +} + +func addOpDeleteSiteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteSite{}, middleware.After) +} + +func addOpDeregisterTransitGatewayValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeregisterTransitGateway{}, middleware.After) +} + +func addOpDisassociateConnectPeerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateConnectPeer{}, middleware.After) +} + +func addOpDisassociateCustomerGatewayValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateCustomerGateway{}, middleware.After) +} + +func addOpDisassociateLinkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateLink{}, middleware.After) +} + +func addOpDisassociateTransitGatewayConnectPeerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateTransitGatewayConnectPeer{}, middleware.After) +} + +func addOpExecuteCoreNetworkChangeSetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpExecuteCoreNetworkChangeSet{}, middleware.After) +} + +func addOpGetConnectAttachmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetConnectAttachment{}, middleware.After) +} + +func addOpGetConnectionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetConnections{}, middleware.After) +} + +func addOpGetConnectPeerAssociationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetConnectPeerAssociations{}, middleware.After) +} + +func addOpGetConnectPeerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetConnectPeer{}, middleware.After) +} + +func addOpGetCoreNetworkChangeSetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCoreNetworkChangeSet{}, middleware.After) +} + +func addOpGetCoreNetworkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCoreNetwork{}, middleware.After) +} + +func addOpGetCoreNetworkPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCoreNetworkPolicy{}, middleware.After) +} + +func addOpGetCustomerGatewayAssociationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCustomerGatewayAssociations{}, middleware.After) +} + +func addOpGetDevicesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetDevices{}, middleware.After) +} + +func addOpGetLinkAssociationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLinkAssociations{}, middleware.After) +} + +func addOpGetLinksValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLinks{}, middleware.After) +} + +func addOpGetNetworkResourceCountsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetNetworkResourceCounts{}, middleware.After) +} + +func addOpGetNetworkResourceRelationshipsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetNetworkResourceRelationships{}, middleware.After) +} + +func addOpGetNetworkResourcesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetNetworkResources{}, middleware.After) +} + +func addOpGetNetworkRoutesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetNetworkRoutes{}, middleware.After) +} + +func addOpGetNetworkTelemetryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetNetworkTelemetry{}, middleware.After) +} + +func addOpGetResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetResourcePolicy{}, middleware.After) +} + +func addOpGetRouteAnalysisValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetRouteAnalysis{}, middleware.After) +} + +func addOpGetSitesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetSites{}, middleware.After) +} + +func addOpGetSiteToSiteVpnAttachmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetSiteToSiteVpnAttachment{}, middleware.After) +} + +func addOpGetTransitGatewayConnectPeerAssociationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetTransitGatewayConnectPeerAssociations{}, middleware.After) +} + +func addOpGetTransitGatewayRegistrationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetTransitGatewayRegistrations{}, middleware.After) +} + +func addOpGetVpcAttachmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetVpcAttachment{}, middleware.After) +} + +func addOpListCoreNetworkPolicyVersionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListCoreNetworkPolicyVersions{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpPutCoreNetworkPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutCoreNetworkPolicy{}, middleware.After) +} + +func addOpPutResourcePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutResourcePolicy{}, middleware.After) +} + +func addOpRegisterTransitGatewayValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRegisterTransitGateway{}, middleware.After) +} + +func addOpRejectAttachmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRejectAttachment{}, middleware.After) +} + +func addOpRestoreCoreNetworkPolicyVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRestoreCoreNetworkPolicyVersion{}, middleware.After) +} + +func addOpStartRouteAnalysisValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartRouteAnalysis{}, 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 addOpUpdateConnectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateConnection{}, middleware.After) +} + +func addOpUpdateCoreNetworkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateCoreNetwork{}, middleware.After) +} + +func addOpUpdateDeviceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateDevice{}, middleware.After) +} + +func addOpUpdateGlobalNetworkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateGlobalNetwork{}, middleware.After) +} + +func addOpUpdateLinkValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateLink{}, middleware.After) +} + +func addOpUpdateNetworkResourceMetadataValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateNetworkResourceMetadata{}, middleware.After) +} + +func addOpUpdateSiteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateSite{}, middleware.After) +} + +func addOpUpdateVpcAttachmentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateVpcAttachment{}, middleware.After) +} + +func validateOpAcceptAttachmentInput(v *AcceptAttachmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AcceptAttachmentInput"} + if v.AttachmentId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AttachmentId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAssociateConnectPeerInput(v *AssociateConnectPeerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateConnectPeerInput"} + if v.GlobalNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) + } + if v.ConnectPeerId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectPeerId")) + } + if v.DeviceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeviceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAssociateCustomerGatewayInput(v *AssociateCustomerGatewayInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateCustomerGatewayInput"} + if v.CustomerGatewayArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("CustomerGatewayArn")) + } + if v.GlobalNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) + } + if v.DeviceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeviceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } } -func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +func validateOpAssociateLinkInput(v *AssociateLinkInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateLinkInput"} + if v.GlobalNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) + } + if v.DeviceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeviceId")) + } + if v.LinkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("LinkId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } } -func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +func validateOpAssociateTransitGatewayConnectPeerInput(v *AssociateTransitGatewayConnectPeerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociateTransitGatewayConnectPeerInput"} + if v.GlobalNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) + } + if v.TransitGatewayConnectPeerArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayConnectPeerArn")) + } + if v.DeviceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeviceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } } -func addOpUpdateConnectionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateConnection{}, middleware.After) +func validateOpCreateConnectAttachmentInput(v *CreateConnectAttachmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateConnectAttachmentInput"} + if v.CoreNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CoreNetworkId")) + } + if v.EdgeLocation == nil { + invalidParams.Add(smithy.NewErrParamRequired("EdgeLocation")) + } + if v.TransportAttachmentId == nil { + invalidParams.Add(smithy.NewErrParamRequired("TransportAttachmentId")) + } + if v.Options == nil { + invalidParams.Add(smithy.NewErrParamRequired("Options")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } } -func addOpUpdateDeviceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateDevice{}, middleware.After) +func validateOpCreateConnectionInput(v *CreateConnectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateConnectionInput"} + if v.GlobalNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) + } + if v.DeviceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeviceId")) + } + if v.ConnectedDeviceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectedDeviceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } } -func addOpUpdateGlobalNetworkValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateGlobalNetwork{}, middleware.After) +func validateOpCreateConnectPeerInput(v *CreateConnectPeerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateConnectPeerInput"} + if v.ConnectAttachmentId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectAttachmentId")) + } + if v.PeerAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("PeerAddress")) + } + if v.InsideCidrBlocks == nil { + invalidParams.Add(smithy.NewErrParamRequired("InsideCidrBlocks")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } } -func addOpUpdateLinkValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateLink{}, middleware.After) +func validateOpCreateCoreNetworkInput(v *CreateCoreNetworkInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateCoreNetworkInput"} + if v.GlobalNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } } -func addOpUpdateNetworkResourceMetadataValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateNetworkResourceMetadata{}, middleware.After) +func validateOpCreateDeviceInput(v *CreateDeviceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateDeviceInput"} + if v.GlobalNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } } -func addOpUpdateSiteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateSite{}, middleware.After) +func validateOpCreateLinkInput(v *CreateLinkInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateLinkInput"} + if v.GlobalNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) + } + if v.Bandwidth == nil { + invalidParams.Add(smithy.NewErrParamRequired("Bandwidth")) + } + if v.SiteId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SiteId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateSiteInput(v *CreateSiteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateSiteInput"} + if v.GlobalNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateSiteToSiteVpnAttachmentInput(v *CreateSiteToSiteVpnAttachmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateSiteToSiteVpnAttachmentInput"} + if v.CoreNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CoreNetworkId")) + } + if v.VpnConnectionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("VpnConnectionArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateVpcAttachmentInput(v *CreateVpcAttachmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateVpcAttachmentInput"} + if v.CoreNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CoreNetworkId")) + } + if v.VpcArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("VpcArn")) + } + if v.SubnetArns == nil { + invalidParams.Add(smithy.NewErrParamRequired("SubnetArns")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteAttachmentInput(v *DeleteAttachmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteAttachmentInput"} + if v.AttachmentId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AttachmentId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteConnectionInput(v *DeleteConnectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteConnectionInput"} + if v.GlobalNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) + } + if v.ConnectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteConnectPeerInput(v *DeleteConnectPeerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteConnectPeerInput"} + if v.ConnectPeerId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectPeerId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteCoreNetworkInput(v *DeleteCoreNetworkInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteCoreNetworkInput"} + if v.CoreNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CoreNetworkId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteCoreNetworkPolicyVersionInput(v *DeleteCoreNetworkPolicyVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteCoreNetworkPolicyVersionInput"} + if v.CoreNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CoreNetworkId")) + } + if v.PolicyVersionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyVersionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } } -func validateOpAssociateCustomerGatewayInput(v *AssociateCustomerGatewayInput) error { +func validateOpDeleteDeviceInput(v *DeleteDeviceInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "AssociateCustomerGatewayInput"} - if v.CustomerGatewayArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("CustomerGatewayArn")) - } + invalidParams := smithy.InvalidParamsError{Context: "DeleteDeviceInput"} if v.GlobalNetworkId == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) } @@ -1014,20 +2082,14 @@ func validateOpAssociateCustomerGatewayInput(v *AssociateCustomerGatewayInput) e } } -func validateOpAssociateLinkInput(v *AssociateLinkInput) error { +func validateOpDeleteGlobalNetworkInput(v *DeleteGlobalNetworkInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "AssociateLinkInput"} + invalidParams := smithy.InvalidParamsError{Context: "DeleteGlobalNetworkInput"} if v.GlobalNetworkId == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) } - if v.DeviceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("DeviceId")) - } - if v.LinkId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LinkId")) - } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1035,19 +2097,16 @@ func validateOpAssociateLinkInput(v *AssociateLinkInput) error { } } -func validateOpAssociateTransitGatewayConnectPeerInput(v *AssociateTransitGatewayConnectPeerInput) error { +func validateOpDeleteLinkInput(v *DeleteLinkInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "AssociateTransitGatewayConnectPeerInput"} + invalidParams := smithy.InvalidParamsError{Context: "DeleteLinkInput"} if v.GlobalNetworkId == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) } - if v.TransitGatewayConnectPeerArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayConnectPeerArn")) - } - if v.DeviceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("DeviceId")) + if v.LinkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("LinkId")) } if invalidParams.Len() > 0 { return invalidParams @@ -1056,19 +2115,13 @@ func validateOpAssociateTransitGatewayConnectPeerInput(v *AssociateTransitGatewa } } -func validateOpCreateConnectionInput(v *CreateConnectionInput) error { +func validateOpDeleteResourcePolicyInput(v *DeleteResourcePolicyInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "CreateConnectionInput"} - if v.GlobalNetworkId == nil { - invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) - } - if v.DeviceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("DeviceId")) - } - if v.ConnectedDeviceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ConnectedDeviceId")) + invalidParams := smithy.InvalidParamsError{Context: "DeleteResourcePolicyInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams @@ -1077,14 +2130,17 @@ func validateOpCreateConnectionInput(v *CreateConnectionInput) error { } } -func validateOpCreateDeviceInput(v *CreateDeviceInput) error { +func validateOpDeleteSiteInput(v *DeleteSiteInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "CreateDeviceInput"} + invalidParams := smithy.InvalidParamsError{Context: "DeleteSiteInput"} if v.GlobalNetworkId == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) } + if v.SiteId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SiteId")) + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1092,19 +2148,16 @@ func validateOpCreateDeviceInput(v *CreateDeviceInput) error { } } -func validateOpCreateLinkInput(v *CreateLinkInput) error { +func validateOpDeregisterTransitGatewayInput(v *DeregisterTransitGatewayInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "CreateLinkInput"} + invalidParams := smithy.InvalidParamsError{Context: "DeregisterTransitGatewayInput"} if v.GlobalNetworkId == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) } - if v.Bandwidth == nil { - invalidParams.Add(smithy.NewErrParamRequired("Bandwidth")) - } - if v.SiteId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SiteId")) + if v.TransitGatewayArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayArn")) } if invalidParams.Len() > 0 { return invalidParams @@ -1113,14 +2166,17 @@ func validateOpCreateLinkInput(v *CreateLinkInput) error { } } -func validateOpCreateSiteInput(v *CreateSiteInput) error { +func validateOpDisassociateConnectPeerInput(v *DisassociateConnectPeerInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "CreateSiteInput"} + invalidParams := smithy.InvalidParamsError{Context: "DisassociateConnectPeerInput"} if v.GlobalNetworkId == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) } + if v.ConnectPeerId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectPeerId")) + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1128,16 +2184,16 @@ func validateOpCreateSiteInput(v *CreateSiteInput) error { } } -func validateOpDeleteConnectionInput(v *DeleteConnectionInput) error { +func validateOpDisassociateCustomerGatewayInput(v *DisassociateCustomerGatewayInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "DeleteConnectionInput"} + invalidParams := smithy.InvalidParamsError{Context: "DisassociateCustomerGatewayInput"} if v.GlobalNetworkId == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) } - if v.ConnectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ConnectionId")) + if v.CustomerGatewayArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("CustomerGatewayArn")) } if invalidParams.Len() > 0 { return invalidParams @@ -1146,17 +2202,20 @@ func validateOpDeleteConnectionInput(v *DeleteConnectionInput) error { } } -func validateOpDeleteDeviceInput(v *DeleteDeviceInput) error { +func validateOpDisassociateLinkInput(v *DisassociateLinkInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "DeleteDeviceInput"} + invalidParams := smithy.InvalidParamsError{Context: "DisassociateLinkInput"} if v.GlobalNetworkId == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) } if v.DeviceId == nil { invalidParams.Add(smithy.NewErrParamRequired("DeviceId")) } + if v.LinkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("LinkId")) + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1164,14 +2223,17 @@ func validateOpDeleteDeviceInput(v *DeleteDeviceInput) error { } } -func validateOpDeleteGlobalNetworkInput(v *DeleteGlobalNetworkInput) error { +func validateOpDisassociateTransitGatewayConnectPeerInput(v *DisassociateTransitGatewayConnectPeerInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "DeleteGlobalNetworkInput"} + invalidParams := smithy.InvalidParamsError{Context: "DisassociateTransitGatewayConnectPeerInput"} if v.GlobalNetworkId == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) } + if v.TransitGatewayConnectPeerArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayConnectPeerArn")) + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1179,16 +2241,16 @@ func validateOpDeleteGlobalNetworkInput(v *DeleteGlobalNetworkInput) error { } } -func validateOpDeleteLinkInput(v *DeleteLinkInput) error { +func validateOpExecuteCoreNetworkChangeSetInput(v *ExecuteCoreNetworkChangeSetInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "DeleteLinkInput"} - if v.GlobalNetworkId == nil { - invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) + invalidParams := smithy.InvalidParamsError{Context: "ExecuteCoreNetworkChangeSetInput"} + if v.CoreNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CoreNetworkId")) } - if v.LinkId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LinkId")) + if v.PolicyVersionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyVersionId")) } if invalidParams.Len() > 0 { return invalidParams @@ -1197,16 +2259,13 @@ func validateOpDeleteLinkInput(v *DeleteLinkInput) error { } } -func validateOpDeleteSiteInput(v *DeleteSiteInput) error { +func validateOpGetConnectAttachmentInput(v *GetConnectAttachmentInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "DeleteSiteInput"} - if v.GlobalNetworkId == nil { - invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) - } - if v.SiteId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SiteId")) + invalidParams := smithy.InvalidParamsError{Context: "GetConnectAttachmentInput"} + if v.AttachmentId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AttachmentId")) } if invalidParams.Len() > 0 { return invalidParams @@ -1215,17 +2274,14 @@ func validateOpDeleteSiteInput(v *DeleteSiteInput) error { } } -func validateOpDeregisterTransitGatewayInput(v *DeregisterTransitGatewayInput) error { +func validateOpGetConnectionsInput(v *GetConnectionsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "DeregisterTransitGatewayInput"} + invalidParams := smithy.InvalidParamsError{Context: "GetConnectionsInput"} if v.GlobalNetworkId == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) } - if v.TransitGatewayArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayArn")) - } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1233,17 +2289,14 @@ func validateOpDeregisterTransitGatewayInput(v *DeregisterTransitGatewayInput) e } } -func validateOpDisassociateCustomerGatewayInput(v *DisassociateCustomerGatewayInput) error { +func validateOpGetConnectPeerAssociationsInput(v *GetConnectPeerAssociationsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateCustomerGatewayInput"} + invalidParams := smithy.InvalidParamsError{Context: "GetConnectPeerAssociationsInput"} if v.GlobalNetworkId == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) } - if v.CustomerGatewayArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("CustomerGatewayArn")) - } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1251,19 +2304,31 @@ func validateOpDisassociateCustomerGatewayInput(v *DisassociateCustomerGatewayIn } } -func validateOpDisassociateLinkInput(v *DisassociateLinkInput) error { +func validateOpGetConnectPeerInput(v *GetConnectPeerInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateLinkInput"} - if v.GlobalNetworkId == nil { - invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) + invalidParams := smithy.InvalidParamsError{Context: "GetConnectPeerInput"} + if v.ConnectPeerId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectPeerId")) } - if v.DeviceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("DeviceId")) + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil } - if v.LinkId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LinkId")) +} + +func validateOpGetCoreNetworkChangeSetInput(v *GetCoreNetworkChangeSetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetCoreNetworkChangeSetInput"} + if v.CoreNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CoreNetworkId")) + } + if v.PolicyVersionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyVersionId")) } if invalidParams.Len() > 0 { return invalidParams @@ -1272,16 +2337,13 @@ func validateOpDisassociateLinkInput(v *DisassociateLinkInput) error { } } -func validateOpDisassociateTransitGatewayConnectPeerInput(v *DisassociateTransitGatewayConnectPeerInput) error { +func validateOpGetCoreNetworkInput(v *GetCoreNetworkInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateTransitGatewayConnectPeerInput"} - if v.GlobalNetworkId == nil { - invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) - } - if v.TransitGatewayConnectPeerArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayConnectPeerArn")) + invalidParams := smithy.InvalidParamsError{Context: "GetCoreNetworkInput"} + if v.CoreNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CoreNetworkId")) } if invalidParams.Len() > 0 { return invalidParams @@ -1290,13 +2352,13 @@ func validateOpDisassociateTransitGatewayConnectPeerInput(v *DisassociateTransit } } -func validateOpGetConnectionsInput(v *GetConnectionsInput) error { +func validateOpGetCoreNetworkPolicyInput(v *GetCoreNetworkPolicyInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "GetConnectionsInput"} - if v.GlobalNetworkId == nil { - invalidParams.Add(smithy.NewErrParamRequired("GlobalNetworkId")) + invalidParams := smithy.InvalidParamsError{Context: "GetCoreNetworkPolicyInput"} + if v.CoreNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CoreNetworkId")) } if invalidParams.Len() > 0 { return invalidParams @@ -1443,6 +2505,21 @@ func validateOpGetNetworkTelemetryInput(v *GetNetworkTelemetryInput) error { } } +func validateOpGetResourcePolicyInput(v *GetResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetResourcePolicyInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetRouteAnalysisInput(v *GetRouteAnalysisInput) error { if v == nil { return nil @@ -1476,6 +2553,21 @@ func validateOpGetSitesInput(v *GetSitesInput) error { } } +func validateOpGetSiteToSiteVpnAttachmentInput(v *GetSiteToSiteVpnAttachmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetSiteToSiteVpnAttachmentInput"} + if v.AttachmentId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AttachmentId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetTransitGatewayConnectPeerAssociationsInput(v *GetTransitGatewayConnectPeerAssociationsInput) error { if v == nil { return nil @@ -1506,6 +2598,36 @@ func validateOpGetTransitGatewayRegistrationsInput(v *GetTransitGatewayRegistrat } } +func validateOpGetVpcAttachmentInput(v *GetVpcAttachmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetVpcAttachmentInput"} + if v.AttachmentId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AttachmentId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListCoreNetworkPolicyVersionsInput(v *ListCoreNetworkPolicyVersionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListCoreNetworkPolicyVersionsInput"} + if v.CoreNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CoreNetworkId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil @@ -1521,6 +2643,42 @@ func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { } } +func validateOpPutCoreNetworkPolicyInput(v *PutCoreNetworkPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutCoreNetworkPolicyInput"} + if v.CoreNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CoreNetworkId")) + } + if v.PolicyDocument == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutResourcePolicyInput(v *PutResourcePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutResourcePolicyInput"} + if v.PolicyDocument == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument")) + } + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpRegisterTransitGatewayInput(v *RegisterTransitGatewayInput) error { if v == nil { return nil @@ -1539,6 +2697,39 @@ func validateOpRegisterTransitGatewayInput(v *RegisterTransitGatewayInput) error } } +func validateOpRejectAttachmentInput(v *RejectAttachmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RejectAttachmentInput"} + if v.AttachmentId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AttachmentId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRestoreCoreNetworkPolicyVersionInput(v *RestoreCoreNetworkPolicyVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RestoreCoreNetworkPolicyVersionInput"} + if v.CoreNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CoreNetworkId")) + } + if v.PolicyVersionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyVersionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartRouteAnalysisInput(v *StartRouteAnalysisInput) error { if v == nil { return nil @@ -1614,6 +2805,21 @@ func validateOpUpdateConnectionInput(v *UpdateConnectionInput) error { } } +func validateOpUpdateCoreNetworkInput(v *UpdateCoreNetworkInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateCoreNetworkInput"} + if v.CoreNetworkId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CoreNetworkId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateDeviceInput(v *UpdateDeviceInput) error { if v == nil { return nil @@ -1703,3 +2909,18 @@ func validateOpUpdateSiteInput(v *UpdateSiteInput) error { return nil } } + +func validateOpUpdateVpcAttachmentInput(v *UpdateVpcAttachmentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateVpcAttachmentInput"} + if v.AttachmentId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AttachmentId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/nimble/api_client.go b/service/nimble/api_client.go index cb17a1b7886..30eedbd1e38 100644 --- a/service/nimble/api_client.go +++ b/service/nimble/api_client.go @@ -4,7 +4,6 @@ package nimble import ( "context" - cryptorand "crypto/rand" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" @@ -15,7 +14,6 @@ import ( smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" - smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "time" @@ -45,8 +43,6 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveDefaultEndpointConfiguration(&options) - resolveIdempotencyTokenProvider(&options) - for _, fn := range optFns { fn(&options) } @@ -79,10 +75,6 @@ type Options struct { // 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 @@ -248,13 +240,6 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } -func resolveIdempotencyTokenProvider(o *Options) { - if o.IdempotencyTokenProvider != nil { - return - } - o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) -} - func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, @@ -293,11 +278,6 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } -// IdempotencyTokenProvider interface for providing idempotency token -type IdempotencyTokenProvider interface { - GetIdempotencyToken() (string, error) -} - func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/nimble/api_op_AcceptEulas.go b/service/nimble/api_op_AcceptEulas.go index d8807cb27e7..cb4eebef600 100644 --- a/service/nimble/api_op_AcceptEulas.go +++ b/service/nimble/api_op_AcceptEulas.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -104,9 +103,6 @@ func (c *Client) addOperationAcceptEulasMiddlewares(stack *middleware.Stack, opt if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opAcceptEulasMiddleware(stack, options); err != nil { - return err - } if err = addOpAcceptEulasValidationMiddleware(stack); err != nil { return err } @@ -125,39 +121,6 @@ func (c *Client) addOperationAcceptEulasMiddlewares(stack *middleware.Stack, opt 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, diff --git a/service/nimble/api_op_CreateLaunchProfile.go b/service/nimble/api_op_CreateLaunchProfile.go index 9fb4ff47355..d448256ce72 100644 --- a/service/nimble/api_op_CreateLaunchProfile.go +++ b/service/nimble/api_op_CreateLaunchProfile.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -136,9 +135,6 @@ func (c *Client) addOperationCreateLaunchProfileMiddlewares(stack *middleware.St if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateLaunchProfileMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateLaunchProfileValidationMiddleware(stack); err != nil { return err } @@ -157,39 +153,6 @@ func (c *Client) addOperationCreateLaunchProfileMiddlewares(stack *middleware.St 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, diff --git a/service/nimble/api_op_CreateStreamingImage.go b/service/nimble/api_op_CreateStreamingImage.go index 48d74d83fad..af272f1778d 100644 --- a/service/nimble/api_op_CreateStreamingImage.go +++ b/service/nimble/api_op_CreateStreamingImage.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -118,9 +117,6 @@ func (c *Client) addOperationCreateStreamingImageMiddlewares(stack *middleware.S if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateStreamingImageMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateStreamingImageValidationMiddleware(stack); err != nil { return err } @@ -139,39 +135,6 @@ func (c *Client) addOperationCreateStreamingImageMiddlewares(stack *middleware.S 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, diff --git a/service/nimble/api_op_CreateStreamingSession.go b/service/nimble/api_op_CreateStreamingSession.go index a16ebe61679..c86146abf6c 100644 --- a/service/nimble/api_op_CreateStreamingSession.go +++ b/service/nimble/api_op_CreateStreamingSession.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -118,9 +117,6 @@ func (c *Client) addOperationCreateStreamingSessionMiddlewares(stack *middleware if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateStreamingSessionMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateStreamingSessionValidationMiddleware(stack); err != nil { return err } @@ -139,39 +135,6 @@ func (c *Client) addOperationCreateStreamingSessionMiddlewares(stack *middleware 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, diff --git a/service/nimble/api_op_CreateStreamingSessionStream.go b/service/nimble/api_op_CreateStreamingSessionStream.go index 47a8c0cf420..ddc455eb987 100644 --- a/service/nimble/api_op_CreateStreamingSessionStream.go +++ b/service/nimble/api_op_CreateStreamingSessionStream.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -111,9 +110,6 @@ func (c *Client) addOperationCreateStreamingSessionStreamMiddlewares(stack *midd if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateStreamingSessionStreamMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateStreamingSessionStreamValidationMiddleware(stack); err != nil { return err } @@ -132,39 +128,6 @@ func (c *Client) addOperationCreateStreamingSessionStreamMiddlewares(stack *midd 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, diff --git a/service/nimble/api_op_CreateStudio.go b/service/nimble/api_op_CreateStudio.go index 2f3e1d216d9..302e35c3b89 100644 --- a/service/nimble/api_op_CreateStudio.go +++ b/service/nimble/api_op_CreateStudio.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -141,9 +140,6 @@ func (c *Client) addOperationCreateStudioMiddlewares(stack *middleware.Stack, op if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateStudioMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateStudioValidationMiddleware(stack); err != nil { return err } @@ -162,39 +158,6 @@ func (c *Client) addOperationCreateStudioMiddlewares(stack *middleware.Stack, op 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, diff --git a/service/nimble/api_op_CreateStudioComponent.go b/service/nimble/api_op_CreateStudioComponent.go index 2c559ef3105..c121e67a661 100644 --- a/service/nimble/api_op_CreateStudioComponent.go +++ b/service/nimble/api_op_CreateStudioComponent.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -133,9 +132,6 @@ func (c *Client) addOperationCreateStudioComponentMiddlewares(stack *middleware. if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateStudioComponentMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateStudioComponentValidationMiddleware(stack); err != nil { return err } @@ -154,39 +150,6 @@ func (c *Client) addOperationCreateStudioComponentMiddlewares(stack *middleware. 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, diff --git a/service/nimble/api_op_DeleteLaunchProfile.go b/service/nimble/api_op_DeleteLaunchProfile.go index bedfceb86b9..d689a163c26 100644 --- a/service/nimble/api_op_DeleteLaunchProfile.go +++ b/service/nimble/api_op_DeleteLaunchProfile.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -105,9 +104,6 @@ func (c *Client) addOperationDeleteLaunchProfileMiddlewares(stack *middleware.St if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opDeleteLaunchProfileMiddleware(stack, options); err != nil { - return err - } if err = addOpDeleteLaunchProfileValidationMiddleware(stack); err != nil { return err } @@ -126,39 +122,6 @@ func (c *Client) addOperationDeleteLaunchProfileMiddlewares(stack *middleware.St 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, diff --git a/service/nimble/api_op_DeleteLaunchProfileMember.go b/service/nimble/api_op_DeleteLaunchProfileMember.go index 5135acfd938..ea834670719 100644 --- a/service/nimble/api_op_DeleteLaunchProfileMember.go +++ b/service/nimble/api_op_DeleteLaunchProfileMember.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -105,9 +104,6 @@ func (c *Client) addOperationDeleteLaunchProfileMemberMiddlewares(stack *middlew if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opDeleteLaunchProfileMemberMiddleware(stack, options); err != nil { - return err - } if err = addOpDeleteLaunchProfileMemberValidationMiddleware(stack); err != nil { return err } @@ -126,39 +122,6 @@ func (c *Client) addOperationDeleteLaunchProfileMemberMiddlewares(stack *middlew 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, diff --git a/service/nimble/api_op_DeleteStreamingImage.go b/service/nimble/api_op_DeleteStreamingImage.go index 7ed3c1e6d07..40665e4c72a 100644 --- a/service/nimble/api_op_DeleteStreamingImage.go +++ b/service/nimble/api_op_DeleteStreamingImage.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -105,9 +104,6 @@ func (c *Client) addOperationDeleteStreamingImageMiddlewares(stack *middleware.S if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opDeleteStreamingImageMiddleware(stack, options); err != nil { - return err - } if err = addOpDeleteStreamingImageValidationMiddleware(stack); err != nil { return err } @@ -126,39 +122,6 @@ func (c *Client) addOperationDeleteStreamingImageMiddlewares(stack *middleware.S 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, diff --git a/service/nimble/api_op_DeleteStreamingSession.go b/service/nimble/api_op_DeleteStreamingSession.go index 8ad7658ebb7..029c0004b55 100644 --- a/service/nimble/api_op_DeleteStreamingSession.go +++ b/service/nimble/api_op_DeleteStreamingSession.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -108,9 +107,6 @@ func (c *Client) addOperationDeleteStreamingSessionMiddlewares(stack *middleware if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opDeleteStreamingSessionMiddleware(stack, options); err != nil { - return err - } if err = addOpDeleteStreamingSessionValidationMiddleware(stack); err != nil { return err } @@ -129,39 +125,6 @@ func (c *Client) addOperationDeleteStreamingSessionMiddlewares(stack *middleware 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, diff --git a/service/nimble/api_op_DeleteStudio.go b/service/nimble/api_op_DeleteStudio.go index 4da3ae26c2b..43047af5e4f 100644 --- a/service/nimble/api_op_DeleteStudio.go +++ b/service/nimble/api_op_DeleteStudio.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -102,9 +101,6 @@ func (c *Client) addOperationDeleteStudioMiddlewares(stack *middleware.Stack, op if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opDeleteStudioMiddleware(stack, options); err != nil { - return err - } if err = addOpDeleteStudioValidationMiddleware(stack); err != nil { return err } @@ -123,39 +119,6 @@ func (c *Client) addOperationDeleteStudioMiddlewares(stack *middleware.Stack, op 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, diff --git a/service/nimble/api_op_DeleteStudioComponent.go b/service/nimble/api_op_DeleteStudioComponent.go index f2086f0c059..f5ebbbef84d 100644 --- a/service/nimble/api_op_DeleteStudioComponent.go +++ b/service/nimble/api_op_DeleteStudioComponent.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -105,9 +104,6 @@ func (c *Client) addOperationDeleteStudioComponentMiddlewares(stack *middleware. if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opDeleteStudioComponentMiddleware(stack, options); err != nil { - return err - } if err = addOpDeleteStudioComponentValidationMiddleware(stack); err != nil { return err } @@ -126,39 +122,6 @@ func (c *Client) addOperationDeleteStudioComponentMiddlewares(stack *middleware. 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, diff --git a/service/nimble/api_op_DeleteStudioMember.go b/service/nimble/api_op_DeleteStudioMember.go index a438f12fced..bbd8e881ed8 100644 --- a/service/nimble/api_op_DeleteStudioMember.go +++ b/service/nimble/api_op_DeleteStudioMember.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" @@ -100,9 +99,6 @@ func (c *Client) addOperationDeleteStudioMemberMiddlewares(stack *middleware.Sta if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opDeleteStudioMemberMiddleware(stack, options); err != nil { - return err - } if err = addOpDeleteStudioMemberValidationMiddleware(stack); err != nil { return err } @@ -121,39 +117,6 @@ func (c *Client) addOperationDeleteStudioMemberMiddlewares(stack *middleware.Sta 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, diff --git a/service/nimble/api_op_PutLaunchProfileMembers.go b/service/nimble/api_op_PutLaunchProfileMembers.go index d5b96b0df99..bdb934be597 100644 --- a/service/nimble/api_op_PutLaunchProfileMembers.go +++ b/service/nimble/api_op_PutLaunchProfileMembers.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -111,9 +110,6 @@ func (c *Client) addOperationPutLaunchProfileMembersMiddlewares(stack *middlewar if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opPutLaunchProfileMembersMiddleware(stack, options); err != nil { - return err - } if err = addOpPutLaunchProfileMembersValidationMiddleware(stack); err != nil { return err } @@ -132,39 +128,6 @@ func (c *Client) addOperationPutLaunchProfileMembersMiddlewares(stack *middlewar 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, diff --git a/service/nimble/api_op_PutStudioMembers.go b/service/nimble/api_op_PutStudioMembers.go index 940011adc97..bbfb1cd5de1 100644 --- a/service/nimble/api_op_PutStudioMembers.go +++ b/service/nimble/api_op_PutStudioMembers.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -107,9 +106,6 @@ func (c *Client) addOperationPutStudioMembersMiddlewares(stack *middleware.Stack if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opPutStudioMembersMiddleware(stack, options); err != nil { - return err - } if err = addOpPutStudioMembersValidationMiddleware(stack); err != nil { return err } @@ -128,39 +124,6 @@ func (c *Client) addOperationPutStudioMembersMiddlewares(stack *middleware.Stack 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, diff --git a/service/nimble/api_op_StartStreamingSession.go b/service/nimble/api_op_StartStreamingSession.go index 76635dfeb99..5ddb13b9c82 100644 --- a/service/nimble/api_op_StartStreamingSession.go +++ b/service/nimble/api_op_StartStreamingSession.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -107,9 +106,6 @@ func (c *Client) addOperationStartStreamingSessionMiddlewares(stack *middleware. if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opStartStreamingSessionMiddleware(stack, options); err != nil { - return err - } if err = addOpStartStreamingSessionValidationMiddleware(stack); err != nil { return err } @@ -128,39 +124,6 @@ func (c *Client) addOperationStartStreamingSessionMiddlewares(stack *middleware. 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, diff --git a/service/nimble/api_op_StartStudioSSOConfigurationRepair.go b/service/nimble/api_op_StartStudioSSOConfigurationRepair.go index 5b88dc0cc70..22d94e3ba95 100644 --- a/service/nimble/api_op_StartStudioSSOConfigurationRepair.go +++ b/service/nimble/api_op_StartStudioSSOConfigurationRepair.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -109,9 +108,6 @@ func (c *Client) addOperationStartStudioSSOConfigurationRepairMiddlewares(stack if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opStartStudioSSOConfigurationRepairMiddleware(stack, options); err != nil { - return err - } if err = addOpStartStudioSSOConfigurationRepairValidationMiddleware(stack); err != nil { return err } @@ -130,39 +126,6 @@ func (c *Client) addOperationStartStudioSSOConfigurationRepairMiddlewares(stack 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, diff --git a/service/nimble/api_op_StopStreamingSession.go b/service/nimble/api_op_StopStreamingSession.go index 69807b7c1ba..f666a0b917d 100644 --- a/service/nimble/api_op_StopStreamingSession.go +++ b/service/nimble/api_op_StopStreamingSession.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -107,9 +106,6 @@ func (c *Client) addOperationStopStreamingSessionMiddlewares(stack *middleware.S if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opStopStreamingSessionMiddleware(stack, options); err != nil { - return err - } if err = addOpStopStreamingSessionValidationMiddleware(stack); err != nil { return err } @@ -128,39 +124,6 @@ func (c *Client) addOperationStopStreamingSessionMiddlewares(stack *middleware.S 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, diff --git a/service/nimble/api_op_UpdateLaunchProfile.go b/service/nimble/api_op_UpdateLaunchProfile.go index 68a08e89fff..35aa6399ddc 100644 --- a/service/nimble/api_op_UpdateLaunchProfile.go +++ b/service/nimble/api_op_UpdateLaunchProfile.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -123,9 +122,6 @@ func (c *Client) addOperationUpdateLaunchProfileMiddlewares(stack *middleware.St if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opUpdateLaunchProfileMiddleware(stack, options); err != nil { - return err - } if err = addOpUpdateLaunchProfileValidationMiddleware(stack); err != nil { return err } @@ -144,39 +140,6 @@ func (c *Client) addOperationUpdateLaunchProfileMiddlewares(stack *middleware.St 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, diff --git a/service/nimble/api_op_UpdateLaunchProfileMember.go b/service/nimble/api_op_UpdateLaunchProfileMember.go index 76c9fd062c9..e952dfc64a9 100644 --- a/service/nimble/api_op_UpdateLaunchProfileMember.go +++ b/service/nimble/api_op_UpdateLaunchProfileMember.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -115,9 +114,6 @@ func (c *Client) addOperationUpdateLaunchProfileMemberMiddlewares(stack *middlew if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opUpdateLaunchProfileMemberMiddleware(stack, options); err != nil { - return err - } if err = addOpUpdateLaunchProfileMemberValidationMiddleware(stack); err != nil { return err } @@ -136,39 +132,6 @@ func (c *Client) addOperationUpdateLaunchProfileMemberMiddlewares(stack *middlew 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, diff --git a/service/nimble/api_op_UpdateStreamingImage.go b/service/nimble/api_op_UpdateStreamingImage.go index 9ea01ce7dda..81788b07120 100644 --- a/service/nimble/api_op_UpdateStreamingImage.go +++ b/service/nimble/api_op_UpdateStreamingImage.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -112,9 +111,6 @@ func (c *Client) addOperationUpdateStreamingImageMiddlewares(stack *middleware.S if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opUpdateStreamingImageMiddleware(stack, options); err != nil { - return err - } if err = addOpUpdateStreamingImageValidationMiddleware(stack); err != nil { return err } @@ -133,39 +129,6 @@ func (c *Client) addOperationUpdateStreamingImageMiddlewares(stack *middleware.S 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, diff --git a/service/nimble/api_op_UpdateStudio.go b/service/nimble/api_op_UpdateStudio.go index 4261534f04e..07c6649d5f7 100644 --- a/service/nimble/api_op_UpdateStudio.go +++ b/service/nimble/api_op_UpdateStudio.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -115,9 +114,6 @@ func (c *Client) addOperationUpdateStudioMiddlewares(stack *middleware.Stack, op if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opUpdateStudioMiddleware(stack, options); err != nil { - return err - } if err = addOpUpdateStudioValidationMiddleware(stack); err != nil { return err } @@ -136,39 +132,6 @@ func (c *Client) addOperationUpdateStudioMiddlewares(stack *middleware.Stack, op 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, diff --git a/service/nimble/api_op_UpdateStudioComponent.go b/service/nimble/api_op_UpdateStudioComponent.go index 5189851668d..424568ae411 100644 --- a/service/nimble/api_op_UpdateStudioComponent.go +++ b/service/nimble/api_op_UpdateStudioComponent.go @@ -4,7 +4,6 @@ package nimble import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/nimble/types" @@ -130,9 +129,6 @@ func (c *Client) addOperationUpdateStudioComponentMiddlewares(stack *middleware. if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opUpdateStudioComponentMiddleware(stack, options); err != nil { - return err - } if err = addOpUpdateStudioComponentValidationMiddleware(stack); err != nil { return err } @@ -151,39 +147,6 @@ func (c *Client) addOperationUpdateStudioComponentMiddlewares(stack *middleware. 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, diff --git a/service/proton/api_client.go b/service/proton/api_client.go index 6d958cc5137..7a1f32cbd06 100644 --- a/service/proton/api_client.go +++ b/service/proton/api_client.go @@ -4,7 +4,6 @@ package proton import ( "context" - cryptorand "crypto/rand" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" @@ -15,7 +14,6 @@ import ( smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" - smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "time" @@ -45,8 +43,6 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveDefaultEndpointConfiguration(&options) - resolveIdempotencyTokenProvider(&options) - for _, fn := range optFns { fn(&options) } @@ -79,10 +75,6 @@ type Options struct { // 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 @@ -248,13 +240,6 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } -func resolveIdempotencyTokenProvider(o *Options) { - if o.IdempotencyTokenProvider != nil { - return - } - o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) -} - func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, @@ -293,11 +278,6 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } -// IdempotencyTokenProvider interface for providing idempotency token -type IdempotencyTokenProvider interface { - GetIdempotencyToken() (string, error) -} - func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/proton/api_op_CreateEnvironmentAccountConnection.go b/service/proton/api_op_CreateEnvironmentAccountConnection.go index 663822cd002..e9f7d142dce 100644 --- a/service/proton/api_op_CreateEnvironmentAccountConnection.go +++ b/service/proton/api_op_CreateEnvironmentAccountConnection.go @@ -4,7 +4,6 @@ package proton import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/proton/types" @@ -131,9 +130,6 @@ func (c *Client) addOperationCreateEnvironmentAccountConnectionMiddlewares(stack if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateEnvironmentAccountConnectionMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateEnvironmentAccountConnectionValidationMiddleware(stack); err != nil { return err } @@ -152,39 +148,6 @@ func (c *Client) addOperationCreateEnvironmentAccountConnectionMiddlewares(stack return nil } -type idempotencyToken_initializeOpCreateEnvironmentAccountConnection struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateEnvironmentAccountConnection) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateEnvironmentAccountConnection) 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.(*CreateEnvironmentAccountConnectionInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateEnvironmentAccountConnectionInput ") - } - - 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_opCreateEnvironmentAccountConnectionMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateEnvironmentAccountConnection{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateEnvironmentAccountConnection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_CreateEnvironmentTemplateVersion.go b/service/proton/api_op_CreateEnvironmentTemplateVersion.go index 14939ae96ec..3a1e7a5b078 100644 --- a/service/proton/api_op_CreateEnvironmentTemplateVersion.go +++ b/service/proton/api_op_CreateEnvironmentTemplateVersion.go @@ -4,7 +4,6 @@ package proton import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/proton/types" @@ -120,9 +119,6 @@ func (c *Client) addOperationCreateEnvironmentTemplateVersionMiddlewares(stack * if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateEnvironmentTemplateVersionMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateEnvironmentTemplateVersionValidationMiddleware(stack); err != nil { return err } @@ -141,39 +137,6 @@ func (c *Client) addOperationCreateEnvironmentTemplateVersionMiddlewares(stack * return nil } -type idempotencyToken_initializeOpCreateEnvironmentTemplateVersion struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateEnvironmentTemplateVersion) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateEnvironmentTemplateVersion) 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.(*CreateEnvironmentTemplateVersionInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateEnvironmentTemplateVersionInput ") - } - - 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_opCreateEnvironmentTemplateVersionMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateEnvironmentTemplateVersion{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateEnvironmentTemplateVersion(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_CreateServiceTemplateVersion.go b/service/proton/api_op_CreateServiceTemplateVersion.go index de59e896f1f..46d085302ec 100644 --- a/service/proton/api_op_CreateServiceTemplateVersion.go +++ b/service/proton/api_op_CreateServiceTemplateVersion.go @@ -4,7 +4,6 @@ package proton import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/proton/types" @@ -126,9 +125,6 @@ func (c *Client) addOperationCreateServiceTemplateVersionMiddlewares(stack *midd if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateServiceTemplateVersionMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateServiceTemplateVersionValidationMiddleware(stack); err != nil { return err } @@ -147,39 +143,6 @@ func (c *Client) addOperationCreateServiceTemplateVersionMiddlewares(stack *midd return nil } -type idempotencyToken_initializeOpCreateServiceTemplateVersion struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateServiceTemplateVersion) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateServiceTemplateVersion) 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.(*CreateServiceTemplateVersionInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateServiceTemplateVersionInput ") - } - - 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_opCreateServiceTemplateVersionMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateServiceTemplateVersion{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateServiceTemplateVersion(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ram/api_op_AcceptResourceShareInvitation.go b/service/ram/api_op_AcceptResourceShareInvitation.go index c1b19e53f15..7a9c0a3b29e 100644 --- a/service/ram/api_op_AcceptResourceShareInvitation.go +++ b/service/ram/api_op_AcceptResourceShareInvitation.go @@ -12,7 +12,9 @@ import ( ) // Accepts an invitation to a resource share from another Amazon Web Services -// account. +// account. After you accept the invitation, the resources included in the resource +// share are available to interact with in the relevant Amazon Web Services +// Management Consoles and tools. func (c *Client) AcceptResourceShareInvitation(ctx context.Context, params *AcceptResourceShareInvitationInput, optFns ...func(*Options)) (*AcceptResourceShareInvitationOutput, error) { if params == nil { params = &AcceptResourceShareInvitationInput{} @@ -30,13 +32,20 @@ func (c *Client) AcceptResourceShareInvitation(ctx context.Context, params *Acce type AcceptResourceShareInvitationInput struct { - // The Amazon Resource Name (ARN) of the invitation. + // The Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the invitation that you want to accept. // // This member is required. ResourceShareInvitationArn *string - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. + // (https://wikipedia.org/wiki/Universally_unique_identifier). If you don't provide + // this value, then Amazon Web Services generates a random one for you. ClientToken *string noSmithyDocumentSerde @@ -44,11 +53,13 @@ type AcceptResourceShareInvitationInput struct { type AcceptResourceShareInvitationOutput struct { - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. ClientToken *string - // Information about the invitation. + // An object that contains information about the specified invitation. ResourceShareInvitation *types.ResourceShareInvitation // Metadata pertaining to the operation's result. diff --git a/service/ram/api_op_AssociateResourceShare.go b/service/ram/api_op_AssociateResourceShare.go index 934b6ce9c8e..8fdb21cf475 100644 --- a/service/ram/api_op_AssociateResourceShare.go +++ b/service/ram/api_op_AssociateResourceShare.go @@ -11,8 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Associates the specified resource share with the specified principals and -// resources. +// Adds the specified list of principals and list of resources to a resource share. +// Principals that already have access to this resource share immediately receive +// access to the added resources. Newly added principals immediately receive access +// to the resources shared in this resource share. func (c *Client) AssociateResourceShare(ctx context.Context, params *AssociateResourceShareInput, optFns ...func(*Options)) (*AssociateResourceShareOutput, error) { if params == nil { params = &AssociateResourceShareInput{} @@ -30,38 +32,57 @@ func (c *Client) AssociateResourceShare(ctx context.Context, params *AssociateRe type AssociateResourceShareInput struct { - // The Amazon Resource Name (ARN) of the resource share. + // Specifies the Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share that you want to add principals or resources to. // // This member is required. ResourceShareArn *string - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. + // (https://wikipedia.org/wiki/Universally_unique_identifier). If you don't provide + // this value, then Amazon Web Services generates a random one for you. ClientToken *string - // The principals to associate with the resource share. The possible values are: + // Specifies a list of principals to whom you want to the resource share. This can + // be null if you want to add only resources. What the principals can do with the + // resources in the share is determined by the RAM permissions that you associate + // with the resource share. See AssociateResourceSharePermission. You can include + // the following values: // - // * - // An Amazon Web Services account ID + // * An Amazon Web Services account ID, for example: + // 123456789012 // - // * An Amazon Resource Name (ARN) of an - // organization in Organizations + // * An Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // an organization in Organizations, for example: + // organizations::123456789012:organization/o-exampleorgid // - // * An ARN of an organizational unit (OU) in - // Organizations + // * An ARN of an + // organizational unit (OU) in Organizations, for example: + // organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123 // - // * An ARN of an IAM role + // * + // An ARN of an IAM role, for example: iam::123456789012:role/rolename // - // * An ARN of an IAM user + // * An ARN of + // an IAM user, for example: iam::123456789012user/username // - // Not all - // resource types can be shared with IAM roles and IAM users. For more information, - // see Sharing with IAM roles and IAM users + // Not all resource types + // can be shared with IAM roles and users. For more information, see Sharing with + // IAM roles and users // (https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types) // in the Resource Access Manager User Guide. Principals []string - // The Amazon Resource Names (ARNs) of the resources. + // Specifies a list of Amazon Resource Names (ARNs) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resources that you want to share. This can be null if you want to add only + // principals. ResourceArns []string noSmithyDocumentSerde @@ -69,11 +90,13 @@ type AssociateResourceShareInput struct { type AssociateResourceShareOutput struct { - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. ClientToken *string - // Information about the associations. + // An array of objects that contain information about the associations. ResourceShareAssociations []types.ResourceShareAssociation // Metadata pertaining to the operation's result. diff --git a/service/ram/api_op_AssociateResourceSharePermission.go b/service/ram/api_op_AssociateResourceSharePermission.go index 5d815fbfecd..2b94f916722 100644 --- a/service/ram/api_op_AssociateResourceSharePermission.go +++ b/service/ram/api_op_AssociateResourceSharePermission.go @@ -10,7 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Associates a permission with a resource share. +// Adds or replaces the RAM permission for a resource type included in a resource +// share. You can have exactly one permission associated with each resource type in +// the resource share. You can add a new RAM permission only if there are currently +// no resources of that resource type currently in the resource share. func (c *Client) AssociateResourceSharePermission(ctx context.Context, params *AssociateResourceSharePermissionInput, optFns ...func(*Options)) (*AssociateResourceSharePermissionOutput, error) { if params == nil { params = &AssociateResourceSharePermissionInput{} @@ -28,27 +31,45 @@ func (c *Client) AssociateResourceSharePermission(ctx context.Context, params *A type AssociateResourceSharePermissionInput struct { - // The Amazon Resource Name (ARN) of the RAM permission to associate with the - // resource share. + // Specifies the Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the RAM permission to associate with the resource share. To find the ARN for a + // permission, use either the ListPermissions operation or go to the Permissions + // library (https://console.aws.amazon.com/ram/home#Permissions:) page in the RAM + // console and then choose the name of the permission. The ARN is displayed on the + // detail page. // // This member is required. PermissionArn *string - // The Amazon Resource Name (ARN) of the resource share. + // Specifies the Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share to which you want to add or replace permissions. // // This member is required. ResourceShareArn *string - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. + // (https://wikipedia.org/wiki/Universally_unique_identifier). If you don't provide + // this value, then Amazon Web Services generates a random one for you. ClientToken *string - // The version of the RAM permissions to associate with the resource share. + // Specifies the version of the RAM permission to associate with the resource + // share. If you don't specify this parameter, the operation uses the version + // designated as the default. PermissionVersion *int32 - // Indicates whether the permission should replace the permissions that are - // currently associated with the resource share. Use true to replace the current - // permissions. Use false to add the permission to the current permission. + // Specifies whether the specified permission should replace or add to the existing + // permission associated with the resource share. Use true to replace the current + // permissions. Use false to add the permission to the current permission. The + // default value is false. A resource share can have only one permission per + // resource type. If a resource share already has a permission for the specified + // resource type and you don't set replace to true then the operation returns an + // error. This helps prevent accidental overwriting of a permission. Replace *bool noSmithyDocumentSerde @@ -56,11 +77,14 @@ type AssociateResourceSharePermissionInput struct { type AssociateResourceSharePermissionOutput struct { - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. ClientToken *string - // Indicates whether the request succeeded. + // A return value of true indicates that the request succeeded. A value of false + // indicates that the request failed. ReturnValue *bool // Metadata pertaining to the operation's result. diff --git a/service/ram/api_op_CreateResourceShare.go b/service/ram/api_op_CreateResourceShare.go index a52b066f7ae..fd99d2faf2f 100644 --- a/service/ram/api_op_CreateResourceShare.go +++ b/service/ram/api_op_CreateResourceShare.go @@ -11,9 +11,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a resource share. You must provide a list of the Amazon Resource Names -// (ARNs) for the resources you want to share. You must also specify who you want -// to share the resources with, and the permissions that you grant them. Sharing a +// Creates a resource share. You can provide a list of the Amazon Resource Names +// (ARNs) +// (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) for +// the resources that you want to share, a list of principals you want to share the +// resources with, and the permissions to grant those principals. Sharing a // resource makes it available for use by principals outside of the Amazon Web // Services account that created the resource. Sharing doesn't change any // permissions or quotas that apply to the resource in the account that created it. @@ -34,52 +36,69 @@ func (c *Client) CreateResourceShare(ctx context.Context, params *CreateResource type CreateResourceShareInput struct { - // The name of the resource share. + // Specifies the name of the resource share. // // This member is required. Name *string - // Indicates whether principals outside your organization in Organizations can be - // associated with a resource share. + // Specifies whether principals outside your organization in Organizations can be + // associated with a resource share. A value of true lets you share with individual + // Amazon Web Services accounts that are not in your organization. A value of false + // only has meaning if your account is a member of an Amazon Web Services + // Organization. The default value is true. AllowExternalPrincipals *bool - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. + // (https://wikipedia.org/wiki/Universally_unique_identifier). If you don't provide + // this value, then Amazon Web Services generates a random one for you. ClientToken *string - // The Amazon Resource Names (ARNs) of the permissions to associate with the - // resource share. If you do not specify an ARN for the permission, RAM - // automatically attaches the default version of the permission for each resource - // type. Only one permission can be associated with each resource type in a - // resource share. + // Specifies the Amazon Resource Names (ARNs) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the RAM permission to associate with the resource share. If you do not specify + // an ARN for the permission, RAM automatically attaches the default version of the + // permission for each resource type. You can associate only one permission with + // each resource type included in the resource share. PermissionArns []string - // The principals to associate with the resource share. The possible values are: + // Specifies a list of one or more principals to associate with the resource share. + // You can include the following values: // - // * - // An Amazon Web Services account ID + // * An Amazon Web Services account ID, for + // example: 123456789012 // - // * An Amazon Resource Name (ARN) of an - // organization in Organizations + // * An Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // an organization in Organizations, for example: + // organizations::123456789012:organization/o-exampleorgid // - // * An ARN of an organizational unit (OU) in - // Organizations + // * An ARN of an + // organizational unit (OU) in Organizations, for example: + // organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123 // - // * An ARN of an IAM role + // * + // An ARN of an IAM role, for example: iam::123456789012:role/rolename // - // * An ARN of an IAM user + // * An ARN of + // an IAM user, for example: iam::123456789012user/username // - // Not all - // resource types can be shared with IAM roles and IAM users. For more information, - // see Sharing with IAM roles and IAM users + // Not all resource types + // can be shared with IAM roles and users. For more information, see Sharing with + // IAM roles and users // (https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types) // in the Resource Access Manager User Guide. Principals []string - // The ARNs of the resources to associate with the resource share. + // Specifies a list of one or more ARNs of the resources to associate with the + // resource share. ResourceArns []string - // One or more tags. + // Specifies one or more tags to attach to the resource share itself. It doesn't + // attach the tags to the resources associated with the resource share. Tags []types.Tag noSmithyDocumentSerde @@ -87,11 +106,13 @@ type CreateResourceShareInput struct { type CreateResourceShareOutput struct { - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. ClientToken *string - // Information about the resource share. + // An object with information about the new resource share. ResourceShare *types.ResourceShare // Metadata pertaining to the operation's result. diff --git a/service/ram/api_op_DeleteResourceShare.go b/service/ram/api_op_DeleteResourceShare.go index 99d1c6c363c..dabc40c856a 100644 --- a/service/ram/api_op_DeleteResourceShare.go +++ b/service/ram/api_op_DeleteResourceShare.go @@ -10,7 +10,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the specified resource share. +// Deletes the specified resource share. This doesn't delete any of the resources +// that were associated with the resource share; it only stops the sharing of those +// resources outside of the Amazon Web Services account that created them. func (c *Client) DeleteResourceShare(ctx context.Context, params *DeleteResourceShareInput, optFns ...func(*Options)) (*DeleteResourceShareOutput, error) { if params == nil { params = &DeleteResourceShareInput{} @@ -28,13 +30,20 @@ func (c *Client) DeleteResourceShare(ctx context.Context, params *DeleteResource type DeleteResourceShareInput struct { - // The Amazon Resource Name (ARN) of the resource share. + // Specifies the Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share to delete. // // This member is required. ResourceShareArn *string - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. + // (https://wikipedia.org/wiki/Universally_unique_identifier). If you don't provide + // this value, then Amazon Web Services generates a random one for you. ClientToken *string noSmithyDocumentSerde @@ -42,11 +51,14 @@ type DeleteResourceShareInput struct { type DeleteResourceShareOutput struct { - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. ClientToken *string - // Indicates whether the request succeeded. + // A return value of true indicates that the request succeeded. A value of false + // indicates that the request failed. ReturnValue *bool // Metadata pertaining to the operation's result. diff --git a/service/ram/api_op_DisassociateResourceShare.go b/service/ram/api_op_DisassociateResourceShare.go index b3ab96c4b74..4d8b695f994 100644 --- a/service/ram/api_op_DisassociateResourceShare.go +++ b/service/ram/api_op_DisassociateResourceShare.go @@ -30,19 +30,56 @@ func (c *Client) DisassociateResourceShare(ctx context.Context, params *Disassoc type DisassociateResourceShareInput struct { - // The Amazon Resource Name (ARN) of the resource share. + // Specifies Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share that you want to remove resources from. // // This member is required. ResourceShareArn *string - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. + // (https://wikipedia.org/wiki/Universally_unique_identifier). If you don't provide + // this value, then Amazon Web Services generates a random one for you. ClientToken *string - // The principals. + // Specifies a list of one or more principals that no longer are to have access to + // the resources in this resource share. You can include the following values: + // + // * + // An Amazon Web Services account ID, for example: 123456789012 + // + // * An Amazon + // Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // an organization in Organizations, for example: + // organizations::123456789012:organization/o-exampleorgid + // + // * An ARN of an + // organizational unit (OU) in Organizations, for example: + // organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123 + // + // * + // An ARN of an IAM role, for example: iam::123456789012:role/rolename + // + // * An ARN of + // an IAM user, for example: iam::123456789012user/username + // + // Not all resource types + // can be shared with IAM roles and users. For more information, see Sharing with + // IAM roles and users + // (https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types) + // in the Resource Access Manager User Guide. Principals []string - // The Amazon Resource Names (ARNs) of the resources. + // Specifies a list of Amazon Resource Names (ARNs) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) for + // one or more resources that you want to remove from the resource share. After the + // operation runs, these resources are no longer shared with principals outside of + // the Amazon Web Services account that created the resources. ResourceArns []string noSmithyDocumentSerde @@ -50,11 +87,14 @@ type DisassociateResourceShareInput struct { type DisassociateResourceShareOutput struct { - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. ClientToken *string - // Information about the associations. + // An array of objects that contain information about the updated associations for + // this resource share. ResourceShareAssociations []types.ResourceShareAssociation // Metadata pertaining to the operation's result. diff --git a/service/ram/api_op_DisassociateResourceSharePermission.go b/service/ram/api_op_DisassociateResourceSharePermission.go index 6851da9f020..7c0a46eca19 100644 --- a/service/ram/api_op_DisassociateResourceSharePermission.go +++ b/service/ram/api_op_DisassociateResourceSharePermission.go @@ -10,7 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Disassociates an RAM permission from a resource share. +// Disassociates an RAM permission from a resource share. Permission changes take +// effect immediately. You can remove a RAM permission from a resource share only +// if there are currently no resources of the relevant resource type currently +// attached to the resource share. func (c *Client) DisassociateResourceSharePermission(ctx context.Context, params *DisassociateResourceSharePermissionInput, optFns ...func(*Options)) (*DisassociateResourceSharePermissionOutput, error) { if params == nil { params = &DisassociateResourceSharePermissionInput{} @@ -28,19 +31,28 @@ func (c *Client) DisassociateResourceSharePermission(ctx context.Context, params type DisassociateResourceSharePermissionInput struct { - // The Amazon Resource Name (ARN) of the permission to disassociate from the - // resource share. + // The Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the permission to disassociate from the resource share. Changes to permissions + // take effect immediately. // // This member is required. PermissionArn *string - // The Amazon Resource Name (ARN) of the resource share. + // The Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share from which you want to disassociate a permission. // // This member is required. ResourceShareArn *string - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. + // (https://wikipedia.org/wiki/Universally_unique_identifier). If you don't provide + // this value, then Amazon Web Services generates a random one for you. ClientToken *string noSmithyDocumentSerde @@ -48,11 +60,14 @@ type DisassociateResourceSharePermissionInput struct { type DisassociateResourceSharePermissionOutput struct { - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. ClientToken *string - // Indicates whether the request succeeded. + // A return value of true indicates that the request succeeded. A value of false + // indicates that the request failed. ReturnValue *bool // Metadata pertaining to the operation's result. diff --git a/service/ram/api_op_EnableSharingWithAwsOrganization.go b/service/ram/api_op_EnableSharingWithAwsOrganization.go index beb58e708bb..100824572e8 100644 --- a/service/ram/api_op_EnableSharingWithAwsOrganization.go +++ b/service/ram/api_op_EnableSharingWithAwsOrganization.go @@ -10,8 +10,15 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Enables resource sharing within your organization in Organizations. The caller -// must be the master account for the organization. +// Enables resource sharing within your organization in Organizations. Calling this +// operation enables RAM to retrieve information about the organization and its +// structure. This lets you share resources with all of the accounts in an +// organization by specifying the organization's ID, or all of the accounts in an +// organizational unit (OU) by specifying the OU's ID. Until you enable sharing +// within the organization, you can specify only individual Amazon Web Services +// accounts, or for supported resource types, IAM users and roles. You must call +// this operation from an IAM user or role in the organization's management +// account. func (c *Client) EnableSharingWithAwsOrganization(ctx context.Context, params *EnableSharingWithAwsOrganizationInput, optFns ...func(*Options)) (*EnableSharingWithAwsOrganizationOutput, error) { if params == nil { params = &EnableSharingWithAwsOrganizationInput{} @@ -33,7 +40,8 @@ type EnableSharingWithAwsOrganizationInput struct { type EnableSharingWithAwsOrganizationOutput struct { - // Indicates whether the request succeeded. + // A return value of true indicates that the request succeeded. A value of false + // indicates that the request failed. ReturnValue *bool // Metadata pertaining to the operation's result. diff --git a/service/ram/api_op_GetPermission.go b/service/ram/api_op_GetPermission.go index f24357ba7c8..5d92a4517b0 100644 --- a/service/ram/api_op_GetPermission.go +++ b/service/ram/api_op_GetPermission.go @@ -29,12 +29,19 @@ func (c *Client) GetPermission(ctx context.Context, params *GetPermissionInput, type GetPermissionInput struct { - // The Amazon Resource Name (ARN) of the permission. + // Specifies the Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the permission whose contents you want to retrieve. To find the ARN for a + // permission, use either the ListPermissions operation or go to the Permissions + // library (https://console.aws.amazon.com/ram/home#Permissions:) page in the RAM + // console and then choose the name of the permission. The ARN is displayed on the + // detail page. // // This member is required. PermissionArn *string - // The identifier for the version of the permission. + // Specifies identifier for the version of the RAM permission to retrieve. If you + // don't specify this parameter, the operation retrieves the default version. PermissionVersion *int32 noSmithyDocumentSerde @@ -42,7 +49,7 @@ type GetPermissionInput struct { type GetPermissionOutput struct { - // Information about the permission. + // An object that contains information about the permission. Permission *types.ResourceSharePermissionDetail // Metadata pertaining to the operation's result. diff --git a/service/ram/api_op_GetResourcePolicies.go b/service/ram/api_op_GetResourcePolicies.go index 3376a8c02f6..9605ba7e0f0 100644 --- a/service/ram/api_op_GetResourcePolicies.go +++ b/service/ram/api_op_GetResourcePolicies.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Gets the policies for the specified resources that you own and have shared. +// Retrieves the resource policies for the specified resources that you own and +// have shared. func (c *Client) GetResourcePolicies(ctx context.Context, params *GetResourcePoliciesInput, optFns ...func(*Options)) (*GetResourcePoliciesOutput, error) { if params == nil { params = &GetResourcePoliciesInput{} @@ -29,19 +30,31 @@ func (c *Client) GetResourcePolicies(ctx context.Context, params *GetResourcePol type GetResourcePoliciesInput struct { - // The Amazon Resource Names (ARNs) of the resources. + // Specifies the Amazon Resource Names (ARNs) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resources whose policies you want to retrieve. // // This member is required. ResourceArns []string - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. MaxResults *int32 - // The token for the next page of results. + // Specifies that you want to receive the next page of results. Valid only if you + // received a NextToken response in the previous request. If you did, it indicates + // that more output is available. Set this parameter to the value provided by the + // previous call's NextToken response to request the next page of results. NextToken *string - // The principal. + // Specifies the principal. Principal *string noSmithyDocumentSerde @@ -49,11 +62,14 @@ type GetResourcePoliciesInput struct { type GetResourcePoliciesOutput struct { - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. + // If present, this value indicates that more output is available than is included + // in the current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You should + // repeat this until the NextToken response element comes back as null. This + // indicates that this is the last page of results. NextToken *string - // A key policy document, in JSON format. + // An array of resource policy documents in JSON format. Policies []string // Metadata pertaining to the operation's result. @@ -136,8 +152,15 @@ var _ GetResourcePoliciesAPIClient = (*Client)(nil) // GetResourcePoliciesPaginatorOptions is the paginator options for // GetResourcePolicies type GetResourcePoliciesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/ram/api_op_GetResourceShareAssociations.go b/service/ram/api_op_GetResourceShareAssociations.go index 78222fcda18..dde9ce701f8 100644 --- a/service/ram/api_op_GetResourceShareAssociations.go +++ b/service/ram/api_op_GetResourceShareAssociations.go @@ -12,7 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Gets the resources or principals for the resource shares that you own. +// Retrieves the resource and principal associations for resource shares that you +// own. func (c *Client) GetResourceShareAssociations(ctx context.Context, params *GetResourceShareAssociationsInput, optFns ...func(*Options)) (*GetResourceShareAssociationsOutput, error) { if params == nil { params = &GetResourceShareAssociationsInput{} @@ -30,32 +31,55 @@ func (c *Client) GetResourceShareAssociations(ctx context.Context, params *GetRe type GetResourceShareAssociationsInput struct { - // The association type. Specify PRINCIPAL to list the principals that are - // associated with the specified resource share. Specify RESOURCE to list the - // resources that are associated with the specified resource share. + // Specifies whether you want to retrieve the associations that involve a specified + // resource or principal. + // + // * PRINCIPAL – list the principals that are associated + // with the specified resource share. + // + // * RESOURCE – list the resources that are + // associated with the specified resource share. // // This member is required. AssociationType types.ResourceShareAssociationType - // The association status. + // Specifies that you want to retrieve only associations with this status. AssociationStatus types.ResourceShareAssociationStatus - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. MaxResults *int32 - // The token for the next page of results. + // Specifies that you want to receive the next page of results. Valid only if you + // received a NextToken response in the previous request. If you did, it indicates + // that more output is available. Set this parameter to the value provided by the + // previous call's NextToken response to request the next page of results. NextToken *string - // The principal. You cannot specify this parameter if the association type is - // RESOURCE. + // Specifies the ID of the principal whose resource shares you want to retrieve. + // This can be an Amazon Web Services account ID, an organization ID, an + // organizational unit ID, or the Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // an individual IAM user or role. You cannot specify this parameter if the + // association type is RESOURCE. Principal *string - // The Amazon Resource Name (ARN) of the resource. You cannot specify this + // Specifies the Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource whose resource shares you want to retrieve. You cannot specify this // parameter if the association type is PRINCIPAL. ResourceArn *string - // The Amazon Resource Names (ARN) of the resource shares. + // Specifies a list of Amazon Resource Names (ARNs) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share whose associations you want to retrieve. ResourceShareArns []string noSmithyDocumentSerde @@ -63,11 +87,14 @@ type GetResourceShareAssociationsInput struct { type GetResourceShareAssociationsOutput struct { - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. + // If present, this value indicates that more output is available than is included + // in the current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You should + // repeat this until the NextToken response element comes back as null. This + // indicates that this is the last page of results. NextToken *string - // Information about the associations. + // An array of objects that contain the details about the associations. ResourceShareAssociations []types.ResourceShareAssociation // Metadata pertaining to the operation's result. @@ -150,8 +177,15 @@ var _ GetResourceShareAssociationsAPIClient = (*Client)(nil) // GetResourceShareAssociationsPaginatorOptions is the paginator options for // GetResourceShareAssociations type GetResourceShareAssociationsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/ram/api_op_GetResourceShareInvitations.go b/service/ram/api_op_GetResourceShareInvitations.go index c84d8561ed1..7c1d9542af0 100644 --- a/service/ram/api_op_GetResourceShareInvitations.go +++ b/service/ram/api_op_GetResourceShareInvitations.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Gets the invitations that you have received for resource shares. +// Retrieves details about invitations that you have received for resource shares. func (c *Client) GetResourceShareInvitations(ctx context.Context, params *GetResourceShareInvitationsInput, optFns ...func(*Options)) (*GetResourceShareInvitationsOutput, error) { if params == nil { params = &GetResourceShareInvitationsInput{} @@ -30,17 +30,31 @@ func (c *Client) GetResourceShareInvitations(ctx context.Context, params *GetRes type GetResourceShareInvitationsInput struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. MaxResults *int32 - // The token for the next page of results. + // Specifies that you want to receive the next page of results. Valid only if you + // received a NextToken response in the previous request. If you did, it indicates + // that more output is available. Set this parameter to the value provided by the + // previous call's NextToken response to request the next page of results. NextToken *string - // The Amazon Resource Names (ARN) of the resource shares. + // Specifies that you want details about invitations only for the resource shares + // described by this list of Amazon Resource Names (ARNs) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) ResourceShareArns []string - // The Amazon Resource Names (ARN) of the invitations. + // Specifies the Amazon Resource Names (ARNs) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share invitations you want information about. ResourceShareInvitationArns []string noSmithyDocumentSerde @@ -48,11 +62,14 @@ type GetResourceShareInvitationsInput struct { type GetResourceShareInvitationsOutput struct { - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. + // If present, this value indicates that more output is available than is included + // in the current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You should + // repeat this until the NextToken response element comes back as null. This + // indicates that this is the last page of results. NextToken *string - // Information about the invitations. + // An array of objects that contain the details about the invitations. ResourceShareInvitations []types.ResourceShareInvitation // Metadata pertaining to the operation's result. @@ -132,8 +149,15 @@ var _ GetResourceShareInvitationsAPIClient = (*Client)(nil) // GetResourceShareInvitationsPaginatorOptions is the paginator options for // GetResourceShareInvitations type GetResourceShareInvitationsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/ram/api_op_GetResourceShares.go b/service/ram/api_op_GetResourceShares.go index cc4c44ba21e..6a8aaa9aa5d 100644 --- a/service/ram/api_op_GetResourceShares.go +++ b/service/ram/api_op_GetResourceShares.go @@ -12,8 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Gets the resource shares that you own or the resource shares that are shared -// with you. +// Retrieves details about the resource shares that you own or that are shared with +// you. func (c *Client) GetResourceShares(ctx context.Context, params *GetResourceSharesInput, optFns ...func(*Options)) (*GetResourceSharesOutput, error) { if params == nil { params = &GetResourceSharesInput{} @@ -31,32 +31,54 @@ func (c *Client) GetResourceShares(ctx context.Context, params *GetResourceShare type GetResourceSharesInput struct { - // The type of owner. + // Specifies that you want to retrieve details of only those resource shares that + // match the following: + // + // * SELF – resources that you are sharing + // + // * OTHER-ACCOUNTS + // – resources that other accounts share with you // // This member is required. ResourceOwner types.ResourceOwner - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. MaxResults *int32 - // The name of the resource share. + // Specifies the name of an individual resource share that you want to retrieve + // details about. Name *string - // The token for the next page of results. + // Specifies that you want to receive the next page of results. Valid only if you + // received a NextToken response in the previous request. If you did, it indicates + // that more output is available. Set this parameter to the value provided by the + // previous call's NextToken response to request the next page of results. NextToken *string - // The Amazon Resource Name (ARN) of the RAM permission that is associated with the - // resource share. + // Specifies that you want to retrieve details of only those resource shares that + // use the RAM permission with this Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). PermissionArn *string - // The Amazon Resource Names (ARNs) of the resource shares. + // Specifies the Amazon Resource Names (ARNs) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // individual resource shares that you want information about. ResourceShareArns []string - // The status of the resource share. + // Specifies that you want to retrieve details of only those resource shares that + // have this status. ResourceShareStatus types.ResourceShareStatus - // One or more tag filters. + // Specifies that you want to retrieve details of only those resource shares that + // match the specified tag keys and values. TagFilters []types.TagFilter noSmithyDocumentSerde @@ -64,11 +86,14 @@ type GetResourceSharesInput struct { type GetResourceSharesOutput struct { - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. + // If present, this value indicates that more output is available than is included + // in the current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You should + // repeat this until the NextToken response element comes back as null. This + // indicates that this is the last page of results. NextToken *string - // Information about the resource shares. + // An array of objects that contain the information about the resource shares. ResourceShares []types.ResourceShare // Metadata pertaining to the operation's result. @@ -150,8 +175,15 @@ var _ GetResourceSharesAPIClient = (*Client)(nil) // GetResourceSharesPaginatorOptions is the paginator options for GetResourceShares type GetResourceSharesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/ram/api_op_ListPendingInvitationResources.go b/service/ram/api_op_ListPendingInvitationResources.go index ac7673b46c8..71161ef05db 100644 --- a/service/ram/api_op_ListPendingInvitationResources.go +++ b/service/ram/api_op_ListPendingInvitationResources.go @@ -12,8 +12,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the resources in a resource share that is shared with you but that the -// invitation is still pending for. +// Lists the resources in a resource share that is shared with you but for which +// the invitation is still PENDING. That means that you haven't accepted or +// rejected the invitation and the invitation hasn't expired. func (c *Client) ListPendingInvitationResources(ctx context.Context, params *ListPendingInvitationResourcesInput, optFns ...func(*Options)) (*ListPendingInvitationResourcesOutput, error) { if params == nil { params = &ListPendingInvitationResourcesInput{} @@ -31,28 +32,60 @@ func (c *Client) ListPendingInvitationResources(ctx context.Context, params *Lis type ListPendingInvitationResourcesInput struct { - // The Amazon Resource Name (ARN) of the invitation. + // Specifies the Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the invitation. You can use GetResourceShareInvitations to find the ARN of the + // invitation. // // This member is required. ResourceShareInvitationArn *string - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. MaxResults *int32 - // The token for the next page of results. + // Specifies that you want to receive the next page of results. Valid only if you + // received a NextToken response in the previous request. If you did, it indicates + // that more output is available. Set this parameter to the value provided by the + // previous call's NextToken response to request the next page of results. NextToken *string + // Specifies that you want the results to include only resources that have the + // specified scope. + // + // * ALL – the results include both global and regional resources + // or resource types. + // + // * GLOBAL – the results include only global resources or + // resource types. + // + // * REGIONAL – the results include only regional resources or + // resource types. + // + // The default value is ALL. + ResourceRegionScope types.ResourceRegionScopeFilter + noSmithyDocumentSerde } type ListPendingInvitationResourcesOutput struct { - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. + // If present, this value indicates that more output is available than is included + // in the current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You should + // repeat this until the NextToken response element comes back as null. This + // indicates that this is the last page of results. NextToken *string - // Information about the resources included the resource share. + // An array of objects that contain the information about the resources included + // the specified resource share. Resources []types.Resource // Metadata pertaining to the operation's result. @@ -135,8 +168,15 @@ var _ ListPendingInvitationResourcesAPIClient = (*Client)(nil) // ListPendingInvitationResourcesPaginatorOptions is the paginator options for // ListPendingInvitationResources type ListPendingInvitationResourcesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/ram/api_op_ListPermissions.go b/service/ram/api_op_ListPermissions.go index e692cfa8947..2eca0d9b3c7 100644 --- a/service/ram/api_op_ListPermissions.go +++ b/service/ram/api_op_ListPermissions.go @@ -12,7 +12,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the RAM permissions. +// Retrieves a list of available RAM permissions that you can use for the supported +// resource types. func (c *Client) ListPermissions(ctx context.Context, params *ListPermissionsInput, optFns ...func(*Options)) (*ListPermissionsOutput, error) { if params == nil { params = &ListPermissionsInput{} @@ -30,15 +31,27 @@ func (c *Client) ListPermissions(ctx context.Context, params *ListPermissionsInp type ListPermissionsInput struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. MaxResults *int32 - // The token for the next page of results. + // Specifies that you want to receive the next page of results. Valid only if you + // received a NextToken response in the previous request. If you did, it indicates + // that more output is available. Set this parameter to the value provided by the + // previous call's NextToken response to request the next page of results. NextToken *string - // Specifies the resource type for which to list permissions. For example, to list - // only permissions that apply to EC2 subnets, specify ec2:Subnet. + // Specifies that you want to list permissions for only the specified resource + // type. For example, to list only permissions that apply to EC2 subnets, specify + // ec2:Subnet. You can use the ListResourceTypes operation to get the specific + // string required. ResourceType *string noSmithyDocumentSerde @@ -46,11 +59,14 @@ type ListPermissionsInput struct { type ListPermissionsOutput struct { - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. + // If present, this value indicates that more output is available than is included + // in the current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You should + // repeat this until the NextToken response element comes back as null. This + // indicates that this is the last page of results. NextToken *string - // Information about the permissions. + // An array of objects with information about the permissions. Permissions []types.ResourceSharePermissionSummary // Metadata pertaining to the operation's result. @@ -129,8 +145,15 @@ var _ ListPermissionsAPIClient = (*Client)(nil) // ListPermissionsPaginatorOptions is the paginator options for ListPermissions type ListPermissionsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/ram/api_op_ListPrincipals.go b/service/ram/api_op_ListPrincipals.go index c4e8057e0b7..308976a7c94 100644 --- a/service/ram/api_op_ListPrincipals.go +++ b/service/ram/api_op_ListPrincipals.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the principals that you have shared resources with or that have shared +// Lists the principals that you are sharing resources with or that are sharing // resources with you. func (c *Client) ListPrincipals(ctx context.Context, params *ListPrincipalsInput, optFns ...func(*Options)) (*ListPrincipalsOutput, error) { if params == nil { @@ -31,38 +31,75 @@ func (c *Client) ListPrincipals(ctx context.Context, params *ListPrincipalsInput type ListPrincipalsInput struct { - // The type of owner. + // Specifies that you want to list information for only resource shares that match + // the following: + // + // * SELF – resources that you are sharing + // + // * OTHER-ACCOUNTS – + // resources that other accounts share with you // // This member is required. ResourceOwner types.ResourceOwner - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. MaxResults *int32 - // The token for the next page of results. + // Specifies that you want to receive the next page of results. Valid only if you + // received a NextToken response in the previous request. If you did, it indicates + // that more output is available. Set this parameter to the value provided by the + // previous call's NextToken response to request the next page of results. NextToken *string - // The principals. + // Specifies that you want to list information for only the listed principals. You + // can include the following values: + // + // * An Amazon Web Services account ID, for + // example: 123456789012 + // + // * An Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // an organization in Organizations, for example: + // organizations::123456789012:organization/o-exampleorgid + // + // * An ARN of an + // organizational unit (OU) in Organizations, for example: + // organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123 + // + // * + // An ARN of an IAM role, for example: iam::123456789012:role/rolename + // + // * An ARN of + // an IAM user, for example: iam::123456789012user/username + // + // Not all resource types + // can be shared with IAM roles and users. For more information, see Sharing with + // IAM roles and users + // (https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types) + // in the Resource Access Manager User Guide. Principals []string - // The Amazon Resource Name (ARN) of the resource. + // Specifies that you want to list principal information for the resource share + // with the specified Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). ResourceArn *string - // The Amazon Resource Names (ARN) of the resource shares. + // Specifies that you want to list information for only principals associated with + // the resource shares specified by a list the Amazon Resource Names (ARNs) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). ResourceShareArns []string - // The resource type. Valid values: acm-pca:CertificateAuthority | appmesh:Mesh | - // codebuild:Project | codebuild:ReportGroup | ec2:CapacityReservation | - // ec2:DedicatedHost | ec2:LocalGatewayRouteTable | ec2:PrefixList | ec2:Subnet | - // ec2:TrafficMirrorTarget | ec2:TransitGateway | imagebuilder:Component | - // imagebuilder:Image | imagebuilder:ImageRecipe | imagebuilder:ContainerRecipe | - // glue:Catalog | glue:Database | glue:Table | license-manager:LicenseConfiguration - // I network-firewall:FirewallPolicy | network-firewall:StatefulRuleGroup | - // network-firewall:StatelessRuleGroup | outposts:Outpost | resource-groups:Group | - // rds:Cluster | route53resolver:FirewallRuleGroup - // |route53resolver:ResolverQueryLogConfig | route53resolver:ResolverRule | - // s3-outposts:Outpost | ssm-contacts:Contact | ssm-incidents:ResponsePlan + // Specifies that you want to list information for only principals associated with + // resource shares that include the specified resource type. For a list of valid + // values, query the ListResourceTypes operation. ResourceType *string noSmithyDocumentSerde @@ -70,11 +107,14 @@ type ListPrincipalsInput struct { type ListPrincipalsOutput struct { - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. + // If present, this value indicates that more output is available than is included + // in the current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You should + // repeat this until the NextToken response element comes back as null. This + // indicates that this is the last page of results. NextToken *string - // The principals. + // An array of objects that contain the details about the principals. Principals []types.Principal // Metadata pertaining to the operation's result. @@ -156,8 +196,15 @@ var _ ListPrincipalsAPIClient = (*Client)(nil) // ListPrincipalsPaginatorOptions is the paginator options for ListPrincipals type ListPrincipalsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/ram/api_op_ListResourceSharePermissions.go b/service/ram/api_op_ListResourceSharePermissions.go index 61476c85416..1dcdefcd5a0 100644 --- a/service/ram/api_op_ListResourceSharePermissions.go +++ b/service/ram/api_op_ListResourceSharePermissions.go @@ -30,16 +30,28 @@ func (c *Client) ListResourceSharePermissions(ctx context.Context, params *ListR type ListResourceSharePermissionsInput struct { - // The Amazon Resource Name (ARN) of the resource share. + // Specifies the Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share for which you want to retrieve the associated permissions. // // This member is required. ResourceShareArn *string - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. MaxResults *int32 - // The token for the next page of results. + // Specifies that you want to receive the next page of results. Valid only if you + // received a NextToken response in the previous request. If you did, it indicates + // that more output is available. Set this parameter to the value provided by the + // previous call's NextToken response to request the next page of results. NextToken *string noSmithyDocumentSerde @@ -47,11 +59,15 @@ type ListResourceSharePermissionsInput struct { type ListResourceSharePermissionsOutput struct { - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. + // If present, this value indicates that more output is available than is included + // in the current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You should + // repeat this until the NextToken response element comes back as null. This + // indicates that this is the last page of results. NextToken *string - // The permissions associated with the resource share. + // An array of objects that describe the permissions associated with the resource + // share. Permissions []types.ResourceSharePermissionSummary // Metadata pertaining to the operation's result. @@ -134,8 +150,15 @@ var _ ListResourceSharePermissionsAPIClient = (*Client)(nil) // ListResourceSharePermissionsPaginatorOptions is the paginator options for // ListResourceSharePermissions type ListResourceSharePermissionsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/ram/api_op_ListResourceTypes.go b/service/ram/api_op_ListResourceTypes.go index 238bd2f1d85..bde3b103323 100644 --- a/service/ram/api_op_ListResourceTypes.go +++ b/service/ram/api_op_ListResourceTypes.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the shareable resource types supported by RAM. +// Lists the resource types that can be shared by RAM. func (c *Client) ListResourceTypes(ctx context.Context, params *ListResourceTypesInput, optFns ...func(*Options)) (*ListResourceTypesOutput, error) { if params == nil { params = &ListResourceTypesInput{} @@ -30,23 +30,52 @@ func (c *Client) ListResourceTypes(ctx context.Context, params *ListResourceType type ListResourceTypesInput struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. MaxResults *int32 - // The token for the next page of results. + // Specifies that you want to receive the next page of results. Valid only if you + // received a NextToken response in the previous request. If you did, it indicates + // that more output is available. Set this parameter to the value provided by the + // previous call's NextToken response to request the next page of results. NextToken *string + // Specifies that you want the results to include only resources that have the + // specified scope. + // + // * ALL – the results include both global and regional resources + // or resource types. + // + // * GLOBAL – the results include only global resources or + // resource types. + // + // * REGIONAL – the results include only regional resources or + // resource types. + // + // The default value is ALL. + ResourceRegionScope types.ResourceRegionScopeFilter + noSmithyDocumentSerde } type ListResourceTypesOutput struct { - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. + // If present, this value indicates that more output is available than is included + // in the current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You should + // repeat this until the NextToken response element comes back as null. This + // indicates that this is the last page of results. NextToken *string - // The shareable resource types supported by RAM. + // An array of objects that contain information about the resource types that can + // be shared using RAM. ResourceTypes []types.ServiceNameAndResourceType // Metadata pertaining to the operation's result. @@ -125,8 +154,15 @@ var _ ListResourceTypesAPIClient = (*Client)(nil) // ListResourceTypesPaginatorOptions is the paginator options for ListResourceTypes type ListResourceTypesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/ram/api_op_ListResources.go b/service/ram/api_op_ListResources.go index a6842996c4d..1453287b905 100644 --- a/service/ram/api_op_ListResources.go +++ b/service/ram/api_op_ListResources.go @@ -31,38 +31,66 @@ func (c *Client) ListResources(ctx context.Context, params *ListResourcesInput, type ListResourcesInput struct { - // The type of owner. + // Specifies that you want to list only the resource shares that match the + // following: + // + // * SELF – resources that you are sharing + // + // * OTHER-ACCOUNTS – + // resources that other accounts share with you // // This member is required. ResourceOwner types.ResourceOwner - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. MaxResults *int32 - // The token for the next page of results. + // Specifies that you want to receive the next page of results. Valid only if you + // received a NextToken response in the previous request. If you did, it indicates + // that more output is available. Set this parameter to the value provided by the + // previous call's NextToken response to request the next page of results. NextToken *string - // The principal. + // Specifies that you want to list only the resource shares that are associated + // with the specified principal. Principal *string - // The Amazon Resource Names (ARNs) of the resources. + // Specifies that you want to list only the resource shares that include resources + // with the specified Amazon Resource Names (ARNs) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). ResourceArns []string - // The Amazon Resource Names (ARN) of the resource shares. + // Specifies that you want the results to include only resources that have the + // specified scope. + // + // * ALL – the results include both global and regional resources + // or resource types. + // + // * GLOBAL – the results include only global resources or + // resource types. + // + // * REGIONAL – the results include only regional resources or + // resource types. + // + // The default value is ALL. + ResourceRegionScope types.ResourceRegionScopeFilter + + // Specifies that you want to list only resources in the resource shares identified + // by the specified Amazon Resource Names (ARNs) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). ResourceShareArns []string - // The resource type. Valid values: acm-pca:CertificateAuthority | appmesh:Mesh | - // codebuild:Project | codebuild:ReportGroup | ec2:CapacityReservation | - // ec2:DedicatedHost | ec2:LocalGatewayRouteTable | ec2:PrefixList | ec2:Subnet | - // ec2:TrafficMirrorTarget | ec2:TransitGateway | imagebuilder:Component | - // imagebuilder:Image | imagebuilder:ImageRecipe | imagebuilder:ContainerRecipe | - // glue:Catalog | glue:Database | glue:Table | license-manager:LicenseConfiguration - // I network-firewall:FirewallPolicy | network-firewall:StatefulRuleGroup | - // network-firewall:StatelessRuleGroup | outposts:Outpost | resource-groups:Group | - // rds:Cluster | route53resolver:FirewallRuleGroup - // |route53resolver:ResolverQueryLogConfig | route53resolver:ResolverRule | - // s3-outposts:Outpost | ssm-contacts:Contact | ssm-incidents:ResponsePlan + // Specifies that you want to list only the resource shares that include resources + // of the specified resource type. For valid values, query the ListResourceTypes + // operation. ResourceType *string noSmithyDocumentSerde @@ -70,11 +98,14 @@ type ListResourcesInput struct { type ListResourcesOutput struct { - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. + // If present, this value indicates that more output is available than is included + // in the current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You should + // repeat this until the NextToken response element comes back as null. This + // indicates that this is the last page of results. NextToken *string - // Information about the resources. + // An array of objects that contain information about the resources. Resources []types.Resource // Metadata pertaining to the operation's result. @@ -155,8 +186,15 @@ var _ ListResourcesAPIClient = (*Client)(nil) // ListResourcesPaginatorOptions is the paginator options for ListResources type ListResourcesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. + // Specifies the total number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value that is + // specific to the operation. If additional items exist beyond the number you + // specify, the NextToken response element is returned with a value (not null). + // Include the specified value as the NextToken request parameter in the next call + // to the operation to get the next part of the results. Note that the service + // might return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go b/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go index 698619cdfdd..c871ae7a0d1 100644 --- a/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go +++ b/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go @@ -10,15 +10,13 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Resource shares that were created by attaching a policy to a resource are -// visible only to the resource share owner, and the resource share cannot be -// modified in RAM. Use this API action to promote the resource share. When you -// promote the resource share, it becomes: -// -// * Visible to all principals that it is -// shared with. -// -// * Modifiable in RAM. +// When you attach a resource-based permission policy to a resource, it +// automatically creates a resource share. However, resource shares created this +// way are visible only to the resource share owner, and the resource share can't +// be modified in RAM. You can use this operation to promote the resource share to +// a full RAM resource share. When you promote a resource share, you can then +// manage the resource share in RAM and it becomes visible to all of the principals +// you shared it with. func (c *Client) PromoteResourceShareCreatedFromPolicy(ctx context.Context, params *PromoteResourceShareCreatedFromPolicyInput, optFns ...func(*Options)) (*PromoteResourceShareCreatedFromPolicyOutput, error) { if params == nil { params = &PromoteResourceShareCreatedFromPolicyInput{} @@ -36,7 +34,9 @@ func (c *Client) PromoteResourceShareCreatedFromPolicy(ctx context.Context, para type PromoteResourceShareCreatedFromPolicyInput struct { - // The Amazon Resource Name (ARN) of the resource share to promote. + // Specifies the Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share to promote. // // This member is required. ResourceShareArn *string @@ -46,7 +46,8 @@ type PromoteResourceShareCreatedFromPolicyInput struct { type PromoteResourceShareCreatedFromPolicyOutput struct { - // Indicates whether the request succeeded. + // A return value of true indicates that the request succeeded. A value of false + // indicates that the request failed. ReturnValue *bool // Metadata pertaining to the operation's result. diff --git a/service/ram/api_op_RejectResourceShareInvitation.go b/service/ram/api_op_RejectResourceShareInvitation.go index 247f1807d4f..feaa15466fa 100644 --- a/service/ram/api_op_RejectResourceShareInvitation.go +++ b/service/ram/api_op_RejectResourceShareInvitation.go @@ -30,13 +30,20 @@ func (c *Client) RejectResourceShareInvitation(ctx context.Context, params *Reje type RejectResourceShareInvitationInput struct { - // The Amazon Resource Name (ARN) of the invitation. + // Specifies the Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the invitation that you want to reject. // // This member is required. ResourceShareInvitationArn *string - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. + // (https://wikipedia.org/wiki/Universally_unique_identifier). If you don't provide + // this value, then Amazon Web Services generates a random one for you. ClientToken *string noSmithyDocumentSerde @@ -44,11 +51,13 @@ type RejectResourceShareInvitationInput struct { type RejectResourceShareInvitationOutput struct { - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. ClientToken *string - // Information about the invitation. + // An object that contains the details about the rejected invitation. ResourceShareInvitation *types.ResourceShareInvitation // Metadata pertaining to the operation's result. diff --git a/service/ram/api_op_TagResource.go b/service/ram/api_op_TagResource.go index 81cedeeb567..596a1c03de5 100644 --- a/service/ram/api_op_TagResource.go +++ b/service/ram/api_op_TagResource.go @@ -11,7 +11,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Adds the specified tags to the specified resource share that you own. +// Adds the specified tag keys and values to the specified resource share. The tags +// are attached only to the resource share, not to the resources that are in the +// resource share. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} @@ -29,12 +31,16 @@ func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optF type TagResourceInput struct { - // The Amazon Resource Name (ARN) of the resource share. + // Specifies the Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share that you want to add tags to. // // This member is required. ResourceShareArn *string - // One or more tags. + // A list of one or more tag key and value pairs. The tag key must be present and + // not be an empty string. The tag value must be present but can be an empty + // string. // // This member is required. Tags []types.Tag diff --git a/service/ram/api_op_UntagResource.go b/service/ram/api_op_UntagResource.go index 156f40f50f7..1580f514d4c 100644 --- a/service/ram/api_op_UntagResource.go +++ b/service/ram/api_op_UntagResource.go @@ -10,7 +10,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes the specified tags from the specified resource share that you own. +// Removes the specified tag key and value pairs from the specified resource share. func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} @@ -28,12 +28,15 @@ func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, type UntagResourceInput struct { - // The Amazon Resource Name (ARN) of the resource share. + // Specifies the Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share that you want to remove tags from. The tags are removed from + // the resource share, not the resources in the resource share. // // This member is required. ResourceShareArn *string - // The tag keys of the tags to remove. + // Specifies a list of one or more tag keys that you want to remove. // // This member is required. TagKeys []string diff --git a/service/ram/api_op_UpdateResourceShare.go b/service/ram/api_op_UpdateResourceShare.go index c7d65b3818f..24dd6060eb9 100644 --- a/service/ram/api_op_UpdateResourceShare.go +++ b/service/ram/api_op_UpdateResourceShare.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates the specified resource share that you own. +// Modifies some of the properties of the specified resource share. func (c *Client) UpdateResourceShare(ctx context.Context, params *UpdateResourceShareInput, optFns ...func(*Options)) (*UpdateResourceShareOutput, error) { if params == nil { params = &UpdateResourceShareInput{} @@ -29,20 +29,27 @@ func (c *Client) UpdateResourceShare(ctx context.Context, params *UpdateResource type UpdateResourceShareInput struct { - // The Amazon Resource Name (ARN) of the resource share. + // Specifies the Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share that you want to modify. // // This member is required. ResourceShareArn *string - // Indicates whether principals outside your organization in Organizations can be + // Specifies whether principals outside your organization in Organizations can be // associated with a resource share. AllowExternalPrincipals *bool - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // Specifies a unique, case-sensitive identifier that you provide to ensure the + // idempotency of the request. This lets you safely retry the request without + // accidentally performing the same operation a second time. Passing the same value + // to a later call to an operation requires that you also pass the same value for + // all other parameters. We recommend that you use a UUID type of value. + // (https://wikipedia.org/wiki/Universally_unique_identifier). If you don't provide + // this value, then Amazon Web Services generates a random one for you. ClientToken *string - // The name of the resource share. + // If specified, the new name that you want to attach to the resource share. Name *string noSmithyDocumentSerde @@ -50,8 +57,10 @@ type UpdateResourceShareInput struct { type UpdateResourceShareOutput struct { - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. + // The idempotency identifier associated with this request. If you want to repeat + // the same operation in an idempotent manner then you must include this value in + // the clientToken request parameter of that later call. All other parameters must + // also have the same values that you used in the first call. ClientToken *string // Information about the resource share. diff --git a/service/ram/deserializers.go b/service/ram/deserializers.go index ae020a47f92..90703f12bf7 100644 --- a/service/ram/deserializers.go +++ b/service/ram/deserializers.go @@ -327,6 +327,9 @@ func awsRestjson1_deserializeOpErrorAssociateResourceShare(response *smithyhttp. case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnknownResourceException", errorCode): return awsRestjson1_deserializeErrorUnknownResourceException(response, errorBody) @@ -4789,6 +4792,42 @@ func awsRestjson1_deserializeErrorTagPolicyViolationException(response *smithyht 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_deserializeErrorUnknownResourceException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.UnknownResourceException{} var buff [1024]byte @@ -5457,6 +5496,15 @@ func awsRestjson1_deserializeDocumentResource(v **types.Resource, value interfac sv.ResourceGroupArn = ptr.String(jtv) } + case "resourceRegionScope": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceRegionScope to be of type string, got %T instead", value) + } + sv.ResourceRegionScope = types.ResourceRegionScope(jtv) + } + case "resourceShareArn": if value != nil { jtv, ok := value.(string) @@ -6598,6 +6646,15 @@ func awsRestjson1_deserializeDocumentServiceNameAndResourceType(v **types.Servic for key, value := range shape { switch key { + case "resourceRegionScope": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceRegionScope to be of type string, got %T instead", value) + } + sv.ResourceRegionScope = types.ResourceRegionScope(jtv) + } + case "resourceType": if value != nil { jtv, ok := value.(string) @@ -6862,6 +6919,46 @@ func awsRestjson1_deserializeDocumentTagPolicyViolationException(v **types.TagPo 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 "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_deserializeDocumentUnknownResourceException(v **types.UnknownResourceException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ram/doc.go b/service/ram/doc.go index 3de049a7932..9c0d39a2f26 100644 --- a/service/ram/doc.go +++ b/service/ram/doc.go @@ -6,15 +6,16 @@ // This is the Resource Access Manager API Reference. This documentation provides // descriptions and syntax for each of the actions and data types in RAM. RAM is a // service that helps you securely share your Amazon Web Services resources across -// Amazon Web Services accounts and within your organization or organizational -// units (OUs) in Organizations. For supported resource types, you can also share -// resources with IAM roles and IAM users. If you have multiple Amazon Web Services -// accounts, you can use RAM to share those resources with other accounts. To learn -// more about RAM, see the following resources: +// Amazon Web Services accounts. If you have multiple Amazon Web Services accounts, +// you can use RAM to share those resources with other accounts. If you use +// Organizations to manage your accounts, then you share your resources with your +// organization or organizational units (OUs). For supported resource types, you +// can also share resources with individual Identity and Access Management (IAM) +// roles an users. To learn more about RAM, see the following resources: // -// * Resource Access Manager product -// page (http://aws.amazon.com/ram) +// * +// Resource Access Manager product page (http://aws.amazon.com/ram) // -// * Resource Access Manager User Guide -// (https://docs.aws.amazon.com/ram/latest/userguide/) +// * Resource +// Access Manager User Guide (https://docs.aws.amazon.com/ram/latest/userguide/) package ram diff --git a/service/ram/serializers.go b/service/ram/serializers.go index 09747517636..679e273e602 100644 --- a/service/ram/serializers.go +++ b/service/ram/serializers.go @@ -1157,6 +1157,11 @@ func awsRestjson1_serializeOpDocumentListPendingInvitationResourcesInput(v *List ok.String(*v.NextToken) } + if len(v.ResourceRegionScope) > 0 { + ok := object.Key("resourceRegionScope") + ok.String(string(v.ResourceRegionScope)) + } + if v.ResourceShareInvitationArn != nil { ok := object.Key("resourceShareInvitationArn") ok.String(*v.ResourceShareInvitationArn) @@ -1432,6 +1437,11 @@ func awsRestjson1_serializeOpDocumentListResourcesInput(v *ListResourcesInput, v ok.String(string(v.ResourceOwner)) } + if len(v.ResourceRegionScope) > 0 { + ok := object.Key("resourceRegionScope") + ok.String(string(v.ResourceRegionScope)) + } + if v.ResourceShareArns != nil { ok := object.Key("resourceShareArns") if err := awsRestjson1_serializeDocumentResourceShareArnList(v.ResourceShareArns, ok); err != nil { @@ -1595,6 +1605,11 @@ func awsRestjson1_serializeOpDocumentListResourceTypesInput(v *ListResourceTypes ok.String(*v.NextToken) } + if len(v.ResourceRegionScope) > 0 { + ok := object.Key("resourceRegionScope") + ok.String(string(v.ResourceRegionScope)) + } + return nil } diff --git a/service/ram/types/enums.go b/service/ram/types/enums.go index edec75d3f80..2acd69bd3fb 100644 --- a/service/ram/types/enums.go +++ b/service/ram/types/enums.go @@ -20,6 +20,44 @@ func (ResourceOwner) Values() []ResourceOwner { } } +type ResourceRegionScope string + +// Enum values for ResourceRegionScope +const ( + ResourceRegionScopeRegional ResourceRegionScope = "REGIONAL" + ResourceRegionScopeGlobal ResourceRegionScope = "GLOBAL" +) + +// Values returns all known values for ResourceRegionScope. 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 (ResourceRegionScope) Values() []ResourceRegionScope { + return []ResourceRegionScope{ + "REGIONAL", + "GLOBAL", + } +} + +type ResourceRegionScopeFilter string + +// Enum values for ResourceRegionScopeFilter +const ( + ResourceRegionScopeFilterAll ResourceRegionScopeFilter = "ALL" + ResourceRegionScopeFilterRegional ResourceRegionScopeFilter = "REGIONAL" + ResourceRegionScopeFilterGlobal ResourceRegionScopeFilter = "GLOBAL" +) + +// Values returns all known values for ResourceRegionScopeFilter. 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 (ResourceRegionScopeFilter) Values() []ResourceRegionScopeFilter { + return []ResourceRegionScopeFilter{ + "ALL", + "REGIONAL", + "GLOBAL", + } +} + type ResourceShareAssociationStatus string // Enum values for ResourceShareAssociationStatus diff --git a/service/ram/types/errors.go b/service/ram/types/errors.go index 1fa0cb001f9..6ef1e42fbd6 100644 --- a/service/ram/types/errors.go +++ b/service/ram/types/errors.go @@ -7,8 +7,9 @@ import ( smithy "github.com/aws/smithy-go" ) -// A client token input parameter was reused with an operation, but at least one of -// the other input parameters is different from the previous call to the operation. +// The client token input parameter was matched one used with a previous call to +// the operation, but at least one of the other input parameters is different from +// the previous call. type IdempotentParameterMismatchException struct { Message *string @@ -31,7 +32,7 @@ func (e *IdempotentParameterMismatchException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// A client token is not valid. +// The client token is not valid. type InvalidClientTokenException struct { Message *string @@ -206,7 +207,7 @@ func (e *OperationNotPermittedException) ErrorMessage() string { func (e *OperationNotPermittedException) ErrorCode() string { return "OperationNotPermittedException" } func (e *OperationNotPermittedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// An Amazon Resource Name (ARN) was not found. +// The specified Amazon Resource Name (ARN) was not found. type ResourceArnNotFoundException struct { Message *string @@ -225,7 +226,7 @@ func (e *ResourceArnNotFoundException) ErrorMessage() string { func (e *ResourceArnNotFoundException) ErrorCode() string { return "ResourceArnNotFoundException" } func (e *ResourceArnNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The invitation was already accepted. +// The specified invitation was already accepted. type ResourceShareInvitationAlreadyAcceptedException struct { Message *string @@ -248,7 +249,7 @@ func (e *ResourceShareInvitationAlreadyAcceptedException) ErrorFault() smithy.Er return smithy.FaultClient } -// The invitation was already rejected. +// The specified invitation was already rejected. type ResourceShareInvitationAlreadyRejectedException struct { Message *string @@ -271,7 +272,7 @@ func (e *ResourceShareInvitationAlreadyRejectedException) ErrorFault() smithy.Er return smithy.FaultClient } -// The Amazon Resource Name (ARN) for an invitation was not found. +// The specified Amazon Resource Name (ARN) for an invitation was not found. type ResourceShareInvitationArnNotFoundException struct { Message *string @@ -294,7 +295,7 @@ func (e *ResourceShareInvitationArnNotFoundException) ErrorFault() smithy.ErrorF return smithy.FaultClient } -// The invitation is expired. +// The specified invitation is expired. type ResourceShareInvitationExpiredException struct { Message *string @@ -317,7 +318,7 @@ func (e *ResourceShareInvitationExpiredException) ErrorFault() smithy.ErrorFault return smithy.FaultClient } -// The requested resource share exceeds the limit for your account. +// This request would exceed the limit for resource shares for your account. type ResourceShareLimitExceededException struct { Message *string @@ -378,7 +379,7 @@ func (e *ServiceUnavailableException) ErrorMessage() string { func (e *ServiceUnavailableException) ErrorCode() string { return "ServiceUnavailableException" } func (e *ServiceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } -// The requested tags exceed the limit for your account. +// This request would exceed the limit for tags for your account. type TagLimitExceededException struct { Message *string @@ -397,7 +398,7 @@ func (e *TagLimitExceededException) ErrorMessage() string { func (e *TagLimitExceededException) ErrorCode() string { return "TagLimitExceededException" } func (e *TagLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The specified tag is a reserved word and cannot be used. +// The specified tag key is a reserved word and can't be used. type TagPolicyViolationException struct { Message *string @@ -416,6 +417,26 @@ func (e *TagPolicyViolationException) ErrorMessage() string { func (e *TagPolicyViolationException) ErrorCode() string { return "TagPolicyViolationException" } func (e *TagPolicyViolationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// You exceeded the rate at which you are allowed to perform this operation. Please +// try again later. +type ThrottlingException struct { + Message *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 { return "ThrottlingException" } +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // A specified resource was not found. type UnknownResourceException struct { Message *string diff --git a/service/ram/types/types.go b/service/ram/types/types.go index 18b7dd38737..217b537347e 100644 --- a/service/ram/types/types.go +++ b/service/ram/types/types.go @@ -10,7 +10,7 @@ import ( // Describes a principal for use with Resource Access Manager. type Principal struct { - // The time when the principal was associated with the resource share. + // The date and time when the principal was associated with the resource share. CreationTime *time.Time // Indicates whether the principal belongs to the same organization in @@ -20,63 +20,82 @@ type Principal struct { // The ID of the principal. Id *string - // The time when the association was last updated. + // The date and time when the association was last updated. LastUpdatedTime *time.Time - // The Amazon Resource Name (ARN) of the resource share. + // The Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // a resource share the principal is associated with. ResourceShareArn *string noSmithyDocumentSerde } -// Describes a resource associated with a resource share. +// Describes a resource associated with a resource share in RAM. type Resource struct { - // The Amazon Resource Name (ARN) of the resource. + // The Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource. Arn *string - // The time when the resource was associated with the resource share. + // The date and time when the resource was associated with the resource share. CreationTime *time.Time - // The time when the association was last updated. + // The date an time when the association was last updated. LastUpdatedTime *time.Time - // The Amazon Resource Name (ARN) of the resource group. This value is returned - // only if the resource is a resource group. + // The Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource group. This value is available only if the resource is part of a + // resource group. ResourceGroupArn *string - // The Amazon Resource Name (ARN) of the resource share. + // Specifies the scope of visibility of this resource: + // + // * REGIONAL – The resource + // can be accessed only by using requests that target the Amazon Web Services + // Region in which the resource exists. + // + // * GLOBAL – The resource can be accessed + // from any Amazon Web Services Region. + ResourceRegionScope ResourceRegionScope + + // The Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share this resource is associated with. ResourceShareArn *string - // The status of the resource. + // The current status of the resource. Status ResourceStatus // A message about the status of the resource. StatusMessage *string - // The resource type. + // The resource type. This takes the form of: service-code:resource-code Type *string noSmithyDocumentSerde } -// Describes a resource share. +// Describes a resource share in RAM. type ResourceShare struct { // Indicates whether principals outside your organization in Organizations can be // associated with a resource share. AllowExternalPrincipals *bool - // The time when the resource share was created. + // The date and time when the resource share was created. CreationTime *time.Time // Indicates how the resource share was created. Possible values include: // // * // CREATED_FROM_POLICY - Indicates that the resource share was created from an - // Amazon Web Services Identity and Access Management (Amazon Web Services IAM) - // policy attached to a resource. These resource shares are visible only to the - // Amazon Web Services account that created it. They cannot be modified in RAM. + // Identity and Access Management (IAM) resource-based permission policy attached + // to the resource. This type of resource share is visible only to the Amazon Web + // Services account that created it. You can't modify it in RAM unless you promote + // it. For more information, see PromoteResourceShareCreatedFromPolicy. // // * // PROMOTING_TO_STANDARD - The resource share is in the process of being promoted. @@ -84,11 +103,11 @@ type ResourceShare struct { // // * STANDARD - // Indicates that the resource share was created in RAM using the console or APIs. - // These resource shares are visible to all principals. They can be modified in - // RAM. + // These resource shares are visible to all principals you share the resource share + // with. You can modify these resource shares in RAM using the console or APIs. FeatureSet ResourceShareFeatureSet - // The time when the resource share was last updated. + // The date and time when the resource share was last updated. LastUpdatedTime *time.Time // The name of the resource share. @@ -97,61 +116,73 @@ type ResourceShare struct { // The ID of the Amazon Web Services account that owns the resource share. OwningAccountId *string - // The Amazon Resource Name (ARN) of the resource share. + // The Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share ResourceShareArn *string - // The status of the resource share. + // The current status of the resource share. Status ResourceShareStatus // A message about the status of the resource share. StatusMessage *string - // The tags for the resource share. + // The tag key and value pairs attached to the resource share. Tags []Tag noSmithyDocumentSerde } -// Describes an association with a resource share. +// Describes an association with a resource share and either a principal or a +// resource. type ResourceShareAssociation struct { - // The associated entity. For resource associations, this is the Amazon Resource - // Name (ARN) of the resource. For principal associations, this is one of the - // following: + // The associated entity. This can be either of the following: // - // * An Amazon Web Services account ID + // * For a resource + // association, this is the Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource. // - // * An ARN of an organization in - // Organizations + // * For principal associations, this is one of the following: // - // * An ARN of an organizational unit (OU) in Organizations + // * + // The ID of an Amazon Web Services account // - // * An - // ARN of an IAM role + // * The Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // an organization in Organizations // - // * An ARN of an IAM user + // * The ARN of an organizational unit (OU) in + // Organizations + // + // * The ARN of an IAM role + // + // * The ARN of an IAM user AssociatedEntity *string - // The association type. + // The type of entity included in this association. AssociationType ResourceShareAssociationType - // The time when the association was created. + // The date and time when the association was created. CreationTime *time.Time // Indicates whether the principal belongs to the same organization in // Organizations as the Amazon Web Services account that owns the resource share. External *bool - // The time when the association was last updated. + // The date and time when the association was last updated. LastUpdatedTime *time.Time - // The Amazon Resource Name (ARN) of the resource share. + // The Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share. ResourceShareArn *string // The name of the resource share. ResourceShareName *string - // The status of the association. + // The current status of the association. Status ResourceShareAssociationStatus // A message about the status of the association. @@ -160,7 +191,8 @@ type ResourceShareAssociation struct { noSmithyDocumentSerde } -// Describes an invitation to join a resource share. +// Describes an invitation for an Amazon Web Services account to join a resource +// share. type ResourceShareInvitation struct { // The date and time when the invitation was sent. @@ -169,21 +201,25 @@ type ResourceShareInvitation struct { // The ID of the Amazon Web Services account that received the invitation. ReceiverAccountId *string - // The Amazon Resource Name (ARN) of the IAM user or IAM role that received the - // invitation. + // The Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the IAM user or role that received the invitation. ReceiverArn *string - // The Amazon Resource Name (ARN) of the resource share. + // The Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the resource share ResourceShareArn *string // To view the resources associated with a pending resource share invitation, use - // ListPendingInvitationResources - // (https://docs.aws.amazon.com/ram/latest/APIReference/API_ListPendingInvitationResources.html). + // ListPendingInvitationResources. // // Deprecated: This member has been deprecated. Use ListPendingInvitationResources. ResourceShareAssociations []ResourceShareAssociation - // The Amazon Resource Name (ARN) of the invitation. + // The Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the invitation. ResourceShareInvitationArn *string // The name of the resource share. @@ -192,7 +228,7 @@ type ResourceShareInvitation struct { // The ID of the Amazon Web Services account that sent the invitation. SenderAccountId *string - // The status of the invitation. + // The current status of the invitation. Status ResourceShareInvitationStatus noSmithyDocumentSerde @@ -201,107 +237,134 @@ type ResourceShareInvitation struct { // Information about an RAM permission. type ResourceSharePermissionDetail struct { - // The Amazon Resource Name (ARN) of the permission. + // The Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // this RAM permission. Arn *string // The date and time when the permission was created. CreationTime *time.Time - // Specifies whether the version of the permission is set to the default version - // for this permission. + // Specifies whether the version of the permission represented in this structure is + // the default version for this permission. DefaultVersion *bool - // Specifies whether the version of the permission is set to the default version - // for this resource type. + // Specifies whether the version of the permission represented in this structure is + // the default version for all resources of this resource type. IsResourceTypeDefault *bool // The date and time when the permission was last updated. LastUpdatedTime *time.Time - // The name of the permission. + // The name of this permission. Name *string // The permission's effect and actions in JSON format. The effect indicates whether - // the actions are allowed or denied. The actions list the API actions to which the - // principal is granted or denied access. + // the specified actions are allowed or denied. The actions list the operations to + // which the principal is granted or denied access. Permission *string - // The resource type to which the permission applies. + // The resource type to which this permission applies. ResourceType *string - // The identifier for the version of the permission. + // The version of the permission represented in this structure. Version *string noSmithyDocumentSerde } -// Information about a permission that is associated with a resource share. +// Information about an RAM permission that is associated with a resource share and +// any of its resources of a specified type. type ResourceSharePermissionSummary struct { - // The Amazon Resource Name (ARN) of the permission. + // The Amazon Resoure Name (ARN) + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the permission you want information about. Arn *string // The date and time when the permission was created. CreationTime *time.Time - // Specifies whether the version of the permission is set to the default version - // for this permission. + // Specifies whether the version of the permission represented in this structure is + // the default version for this permission. DefaultVersion *bool - // Specifies whether the version of the permission is set to the default version - // for this resource type. + // Specifies whether the version of the permission represented in this structure is + // the default version for all resources of this resource type. IsResourceTypeDefault *bool // The date and time when the permission was last updated. LastUpdatedTime *time.Time - // The name of the permission. + // The name of this permission. Name *string - // The type of resource to which the permission applies. + // The type of resource to which this permission applies. ResourceType *string // The current status of the permission. Status *string - // The identifier for the version of the permission. + // The version of the permission represented in this structure. Version *string noSmithyDocumentSerde } -// Information about the shareable resource types and the Amazon Web Services -// services to which they belong. +// Information about a shareable resource type and the Amazon Web Services service +// to which resources of that type belong. type ServiceNameAndResourceType struct { - // The shareable resource types. + // Specifies the scope of visibility of resources of this type: + // + // * REGIONAL – The + // resource can be accessed only by using requests that target the Amazon Web + // Services Region in which the resource exists. + // + // * GLOBAL – The resource can be + // accessed from any Amazon Web Services Region. + ResourceRegionScope ResourceRegionScope + + // The type of the resource. ResourceType *string - // The name of the Amazon Web Services services to which the resources belong. + // The name of the Amazon Web Services service to which resources of this type + // belong. ServiceName *string noSmithyDocumentSerde } -// Information about a tag. +// A structure containing a tag. A tag is metadata that you can attach to your +// resources to help organize and categorize them. You can also use them to help +// you secure your resources. For more information, see Controlling access to +// Amazon Web Services resources using tags +// (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html). For more +// information about tags, see Tagging Amazon Web Services resources +// (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the Amazon +// Web Services General Reference Guide. type Tag struct { - // The key of the tag. + // The key, or name, attached to the tag. Every tag must have a key. Key names are + // case sensitive. Key *string - // The value of the tag. + // The string value attached to the tag. The value can be an empty string. Key + // values are case sensitive. Value *string noSmithyDocumentSerde } -// Used to filter information based on tags. +// A tag key and optional list of possible values that you can use to filter +// results for tagged resources. type TagFilter struct { - // The tag key. + // The tag key. This must have a valid string value and can't be empty. TagKey *string - // The tag values. + // A list of zero or more tag values. If no values are provided, then the filter + // matches any tag with the specified key, regardless of its value. TagValues []string noSmithyDocumentSerde diff --git a/service/rekognition/api_op_CompareFaces.go b/service/rekognition/api_op_CompareFaces.go index 57f899248b9..c5ff49cdd38 100644 --- a/service/rekognition/api_op_CompareFaces.go +++ b/service/rekognition/api_op_CompareFaces.go @@ -28,7 +28,7 @@ import ( // a PNG or JPEG file. In response, the operation returns an array of face matches // ordered by similarity score in descending order. For each face match, the // response provides a bounding box of the face, facial landmarks, pose details -// (pitch, role, and yaw), quality (brightness and sharpness), and confidence value +// (pitch, roll, and yaw), quality (brightness and sharpness), and confidence value // (indicating the level of confidence that the bounding box contains a face). The // response also provides a similarity score, which indicates how closely the faces // match. By default, only faces with a similarity score of greater than or equal diff --git a/service/rekognition/api_op_DetectText.go b/service/rekognition/api_op_DetectText.go index 92e7ae5f0eb..d2d7b776020 100644 --- a/service/rekognition/api_op_DetectText.go +++ b/service/rekognition/api_op_DetectText.go @@ -19,19 +19,19 @@ import ( // a .png or .jpeg formatted file. The DetectText operation returns text in an // array of TextDetection elements, TextDetections. Each TextDetection element // provides information about a single word or line of text that was detected in -// the image. A word is one or more ISO basic latin script characters that are not -// separated by spaces. DetectText can detect up to 100 words in an image. A line -// is a string of equally spaced words. A line isn't necessarily a complete -// sentence. For example, a driver's license number is detected as a line. A line -// ends when there is no aligned text after it. Also, a line ends when there is a -// large gap between words, relative to the length of the words. This means, -// depending on the gap between words, Amazon Rekognition may detect multiple lines -// in text aligned in the same direction. Periods don't represent the end of a -// line. If a sentence spans multiple lines, the DetectText operation returns -// multiple lines. To determine whether a TextDetection element is a line of text -// or a word, use the TextDetection object Type field. To be detected, text must be -// within +/- 90 degrees orientation of the horizontal axis. For more information, -// see DetectText in the Amazon Rekognition Developer Guide. +// the image. A word is one or more script characters that are not separated by +// spaces. DetectText can detect up to 100 words in an image. A line is a string of +// equally spaced words. A line isn't necessarily a complete sentence. For example, +// a driver's license number is detected as a line. A line ends when there is no +// aligned text after it. Also, a line ends when there is a large gap between +// words, relative to the length of the words. This means, depending on the gap +// between words, Amazon Rekognition may detect multiple lines in text aligned in +// the same direction. Periods don't represent the end of a line. If a sentence +// spans multiple lines, the DetectText operation returns multiple lines. To +// determine whether a TextDetection element is a line of text or a word, use the +// TextDetection object Type field. To be detected, text must be within +/- 90 +// degrees orientation of the horizontal axis. For more information, see DetectText +// in the Amazon Rekognition Developer Guide. func (c *Client) DetectText(ctx context.Context, params *DetectTextInput, optFns ...func(*Options)) (*DetectTextOutput, error) { if params == nil { params = &DetectTextInput{} diff --git a/service/rekognition/types/enums.go b/service/rekognition/types/enums.go index 34534e1bdba..06804ae487f 100644 --- a/service/rekognition/types/enums.go +++ b/service/rekognition/types/enums.go @@ -252,8 +252,10 @@ type KnownGenderType string // Enum values for KnownGenderType const ( - KnownGenderTypeMale KnownGenderType = "Male" - KnownGenderTypeFemale KnownGenderType = "Female" + KnownGenderTypeMale KnownGenderType = "Male" + KnownGenderTypeFemale KnownGenderType = "Female" + KnownGenderTypeNonbinary KnownGenderType = "Nonbinary" + KnownGenderTypeUnlisted KnownGenderType = "Unlisted" ) // Values returns all known values for KnownGenderType. Note that this can be @@ -263,6 +265,8 @@ func (KnownGenderType) Values() []KnownGenderType { return []KnownGenderType{ "Male", "Female", + "Nonbinary", + "Unlisted", } } diff --git a/service/rekognition/types/types.go b/service/rekognition/types/types.go index ecd3dc448b8..bdf1a1dfafa 100644 --- a/service/rekognition/types/types.go +++ b/service/rekognition/types/types.go @@ -140,7 +140,8 @@ type Celebrity struct { // A unique identifier for the celebrity. Id *string - // The known gender identity for the celebrity that matches the provided ID. + // The known gender identity for the celebrity that matches the provided ID. The + // known gender identity can be Male, Female, Nonbinary, or Unlisted. KnownGender *KnownGender // The confidence, in percentage, that Amazon Rekognition has that the recognized @@ -920,7 +921,8 @@ type KinesisVideoStream struct { noSmithyDocumentSerde } -// The known gender identity for the celebrity that matches the provided ID. +// The known gender identity for the celebrity that matches the provided ID. The +// known gender identity can be Male, Female, Nonbinary, or Unlisted. type KnownGender struct { // A string value of the KnownGender info about the Celebrity. diff --git a/service/snowdevicemanagement/api_client.go b/service/snowdevicemanagement/api_client.go index 845af8419d6..00f1b294199 100644 --- a/service/snowdevicemanagement/api_client.go +++ b/service/snowdevicemanagement/api_client.go @@ -4,7 +4,6 @@ package snowdevicemanagement import ( "context" - cryptorand "crypto/rand" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" @@ -15,7 +14,6 @@ import ( smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" - smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "time" @@ -46,8 +44,6 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveDefaultEndpointConfiguration(&options) - resolveIdempotencyTokenProvider(&options) - for _, fn := range optFns { fn(&options) } @@ -80,10 +76,6 @@ type Options struct { // 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 @@ -249,13 +241,6 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } -func resolveIdempotencyTokenProvider(o *Options) { - if o.IdempotencyTokenProvider != nil { - return - } - o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) -} - func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, @@ -294,11 +279,6 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } -// IdempotencyTokenProvider interface for providing idempotency token -type IdempotencyTokenProvider interface { - GetIdempotencyToken() (string, error) -} - func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/snowdevicemanagement/api_op_CreateTask.go b/service/snowdevicemanagement/api_op_CreateTask.go index ac33e1367f0..57dbf5f5c45 100644 --- a/service/snowdevicemanagement/api_op_CreateTask.go +++ b/service/snowdevicemanagement/api_op_CreateTask.go @@ -4,7 +4,6 @@ package snowdevicemanagement import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/snowdevicemanagement/types" @@ -112,9 +111,6 @@ func (c *Client) addOperationCreateTaskMiddlewares(stack *middleware.Stack, opti if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateTaskMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateTaskValidationMiddleware(stack); err != nil { return err } @@ -133,39 +129,6 @@ func (c *Client) addOperationCreateTaskMiddlewares(stack *middleware.Stack, opti return nil } -type idempotencyToken_initializeOpCreateTask struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateTask) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateTask) 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.(*CreateTaskInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateTaskInput ") - } - - 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_opCreateTaskMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateTask{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateTask(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wisdom/api_client.go b/service/wisdom/api_client.go index dbb1b4a9fac..395920f1161 100644 --- a/service/wisdom/api_client.go +++ b/service/wisdom/api_client.go @@ -4,7 +4,6 @@ package wisdom import ( "context" - cryptorand "crypto/rand" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" @@ -15,7 +14,6 @@ import ( smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" - smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net/http" "time" @@ -46,8 +44,6 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveDefaultEndpointConfiguration(&options) - resolveIdempotencyTokenProvider(&options) - for _, fn := range optFns { fn(&options) } @@ -80,10 +76,6 @@ type Options struct { // 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 @@ -249,13 +241,6 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } -func resolveIdempotencyTokenProvider(o *Options) { - if o.IdempotencyTokenProvider != nil { - return - } - o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) -} - func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, @@ -294,11 +279,6 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } -// IdempotencyTokenProvider interface for providing idempotency token -type IdempotencyTokenProvider interface { - GetIdempotencyToken() (string, error) -} - func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/wisdom/api_op_CreateAssistant.go b/service/wisdom/api_op_CreateAssistant.go index db720ae4b4e..904445b2872 100644 --- a/service/wisdom/api_op_CreateAssistant.go +++ b/service/wisdom/api_op_CreateAssistant.go @@ -4,7 +4,6 @@ package wisdom import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wisdom/types" @@ -112,9 +111,6 @@ func (c *Client) addOperationCreateAssistantMiddlewares(stack *middleware.Stack, if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateAssistantMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateAssistantValidationMiddleware(stack); err != nil { return err } @@ -133,39 +129,6 @@ func (c *Client) addOperationCreateAssistantMiddlewares(stack *middleware.Stack, return nil } -type idempotencyToken_initializeOpCreateAssistant struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateAssistant) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateAssistant) 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.(*CreateAssistantInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAssistantInput ") - } - - 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_opCreateAssistantMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAssistant{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateAssistant(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wisdom/api_op_CreateAssistantAssociation.go b/service/wisdom/api_op_CreateAssistantAssociation.go index 3d0783c38b3..a309193821a 100644 --- a/service/wisdom/api_op_CreateAssistantAssociation.go +++ b/service/wisdom/api_op_CreateAssistantAssociation.go @@ -4,7 +4,6 @@ package wisdom import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wisdom/types" @@ -114,9 +113,6 @@ func (c *Client) addOperationCreateAssistantAssociationMiddlewares(stack *middle if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateAssistantAssociationMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateAssistantAssociationValidationMiddleware(stack); err != nil { return err } @@ -135,39 +131,6 @@ func (c *Client) addOperationCreateAssistantAssociationMiddlewares(stack *middle return nil } -type idempotencyToken_initializeOpCreateAssistantAssociation struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateAssistantAssociation) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateAssistantAssociation) 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.(*CreateAssistantAssociationInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAssistantAssociationInput ") - } - - 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_opCreateAssistantAssociationMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAssistantAssociation{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateAssistantAssociation(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wisdom/api_op_CreateContent.go b/service/wisdom/api_op_CreateContent.go index 4e92d6434fa..8e2368e1332 100644 --- a/service/wisdom/api_op_CreateContent.go +++ b/service/wisdom/api_op_CreateContent.go @@ -4,7 +4,6 @@ package wisdom import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wisdom/types" @@ -132,9 +131,6 @@ func (c *Client) addOperationCreateContentMiddlewares(stack *middleware.Stack, o if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateContentMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateContentValidationMiddleware(stack); err != nil { return err } @@ -153,39 +149,6 @@ func (c *Client) addOperationCreateContentMiddlewares(stack *middleware.Stack, o return nil } -type idempotencyToken_initializeOpCreateContent struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateContent) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateContent) 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.(*CreateContentInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateContentInput ") - } - - 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_opCreateContentMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateContent{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateContent(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wisdom/api_op_CreateKnowledgeBase.go b/service/wisdom/api_op_CreateKnowledgeBase.go index 83f32f197d8..1ea3d10fa06 100644 --- a/service/wisdom/api_op_CreateKnowledgeBase.go +++ b/service/wisdom/api_op_CreateKnowledgeBase.go @@ -4,7 +4,6 @@ package wisdom import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wisdom/types" @@ -143,9 +142,6 @@ func (c *Client) addOperationCreateKnowledgeBaseMiddlewares(stack *middleware.St if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateKnowledgeBaseMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateKnowledgeBaseValidationMiddleware(stack); err != nil { return err } @@ -164,39 +160,6 @@ func (c *Client) addOperationCreateKnowledgeBaseMiddlewares(stack *middleware.St return nil } -type idempotencyToken_initializeOpCreateKnowledgeBase struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateKnowledgeBase) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateKnowledgeBase) 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.(*CreateKnowledgeBaseInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateKnowledgeBaseInput ") - } - - 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_opCreateKnowledgeBaseMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateKnowledgeBase{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateKnowledgeBase(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wisdom/api_op_CreateSession.go b/service/wisdom/api_op_CreateSession.go index 839bc9f0b6d..bcaf0b20019 100644 --- a/service/wisdom/api_op_CreateSession.go +++ b/service/wisdom/api_op_CreateSession.go @@ -4,7 +4,6 @@ package wisdom import ( "context" - "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/wisdom/types" @@ -112,9 +111,6 @@ func (c *Client) addOperationCreateSessionMiddlewares(stack *middleware.Stack, o if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } - if err = addIdempotencyToken_opCreateSessionMiddleware(stack, options); err != nil { - return err - } if err = addOpCreateSessionValidationMiddleware(stack); err != nil { return err } @@ -133,39 +129,6 @@ func (c *Client) addOperationCreateSessionMiddlewares(stack *middleware.Stack, o return nil } -type idempotencyToken_initializeOpCreateSession struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateSession) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateSession) 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.(*CreateSessionInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateSessionInput ") - } - - 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_opCreateSessionMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateSession{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - func newServiceMetadataMiddleware_opCreateSession(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region,