diff --git a/.changelog/6ed4b80d8dd046f69e9fc13d60233253.json b/.changelog/6ed4b80d8dd046f69e9fc13d60233253.json new file mode 100644 index 00000000000..53a32dc74fa --- /dev/null +++ b/.changelog/6ed4b80d8dd046f69e9fc13d60233253.json @@ -0,0 +1,8 @@ +{ + "id": "6ed4b80d-8dd0-46f6-9e9f-c13d60233253", + "type": "feature", + "description": "Remove deprecated `honeycode` service.", + "modules": [ + "." + ] +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/honeycode.json b/codegen/sdk-codegen/aws-models/honeycode.json deleted file mode 100644 index b1c6d908a55..00000000000 --- a/codegen/sdk-codegen/aws-models/honeycode.json +++ /dev/null @@ -1,3710 +0,0 @@ -{ - "smithy": "2.0", - "metadata": { - "suppressions": [ - { - "id": "HttpMethodSemantics", - "namespace": "*" - }, - { - "id": "HttpResponseCodeSemantics", - "namespace": "*" - }, - { - "id": "PaginatedTrait", - "namespace": "*" - }, - { - "id": "HttpHeaderTrait", - "namespace": "*" - }, - { - "id": "HttpUriConflict", - "namespace": "*" - }, - { - "id": "Service", - "namespace": "*" - } - ] - }, - "shapes": { - "com.amazonaws.honeycode#AccessDeniedException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.honeycode#ErrorMessage" - } - }, - "traits": { - "smithy.api#documentation": "

\n You do not have sufficient access to perform this action. Check that the workbook is owned by you and your\n IAM policy allows access to the resource in the request.\n

", - "smithy.api#error": "client", - "smithy.api#httpError": 403 - } - }, - "com.amazonaws.honeycode#AutomationExecutionException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.honeycode#ErrorMessage" - } - }, - "traits": { - "smithy.api#documentation": "

The automation execution did not end successfully.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.honeycode#AutomationExecutionTimeoutException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.honeycode#ErrorMessage" - } - }, - "traits": { - "smithy.api#documentation": "

The automation execution timed out.

", - "smithy.api#error": "server", - "smithy.api#httpError": 504 - } - }, - "com.amazonaws.honeycode#AwsUserArn": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 20, - "max": 2048 - } - } - }, - "com.amazonaws.honeycode#BatchCreateTableRows": { - "type": "operation", - "input": { - "target": "com.amazonaws.honeycode#BatchCreateTableRowsRequest" - }, - "output": { - "target": "com.amazonaws.honeycode#BatchCreateTableRowsResult" - }, - "errors": [ - { - "target": "com.amazonaws.honeycode#AccessDeniedException" - }, - { - "target": "com.amazonaws.honeycode#InternalServerException" - }, - { - "target": "com.amazonaws.honeycode#RequestTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.honeycode#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.honeycode#ServiceUnavailableException" - }, - { - "target": "com.amazonaws.honeycode#ThrottlingException" - }, - { - "target": "com.amazonaws.honeycode#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

\n The BatchCreateTableRows API allows you to create one or more rows at the end of a table in a workbook.\n The API allows you to specify the values to set in some or all of the columns in the new rows.\n

\n

\n If a column is not explicitly set in a specific row, then the column level formula specified in the table\n will be applied to the new row. If there is no column level formula but the last row of the table has a\n formula, then that formula will be copied down to the new row. If there is no column level formula and\n no formula in the last row of the table, then that column will be left blank for the new rows.\n

", - "smithy.api#http": { - "method": "POST", - "uri": "/workbooks/{workbookId}/tables/{tableId}/rows/batchcreate", - "code": 200 - } - } - }, - "com.amazonaws.honeycode#BatchCreateTableRowsRequest": { - "type": "structure", - "members": { - "workbookId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the workbook where the new rows are being added.

\n

\n If a workbook with the specified ID could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tableId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the table where the new rows are being added.

\n

\n If a table with the specified ID could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "rowsToCreate": { - "target": "com.amazonaws.honeycode#CreateRowDataList", - "traits": { - "smithy.api#documentation": "

\n The list of rows to create at the end of the table. Each item in this list needs to have a batch item id\n to uniquely identify the element in the request and the cells to create for that row.\n You need to specify at least one item in this list.\n

\n

\n Note that if one of the column ids in any of the rows in the request does not exist in the table, then the\n request fails and no updates are made to the table.\n

", - "smithy.api#required": {} - } - }, - "clientRequestToken": { - "target": "com.amazonaws.honeycode#ClientRequestToken", - "traits": { - "smithy.api#documentation": "

\n The request token for performing the batch create operation.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will not perform\n the operation again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.honeycode#BatchCreateTableRowsResult": { - "type": "structure", - "members": { - "workbookCursor": { - "target": "com.amazonaws.honeycode#WorkbookCursor", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The updated workbook cursor after adding the new rows at the end of the table.

", - "smithy.api#required": {} - } - }, - "createdRows": { - "target": "com.amazonaws.honeycode#CreatedRowsMap", - "traits": { - "smithy.api#documentation": "

The map of batch item id to the row id that was created for that item.

", - "smithy.api#required": {} - } - }, - "failedBatchItems": { - "target": "com.amazonaws.honeycode#FailedBatchItems", - "traits": { - "smithy.api#documentation": "

\n The list of batch items in the request that could not be added to the table. Each element in this list\n contains one item from the request that could not be added to the table along with the reason why\n that item could not be added.\n

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.honeycode#BatchDeleteTableRows": { - "type": "operation", - "input": { - "target": "com.amazonaws.honeycode#BatchDeleteTableRowsRequest" - }, - "output": { - "target": "com.amazonaws.honeycode#BatchDeleteTableRowsResult" - }, - "errors": [ - { - "target": "com.amazonaws.honeycode#AccessDeniedException" - }, - { - "target": "com.amazonaws.honeycode#InternalServerException" - }, - { - "target": "com.amazonaws.honeycode#RequestTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.honeycode#ServiceUnavailableException" - }, - { - "target": "com.amazonaws.honeycode#ThrottlingException" - }, - { - "target": "com.amazonaws.honeycode#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

\n The BatchDeleteTableRows API allows you to delete one or more rows from a table in a workbook.\n You need to specify the ids of the rows that you want to delete from the table.\n

", - "smithy.api#http": { - "method": "POST", - "uri": "/workbooks/{workbookId}/tables/{tableId}/rows/batchdelete", - "code": 200 - } - } - }, - "com.amazonaws.honeycode#BatchDeleteTableRowsRequest": { - "type": "structure", - "members": { - "workbookId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the workbook where the rows are being deleted.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tableId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the table where the rows are being deleted.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "rowIds": { - "target": "com.amazonaws.honeycode#RowIdList", - "traits": { - "smithy.api#documentation": "

\n The list of row ids to delete from the table. You need to specify at least one row id in this list.\n

\n

\n Note that if one of the row ids provided in the request does not exist in the table, then the request fails\n and no rows are deleted from the table.\n

", - "smithy.api#required": {} - } - }, - "clientRequestToken": { - "target": "com.amazonaws.honeycode#ClientRequestToken", - "traits": { - "smithy.api#documentation": "

\n The request token for performing the delete action.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will not perform\n the action again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.honeycode#BatchDeleteTableRowsResult": { - "type": "structure", - "members": { - "workbookCursor": { - "target": "com.amazonaws.honeycode#WorkbookCursor", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The updated workbook cursor after deleting the rows from the table.

", - "smithy.api#required": {} - } - }, - "failedBatchItems": { - "target": "com.amazonaws.honeycode#FailedBatchItems", - "traits": { - "smithy.api#documentation": "

\n The list of row ids in the request that could not be deleted from the table. Each element in this list\n contains one row id from the request that could not be deleted along with the reason why that item could not\n be deleted.\n

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.honeycode#BatchErrorMessage": { - "type": "string", - "traits": { - "smithy.api#pattern": "^(?!\\s*$).+$" - } - }, - "com.amazonaws.honeycode#BatchItemId": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 64 - }, - "smithy.api#pattern": "^(?!\\s*$).+$" - } - }, - "com.amazonaws.honeycode#BatchUpdateTableRows": { - "type": "operation", - "input": { - "target": "com.amazonaws.honeycode#BatchUpdateTableRowsRequest" - }, - "output": { - "target": "com.amazonaws.honeycode#BatchUpdateTableRowsResult" - }, - "errors": [ - { - "target": "com.amazonaws.honeycode#AccessDeniedException" - }, - { - "target": "com.amazonaws.honeycode#InternalServerException" - }, - { - "target": "com.amazonaws.honeycode#RequestTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.honeycode#ServiceUnavailableException" - }, - { - "target": "com.amazonaws.honeycode#ThrottlingException" - }, - { - "target": "com.amazonaws.honeycode#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

\n The BatchUpdateTableRows API allows you to update one or more rows in a table in a workbook.\n

\n

\n You can specify the values to set in some or all of the columns in the table for the specified\n rows.\n If a column is not explicitly specified in a particular row, then that column will not be updated\n for that row. To clear out the data in a specific cell, you need to set the value as an empty string\n (\"\").\n

", - "smithy.api#http": { - "method": "POST", - "uri": "/workbooks/{workbookId}/tables/{tableId}/rows/batchupdate", - "code": 200 - } - } - }, - "com.amazonaws.honeycode#BatchUpdateTableRowsRequest": { - "type": "structure", - "members": { - "workbookId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the workbook where the rows are being updated.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tableId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the table where the rows are being updated.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "rowsToUpdate": { - "target": "com.amazonaws.honeycode#UpdateRowDataList", - "traits": { - "smithy.api#documentation": "

\n The list of rows to update in the table. Each item in this list needs to contain the row id to update\n along with the map of column id to cell values for each column in that row that needs to be updated.\n You need to specify at least one row in this list, and for each row, you need to specify at least one\n column to update.\n

\n

\n Note that if one of the row or column ids in the request does not exist in the table, then the request fails\n and no updates are made to the table.\n

", - "smithy.api#required": {} - } - }, - "clientRequestToken": { - "target": "com.amazonaws.honeycode#ClientRequestToken", - "traits": { - "smithy.api#documentation": "

\n The request token for performing the update action.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will not perform\n the action again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.honeycode#BatchUpdateTableRowsResult": { - "type": "structure", - "members": { - "workbookCursor": { - "target": "com.amazonaws.honeycode#WorkbookCursor", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The updated workbook cursor after adding the new rows at the end of the table.

", - "smithy.api#required": {} - } - }, - "failedBatchItems": { - "target": "com.amazonaws.honeycode#FailedBatchItems", - "traits": { - "smithy.api#documentation": "

\n The list of batch items in the request that could not be updated in the table. Each element in this list\n contains one item from the request that could not be updated in the table along with the reason why\n that item could not be updated.\n

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.honeycode#BatchUpsertTableRows": { - "type": "operation", - "input": { - "target": "com.amazonaws.honeycode#BatchUpsertTableRowsRequest" - }, - "output": { - "target": "com.amazonaws.honeycode#BatchUpsertTableRowsResult" - }, - "errors": [ - { - "target": "com.amazonaws.honeycode#AccessDeniedException" - }, - { - "target": "com.amazonaws.honeycode#InternalServerException" - }, - { - "target": "com.amazonaws.honeycode#RequestTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.honeycode#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.honeycode#ServiceUnavailableException" - }, - { - "target": "com.amazonaws.honeycode#ThrottlingException" - }, - { - "target": "com.amazonaws.honeycode#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

\n The BatchUpsertTableRows API allows you to upsert one or more rows in a table. The upsert\n operation takes a filter expression as input and evaluates it to find matching rows on the destination\n table. If matching rows are found, it will update the cells in the matching rows to new values specified\n in the request. If no matching rows are found, a new row is added at the end of the table and the cells in\n that row are set to the new values specified in the request.\n

\n

\n You can specify the values to set in some or all of the columns in the table for the\n matching or newly appended rows. If a column is not explicitly specified for a particular row, then that\n column will not be updated for that row. To clear out the data in a specific cell, you need to set the value\n as an empty string (\"\").\n

", - "smithy.api#http": { - "method": "POST", - "uri": "/workbooks/{workbookId}/tables/{tableId}/rows/batchupsert", - "code": 200 - } - } - }, - "com.amazonaws.honeycode#BatchUpsertTableRowsRequest": { - "type": "structure", - "members": { - "workbookId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the workbook where the rows are being upserted.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tableId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the table where the rows are being upserted.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "rowsToUpsert": { - "target": "com.amazonaws.honeycode#UpsertRowDataList", - "traits": { - "smithy.api#documentation": "

\n The list of rows to upsert in the table. Each item in this list needs to have a batch item id to uniquely\n identify the element in the request, a filter expression to find the rows to update for that element\n and the cell values to set for each column in the upserted rows. You need to specify\n at least one item in this list.\n

\n

\n Note that if one of the filter formulas in the request fails to evaluate because of an error or one of the\n column ids in any of the rows does not exist in the table, then the request fails\n and no updates are made to the table.\n

", - "smithy.api#required": {} - } - }, - "clientRequestToken": { - "target": "com.amazonaws.honeycode#ClientRequestToken", - "traits": { - "smithy.api#documentation": "

\n The request token for performing the update action.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will not perform\n the action again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.honeycode#BatchUpsertTableRowsResult": { - "type": "structure", - "members": { - "rows": { - "target": "com.amazonaws.honeycode#UpsertRowsResultMap", - "traits": { - "smithy.api#documentation": "

\n A map with the batch item id as the key and the result of the upsert operation as the value. The\n result of the upsert operation specifies whether existing rows were updated or a new row was appended, along\n with the list of row ids that were affected.\n

", - "smithy.api#required": {} - } - }, - "workbookCursor": { - "target": "com.amazonaws.honeycode#WorkbookCursor", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The updated workbook cursor after updating or appending rows in the table.

", - "smithy.api#required": {} - } - }, - "failedBatchItems": { - "target": "com.amazonaws.honeycode#FailedBatchItems", - "traits": { - "smithy.api#documentation": "

\n The list of batch items in the request that could not be updated or appended in the table. Each element in\n this list contains one item from the request that could not be updated in the table along with the reason\n why that item could not be updated or appended.\n

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.honeycode#Cell": { - "type": "structure", - "members": { - "formula": { - "target": "com.amazonaws.honeycode#Formula", - "traits": { - "smithy.api#documentation": "

\n The formula contained in the cell. This field is empty if a cell does not have a formula.\n

" - } - }, - "format": { - "target": "com.amazonaws.honeycode#Format", - "traits": { - "smithy.api#documentation": "

The format of the cell. If this field is empty, then the format is either not specified in the\n workbook or the format is set to AUTO.

" - } - }, - "rawValue": { - "target": "com.amazonaws.honeycode#RawValue", - "traits": { - "smithy.api#documentation": "

\n The raw value of the data contained in the cell. The raw value depends on the format of the data in the\n cell. However the attribute in the API return value is always a string containing the raw value.\n

\n

\n Cells with format DATE, DATE_TIME or TIME have the raw value as a floating point\n number where the whole number represents the number of days since 1/1/1900 and the fractional part\n represents the fraction of the day since midnight. For example, a cell with date 11/3/2020 has the raw value\n \"44138\". A cell with the time 9:00 AM has the raw value \"0.375\" and a cell with date/time value of\n 11/3/2020 9:00 AM has the raw value \"44138.375\". Notice that even though the raw value is a number in all\n three cases, it is still represented as a string.\n

\n

\n Cells with format NUMBER, CURRENCY, PERCENTAGE and ACCOUNTING have the raw value of the data as the number\n representing the data being displayed. For example, the number 1.325 with two decimal places in the format\n will have it's raw value as \"1.325\" and formatted value as \"1.33\". A currency value for\n $10 will have the raw value as \"10\" and formatted value as \"$10.00\". A value representing 20% with two\n decimal places in the format will have its raw value as \"0.2\" and the formatted value as \"20.00%\". An\n accounting value of -$25 will have \"-25\" as the raw value and \"$ (25.00)\" as the formatted value.\n

\n

\n Cells with format TEXT will have the raw text as the raw value. For example, a cell with text \"John Smith\"\n will have \"John Smith\" as both the raw value and the formatted value.\n

\n

\n Cells with format CONTACT will have the name of the contact as a formatted value and the email address of\n the contact as the raw value. For example, a contact for John Smith will have \"John Smith\" as the\n formatted value and \"john.smith@example.com\" as the raw value.\n

\n

\n Cells with format ROWLINK (aka picklist) will have the first column of the linked row as the formatted value\n and the row id of the linked row as the raw value. For example, a cell containing a picklist to a table\n that displays task status might have \"Completed\" as the formatted value and\n \"row:dfcefaee-5b37-4355-8f28-40c3e4ff5dd4/ca432b2f-b8eb-431d-9fb5-cbe0342f9f03\" as the raw value.\n

\n

\n Cells with format ROWSET (aka multi-select or multi-record picklist) will by default have the first column\n of each of the linked rows as the formatted value in the list, and the rowset id of the linked rows as the\n raw value. For example, a cell containing a multi-select picklist to a table that contains items might have\n \"Item A\", \"Item B\" in the formatted value list and \"rows:b742c1f4-6cb0-4650-a845-35eb86fcc2bb/\n [fdea123b-8f68-474a-aa8a-5ff87aa333af,6daf41f0-a138-4eee-89da-123086d36ecf]\" as the raw value.\n

\n

\n Cells with format ATTACHMENT will have the name of the attachment as the formatted value and the attachment\n id as the raw value. For example, a cell containing an attachment named \"image.jpeg\" will have\n \"image.jpeg\" as the formatted value and \"attachment:ca432b2f-b8eb-431d-9fb5-cbe0342f9f03\" as the raw value.\n

\n

\n Cells with format AUTO or cells without any format that are auto-detected as one of the formats above will\n contain the raw and formatted values as mentioned above, based on the auto-detected formats. If there is no\n auto-detected format, the raw and formatted values will be the same as the data in the cell.\n

" - } - }, - "formattedValue": { - "target": "com.amazonaws.honeycode#FormattedValue", - "traits": { - "smithy.api#documentation": "

\n The formatted value of the cell. This is the value that you see displayed in the cell in the UI.\n

\n

\n Note that the formatted value of a cell is always represented as a string irrespective of the data that is\n stored in the cell. For example, if a cell contains a date, the formatted value of the cell is the string\n representation of the formatted date being shown in the cell in the UI. See details in the rawValue field\n below for how cells of different formats will have different raw and formatted values.\n

" - } - }, - "formattedValues": { - "target": "com.amazonaws.honeycode#FormattedValuesList", - "traits": { - "smithy.api#documentation": "

\n A list of formatted values of the cell. This field is only returned when the cell is ROWSET format\n (aka multi-select or multi-record picklist). Values in the list are always represented as strings.\n The formattedValue field will be empty if this field is returned.\n

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

An object that represents a single cell in a table.

", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.honeycode#CellInput": { - "type": "structure", - "members": { - "fact": { - "target": "com.amazonaws.honeycode#Fact", - "traits": { - "smithy.api#documentation": "

\n Fact represents the data that is entered into a cell. This data can be free text or a formula. Formulas need\n to start with the equals (=) sign.\n

" - } - }, - "facts": { - "target": "com.amazonaws.honeycode#FactList", - "traits": { - "smithy.api#documentation": "

\n A list representing the values that are entered into a ROWSET cell. Facts list can have either only values\n or rowIDs, and rowIDs should from the same table.\n

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

\n CellInput object contains the data needed to create or update cells in a table.\n

\n \n

\n CellInput object has only a facts field or a fact field, but not both. A 400 bad request will be\n thrown if both fact and facts field are present.\n

\n
" - } - }, - "com.amazonaws.honeycode#Cells": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#Cell" - } - }, - "com.amazonaws.honeycode#ClientRequestToken": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 32, - "max": 64 - }, - "smithy.api#pattern": "^(?!\\s*$).+$" - } - }, - "com.amazonaws.honeycode#ColumnMetadata": { - "type": "structure", - "members": { - "name": { - "target": "com.amazonaws.honeycode#Name", - "traits": { - "smithy.api#documentation": "

The name of the column.

", - "smithy.api#required": {} - } - }, - "format": { - "target": "com.amazonaws.honeycode#Format", - "traits": { - "smithy.api#documentation": "

The format of the column.

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

Metadata for column in the table.

" - } - }, - "com.amazonaws.honeycode#CreateRowData": { - "type": "structure", - "members": { - "batchItemId": { - "target": "com.amazonaws.honeycode#BatchItemId", - "traits": { - "smithy.api#documentation": "

\n An external identifier that represents the single row that is being created as part of the\n BatchCreateTableRows request. This can be any string that you can use to identify the row in the request.\n The BatchCreateTableRows API puts the batch item id in the results to allow you to link data in the\n request to data in the results.\n

", - "smithy.api#required": {} - } - }, - "cellsToCreate": { - "target": "com.amazonaws.honeycode#RowDataInput", - "traits": { - "smithy.api#documentation": "

\n A map representing the cells to create in the new row. The key is the column id of the\n cell and the value is the CellInput object that represents the data to set in that cell.\n

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

\n Data needed to create a single row in a table as part of the BatchCreateTableRows request.\n

" - } - }, - "com.amazonaws.honeycode#CreateRowDataList": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#CreateRowData" - }, - "traits": { - "smithy.api#length": { - "min": 1, - "max": 100 - } - } - }, - "com.amazonaws.honeycode#CreatedRowsMap": { - "type": "map", - "key": { - "target": "com.amazonaws.honeycode#BatchItemId" - }, - "value": { - "target": "com.amazonaws.honeycode#RowId" - } - }, - "com.amazonaws.honeycode#DataItem": { - "type": "structure", - "members": { - "overrideFormat": { - "target": "com.amazonaws.honeycode#Format", - "traits": { - "smithy.api#documentation": "

\n The overrideFormat is optional and is specified only if a particular row of data has a different format for\n the data than the default format defined on the screen or the table.\n

" - } - }, - "rawValue": { - "target": "com.amazonaws.honeycode#RawValue", - "traits": { - "smithy.api#documentation": "

The raw value of the data. e.g. jsmith@example.com

" - } - }, - "formattedValue": { - "target": "com.amazonaws.honeycode#FormattedValue", - "traits": { - "smithy.api#documentation": "

The formatted value of the data. e.g. John Smith.

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

The data in a particular data cell defined on the screen.

", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.honeycode#DataItems": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#DataItem" - } - }, - "com.amazonaws.honeycode#DelimitedTextDelimiter": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 1 - }, - "smithy.api#pattern": "^[^\\n\\r\\x00\\x08\\x0B\\x0C\\x0E\\x1F]?$" - } - }, - "com.amazonaws.honeycode#DelimitedTextImportOptions": { - "type": "structure", - "members": { - "delimiter": { - "target": "com.amazonaws.honeycode#DelimitedTextDelimiter", - "traits": { - "smithy.api#documentation": "

The delimiter to use for separating columns in a single row of the input.

", - "smithy.api#required": {} - } - }, - "hasHeaderRow": { - "target": "com.amazonaws.honeycode#HasHeaderRow", - "traits": { - "smithy.api#default": false, - "smithy.api#documentation": "

Indicates whether the input file has a header row at the top containing the column names.

" - } - }, - "ignoreEmptyRows": { - "target": "com.amazonaws.honeycode#IgnoreEmptyRows", - "traits": { - "smithy.api#default": false, - "smithy.api#documentation": "

A parameter to indicate whether empty rows should be ignored or be included in the import.

" - } - }, - "dataCharacterEncoding": { - "target": "com.amazonaws.honeycode#ImportDataCharacterEncoding", - "traits": { - "smithy.api#documentation": "

The encoding of the data in the input file.

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

\n An object that contains the options relating to parsing delimited text as part of an import request.\n

" - } - }, - "com.amazonaws.honeycode#DescribeTableDataImportJob": { - "type": "operation", - "input": { - "target": "com.amazonaws.honeycode#DescribeTableDataImportJobRequest" - }, - "output": { - "target": "com.amazonaws.honeycode#DescribeTableDataImportJobResult" - }, - "errors": [ - { - "target": "com.amazonaws.honeycode#AccessDeniedException" - }, - { - "target": "com.amazonaws.honeycode#InternalServerException" - }, - { - "target": "com.amazonaws.honeycode#RequestTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.honeycode#ServiceUnavailableException" - }, - { - "target": "com.amazonaws.honeycode#ThrottlingException" - }, - { - "target": "com.amazonaws.honeycode#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

\n The DescribeTableDataImportJob API allows you to retrieve the status and details of a table data import job.\n

", - "smithy.api#http": { - "method": "GET", - "uri": "/workbooks/{workbookId}/tables/{tableId}/import/{jobId}", - "code": 200 - } - } - }, - "com.amazonaws.honeycode#DescribeTableDataImportJobRequest": { - "type": "structure", - "members": { - "workbookId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the workbook into which data was imported.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tableId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the table into which data was imported.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "jobId": { - "target": "com.amazonaws.honeycode#JobId", - "traits": { - "smithy.api#documentation": "

The ID of the job that was returned by the StartTableDataImportJob request.

\n

\n If a job with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.honeycode#DescribeTableDataImportJobResult": { - "type": "structure", - "members": { - "jobStatus": { - "target": "com.amazonaws.honeycode#TableDataImportJobStatus", - "traits": { - "smithy.api#documentation": "

\n The current status of the import job.\n

", - "smithy.api#required": {} - } - }, - "message": { - "target": "com.amazonaws.honeycode#TableDataImportJobMessage", - "traits": { - "smithy.api#documentation": "

\n A message providing more details about the current status of the import job.\n

", - "smithy.api#required": {} - } - }, - "jobMetadata": { - "target": "com.amazonaws.honeycode#TableDataImportJobMetadata", - "traits": { - "smithy.api#documentation": "

\n The metadata about the job that was submitted for import.\n

", - "smithy.api#required": {} - } - }, - "errorCode": { - "target": "com.amazonaws.honeycode#ErrorCode", - "traits": { - "smithy.api#documentation": "

\n If job status is failed, error code to understand reason for the failure.\n

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.honeycode#DestinationOptions": { - "type": "structure", - "members": { - "columnMap": { - "target": "com.amazonaws.honeycode#ImportColumnMap", - "traits": { - "smithy.api#documentation": "

A map of the column id to the import properties for each column.

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

An object that contains the options relating to the destination of the import request.

" - } - }, - "com.amazonaws.honeycode#Email": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 3, - "max": 254 - }, - "smithy.api#pattern": "^([a-zA-Z0-9_\\-\\.]+)@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.honeycode#ErrorCode": { - "type": "enum", - "members": { - "AccessDenied": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ACCESS_DENIED" - } - }, - "InvalidUrlError": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INVALID_URL_ERROR" - } - }, - "InvalidImportOptionsError": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INVALID_IMPORT_OPTIONS_ERROR" - } - }, - "InvalidTableIdError": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INVALID_TABLE_ID_ERROR" - } - }, - "InvalidTableColumnIdError": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INVALID_TABLE_COLUMN_ID_ERROR" - } - }, - "TableNotFoundError": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "TABLE_NOT_FOUND_ERROR" - } - }, - "FileEmptyError": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "FILE_EMPTY_ERROR" - } - }, - "InvalidFileTypeError": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "INVALID_FILE_TYPE_ERROR" - } - }, - "FileParsingError": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "FILE_PARSING_ERROR" - } - }, - "FileSizeLimitError": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "FILE_SIZE_LIMIT_ERROR" - } - }, - "FileNotFoundError": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "FILE_NOT_FOUND_ERROR" - } - }, - "UnknownError": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "UNKNOWN_ERROR" - } - }, - "ResourceNotFoundError": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "RESOURCE_NOT_FOUND_ERROR" - } - }, - "SystemLimitError": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SYSTEM_LIMIT_ERROR" - } - } - } - }, - "com.amazonaws.honeycode#ErrorMessage": { - "type": "string" - }, - "com.amazonaws.honeycode#Fact": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 8192 - }, - "smithy.api#pattern": "^[\\s\\S]*$", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.honeycode#FactList": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#Fact" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 220 - } - } - }, - "com.amazonaws.honeycode#FailedBatchItem": { - "type": "structure", - "members": { - "id": { - "target": "com.amazonaws.honeycode#BatchItemId", - "traits": { - "smithy.api#documentation": "

\n The id of the batch item that failed. This is the batch item id for the BatchCreateTableRows and\n BatchUpsertTableRows operations and the row id for the BatchUpdateTableRows and BatchDeleteTableRows\n operations.\n

", - "smithy.api#required": {} - } - }, - "errorMessage": { - "target": "com.amazonaws.honeycode#BatchErrorMessage", - "traits": { - "smithy.api#documentation": "

\n The error message that indicates why the batch item failed.\n

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

\n A single item in a batch that failed to perform the intended action because of an error preventing it from\n succeeding.\n

" - } - }, - "com.amazonaws.honeycode#FailedBatchItems": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#FailedBatchItem" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 100 - } - } - }, - "com.amazonaws.honeycode#Filter": { - "type": "structure", - "members": { - "formula": { - "target": "com.amazonaws.honeycode#Formula", - "traits": { - "smithy.api#documentation": "

\n A formula representing a filter function that returns zero or more matching rows from a table. Valid\n formulas in this field return a list of rows from a table. The most common ways of writing a formula to\n return a list of rows are to use the FindRow() or Filter() functions. Any other formula that returns zero or\n more rows is also acceptable. For example, you can use a formula that points to a cell that contains a\n filter function.\n

", - "smithy.api#required": {} - } - }, - "contextRowId": { - "target": "com.amazonaws.honeycode#RowId", - "traits": { - "smithy.api#documentation": "

\n The optional contextRowId attribute can be used to specify the row id of the context row if the filter\n formula contains unqualified references to table columns and needs a context row to evaluate them\n successfully.\n

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

\n An object that represents a filter formula along with the id of the context row under which the filter\n function needs to evaluate.\n

" - } - }, - "com.amazonaws.honeycode#Format": { - "type": "enum", - "members": { - "Auto": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "AUTO" - } - }, - "Number": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "NUMBER" - } - }, - "Currency": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CURRENCY" - } - }, - "Date": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DATE" - } - }, - "Time": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "TIME" - } - }, - "DateTime": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DATE_TIME" - } - }, - "Percentage": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "PERCENTAGE" - } - }, - "Text": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "TEXT" - } - }, - "Accounting": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ACCOUNTING" - } - }, - "Contact": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CONTACT" - } - }, - "Rowlink": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ROWLINK" - } - }, - "Rowset": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ROWSET" - } - } - } - }, - "com.amazonaws.honeycode#FormattedValue": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 8192 - }, - "smithy.api#pattern": "^[\\s\\S]*$" - } - }, - "com.amazonaws.honeycode#FormattedValuesList": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#FormattedValue" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 220 - } - } - }, - "com.amazonaws.honeycode#Formula": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 8192 - }, - "smithy.api#pattern": "^=", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.honeycode#GetScreenData": { - "type": "operation", - "input": { - "target": "com.amazonaws.honeycode#GetScreenDataRequest" - }, - "output": { - "target": "com.amazonaws.honeycode#GetScreenDataResult" - }, - "errors": [ - { - "target": "com.amazonaws.honeycode#AccessDeniedException" - }, - { - "target": "com.amazonaws.honeycode#InternalServerException" - }, - { - "target": "com.amazonaws.honeycode#RequestTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.honeycode#ServiceUnavailableException" - }, - { - "target": "com.amazonaws.honeycode#ThrottlingException" - }, - { - "target": "com.amazonaws.honeycode#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

\n The GetScreenData API allows retrieval of data from a screen in a Honeycode app.\n The API allows setting local variables in the screen to filter, sort or otherwise affect what will be\n displayed on the screen.\n

", - "smithy.api#http": { - "method": "POST", - "uri": "/screendata", - "code": 200 - } - } - }, - "com.amazonaws.honeycode#GetScreenDataRequest": { - "type": "structure", - "members": { - "workbookId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the workbook that contains the screen.

", - "smithy.api#required": {} - } - }, - "appId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the app that contains the screen.

", - "smithy.api#required": {} - } - }, - "screenId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the screen.

", - "smithy.api#required": {} - } - }, - "variables": { - "target": "com.amazonaws.honeycode#VariableValueMap", - "traits": { - "smithy.api#documentation": "

\n Variables are optional and are needed only if the screen requires them to render correctly. Variables are\n specified as a map where the key is the name of the variable as defined on the screen. The value is an\n object which currently has only one property, rawValue, which holds the value of the variable to be passed\n to the screen.\n

" - } - }, - "maxResults": { - "target": "com.amazonaws.honeycode#MaxResults", - "traits": { - "smithy.api#documentation": "

\n The number of results to be returned on a single page.\n Specify a number between 1 and 100. The maximum value is 100.\n

\n

\n This parameter is optional. If you don't specify this parameter, the default page size is 100.\n

" - } - }, - "nextToken": { - "target": "com.amazonaws.honeycode#PaginationToken", - "traits": { - "smithy.api#documentation": "

\n This parameter is optional. If a nextToken is not specified, the API returns the first page of data.\n

\n

\n Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API\n will throw ValidationException.\n

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.honeycode#GetScreenDataResult": { - "type": "structure", - "members": { - "results": { - "target": "com.amazonaws.honeycode#ResultSetMap", - "traits": { - "smithy.api#documentation": "

A map of all the rows on the screen keyed by block name.

", - "smithy.api#required": {} - } - }, - "workbookCursor": { - "target": "com.amazonaws.honeycode#WorkbookCursor", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

\n Indicates the cursor of the workbook at which the data returned by this workbook is read. Workbook cursor\n keeps increasing with every update and the increments are not sequential.\n

", - "smithy.api#required": {} - } - }, - "nextToken": { - "target": "com.amazonaws.honeycode#PaginationToken", - "traits": { - "smithy.api#documentation": "

\n Provides the pagination token to load the next page if there are more results matching the request. If a\n pagination token is not present in the response, it means that all data matching the query has been loaded.\n

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.honeycode#HasHeaderRow": { - "type": "boolean", - "traits": { - "smithy.api#default": false - } - }, - "com.amazonaws.honeycode#IgnoreEmptyRows": { - "type": "boolean", - "traits": { - "smithy.api#default": false - } - }, - "com.amazonaws.honeycode#ImportColumnMap": { - "type": "map", - "key": { - "target": "com.amazonaws.honeycode#ResourceId" - }, - "value": { - "target": "com.amazonaws.honeycode#SourceDataColumnProperties" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 100 - } - } - }, - "com.amazonaws.honeycode#ImportDataCharacterEncoding": { - "type": "enum", - "members": { - "UTF_8": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "UTF-8" - } - }, - "US_ASCII": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "US-ASCII" - } - }, - "ISO_8859_1": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ISO-8859-1" - } - }, - "UTF_16BE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "UTF-16BE" - } - }, - "UTF_16LE": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "UTF-16LE" - } - }, - "UTF_16": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "UTF-16" - } - } - } - }, - "com.amazonaws.honeycode#ImportDataSource": { - "type": "structure", - "members": { - "dataSourceConfig": { - "target": "com.amazonaws.honeycode#ImportDataSourceConfig", - "traits": { - "smithy.api#documentation": "

The configuration parameters for the data source of the import

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

An object that has details about the source of the data that was submitted for import.

" - } - }, - "com.amazonaws.honeycode#ImportDataSourceConfig": { - "type": "structure", - "members": { - "dataSourceUrl": { - "target": "com.amazonaws.honeycode#SecureURL", - "traits": { - "smithy.api#documentation": "

\n The URL from which source data will be downloaded for the import request.\n

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

\n An object that contains the configuration parameters for the data source of an import request.\n

" - } - }, - "com.amazonaws.honeycode#ImportJobSubmitter": { - "type": "structure", - "members": { - "email": { - "target": "com.amazonaws.honeycode#Email", - "traits": { - "smithy.api#documentation": "

The email id of the submitter of the import job, if available.

" - } - }, - "userArn": { - "target": "com.amazonaws.honeycode#AwsUserArn", - "traits": { - "smithy.api#documentation": "

The AWS user ARN of the submitter of the import job, if available.

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

An object that contains the attributes of the submitter of the import job.

" - } - }, - "com.amazonaws.honeycode#ImportOptions": { - "type": "structure", - "members": { - "destinationOptions": { - "target": "com.amazonaws.honeycode#DestinationOptions", - "traits": { - "smithy.api#documentation": "

Options relating to the destination of the import request.

" - } - }, - "delimitedTextOptions": { - "target": "com.amazonaws.honeycode#DelimitedTextImportOptions", - "traits": { - "smithy.api#documentation": "

Options relating to parsing delimited text. Required if dataFormat is DELIMITED_TEXT.

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

An object that contains the options specified by the sumitter of the import request.

" - } - }, - "com.amazonaws.honeycode#ImportSourceDataFormat": { - "type": "enum", - "members": { - "DelimitedText": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DELIMITED_TEXT" - } - } - } - }, - "com.amazonaws.honeycode#InternalServerException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.honeycode#ErrorMessage" - } - }, - "traits": { - "smithy.api#documentation": "

There were unexpected errors from the server.

", - "smithy.api#error": "server", - "smithy.api#httpError": 500 - } - }, - "com.amazonaws.honeycode#InvokeScreenAutomation": { - "type": "operation", - "input": { - "target": "com.amazonaws.honeycode#InvokeScreenAutomationRequest" - }, - "output": { - "target": "com.amazonaws.honeycode#InvokeScreenAutomationResult" - }, - "errors": [ - { - "target": "com.amazonaws.honeycode#AccessDeniedException" - }, - { - "target": "com.amazonaws.honeycode#AutomationExecutionException" - }, - { - "target": "com.amazonaws.honeycode#AutomationExecutionTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#InternalServerException" - }, - { - "target": "com.amazonaws.honeycode#RequestTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.honeycode#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.honeycode#ServiceUnavailableException" - }, - { - "target": "com.amazonaws.honeycode#ThrottlingException" - }, - { - "target": "com.amazonaws.honeycode#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

\n The InvokeScreenAutomation API allows invoking an action defined in a screen in a Honeycode app.\n The API allows setting local variables, which can then be used in the automation being invoked.\n This allows automating the Honeycode app interactions to write, update or delete data in the workbook.\n

", - "smithy.api#http": { - "method": "POST", - "uri": "/workbooks/{workbookId}/apps/{appId}/screens/{screenId}/automations/{screenAutomationId}", - "code": 200 - } - } - }, - "com.amazonaws.honeycode#InvokeScreenAutomationRequest": { - "type": "structure", - "members": { - "workbookId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the workbook that contains the screen automation.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "appId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the app that contains the screen automation.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "screenId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the screen that contains the screen automation.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "screenAutomationId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the automation action to be performed.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "variables": { - "target": "com.amazonaws.honeycode#VariableValueMap", - "traits": { - "smithy.api#documentation": "

\n Variables are specified as a map where the key is the name of the variable as defined on the screen. The value is an\n object which currently has only one property, rawValue, which holds the value of the variable to be passed\n to the screen. Any variables defined in a screen are required to be passed in the call.\n

" - } - }, - "rowId": { - "target": "com.amazonaws.honeycode#RowId", - "traits": { - "smithy.api#documentation": "

\n The row ID for the automation if the automation is defined inside a block with source or list.\n

" - } - }, - "clientRequestToken": { - "target": "com.amazonaws.honeycode#ClientRequestToken", - "traits": { - "smithy.api#documentation": "

\n The request token for performing the automation action.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will return the\n response of the previous call rather than performing the action again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.honeycode#InvokeScreenAutomationResult": { - "type": "structure", - "members": { - "workbookCursor": { - "target": "com.amazonaws.honeycode#WorkbookCursor", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The updated workbook cursor after performing the automation action.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.honeycode#JobId": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 100 - }, - "smithy.api#pattern": "^[^\\n\\r\\x00\\x08\\x0B\\x0C\\x0E\\x1F]*$" - } - }, - "com.amazonaws.honeycode#ListTableColumns": { - "type": "operation", - "input": { - "target": "com.amazonaws.honeycode#ListTableColumnsRequest" - }, - "output": { - "target": "com.amazonaws.honeycode#ListTableColumnsResult" - }, - "errors": [ - { - "target": "com.amazonaws.honeycode#AccessDeniedException" - }, - { - "target": "com.amazonaws.honeycode#InternalServerException" - }, - { - "target": "com.amazonaws.honeycode#RequestTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.honeycode#ServiceUnavailableException" - }, - { - "target": "com.amazonaws.honeycode#ThrottlingException" - }, - { - "target": "com.amazonaws.honeycode#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

\n The ListTableColumns API allows you to retrieve a list of all the columns in a table in a workbook.\n

", - "smithy.api#http": { - "method": "GET", - "uri": "/workbooks/{workbookId}/tables/{tableId}/columns", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "items": "tableColumns" - } - } - }, - "com.amazonaws.honeycode#ListTableColumnsRequest": { - "type": "structure", - "members": { - "workbookId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the workbook that contains the table whose columns are being retrieved.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tableId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the table whose columns are being retrieved.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "nextToken": { - "target": "com.amazonaws.honeycode#PaginationToken", - "traits": { - "smithy.api#documentation": "

\n This parameter is optional. If a nextToken is not specified, the API returns the first page of data.\n

\n

\n Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API\n will throw ValidationException.\n

", - "smithy.api#httpQuery": "nextToken" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.honeycode#ListTableColumnsResult": { - "type": "structure", - "members": { - "tableColumns": { - "target": "com.amazonaws.honeycode#TableColumns", - "traits": { - "smithy.api#documentation": "

\n The list of columns in the table.\n

", - "smithy.api#required": {} - } - }, - "nextToken": { - "target": "com.amazonaws.honeycode#PaginationToken", - "traits": { - "smithy.api#documentation": "

\n Provides the pagination token to load the next page if there are more results matching the request. If a\n pagination token is not present in the response, it means that all data matching the request has been\n loaded.\n

" - } - }, - "workbookCursor": { - "target": "com.amazonaws.honeycode#WorkbookCursor", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

\n Indicates the cursor of the workbook at which the data returned by this request is read. Workbook cursor\n keeps increasing with every update and the increments are not sequential.\n

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.honeycode#ListTableRows": { - "type": "operation", - "input": { - "target": "com.amazonaws.honeycode#ListTableRowsRequest" - }, - "output": { - "target": "com.amazonaws.honeycode#ListTableRowsResult" - }, - "errors": [ - { - "target": "com.amazonaws.honeycode#AccessDeniedException" - }, - { - "target": "com.amazonaws.honeycode#InternalServerException" - }, - { - "target": "com.amazonaws.honeycode#RequestTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.honeycode#ServiceUnavailableException" - }, - { - "target": "com.amazonaws.honeycode#ThrottlingException" - }, - { - "target": "com.amazonaws.honeycode#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

\n The ListTableRows API allows you to retrieve a list of all the rows in a table in a workbook.\n

", - "smithy.api#http": { - "method": "POST", - "uri": "/workbooks/{workbookId}/tables/{tableId}/rows/list", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "items": "rows", - "pageSize": "maxResults" - } - } - }, - "com.amazonaws.honeycode#ListTableRowsRequest": { - "type": "structure", - "members": { - "workbookId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the workbook that contains the table whose rows are being retrieved.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tableId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the table whose rows are being retrieved.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "rowIds": { - "target": "com.amazonaws.honeycode#RowIdList", - "traits": { - "smithy.api#documentation": "

\n This parameter is optional. If one or more row ids are specified in this list, then only the specified\n row ids are returned in the result. If no row ids are specified here, then all the rows in the table are\n returned.\n

" - } - }, - "maxResults": { - "target": "com.amazonaws.honeycode#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum number of rows to return in each page of the results.

" - } - }, - "nextToken": { - "target": "com.amazonaws.honeycode#PaginationToken", - "traits": { - "smithy.api#documentation": "

\n This parameter is optional. If a nextToken is not specified, the API returns the first page of data.\n

\n

\n Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API\n will throw ValidationException.\n

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.honeycode#ListTableRowsResult": { - "type": "structure", - "members": { - "columnIds": { - "target": "com.amazonaws.honeycode#ResourceIds", - "traits": { - "smithy.api#documentation": "

\n The list of columns in the table whose row data is returned in the result.\n

", - "smithy.api#required": {} - } - }, - "rows": { - "target": "com.amazonaws.honeycode#TableRows", - "traits": { - "smithy.api#documentation": "

\n The list of rows in the table. Note that this result is paginated, so this list contains a maximum of 100\n rows.\n

", - "smithy.api#required": {} - } - }, - "rowIdsNotFound": { - "target": "com.amazonaws.honeycode#RowIdList", - "traits": { - "smithy.api#documentation": "

\n The list of row ids included in the request that were not found in the table.\n

" - } - }, - "nextToken": { - "target": "com.amazonaws.honeycode#PaginationToken", - "traits": { - "smithy.api#documentation": "

\n Provides the pagination token to load the next page if there are more results matching the request. If a\n pagination token is not present in the response, it means that all data matching the request has been\n loaded.\n

" - } - }, - "workbookCursor": { - "target": "com.amazonaws.honeycode#WorkbookCursor", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

\n Indicates the cursor of the workbook at which the data returned by this request is read. Workbook cursor\n keeps increasing with every update and the increments are not sequential.\n

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.honeycode#ListTables": { - "type": "operation", - "input": { - "target": "com.amazonaws.honeycode#ListTablesRequest" - }, - "output": { - "target": "com.amazonaws.honeycode#ListTablesResult" - }, - "errors": [ - { - "target": "com.amazonaws.honeycode#AccessDeniedException" - }, - { - "target": "com.amazonaws.honeycode#InternalServerException" - }, - { - "target": "com.amazonaws.honeycode#RequestTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.honeycode#ServiceUnavailableException" - }, - { - "target": "com.amazonaws.honeycode#ThrottlingException" - }, - { - "target": "com.amazonaws.honeycode#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

\n The ListTables API allows you to retrieve a list of all the tables in a workbook.\n

", - "smithy.api#http": { - "method": "GET", - "uri": "/workbooks/{workbookId}/tables", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "items": "tables", - "pageSize": "maxResults" - } - } - }, - "com.amazonaws.honeycode#ListTablesRequest": { - "type": "structure", - "members": { - "workbookId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the workbook whose tables are being retrieved.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "maxResults": { - "target": "com.amazonaws.honeycode#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum number of tables to return in each page of the results.

", - "smithy.api#httpQuery": "maxResults" - } - }, - "nextToken": { - "target": "com.amazonaws.honeycode#PaginationToken", - "traits": { - "smithy.api#documentation": "

\n This parameter is optional. If a nextToken is not specified, the API returns the first page of data.\n

\n

\n Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API\n will throw ValidationException.\n

", - "smithy.api#httpQuery": "nextToken" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.honeycode#ListTablesResult": { - "type": "structure", - "members": { - "tables": { - "target": "com.amazonaws.honeycode#Tables", - "traits": { - "smithy.api#documentation": "

\n The list of tables in the workbook.\n

", - "smithy.api#required": {} - } - }, - "nextToken": { - "target": "com.amazonaws.honeycode#PaginationToken", - "traits": { - "smithy.api#documentation": "

\n Provides the pagination token to load the next page if there are more results matching the request. If a\n pagination token is not present in the response, it means that all data matching the request has been\n loaded.\n

" - } - }, - "workbookCursor": { - "target": "com.amazonaws.honeycode#WorkbookCursor", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

\n Indicates the cursor of the workbook at which the data returned by this request is read. Workbook cursor\n keeps increasing with every update and the increments are not sequential.\n

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.honeycode#ListTagsForResource": { - "type": "operation", - "input": { - "target": "com.amazonaws.honeycode#ListTagsForResourceRequest" - }, - "output": { - "target": "com.amazonaws.honeycode#ListTagsForResourceResult" - }, - "errors": [ - { - "target": "com.amazonaws.honeycode#AccessDeniedException" - }, - { - "target": "com.amazonaws.honeycode#InternalServerException" - }, - { - "target": "com.amazonaws.honeycode#RequestTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.honeycode#ServiceUnavailableException" - }, - { - "target": "com.amazonaws.honeycode#ThrottlingException" - }, - { - "target": "com.amazonaws.honeycode#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

\n The ListTagsForResource API allows you to return a resource's tags.\n

", - "smithy.api#http": { - "method": "GET", - "uri": "/tags/{resourceArn}", - "code": 200 - } - } - }, - "com.amazonaws.honeycode#ListTagsForResourceRequest": { - "type": "structure", - "members": { - "resourceArn": { - "target": "com.amazonaws.honeycode#ResourceArn", - "traits": { - "smithy.api#documentation": "

The resource's Amazon Resource Name (ARN).

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.honeycode#ListTagsForResourceResult": { - "type": "structure", - "members": { - "tags": { - "target": "com.amazonaws.honeycode#TagsMap", - "traits": { - "smithy.api#documentation": "

The resource's tags.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.honeycode#MaxResults": { - "type": "integer", - "traits": { - "smithy.api#range": { - "min": 1, - "max": 100 - } - } - }, - "com.amazonaws.honeycode#Name": { - "type": "string", - "traits": { - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.honeycode#PaginationToken": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 1024 - }, - "smithy.api#pattern": "^(?!\\s*$).+$" - } - }, - "com.amazonaws.honeycode#QueryTableRows": { - "type": "operation", - "input": { - "target": "com.amazonaws.honeycode#QueryTableRowsRequest" - }, - "output": { - "target": "com.amazonaws.honeycode#QueryTableRowsResult" - }, - "errors": [ - { - "target": "com.amazonaws.honeycode#AccessDeniedException" - }, - { - "target": "com.amazonaws.honeycode#InternalServerException" - }, - { - "target": "com.amazonaws.honeycode#RequestTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.honeycode#ServiceUnavailableException" - }, - { - "target": "com.amazonaws.honeycode#ThrottlingException" - }, - { - "target": "com.amazonaws.honeycode#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

\n The QueryTableRows API allows you to use a filter formula to query for specific rows in a table.\n

", - "smithy.api#http": { - "method": "POST", - "uri": "/workbooks/{workbookId}/tables/{tableId}/rows/query", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "items": "rows", - "pageSize": "maxResults" - } - } - }, - "com.amazonaws.honeycode#QueryTableRowsRequest": { - "type": "structure", - "members": { - "workbookId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the workbook whose table rows are being queried.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tableId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the table whose rows are being queried.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "filterFormula": { - "target": "com.amazonaws.honeycode#Filter", - "traits": { - "smithy.api#documentation": "

An object that represents a filter formula along with the id of the context row under which the filter\n function needs to evaluate.

", - "smithy.api#required": {} - } - }, - "maxResults": { - "target": "com.amazonaws.honeycode#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum number of rows to return in each page of the results.

" - } - }, - "nextToken": { - "target": "com.amazonaws.honeycode#PaginationToken", - "traits": { - "smithy.api#documentation": "

\n This parameter is optional. If a nextToken is not specified, the API returns the first page of data.\n

\n

\n Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API\n will throw ValidationException.\n

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.honeycode#QueryTableRowsResult": { - "type": "structure", - "members": { - "columnIds": { - "target": "com.amazonaws.honeycode#ResourceIds", - "traits": { - "smithy.api#documentation": "

\n The list of columns in the table whose row data is returned in the result.\n

", - "smithy.api#required": {} - } - }, - "rows": { - "target": "com.amazonaws.honeycode#TableRows", - "traits": { - "smithy.api#documentation": "

\n The list of rows in the table that match the query filter.\n

", - "smithy.api#required": {} - } - }, - "nextToken": { - "target": "com.amazonaws.honeycode#PaginationToken", - "traits": { - "smithy.api#documentation": "

\n Provides the pagination token to load the next page if there are more results matching the request. If a\n pagination token is not present in the response, it means that all data matching the request has been\n loaded.\n

" - } - }, - "workbookCursor": { - "target": "com.amazonaws.honeycode#WorkbookCursor", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

\n Indicates the cursor of the workbook at which the data returned by this request is read. Workbook cursor\n keeps increasing with every update and the increments are not sequential.\n

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.honeycode#RawValue": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 32767 - }, - "smithy.api#pattern": "^[\\s\\S]*$" - } - }, - "com.amazonaws.honeycode#RequestTimeoutException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.honeycode#ErrorMessage" - } - }, - "traits": { - "smithy.api#documentation": "

The request timed out.

", - "smithy.api#error": "server", - "smithy.api#httpError": 504 - } - }, - "com.amazonaws.honeycode#ResourceArn": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 256 - }, - "smithy.api#pattern": "^arn:aws:honeycode:.+:[0-9]{12}:.+:.+$" - } - }, - "com.amazonaws.honeycode#ResourceId": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 36, - "max": 36 - }, - "smithy.api#pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" - } - }, - "com.amazonaws.honeycode#ResourceIds": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#ResourceId" - }, - "traits": { - "smithy.api#length": { - "min": 1, - "max": 100 - } - } - }, - "com.amazonaws.honeycode#ResourceNotFoundException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.honeycode#ErrorMessage" - } - }, - "traits": { - "smithy.api#documentation": "

A Workbook, Table, App, Screen or Screen Automation was not found with the given ID.

", - "smithy.api#error": "client", - "smithy.api#httpError": 404 - } - }, - "com.amazonaws.honeycode#ResultHeader": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#ColumnMetadata" - } - }, - "com.amazonaws.honeycode#ResultRow": { - "type": "structure", - "members": { - "rowId": { - "target": "com.amazonaws.honeycode#RowId", - "traits": { - "smithy.api#documentation": "

The ID for a particular row.

" - } - }, - "dataItems": { - "target": "com.amazonaws.honeycode#DataItems", - "traits": { - "smithy.api#documentation": "

List of all the data cells in a row.

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

A single row in the ResultSet.

" - } - }, - "com.amazonaws.honeycode#ResultRows": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#ResultRow" - } - }, - "com.amazonaws.honeycode#ResultSet": { - "type": "structure", - "members": { - "headers": { - "target": "com.amazonaws.honeycode#ResultHeader", - "traits": { - "smithy.api#documentation": "

\n List of headers for all the data cells in the block. The header identifies the name and default format of\n the data cell. Data cells appear in the same order in all rows as defined in the header. The names and\n formats are not repeated in the rows. If a particular row does not have a value for a data cell, a blank\n value is used.\n

\n

\n For example, a task list that displays the task name, due date and assigned person might have headers\n [ { \"name\": \"Task Name\"}, {\"name\": \"Due Date\", \"format\": \"DATE\"}, {\"name\": \"Assigned\", \"format\": \"CONTACT\"} ].\n Every row in the result will have the task name as the first item, due date as the second item and assigned\n person as the third item. If a particular task does not have a due date, that row will still have a blank\n value in the second element and the assigned person will still be in the third element.\n

", - "smithy.api#required": {} - } - }, - "rows": { - "target": "com.amazonaws.honeycode#ResultRows", - "traits": { - "smithy.api#documentation": "

\n List of rows returned by the request. Each row has a row Id and a list of data cells in that row. The data\n cells will be present in the same order as they are defined in the header.\n

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

\n ResultSet contains the results of the request for a single block or list defined on the screen.\n

" - } - }, - "com.amazonaws.honeycode#ResultSetMap": { - "type": "map", - "key": { - "target": "com.amazonaws.honeycode#Name" - }, - "value": { - "target": "com.amazonaws.honeycode#ResultSet" - } - }, - "com.amazonaws.honeycode#RowDataInput": { - "type": "map", - "key": { - "target": "com.amazonaws.honeycode#ResourceId" - }, - "value": { - "target": "com.amazonaws.honeycode#CellInput" - }, - "traits": { - "smithy.api#length": { - "min": 1, - "max": 100 - } - } - }, - "com.amazonaws.honeycode#RowId": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 77, - "max": 77 - }, - "smithy.api#pattern": "^row:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" - } - }, - "com.amazonaws.honeycode#RowIdList": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#RowId" - }, - "traits": { - "smithy.api#length": { - "min": 1, - "max": 100 - } - } - }, - "com.amazonaws.honeycode#SecureURL": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 8000 - }, - "smithy.api#pattern": "^https:\\/\\/[^\\n\\r\\x00\\x08\\x0B\\x0C\\x0E\\x1F]*$", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.honeycode#ServiceQuotaExceededException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.honeycode#ErrorMessage", - "traits": { - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

\n The request caused service quota to be breached.\n

", - "smithy.api#error": "client", - "smithy.api#httpError": 402 - } - }, - "com.amazonaws.honeycode#ServiceUnavailableException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.honeycode#ErrorMessage" - } - }, - "traits": { - "smithy.api#documentation": "

Remote service is unreachable.

", - "smithy.api#error": "server", - "smithy.api#httpError": 503 - } - }, - "com.amazonaws.honeycode#SheetsPublicApiService": { - "type": "service", - "version": "2020-03-01", - "operations": [ - { - "target": "com.amazonaws.honeycode#BatchCreateTableRows" - }, - { - "target": "com.amazonaws.honeycode#BatchDeleteTableRows" - }, - { - "target": "com.amazonaws.honeycode#BatchUpdateTableRows" - }, - { - "target": "com.amazonaws.honeycode#BatchUpsertTableRows" - }, - { - "target": "com.amazonaws.honeycode#DescribeTableDataImportJob" - }, - { - "target": "com.amazonaws.honeycode#GetScreenData" - }, - { - "target": "com.amazonaws.honeycode#InvokeScreenAutomation" - }, - { - "target": "com.amazonaws.honeycode#ListTableColumns" - }, - { - "target": "com.amazonaws.honeycode#ListTableRows" - }, - { - "target": "com.amazonaws.honeycode#ListTables" - }, - { - "target": "com.amazonaws.honeycode#ListTagsForResource" - }, - { - "target": "com.amazonaws.honeycode#QueryTableRows" - }, - { - "target": "com.amazonaws.honeycode#StartTableDataImportJob" - }, - { - "target": "com.amazonaws.honeycode#TagResource" - }, - { - "target": "com.amazonaws.honeycode#UntagResource" - } - ], - "traits": { - "aws.api#service": { - "sdkId": "Honeycode", - "arnNamespace": "honeycode", - "cloudFormationName": "Honeycode", - "cloudTrailEventSource": "honeycode.amazonaws.com", - "endpointPrefix": "honeycode" - }, - "aws.auth#sigv4": { - "name": "honeycode" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

\n Amazon Honeycode is a fully managed service that allows you to quickly build mobile and web apps for teams—without\n programming. Build Honeycode apps for managing almost anything, like projects, customers, operations, approvals,\n resources, and even your team.\n

", - "smithy.api#title": "Amazon Honeycode", - "smithy.rules#endpointRuleSet": { - "version": "1.0", - "parameters": { - "Region": { - "builtIn": "AWS::Region", - "required": false, - "documentation": "The AWS region used to dispatch the request.", - "type": "String" - }, - "UseDualStack": { - "builtIn": "AWS::UseDualStack", - "required": true, - "default": false, - "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", - "type": "Boolean" - }, - "UseFIPS": { - "builtIn": "AWS::UseFIPS", - "required": true, - "default": false, - "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", - "type": "Boolean" - }, - "Endpoint": { - "builtIn": "SDK::Endpoint", - "required": false, - "documentation": "Override the endpoint used to send this request", - "type": "String" - } - }, - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "error": "Invalid Configuration: FIPS and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" - }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Region" - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://honeycode-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - }, - true - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://honeycode-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://honeycode.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "endpoint": { - "url": "https://honeycode.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" - } - ] - }, - "smithy.rules#endpointTests": { - "testCases": [ - { - "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://honeycode.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://honeycode-fips.us-east-1.api.aws" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://honeycode-fips.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://honeycode.us-east-1.api.aws" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://honeycode.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://honeycode-fips.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://honeycode-fips.cn-north-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://honeycode.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://honeycode.cn-north-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://honeycode-fips.us-gov-east-1.api.aws" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://honeycode-fips.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://honeycode.us-gov-east-1.api.aws" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://honeycode.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://honeycode-fips.us-iso-east-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://honeycode.us-iso-east-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://honeycode-fips.us-isob-east-1.sc2s.sgov.gov" - } - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://honeycode.us-isob-east-1.sc2s.sgov.gov" - } - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", - "expect": { - "endpoint": { - "url": "https://example.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", - "expect": { - "endpoint": { - "url": "https://example.com" - } - }, - "params": { - "UseFIPS": false, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with fips enabled and dualstack disabled", - "expect": { - "error": "Invalid Configuration: FIPS and custom endpoint are not supported" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with fips disabled and dualstack enabled", - "expect": { - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "Missing region", - "expect": { - "error": "Invalid Configuration: Missing Region" - } - } - ], - "version": "1.0" - } - } - }, - "com.amazonaws.honeycode#SourceDataColumnIndex": { - "type": "integer", - "traits": { - "smithy.api#range": { - "min": 1 - } - } - }, - "com.amazonaws.honeycode#SourceDataColumnProperties": { - "type": "structure", - "members": { - "columnIndex": { - "target": "com.amazonaws.honeycode#SourceDataColumnIndex", - "traits": { - "smithy.api#documentation": "

The index of the column in the input file.

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

An object that contains the properties for importing data to a specific column in a table.

" - } - }, - "com.amazonaws.honeycode#StartTableDataImportJob": { - "type": "operation", - "input": { - "target": "com.amazonaws.honeycode#StartTableDataImportJobRequest" - }, - "output": { - "target": "com.amazonaws.honeycode#StartTableDataImportJobResult" - }, - "errors": [ - { - "target": "com.amazonaws.honeycode#AccessDeniedException" - }, - { - "target": "com.amazonaws.honeycode#InternalServerException" - }, - { - "target": "com.amazonaws.honeycode#RequestTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.honeycode#ServiceQuotaExceededException" - }, - { - "target": "com.amazonaws.honeycode#ServiceUnavailableException" - }, - { - "target": "com.amazonaws.honeycode#ThrottlingException" - }, - { - "target": "com.amazonaws.honeycode#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

\n The StartTableDataImportJob API allows you to start an import job on a table. This API will only return\n the id of the job that was started. To find out the status of the import request, you need to call the\n DescribeTableDataImportJob API.\n

", - "smithy.api#http": { - "method": "POST", - "uri": "/workbooks/{workbookId}/tables/{destinationTableId}/import", - "code": 200 - } - } - }, - "com.amazonaws.honeycode#StartTableDataImportJobRequest": { - "type": "structure", - "members": { - "workbookId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the workbook where the rows are being imported.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "dataSource": { - "target": "com.amazonaws.honeycode#ImportDataSource", - "traits": { - "smithy.api#documentation": "

\n The source of the data that is being imported. The size of source must be no larger than 100 MB.\n Source must have no more than 100,000 cells and no more than 1,000 rows.\n

", - "smithy.api#required": {} - } - }, - "dataFormat": { - "target": "com.amazonaws.honeycode#ImportSourceDataFormat", - "traits": { - "smithy.api#documentation": "

\n The format of the data that is being imported. Currently the only option supported is \"DELIMITED_TEXT\".\n

", - "smithy.api#required": {} - } - }, - "destinationTableId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The ID of the table where the rows are being imported.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "importOptions": { - "target": "com.amazonaws.honeycode#ImportOptions", - "traits": { - "smithy.api#documentation": "

\n The options for customizing this import request.\n

", - "smithy.api#required": {} - } - }, - "clientRequestToken": { - "target": "com.amazonaws.honeycode#ClientRequestToken", - "traits": { - "smithy.api#documentation": "

\n The request token for performing the update action.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will not perform\n the action again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.honeycode#StartTableDataImportJobResult": { - "type": "structure", - "members": { - "jobId": { - "target": "com.amazonaws.honeycode#JobId", - "traits": { - "smithy.api#documentation": "

\n The id that is assigned to this import job. Future requests to find out the status of this import job\n need to send this id in the appropriate parameter in the request.\n

", - "smithy.api#required": {} - } - }, - "jobStatus": { - "target": "com.amazonaws.honeycode#TableDataImportJobStatus", - "traits": { - "smithy.api#documentation": "

\n The status of the import job immediately after submitting the request.\n

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.honeycode#Table": { - "type": "structure", - "members": { - "tableId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The id of the table.

" - } - }, - "tableName": { - "target": "com.amazonaws.honeycode#TableName", - "traits": { - "smithy.api#documentation": "

The name of the table.

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

An object representing the properties of a table in a workbook.

" - } - }, - "com.amazonaws.honeycode#TableColumn": { - "type": "structure", - "members": { - "tableColumnId": { - "target": "com.amazonaws.honeycode#ResourceId", - "traits": { - "smithy.api#documentation": "

The id of the column in the table.

" - } - }, - "tableColumnName": { - "target": "com.amazonaws.honeycode#TableColumnName", - "traits": { - "smithy.api#documentation": "

The name of the column in the table.

" - } - }, - "format": { - "target": "com.amazonaws.honeycode#Format", - "traits": { - "smithy.api#documentation": "

\n The column level format that is applied in the table. An empty value in this field means that the\n column format is the default value 'AUTO'.\n

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

An object that contains attributes about a single column in a table

" - } - }, - "com.amazonaws.honeycode#TableColumnName": { - "type": "string" - }, - "com.amazonaws.honeycode#TableColumns": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#TableColumn" - } - }, - "com.amazonaws.honeycode#TableDataImportJobMessage": { - "type": "string" - }, - "com.amazonaws.honeycode#TableDataImportJobMetadata": { - "type": "structure", - "members": { - "submitter": { - "target": "com.amazonaws.honeycode#ImportJobSubmitter", - "traits": { - "smithy.api#documentation": "

Details about the submitter of the import request.

", - "smithy.api#required": {} - } - }, - "submitTime": { - "target": "com.amazonaws.honeycode#TimestampInMillis", - "traits": { - "smithy.api#documentation": "

The timestamp when the job was submitted for import.

", - "smithy.api#required": {} - } - }, - "importOptions": { - "target": "com.amazonaws.honeycode#ImportOptions", - "traits": { - "smithy.api#documentation": "

The options that was specified at the time of submitting the import request.

", - "smithy.api#required": {} - } - }, - "dataSource": { - "target": "com.amazonaws.honeycode#ImportDataSource", - "traits": { - "smithy.api#documentation": "

The source of the data that was submitted for import.

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

The metadata associated with the table data import job that was submitted.

" - } - }, - "com.amazonaws.honeycode#TableDataImportJobStatus": { - "type": "enum", - "members": { - "Submitted": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SUBMITTED" - } - }, - "InProgress": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "IN_PROGRESS" - } - }, - "Completed": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "COMPLETED" - } - }, - "Failed": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "FAILED" - } - } - } - }, - "com.amazonaws.honeycode#TableName": { - "type": "string" - }, - "com.amazonaws.honeycode#TableRow": { - "type": "structure", - "members": { - "rowId": { - "target": "com.amazonaws.honeycode#RowId", - "traits": { - "smithy.api#documentation": "

The id of the row in the table.

", - "smithy.api#required": {} - } - }, - "cells": { - "target": "com.amazonaws.honeycode#Cells", - "traits": { - "smithy.api#documentation": "

A list of cells in the table row. The cells appear in the same order as the columns of the table.\n

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

An object that contains attributes about a single row in a table

" - } - }, - "com.amazonaws.honeycode#TableRows": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#TableRow" - } - }, - "com.amazonaws.honeycode#Tables": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#Table" - } - }, - "com.amazonaws.honeycode#TagKey": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 100 - }, - "smithy.api#pattern": "^[^\\n\\r\\x00\\x08\\x0B\\x0C\\x0E\\x1F]*$" - } - }, - "com.amazonaws.honeycode#TagKeysList": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#TagKey" - }, - "traits": { - "smithy.api#documentation": "

A list of tag keys

", - "smithy.api#length": { - "min": 0, - "max": 100 - } - } - }, - "com.amazonaws.honeycode#TagResource": { - "type": "operation", - "input": { - "target": "com.amazonaws.honeycode#TagResourceRequest" - }, - "output": { - "target": "com.amazonaws.honeycode#TagResourceResult" - }, - "errors": [ - { - "target": "com.amazonaws.honeycode#AccessDeniedException" - }, - { - "target": "com.amazonaws.honeycode#InternalServerException" - }, - { - "target": "com.amazonaws.honeycode#RequestTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.honeycode#ServiceUnavailableException" - }, - { - "target": "com.amazonaws.honeycode#ThrottlingException" - }, - { - "target": "com.amazonaws.honeycode#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

\n The TagResource API allows you to add tags to an ARN-able resource. Resource includes workbook, table,\n screen and screen-automation.\n

", - "smithy.api#http": { - "method": "POST", - "uri": "/tags/{resourceArn}", - "code": 200 - } - } - }, - "com.amazonaws.honeycode#TagResourceRequest": { - "type": "structure", - "members": { - "resourceArn": { - "target": "com.amazonaws.honeycode#ResourceArn", - "traits": { - "smithy.api#documentation": "

The resource's Amazon Resource Name (ARN).

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tags": { - "target": "com.amazonaws.honeycode#TagsMap", - "traits": { - "smithy.api#documentation": "

A list of tags to apply to the resource.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.honeycode#TagResourceResult": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.honeycode#TagValue": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 100 - }, - "smithy.api#pattern": "^[^\\n\\r\\x00\\x08\\x0B\\x0C\\x0E\\x1F]*$" - } - }, - "com.amazonaws.honeycode#TagsMap": { - "type": "map", - "key": { - "target": "com.amazonaws.honeycode#TagKey" - }, - "value": { - "target": "com.amazonaws.honeycode#TagValue" - }, - "traits": { - "smithy.api#documentation": "

A string to string map representing tags

", - "smithy.api#length": { - "min": 0, - "max": 100 - } - } - }, - "com.amazonaws.honeycode#ThrottlingException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.honeycode#ErrorMessage" - } - }, - "traits": { - "smithy.api#documentation": "

Tps(transactions per second) rate reached.

", - "smithy.api#error": "client", - "smithy.api#httpError": 429 - } - }, - "com.amazonaws.honeycode#TimestampInMillis": { - "type": "timestamp" - }, - "com.amazonaws.honeycode#UntagResource": { - "type": "operation", - "input": { - "target": "com.amazonaws.honeycode#UntagResourceRequest" - }, - "output": { - "target": "com.amazonaws.honeycode#UntagResourceResult" - }, - "errors": [ - { - "target": "com.amazonaws.honeycode#AccessDeniedException" - }, - { - "target": "com.amazonaws.honeycode#InternalServerException" - }, - { - "target": "com.amazonaws.honeycode#RequestTimeoutException" - }, - { - "target": "com.amazonaws.honeycode#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.honeycode#ServiceUnavailableException" - }, - { - "target": "com.amazonaws.honeycode#ThrottlingException" - }, - { - "target": "com.amazonaws.honeycode#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

\n The UntagResource API allows you to removes tags from an ARN-able resource. Resource includes workbook, table,\n screen and screen-automation.\n

", - "smithy.api#http": { - "method": "DELETE", - "uri": "/tags/{resourceArn}", - "code": 200 - } - } - }, - "com.amazonaws.honeycode#UntagResourceRequest": { - "type": "structure", - "members": { - "resourceArn": { - "target": "com.amazonaws.honeycode#ResourceArn", - "traits": { - "smithy.api#documentation": "

The resource's Amazon Resource Name (ARN).

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tagKeys": { - "target": "com.amazonaws.honeycode#TagKeysList", - "traits": { - "smithy.api#documentation": "

A list of tag keys to remove from the resource.

", - "smithy.api#httpQuery": "tagKeys", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.honeycode#UntagResourceResult": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.honeycode#UpdateRowData": { - "type": "structure", - "members": { - "rowId": { - "target": "com.amazonaws.honeycode#RowId", - "traits": { - "smithy.api#documentation": "

\n The id of the row that needs to be updated.\n

", - "smithy.api#required": {} - } - }, - "cellsToUpdate": { - "target": "com.amazonaws.honeycode#RowDataInput", - "traits": { - "smithy.api#documentation": "

\n A map representing the cells to update in the given row. The key is the column id of the\n cell and the value is the CellInput object that represents the data to set in that cell.\n

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

\n Data needed to create a single row in a table as part of the BatchCreateTableRows request.\n

" - } - }, - "com.amazonaws.honeycode#UpdateRowDataList": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#UpdateRowData" - }, - "traits": { - "smithy.api#length": { - "min": 1, - "max": 100 - } - } - }, - "com.amazonaws.honeycode#UpsertAction": { - "type": "enum", - "members": { - "Updated": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "UPDATED" - } - }, - "Appended": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "APPENDED" - } - } - } - }, - "com.amazonaws.honeycode#UpsertRowData": { - "type": "structure", - "members": { - "batchItemId": { - "target": "com.amazonaws.honeycode#BatchItemId", - "traits": { - "smithy.api#documentation": "

\n An external identifier that represents a single item in the request that is being upserted as part of the\n BatchUpsertTableRows request. This can be any string that you can use to identify the item in the request.\n The BatchUpsertTableRows API puts the batch item id in the results to allow you to link data in the\n request to data in the results.\n

", - "smithy.api#required": {} - } - }, - "filter": { - "target": "com.amazonaws.honeycode#Filter", - "traits": { - "smithy.api#documentation": "

\n The filter formula to use to find existing matching rows to update. The formula needs to return zero or more\n rows. If the formula returns 0 rows, then a new row will be appended in the target table. If the formula\n returns one or more rows, then the returned rows will be updated.\n

\n

\n Note that the filter formula needs to return rows from the target table for the upsert operation to succeed.\n If the filter formula has a syntax error or it doesn't evaluate to zero or more rows in the target table\n for any one item in the input list, then the entire BatchUpsertTableRows request fails and no updates are\n made to the table.\n

", - "smithy.api#required": {} - } - }, - "cellsToUpdate": { - "target": "com.amazonaws.honeycode#RowDataInput", - "traits": { - "smithy.api#documentation": "

\n A map representing the cells to update for the matching rows or an appended row. The key is the column id\n of the cell and the value is the CellInput object that represents the data to set in that cell.\n

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

\n Data needed to upsert rows in a table as part of a single item in the BatchUpsertTableRows request.\n

" - } - }, - "com.amazonaws.honeycode#UpsertRowDataList": { - "type": "list", - "member": { - "target": "com.amazonaws.honeycode#UpsertRowData" - } - }, - "com.amazonaws.honeycode#UpsertRowsResult": { - "type": "structure", - "members": { - "rowIds": { - "target": "com.amazonaws.honeycode#RowIdList", - "traits": { - "smithy.api#documentation": "

\n The list of row ids that were changed as part of an upsert row operation. If the upsert resulted in an\n update, this list could potentially contain multiple rows that matched the filter and hence got updated.\n If the upsert resulted in an append, this list would only have the single row that was appended.\n

", - "smithy.api#required": {} - } - }, - "upsertAction": { - "target": "com.amazonaws.honeycode#UpsertAction", - "traits": { - "smithy.api#documentation": "

\n The result of the upsert action.\n

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

\n An object that represents the result of a single upsert row request.\n

" - } - }, - "com.amazonaws.honeycode#UpsertRowsResultMap": { - "type": "map", - "key": { - "target": "com.amazonaws.honeycode#BatchItemId" - }, - "value": { - "target": "com.amazonaws.honeycode#UpsertRowsResult" - } - }, - "com.amazonaws.honeycode#ValidationException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.honeycode#ErrorMessage", - "traits": { - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

\n Request is invalid. The message in the response contains details on why the request is invalid.\n

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.honeycode#VariableName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 255 - }, - "smithy.api#pattern": "^(?!\\s*$).+$", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.honeycode#VariableValue": { - "type": "structure", - "members": { - "rawValue": { - "target": "com.amazonaws.honeycode#RawValue", - "traits": { - "smithy.api#documentation": "

Raw value of the variable.

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

The input variables to the app to be used by the InvokeScreenAutomation action request.

", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.honeycode#VariableValueMap": { - "type": "map", - "key": { - "target": "com.amazonaws.honeycode#VariableName" - }, - "value": { - "target": "com.amazonaws.honeycode#VariableValue" - }, - "traits": { - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.honeycode#WorkbookCursor": { - "type": "long", - "traits": { - "smithy.api#default": 0 - } - } - } -} diff --git a/service/honeycode/CHANGELOG.md b/service/honeycode/CHANGELOG.md deleted file mode 100644 index f1321c3dae1..00000000000 --- a/service/honeycode/CHANGELOG.md +++ /dev/null @@ -1,379 +0,0 @@ -# v1.21.5 (2024-05-08) - -* **Bug Fix**: GoDoc improvement - -# v1.21.4 (2024-03-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.3 (2024-03-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.2 (2024-03-07) - -* **Bug Fix**: Remove dependency on go-cmp. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.1 (2024-02-23) - -* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.0 (2024-02-22) - -* **Feature**: Add middleware stack snapshot tests. - -# v1.20.2 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.1 (2024-02-20) - -* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure. - -# v1.20.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.6 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.5 (2023-12-08) - -* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. - -# v1.19.4 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.3 (2023-12-06) - -* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. - -# v1.19.2 (2023-12-01) - -* **Bug Fix**: Correct wrapping of errors in authentication workflow. -* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.1 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.0 (2023-11-29) - -* **Feature**: Expose Options() accessor on service clients. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.5 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.4 (2023-11-28) - -* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. - -# v1.18.3 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.2 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.1 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.0 (2023-11-01) - -* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.0 (2023-10-24) - -* **Feature**: **BREAKFIX**: Correct nullability and default value representation of various input fields across a large number of services. Calling code that references one or more of the affected fields will need to update usage accordingly. See [2162](https://github.com/aws/aws-sdk-go-v2/issues/2162). - -# v1.15.2 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.1 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.0 (2023-09-18) - -* **Announcement**: [BREAKFIX] Change in MaxResults datatype from value to pointer type in cognito-sync service. -* **Feature**: Adds several endpoint ruleset changes across all models: smaller rulesets, removed non-unique regional endpoints, fixes FIPS and DualStack endpoints, and make region not required in SDK::Endpoint. Additional breakfix to cognito-sync field. - -# v1.14.5 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.4 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.3 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.2 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.1 (2023-08-01) - -* No change notes available for this release. - -# v1.14.0 (2023-07-31) - -* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.14 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.13 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.12 (2023-06-15) - -* No change notes available for this release. - -# v1.13.11 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.10 (2023-05-04) - -* No change notes available for this release. - -# v1.13.9 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.8 (2023-04-10) - -* No change notes available for this release. - -# v1.13.7 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.6 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.5 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.4 (2023-02-22) - -* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. - -# v1.13.3 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.2 (2023-02-15) - -* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910. -* **Bug Fix**: Correct error type parsing for restJson services. - -# v1.13.1 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.0 (2023-01-05) - -* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). - -# v1.12.21 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.20 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.19 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.18 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.17 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.16 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.15 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.14 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.13 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.12 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.11 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.10 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.9 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.8 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.7 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.6 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.5 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.4 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.3 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.2 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.1 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.0 (2022-02-24) - -* **Feature**: API client updated -* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.0 (2022-01-28) - -* **Feature**: Updated to latest API model. - -# v1.9.0 (2022-01-14) - -* **Feature**: Updated API models -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.0 (2022-01-07) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.0 (2021-12-21) - -* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens. - -# v1.6.2 (2021-12-02) - -* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514)) -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.0 (2021-11-06) - -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.0 (2021-10-21) - -* **Feature**: Updated to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.2 (2021-10-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.1 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.0 (2021-08-27) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.3 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.2 (2021-08-04) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.1 (2021-07-15) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.0 (2021-06-25) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.1 (2021-05-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/service/honeycode/LICENSE.txt b/service/honeycode/LICENSE.txt deleted file mode 100644 index d6456956733..00000000000 --- a/service/honeycode/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/service/honeycode/api_client.go b/service/honeycode/api_client.go deleted file mode 100644 index 4cfb1557ec5..00000000000 --- a/service/honeycode/api_client.go +++ /dev/null @@ -1,537 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/aws/defaults" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/retry" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" - internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - 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" - "net/http" - "time" -) - -const ServiceID = "Honeycode" -const ServiceAPIVersion = "2020-03-01" - -// Client provides the API client to make operations call for Amazon Honeycode. -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) - - setResolvedDefaultsMode(&options) - - resolveRetryer(&options) - - resolveHTTPClient(&options) - - resolveHTTPSignerV4(&options) - - resolveEndpointResolverV2(&options) - - resolveAuthSchemeResolver(&options) - - for _, fn := range optFns { - fn(&options) - } - - finalizeRetryMaxAttempts(&options) - - ignoreAnonymousAuth(&options) - - wrapWithAnonymousAuth(&options) - - resolveAuthSchemes(&options) - - client := &Client{ - options: options, - } - - return client -} - -// Options returns a copy of the client configuration. -// -// Callers SHOULD NOT perform mutations on any inner structures within client -// config. Config overrides should instead be made on a per-operation basis through -// functional options. -func (c *Client) Options() Options { - return c.options.Copy() -} - -func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { - ctx = middleware.ClearStackValues(ctx) - stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) - options := c.options.Copy() - - for _, fn := range optFns { - fn(&options) - } - - finalizeOperationRetryMaxAttempts(&options, *c) - - finalizeClientEndpointResolverOptions(&options) - - for _, fn := range stackFns { - if err := fn(stack, options); err != nil { - return nil, metadata, err - } - } - - for _, fn := range options.APIOptions { - if err := fn(stack); err != nil { - return nil, metadata, err - } - } - - 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 operationInputKey struct{} - -func setOperationInput(ctx context.Context, input interface{}) context.Context { - return middleware.WithStackValue(ctx, operationInputKey{}, input) -} - -func getOperationInput(ctx context.Context) interface{} { - return middleware.GetStackValue(ctx, operationInputKey{}) -} - -type setOperationInputMiddleware struct { -} - -func (*setOperationInputMiddleware) ID() string { - return "setOperationInput" -} - -func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - ctx = setOperationInput(ctx, in.Parameters) - return next.HandleSerialize(ctx, in) -} - -func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { - if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { - return fmt.Errorf("add ResolveAuthScheme: %w", err) - } - if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { - return fmt.Errorf("add GetIdentity: %v", err) - } - if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { - return fmt.Errorf("add ResolveEndpointV2: %v", err) - } - if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { - return fmt.Errorf("add Signing: %w", err) - } - return nil -} -func resolveAuthSchemeResolver(options *Options) { - if options.AuthSchemeResolver == nil { - options.AuthSchemeResolver = &defaultAuthSchemeResolver{} - } -} - -func resolveAuthSchemes(options *Options) { - if options.AuthSchemes == nil { - options.AuthSchemes = []smithyhttp.AuthScheme{ - internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ - Signer: options.HTTPSignerV4, - Logger: options.Logger, - LogSigning: options.ClientLogMode.IsSigning(), - }), - } - } -} - -type noSmithyDocumentSerde = smithydocument.NoSerde - -type legacyEndpointContextSetter struct { - LegacyResolver EndpointResolver -} - -func (*legacyEndpointContextSetter) ID() string { - return "legacyEndpointContextSetter" -} - -func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.LegacyResolver != nil { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) - } - - return next.HandleInitialize(ctx, in) - -} -func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { - return stack.Initialize.Add(&legacyEndpointContextSetter{ - LegacyResolver: o.EndpointResolver, - }, middleware.Before) -} - -func resolveDefaultLogger(o *Options) { - if o.Logger != nil { - return - } - o.Logger = logging.Nop{} -} - -func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { - return middleware.AddSetLoggerMiddleware(stack, o.Logger) -} - -func setResolvedDefaultsMode(o *Options) { - if len(o.resolvedDefaultsMode) > 0 { - return - } - - var mode aws.DefaultsMode - mode.SetFromString(string(o.DefaultsMode)) - - if mode == aws.DefaultsModeAuto { - mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) - } - - o.resolvedDefaultsMode = mode -} - -// NewFromConfig returns a new client from the provided config. -func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { - opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - } - resolveAWSRetryerProvider(cfg, &opts) - resolveAWSRetryMaxAttempts(cfg, &opts) - resolveAWSRetryMode(cfg, &opts) - resolveAWSEndpointResolver(cfg, &opts) - resolveUseDualStackEndpoint(cfg, &opts) - resolveUseFIPSEndpoint(cfg, &opts) - resolveBaseEndpoint(cfg, &opts) - return New(opts, optFns...) -} - -func resolveHTTPClient(o *Options) { - var buildable *awshttp.BuildableClient - - if o.HTTPClient != nil { - var ok bool - buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) - if !ok { - return - } - } else { - buildable = awshttp.NewBuildableClient() - } - - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { - if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { - dialer.Timeout = dialerTimeout - } - }) - - buildable = buildable.WithTransportOptions(func(transport *http.Transport) { - if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { - transport.TLSHandshakeTimeout = tlsHandshakeTimeout - } - }) - } - - o.HTTPClient = buildable -} - -func resolveRetryer(o *Options) { - if o.Retryer != nil { - return - } - - if len(o.RetryMode) == 0 { - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - o.RetryMode = modeConfig.RetryMode - } - } - if len(o.RetryMode) == 0 { - o.RetryMode = aws.RetryModeStandard - } - - var standardOptions []func(*retry.StandardOptions) - if v := o.RetryMaxAttempts; v != 0 { - standardOptions = append(standardOptions, func(so *retry.StandardOptions) { - so.MaxAttempts = v - }) - } - - switch o.RetryMode { - case aws.RetryModeAdaptive: - var adaptiveOptions []func(*retry.AdaptiveModeOptions) - if len(standardOptions) != 0 { - adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { - ao.StandardOptions = append(ao.StandardOptions, standardOptions...) - }) - } - o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) - - default: - o.Retryer = retry.NewStandard(standardOptions...) - } -} - -func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { - if cfg.Retryer == nil { - return - } - o.Retryer = cfg.Retryer() -} - -func resolveAWSRetryMode(cfg aws.Config, o *Options) { - if len(cfg.RetryMode) == 0 { - return - } - o.RetryMode = cfg.RetryMode -} -func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { - if cfg.RetryMaxAttempts == 0 { - return - } - o.RetryMaxAttempts = cfg.RetryMaxAttempts -} - -func finalizeRetryMaxAttempts(o *Options) { - if o.RetryMaxAttempts == 0 { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func finalizeOperationRetryMaxAttempts(o *Options, client Client) { - if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { - if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { - return - } - o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) -} - -func addClientUserAgent(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "honeycode", goModuleVersion) - if len(options.AppID) > 0 { - ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) - } - - return nil -} - -func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { - id := (*awsmiddleware.RequestUserAgent)(nil).ID() - mw, ok := stack.Build.Get(id) - if !ok { - mw = awsmiddleware.NewRequestUserAgent() - if err := stack.Build.Add(mw, middleware.After); err != nil { - return nil, err - } - } - - ua, ok := mw.(*awsmiddleware.RequestUserAgent) - if !ok { - return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) - } - - return ua, nil -} - -type HTTPSignerV4 interface { - SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error -} - -func resolveHTTPSignerV4(o *Options) { - if o.HTTPSignerV4 != nil { - return - } - o.HTTPSignerV4 = newDefaultV4Signer(*o) -} - -func newDefaultV4Signer(o Options) *v4.Signer { - return v4.NewSigner(func(so *v4.SignerOptions) { - so.Logger = o.Logger - so.LogSigning = o.ClientLogMode.IsSigning() - }) -} - -func addClientRequestID(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) -} - -func addComputeContentLength(stack *middleware.Stack) error { - return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) -} - -func addRawResponseToMetadata(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) -} - -func addRecordResponseTiming(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) -} -func addStreamingEventsPayload(stack *middleware.Stack) error { - return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) -} - -func addUnsignedPayload(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) -} - -func addComputePayloadSHA256(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) -} - -func addContentSHA256Header(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) -} - -func addRetry(stack *middleware.Stack, o Options) error { - attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { - m.LogAttempts = o.ClientLogMode.IsRetries() - }) - if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { - return err - } - if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { - return err - } - return nil -} - -// resolves dual-stack endpoint configuration -func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseDualStackEndpoint = value - } - return nil -} - -// resolves FIPS endpoint configuration -func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseFIPSEndpoint = value - } - return nil -} - -func addRecursionDetection(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) -} - -func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) - -} - -func addResponseErrorMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) - -} - -func addRequestResponseLogging(stack *middleware.Stack, o Options) error { - return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ - LogRequest: o.ClientLogMode.IsRequest(), - LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), - LogResponse: o.ClientLogMode.IsResponse(), - LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), - }, middleware.After) -} - -type disableHTTPSMiddleware struct { - DisableHTTPS bool -} - -func (*disableHTTPSMiddleware) ID() string { - return "disableHTTPS" -} - -func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { - req.URL.Scheme = "http" - } - - return next.HandleFinalize(ctx, in) -} - -func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { - return stack.Finalize.Insert(&disableHTTPSMiddleware{ - DisableHTTPS: o.EndpointOptions.DisableHTTPS, - }, "ResolveEndpointV2", middleware.After) -} diff --git a/service/honeycode/api_client_test.go b/service/honeycode/api_client_test.go deleted file mode 100644 index c797e8f20d7..00000000000 --- a/service/honeycode/api_client_test.go +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "io/ioutil" - "net/http" - "strings" - "testing" -) - -func TestClient_resolveRetryOptions(t *testing.T) { - nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: 200, - Header: http.Header{}, - Body: ioutil.NopCloser(strings.NewReader("")), - }, nil - }) - - cases := map[string]struct { - defaultsMode aws.DefaultsMode - retryer aws.Retryer - retryMaxAttempts int - opRetryMaxAttempts *int - retryMode aws.RetryMode - expectClientRetryMode aws.RetryMode - expectClientMaxAttempts int - expectOpMaxAttempts int - }{ - "defaults": { - defaultsMode: aws.DefaultsModeStandard, - expectClientRetryMode: aws.RetryModeStandard, - expectClientMaxAttempts: 3, - expectOpMaxAttempts: 3, - }, - "custom default retry": { - retryMode: aws.RetryModeAdaptive, - retryMaxAttempts: 10, - expectClientRetryMode: aws.RetryModeAdaptive, - expectClientMaxAttempts: 10, - expectOpMaxAttempts: 10, - }, - "custom op max attempts": { - retryMode: aws.RetryModeAdaptive, - retryMaxAttempts: 10, - opRetryMaxAttempts: aws.Int(2), - expectClientRetryMode: aws.RetryModeAdaptive, - expectClientMaxAttempts: 10, - expectOpMaxAttempts: 2, - }, - "custom op no change max attempts": { - retryMode: aws.RetryModeAdaptive, - retryMaxAttempts: 10, - opRetryMaxAttempts: aws.Int(10), - expectClientRetryMode: aws.RetryModeAdaptive, - expectClientMaxAttempts: 10, - expectOpMaxAttempts: 10, - }, - "custom op 0 max attempts": { - retryMode: aws.RetryModeAdaptive, - retryMaxAttempts: 10, - opRetryMaxAttempts: aws.Int(0), - expectClientRetryMode: aws.RetryModeAdaptive, - expectClientMaxAttempts: 10, - expectOpMaxAttempts: 10, - }, - } - - for name, c := range cases { - t.Run(name, func(t *testing.T) { - client := NewFromConfig(aws.Config{ - DefaultsMode: c.defaultsMode, - Retryer: func() func() aws.Retryer { - if c.retryer == nil { - return nil - } - - return func() aws.Retryer { return c.retryer } - }(), - HTTPClient: nopClient, - RetryMaxAttempts: c.retryMaxAttempts, - RetryMode: c.retryMode, - }, func(o *Options) { - if o.Retryer == nil { - t.Errorf("retryer must not be nil in functional options") - } - }) - - if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { - t.Errorf("expect %v retry mode, got %v", e, a) - } - if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { - t.Errorf("expect %v max attempts, got %v", e, a) - } - - _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, - []func(*Options){ - func(o *Options) { - if c.opRetryMaxAttempts == nil { - return - } - o.RetryMaxAttempts = *c.opRetryMaxAttempts - }, - }, - func(s *middleware.Stack, o Options) error { - s.Initialize.Clear() - s.Serialize.Clear() - s.Build.Clear() - s.Finalize.Clear() - s.Deserialize.Clear() - - if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { - t.Errorf("expect %v op max attempts, got %v", e, a) - } - return nil - }) - if err != nil { - t.Fatalf("expect no operation error, got %v", err) - } - }) - } -} diff --git a/service/honeycode/api_op_BatchCreateTableRows.go b/service/honeycode/api_op_BatchCreateTableRows.go deleted file mode 100644 index 08e2067e9e6..00000000000 --- a/service/honeycode/api_op_BatchCreateTableRows.go +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/honeycode/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The BatchCreateTableRows API allows you to create one or more rows at the end -// -// of a table in a workbook. The API allows you to specify the values to set in -// some or all of the columns in the new rows. -// -// If a column is not explicitly set in a specific row, then the column level -// formula specified in the table will be applied to the new row. If there is no -// column level formula but the last row of the table has a formula, then that -// formula will be copied down to the new row. If there is no column level formula -// and no formula in the last row of the table, then that column will be left blank -// for the new rows. -func (c *Client) BatchCreateTableRows(ctx context.Context, params *BatchCreateTableRowsInput, optFns ...func(*Options)) (*BatchCreateTableRowsOutput, error) { - if params == nil { - params = &BatchCreateTableRowsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "BatchCreateTableRows", params, optFns, c.addOperationBatchCreateTableRowsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*BatchCreateTableRowsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type BatchCreateTableRowsInput struct { - - // The list of rows to create at the end of the table. Each item in this list - // needs to have a batch item id to uniquely identify the element in the request - // and the cells to create for that row. You need to specify at least one item in - // this list. - // - // Note that if one of the column ids in any of the rows in the request does not - // exist in the table, then the request fails and no updates are made to the table. - // - // This member is required. - RowsToCreate []types.CreateRowData - - // The ID of the table where the new rows are being added. - // - // If a table with the specified ID could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - TableId *string - - // The ID of the workbook where the new rows are being added. - // - // If a workbook with the specified ID could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - WorkbookId *string - - // The request token for performing the batch create operation. Request tokens - // help to identify duplicate requests. If a call times out or fails due to a - // transient error like a failed network connection, you can retry the call with - // the same request token. The service ensures that if the first call using that - // request token is successfully performed, the second call will not perform the - // operation again. - // - // Note that request tokens are valid only for a few minutes. You cannot use - // request tokens to dedupe requests spanning hours or days. - ClientRequestToken *string - - noSmithyDocumentSerde -} - -type BatchCreateTableRowsOutput struct { - - // The map of batch item id to the row id that was created for that item. - // - // This member is required. - CreatedRows map[string]string - - // The updated workbook cursor after adding the new rows at the end of the table. - // - // This member is required. - WorkbookCursor int64 - - // The list of batch items in the request that could not be added to the table. - // Each element in this list contains one item from the request that could not be - // added to the table along with the reason why that item could not be added. - FailedBatchItems []types.FailedBatchItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationBatchCreateTableRowsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpBatchCreateTableRows{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBatchCreateTableRows{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "BatchCreateTableRows"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpBatchCreateTableRowsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchCreateTableRows(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opBatchCreateTableRows(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "BatchCreateTableRows", - } -} diff --git a/service/honeycode/api_op_BatchDeleteTableRows.go b/service/honeycode/api_op_BatchDeleteTableRows.go deleted file mode 100644 index 56e24481757..00000000000 --- a/service/honeycode/api_op_BatchDeleteTableRows.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/honeycode/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The BatchDeleteTableRows API allows you to delete one or more rows from a -// -// table in a workbook. You need to specify the ids of the rows that you want to -// delete from the table. -func (c *Client) BatchDeleteTableRows(ctx context.Context, params *BatchDeleteTableRowsInput, optFns ...func(*Options)) (*BatchDeleteTableRowsOutput, error) { - if params == nil { - params = &BatchDeleteTableRowsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "BatchDeleteTableRows", params, optFns, c.addOperationBatchDeleteTableRowsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*BatchDeleteTableRowsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type BatchDeleteTableRowsInput struct { - - // The list of row ids to delete from the table. You need to specify at least one - // row id in this list. - // - // Note that if one of the row ids provided in the request does not exist in the - // table, then the request fails and no rows are deleted from the table. - // - // This member is required. - RowIds []string - - // The ID of the table where the rows are being deleted. - // - // If a table with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - TableId *string - - // The ID of the workbook where the rows are being deleted. - // - // If a workbook with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - WorkbookId *string - - // The request token for performing the delete action. Request tokens help to - // identify duplicate requests. If a call times out or fails due to a transient - // error like a failed network connection, you can retry the call with the same - // request token. The service ensures that if the first call using that request - // token is successfully performed, the second call will not perform the action - // again. - // - // Note that request tokens are valid only for a few minutes. You cannot use - // request tokens to dedupe requests spanning hours or days. - ClientRequestToken *string - - noSmithyDocumentSerde -} - -type BatchDeleteTableRowsOutput struct { - - // The updated workbook cursor after deleting the rows from the table. - // - // This member is required. - WorkbookCursor int64 - - // The list of row ids in the request that could not be deleted from the table. - // Each element in this list contains one row id from the request that could not be - // deleted along with the reason why that item could not be deleted. - FailedBatchItems []types.FailedBatchItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationBatchDeleteTableRowsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpBatchDeleteTableRows{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBatchDeleteTableRows{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "BatchDeleteTableRows"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpBatchDeleteTableRowsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchDeleteTableRows(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opBatchDeleteTableRows(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "BatchDeleteTableRows", - } -} diff --git a/service/honeycode/api_op_BatchUpdateTableRows.go b/service/honeycode/api_op_BatchUpdateTableRows.go deleted file mode 100644 index 1a95829617c..00000000000 --- a/service/honeycode/api_op_BatchUpdateTableRows.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/honeycode/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The BatchUpdateTableRows API allows you to update one or more rows in a table -// -// in a workbook. -// -// You can specify the values to set in some or all of the columns in the table -// for the specified rows. If a column is not explicitly specified in a particular -// row, then that column will not be updated for that row. To clear out the data in -// a specific cell, you need to set the value as an empty string (""). -func (c *Client) BatchUpdateTableRows(ctx context.Context, params *BatchUpdateTableRowsInput, optFns ...func(*Options)) (*BatchUpdateTableRowsOutput, error) { - if params == nil { - params = &BatchUpdateTableRowsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "BatchUpdateTableRows", params, optFns, c.addOperationBatchUpdateTableRowsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*BatchUpdateTableRowsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type BatchUpdateTableRowsInput struct { - - // The list of rows to update in the table. Each item in this list needs to - // contain the row id to update along with the map of column id to cell values for - // each column in that row that needs to be updated. You need to specify at least - // one row in this list, and for each row, you need to specify at least one column - // to update. - // - // Note that if one of the row or column ids in the request does not exist in the - // table, then the request fails and no updates are made to the table. - // - // This member is required. - RowsToUpdate []types.UpdateRowData - - // The ID of the table where the rows are being updated. - // - // If a table with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - TableId *string - - // The ID of the workbook where the rows are being updated. - // - // If a workbook with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - WorkbookId *string - - // The request token for performing the update action. Request tokens help to - // identify duplicate requests. If a call times out or fails due to a transient - // error like a failed network connection, you can retry the call with the same - // request token. The service ensures that if the first call using that request - // token is successfully performed, the second call will not perform the action - // again. - // - // Note that request tokens are valid only for a few minutes. You cannot use - // request tokens to dedupe requests spanning hours or days. - ClientRequestToken *string - - noSmithyDocumentSerde -} - -type BatchUpdateTableRowsOutput struct { - - // The updated workbook cursor after adding the new rows at the end of the table. - // - // This member is required. - WorkbookCursor int64 - - // The list of batch items in the request that could not be updated in the table. - // Each element in this list contains one item from the request that could not be - // updated in the table along with the reason why that item could not be updated. - FailedBatchItems []types.FailedBatchItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationBatchUpdateTableRowsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpBatchUpdateTableRows{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBatchUpdateTableRows{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "BatchUpdateTableRows"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpBatchUpdateTableRowsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchUpdateTableRows(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opBatchUpdateTableRows(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "BatchUpdateTableRows", - } -} diff --git a/service/honeycode/api_op_BatchUpsertTableRows.go b/service/honeycode/api_op_BatchUpsertTableRows.go deleted file mode 100644 index 05f14d118b9..00000000000 --- a/service/honeycode/api_op_BatchUpsertTableRows.go +++ /dev/null @@ -1,199 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/honeycode/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The BatchUpsertTableRows API allows you to upsert one or more rows in a table. -// -// The upsert operation takes a filter expression as input and evaluates it to find -// matching rows on the destination table. If matching rows are found, it will -// update the cells in the matching rows to new values specified in the request. If -// no matching rows are found, a new row is added at the end of the table and the -// cells in that row are set to the new values specified in the request. -// -// You can specify the values to set in some or all of the columns in the table -// for the matching or newly appended rows. If a column is not explicitly specified -// for a particular row, then that column will not be updated for that row. To -// clear out the data in a specific cell, you need to set the value as an empty -// string (""). -func (c *Client) BatchUpsertTableRows(ctx context.Context, params *BatchUpsertTableRowsInput, optFns ...func(*Options)) (*BatchUpsertTableRowsOutput, error) { - if params == nil { - params = &BatchUpsertTableRowsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "BatchUpsertTableRows", params, optFns, c.addOperationBatchUpsertTableRowsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*BatchUpsertTableRowsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type BatchUpsertTableRowsInput struct { - - // The list of rows to upsert in the table. Each item in this list needs to have - // a batch item id to uniquely identify the element in the request, a filter - // expression to find the rows to update for that element and the cell values to - // set for each column in the upserted rows. You need to specify at least one item - // in this list. - // - // Note that if one of the filter formulas in the request fails to evaluate - // because of an error or one of the column ids in any of the rows does not exist - // in the table, then the request fails and no updates are made to the table. - // - // This member is required. - RowsToUpsert []types.UpsertRowData - - // The ID of the table where the rows are being upserted. - // - // If a table with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - TableId *string - - // The ID of the workbook where the rows are being upserted. - // - // If a workbook with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - WorkbookId *string - - // The request token for performing the update action. Request tokens help to - // identify duplicate requests. If a call times out or fails due to a transient - // error like a failed network connection, you can retry the call with the same - // request token. The service ensures that if the first call using that request - // token is successfully performed, the second call will not perform the action - // again. - // - // Note that request tokens are valid only for a few minutes. You cannot use - // request tokens to dedupe requests spanning hours or days. - ClientRequestToken *string - - noSmithyDocumentSerde -} - -type BatchUpsertTableRowsOutput struct { - - // A map with the batch item id as the key and the result of the upsert operation - // as the value. The result of the upsert operation specifies whether existing rows - // were updated or a new row was appended, along with the list of row ids that were - // affected. - // - // This member is required. - Rows map[string]types.UpsertRowsResult - - // The updated workbook cursor after updating or appending rows in the table. - // - // This member is required. - WorkbookCursor int64 - - // The list of batch items in the request that could not be updated or appended - // in the table. Each element in this list contains one item from the request that - // could not be updated in the table along with the reason why that item could not - // be updated or appended. - FailedBatchItems []types.FailedBatchItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationBatchUpsertTableRowsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpBatchUpsertTableRows{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBatchUpsertTableRows{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "BatchUpsertTableRows"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpBatchUpsertTableRowsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchUpsertTableRows(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opBatchUpsertTableRows(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "BatchUpsertTableRows", - } -} diff --git a/service/honeycode/api_op_DescribeTableDataImportJob.go b/service/honeycode/api_op_DescribeTableDataImportJob.go deleted file mode 100644 index d1f6a2728c1..00000000000 --- a/service/honeycode/api_op_DescribeTableDataImportJob.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/honeycode/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The DescribeTableDataImportJob API allows you to retrieve the status and -// -// details of a table data import job. -func (c *Client) DescribeTableDataImportJob(ctx context.Context, params *DescribeTableDataImportJobInput, optFns ...func(*Options)) (*DescribeTableDataImportJobOutput, error) { - if params == nil { - params = &DescribeTableDataImportJobInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTableDataImportJob", params, optFns, c.addOperationDescribeTableDataImportJobMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTableDataImportJobOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTableDataImportJobInput struct { - - // The ID of the job that was returned by the StartTableDataImportJob request. - // - // If a job with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - JobId *string - - // The ID of the table into which data was imported. - // - // If a table with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - TableId *string - - // The ID of the workbook into which data was imported. - // - // If a workbook with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - WorkbookId *string - - noSmithyDocumentSerde -} - -type DescribeTableDataImportJobOutput struct { - - // The metadata about the job that was submitted for import. - // - // This member is required. - JobMetadata *types.TableDataImportJobMetadata - - // The current status of the import job. - // - // This member is required. - JobStatus types.TableDataImportJobStatus - - // A message providing more details about the current status of the import job. - // - // This member is required. - Message *string - - // If job status is failed, error code to understand reason for the failure. - ErrorCode types.ErrorCode - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTableDataImportJobMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeTableDataImportJob{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeTableDataImportJob{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTableDataImportJob"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeTableDataImportJobValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTableDataImportJob(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeTableDataImportJob(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTableDataImportJob", - } -} diff --git a/service/honeycode/api_op_GetScreenData.go b/service/honeycode/api_op_GetScreenData.go deleted file mode 100644 index 4ff832245ab..00000000000 --- a/service/honeycode/api_op_GetScreenData.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/honeycode/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The GetScreenData API allows retrieval of data from a screen in a Honeycode -// -// app. The API allows setting local variables in the screen to filter, sort or -// otherwise affect what will be displayed on the screen. -func (c *Client) GetScreenData(ctx context.Context, params *GetScreenDataInput, optFns ...func(*Options)) (*GetScreenDataOutput, error) { - if params == nil { - params = &GetScreenDataInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetScreenData", params, optFns, c.addOperationGetScreenDataMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetScreenDataOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetScreenDataInput struct { - - // The ID of the app that contains the screen. - // - // This member is required. - AppId *string - - // The ID of the screen. - // - // This member is required. - ScreenId *string - - // The ID of the workbook that contains the screen. - // - // This member is required. - WorkbookId *string - - // The number of results to be returned on a single page. Specify a number - // between 1 and 100. The maximum value is 100. - // - // This parameter is optional. If you don't specify this parameter, the default - // page size is 100. - MaxResults *int32 - - // This parameter is optional. If a nextToken is not specified, the API returns - // the first page of data. - // - // Pagination tokens expire after 1 hour. If you use a token that was returned - // more than an hour back, the API will throw ValidationException. - NextToken *string - - // Variables are optional and are needed only if the screen requires them to - // render correctly. Variables are specified as a map where the key is the name of - // the variable as defined on the screen. The value is an object which currently - // has only one property, rawValue, which holds the value of the variable to be - // passed to the screen. - Variables map[string]types.VariableValue - - noSmithyDocumentSerde -} - -type GetScreenDataOutput struct { - - // A map of all the rows on the screen keyed by block name. - // - // This member is required. - Results map[string]types.ResultSet - - // Indicates the cursor of the workbook at which the data returned by this - // workbook is read. Workbook cursor keeps increasing with every update and the - // increments are not sequential. - // - // This member is required. - WorkbookCursor int64 - - // Provides the pagination token to load the next page if there are more results - // matching the request. If a pagination token is not present in the response, it - // means that all data matching the query has been loaded. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetScreenDataMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetScreenData{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetScreenData{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetScreenData"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetScreenDataValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetScreenData(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetScreenData(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetScreenData", - } -} diff --git a/service/honeycode/api_op_InvokeScreenAutomation.go b/service/honeycode/api_op_InvokeScreenAutomation.go deleted file mode 100644 index 3f4bb27cf36..00000000000 --- a/service/honeycode/api_op_InvokeScreenAutomation.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/honeycode/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The InvokeScreenAutomation API allows invoking an action defined in a screen -// -// in a Honeycode app. The API allows setting local variables, which can then be -// used in the automation being invoked. This allows automating the Honeycode app -// interactions to write, update or delete data in the workbook. -func (c *Client) InvokeScreenAutomation(ctx context.Context, params *InvokeScreenAutomationInput, optFns ...func(*Options)) (*InvokeScreenAutomationOutput, error) { - if params == nil { - params = &InvokeScreenAutomationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "InvokeScreenAutomation", params, optFns, c.addOperationInvokeScreenAutomationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*InvokeScreenAutomationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type InvokeScreenAutomationInput struct { - - // The ID of the app that contains the screen automation. - // - // This member is required. - AppId *string - - // The ID of the automation action to be performed. - // - // This member is required. - ScreenAutomationId *string - - // The ID of the screen that contains the screen automation. - // - // This member is required. - ScreenId *string - - // The ID of the workbook that contains the screen automation. - // - // This member is required. - WorkbookId *string - - // The request token for performing the automation action. Request tokens help to - // identify duplicate requests. If a call times out or fails due to a transient - // error like a failed network connection, you can retry the call with the same - // request token. The service ensures that if the first call using that request - // token is successfully performed, the second call will return the response of the - // previous call rather than performing the action again. - // - // Note that request tokens are valid only for a few minutes. You cannot use - // request tokens to dedupe requests spanning hours or days. - ClientRequestToken *string - - // The row ID for the automation if the automation is defined inside a block with - // source or list. - RowId *string - - // Variables are specified as a map where the key is the name of the variable as - // defined on the screen. The value is an object which currently has only one - // property, rawValue, which holds the value of the variable to be passed to the - // screen. Any variables defined in a screen are required to be passed in the call. - Variables map[string]types.VariableValue - - noSmithyDocumentSerde -} - -type InvokeScreenAutomationOutput struct { - - // The updated workbook cursor after performing the automation action. - // - // This member is required. - WorkbookCursor int64 - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationInvokeScreenAutomationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpInvokeScreenAutomation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpInvokeScreenAutomation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "InvokeScreenAutomation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpInvokeScreenAutomationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInvokeScreenAutomation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opInvokeScreenAutomation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "InvokeScreenAutomation", - } -} diff --git a/service/honeycode/api_op_ListTableColumns.go b/service/honeycode/api_op_ListTableColumns.go deleted file mode 100644 index 8a9f99ae981..00000000000 --- a/service/honeycode/api_op_ListTableColumns.go +++ /dev/null @@ -1,247 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/honeycode/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The ListTableColumns API allows you to retrieve a list of all the columns in a -// -// table in a workbook. -func (c *Client) ListTableColumns(ctx context.Context, params *ListTableColumnsInput, optFns ...func(*Options)) (*ListTableColumnsOutput, error) { - if params == nil { - params = &ListTableColumnsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListTableColumns", params, optFns, c.addOperationListTableColumnsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListTableColumnsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListTableColumnsInput struct { - - // The ID of the table whose columns are being retrieved. - // - // If a table with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - TableId *string - - // The ID of the workbook that contains the table whose columns are being - // retrieved. - // - // If a workbook with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - WorkbookId *string - - // This parameter is optional. If a nextToken is not specified, the API returns - // the first page of data. - // - // Pagination tokens expire after 1 hour. If you use a token that was returned - // more than an hour back, the API will throw ValidationException. - NextToken *string - - noSmithyDocumentSerde -} - -type ListTableColumnsOutput struct { - - // The list of columns in the table. - // - // This member is required. - TableColumns []types.TableColumn - - // Provides the pagination token to load the next page if there are more results - // matching the request. If a pagination token is not present in the response, it - // means that all data matching the request has been loaded. - NextToken *string - - // Indicates the cursor of the workbook at which the data returned by this - // request is read. Workbook cursor keeps increasing with every update and the - // increments are not sequential. - WorkbookCursor int64 - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListTableColumnsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListTableColumns{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTableColumns{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListTableColumns"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpListTableColumnsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTableColumns(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// ListTableColumnsAPIClient is a client that implements the ListTableColumns -// operation. -type ListTableColumnsAPIClient interface { - ListTableColumns(context.Context, *ListTableColumnsInput, ...func(*Options)) (*ListTableColumnsOutput, error) -} - -var _ ListTableColumnsAPIClient = (*Client)(nil) - -// ListTableColumnsPaginatorOptions is the paginator options for ListTableColumns -type ListTableColumnsPaginatorOptions struct { - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListTableColumnsPaginator is a paginator for ListTableColumns -type ListTableColumnsPaginator struct { - options ListTableColumnsPaginatorOptions - client ListTableColumnsAPIClient - params *ListTableColumnsInput - nextToken *string - firstPage bool -} - -// NewListTableColumnsPaginator returns a new ListTableColumnsPaginator -func NewListTableColumnsPaginator(client ListTableColumnsAPIClient, params *ListTableColumnsInput, optFns ...func(*ListTableColumnsPaginatorOptions)) *ListTableColumnsPaginator { - if params == nil { - params = &ListTableColumnsInput{} - } - - options := ListTableColumnsPaginatorOptions{} - - for _, fn := range optFns { - fn(&options) - } - - return &ListTableColumnsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListTableColumnsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListTableColumns page. -func (p *ListTableColumnsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTableColumnsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - result, err := p.client.ListTableColumns(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_opListTableColumns(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListTableColumns", - } -} diff --git a/service/honeycode/api_op_ListTableRows.go b/service/honeycode/api_op_ListTableRows.go deleted file mode 100644 index f1406c042e1..00000000000 --- a/service/honeycode/api_op_ListTableRows.go +++ /dev/null @@ -1,276 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/honeycode/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The ListTableRows API allows you to retrieve a list of all the rows in a table -// -// in a workbook. -func (c *Client) ListTableRows(ctx context.Context, params *ListTableRowsInput, optFns ...func(*Options)) (*ListTableRowsOutput, error) { - if params == nil { - params = &ListTableRowsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListTableRows", params, optFns, c.addOperationListTableRowsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListTableRowsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListTableRowsInput struct { - - // The ID of the table whose rows are being retrieved. - // - // If a table with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - TableId *string - - // The ID of the workbook that contains the table whose rows are being retrieved. - // - // If a workbook with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - WorkbookId *string - - // The maximum number of rows to return in each page of the results. - MaxResults *int32 - - // This parameter is optional. If a nextToken is not specified, the API returns - // the first page of data. - // - // Pagination tokens expire after 1 hour. If you use a token that was returned - // more than an hour back, the API will throw ValidationException. - NextToken *string - - // This parameter is optional. If one or more row ids are specified in this list, - // then only the specified row ids are returned in the result. If no row ids are - // specified here, then all the rows in the table are returned. - RowIds []string - - noSmithyDocumentSerde -} - -type ListTableRowsOutput struct { - - // The list of columns in the table whose row data is returned in the result. - // - // This member is required. - ColumnIds []string - - // The list of rows in the table. Note that this result is paginated, so this - // list contains a maximum of 100 rows. - // - // This member is required. - Rows []types.TableRow - - // Indicates the cursor of the workbook at which the data returned by this - // request is read. Workbook cursor keeps increasing with every update and the - // increments are not sequential. - // - // This member is required. - WorkbookCursor int64 - - // Provides the pagination token to load the next page if there are more results - // matching the request. If a pagination token is not present in the response, it - // means that all data matching the request has been loaded. - NextToken *string - - // The list of row ids included in the request that were not found in the table. - RowIdsNotFound []string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListTableRowsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListTableRows{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTableRows{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListTableRows"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpListTableRowsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTableRows(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// ListTableRowsAPIClient is a client that implements the ListTableRows operation. -type ListTableRowsAPIClient interface { - ListTableRows(context.Context, *ListTableRowsInput, ...func(*Options)) (*ListTableRowsOutput, error) -} - -var _ ListTableRowsAPIClient = (*Client)(nil) - -// ListTableRowsPaginatorOptions is the paginator options for ListTableRows -type ListTableRowsPaginatorOptions struct { - // The maximum number of rows to return in each page of the results. - 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 -} - -// ListTableRowsPaginator is a paginator for ListTableRows -type ListTableRowsPaginator struct { - options ListTableRowsPaginatorOptions - client ListTableRowsAPIClient - params *ListTableRowsInput - nextToken *string - firstPage bool -} - -// NewListTableRowsPaginator returns a new ListTableRowsPaginator -func NewListTableRowsPaginator(client ListTableRowsAPIClient, params *ListTableRowsInput, optFns ...func(*ListTableRowsPaginatorOptions)) *ListTableRowsPaginator { - if params == nil { - params = &ListTableRowsInput{} - } - - options := ListTableRowsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListTableRowsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListTableRowsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListTableRows page. -func (p *ListTableRowsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTableRowsOutput, 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.ListTableRows(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_opListTableRows(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListTableRows", - } -} diff --git a/service/honeycode/api_op_ListTables.go b/service/honeycode/api_op_ListTables.go deleted file mode 100644 index 9cf3f2eb376..00000000000 --- a/service/honeycode/api_op_ListTables.go +++ /dev/null @@ -1,252 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/honeycode/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The ListTables API allows you to retrieve a list of all the tables in a -// -// workbook. -func (c *Client) ListTables(ctx context.Context, params *ListTablesInput, optFns ...func(*Options)) (*ListTablesOutput, error) { - if params == nil { - params = &ListTablesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListTables", params, optFns, c.addOperationListTablesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListTablesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListTablesInput struct { - - // The ID of the workbook whose tables are being retrieved. - // - // If a workbook with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - WorkbookId *string - - // The maximum number of tables to return in each page of the results. - MaxResults *int32 - - // This parameter is optional. If a nextToken is not specified, the API returns - // the first page of data. - // - // Pagination tokens expire after 1 hour. If you use a token that was returned - // more than an hour back, the API will throw ValidationException. - NextToken *string - - noSmithyDocumentSerde -} - -type ListTablesOutput struct { - - // The list of tables in the workbook. - // - // This member is required. - Tables []types.Table - - // Provides the pagination token to load the next page if there are more results - // matching the request. If a pagination token is not present in the response, it - // means that all data matching the request has been loaded. - NextToken *string - - // Indicates the cursor of the workbook at which the data returned by this - // request is read. Workbook cursor keeps increasing with every update and the - // increments are not sequential. - WorkbookCursor int64 - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListTablesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListTables{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTables{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListTables"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpListTablesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTables(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// ListTablesAPIClient is a client that implements the ListTables operation. -type ListTablesAPIClient interface { - ListTables(context.Context, *ListTablesInput, ...func(*Options)) (*ListTablesOutput, error) -} - -var _ ListTablesAPIClient = (*Client)(nil) - -// ListTablesPaginatorOptions is the paginator options for ListTables -type ListTablesPaginatorOptions struct { - // The maximum number of tables to return in each page of the results. - 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 -} - -// ListTablesPaginator is a paginator for ListTables -type ListTablesPaginator struct { - options ListTablesPaginatorOptions - client ListTablesAPIClient - params *ListTablesInput - nextToken *string - firstPage bool -} - -// NewListTablesPaginator returns a new ListTablesPaginator -func NewListTablesPaginator(client ListTablesAPIClient, params *ListTablesInput, optFns ...func(*ListTablesPaginatorOptions)) *ListTablesPaginator { - if params == nil { - params = &ListTablesInput{} - } - - options := ListTablesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListTablesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListTablesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListTables page. -func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTablesOutput, 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.ListTables(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_opListTables(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListTables", - } -} diff --git a/service/honeycode/api_op_ListTagsForResource.go b/service/honeycode/api_op_ListTagsForResource.go deleted file mode 100644 index fd066e51776..00000000000 --- a/service/honeycode/api_op_ListTagsForResource.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The ListTagsForResource API allows you to return a resource's tags. -func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { - if params == nil { - params = &ListTagsForResourceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListTagsForResourceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListTagsForResourceInput struct { - - // The resource's Amazon Resource Name (ARN). - // - // This member is required. - ResourceArn *string - - noSmithyDocumentSerde -} - -type ListTagsForResourceOutput struct { - - // The resource's tags. - Tags map[string]string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListTagsForResource"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListTagsForResource", - } -} diff --git a/service/honeycode/api_op_QueryTableRows.go b/service/honeycode/api_op_QueryTableRows.go deleted file mode 100644 index 0ea8a20d08d..00000000000 --- a/service/honeycode/api_op_QueryTableRows.go +++ /dev/null @@ -1,274 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/honeycode/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The QueryTableRows API allows you to use a filter formula to query for -// -// specific rows in a table. -func (c *Client) QueryTableRows(ctx context.Context, params *QueryTableRowsInput, optFns ...func(*Options)) (*QueryTableRowsOutput, error) { - if params == nil { - params = &QueryTableRowsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "QueryTableRows", params, optFns, c.addOperationQueryTableRowsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*QueryTableRowsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type QueryTableRowsInput struct { - - // An object that represents a filter formula along with the id of the context row - // under which the filter function needs to evaluate. - // - // This member is required. - FilterFormula *types.Filter - - // The ID of the table whose rows are being queried. - // - // If a table with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - TableId *string - - // The ID of the workbook whose table rows are being queried. - // - // If a workbook with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - WorkbookId *string - - // The maximum number of rows to return in each page of the results. - MaxResults *int32 - - // This parameter is optional. If a nextToken is not specified, the API returns - // the first page of data. - // - // Pagination tokens expire after 1 hour. If you use a token that was returned - // more than an hour back, the API will throw ValidationException. - NextToken *string - - noSmithyDocumentSerde -} - -type QueryTableRowsOutput struct { - - // The list of columns in the table whose row data is returned in the result. - // - // This member is required. - ColumnIds []string - - // The list of rows in the table that match the query filter. - // - // This member is required. - Rows []types.TableRow - - // Indicates the cursor of the workbook at which the data returned by this - // request is read. Workbook cursor keeps increasing with every update and the - // increments are not sequential. - // - // This member is required. - WorkbookCursor int64 - - // Provides the pagination token to load the next page if there are more results - // matching the request. If a pagination token is not present in the response, it - // means that all data matching the request has been loaded. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationQueryTableRowsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpQueryTableRows{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpQueryTableRows{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "QueryTableRows"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpQueryTableRowsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opQueryTableRows(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// QueryTableRowsAPIClient is a client that implements the QueryTableRows -// operation. -type QueryTableRowsAPIClient interface { - QueryTableRows(context.Context, *QueryTableRowsInput, ...func(*Options)) (*QueryTableRowsOutput, error) -} - -var _ QueryTableRowsAPIClient = (*Client)(nil) - -// QueryTableRowsPaginatorOptions is the paginator options for QueryTableRows -type QueryTableRowsPaginatorOptions struct { - // The maximum number of rows to return in each page of the results. - 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 -} - -// QueryTableRowsPaginator is a paginator for QueryTableRows -type QueryTableRowsPaginator struct { - options QueryTableRowsPaginatorOptions - client QueryTableRowsAPIClient - params *QueryTableRowsInput - nextToken *string - firstPage bool -} - -// NewQueryTableRowsPaginator returns a new QueryTableRowsPaginator -func NewQueryTableRowsPaginator(client QueryTableRowsAPIClient, params *QueryTableRowsInput, optFns ...func(*QueryTableRowsPaginatorOptions)) *QueryTableRowsPaginator { - if params == nil { - params = &QueryTableRowsInput{} - } - - options := QueryTableRowsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &QueryTableRowsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *QueryTableRowsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next QueryTableRows page. -func (p *QueryTableRowsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*QueryTableRowsOutput, 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.QueryTableRows(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_opQueryTableRows(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "QueryTableRows", - } -} diff --git a/service/honeycode/api_op_StartTableDataImportJob.go b/service/honeycode/api_op_StartTableDataImportJob.go deleted file mode 100644 index d362222a080..00000000000 --- a/service/honeycode/api_op_StartTableDataImportJob.go +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/honeycode/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The StartTableDataImportJob API allows you to start an import job on a table. -// -// This API will only return the id of the job that was started. To find out the -// status of the import request, you need to call the DescribeTableDataImportJob -// API. -func (c *Client) StartTableDataImportJob(ctx context.Context, params *StartTableDataImportJobInput, optFns ...func(*Options)) (*StartTableDataImportJobOutput, error) { - if params == nil { - params = &StartTableDataImportJobInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "StartTableDataImportJob", params, optFns, c.addOperationStartTableDataImportJobMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*StartTableDataImportJobOutput) - out.ResultMetadata = metadata - return out, nil -} - -type StartTableDataImportJobInput struct { - - // The request token for performing the update action. Request tokens help to - // identify duplicate requests. If a call times out or fails due to a transient - // error like a failed network connection, you can retry the call with the same - // request token. The service ensures that if the first call using that request - // token is successfully performed, the second call will not perform the action - // again. - // - // Note that request tokens are valid only for a few minutes. You cannot use - // request tokens to dedupe requests spanning hours or days. - // - // This member is required. - ClientRequestToken *string - - // The format of the data that is being imported. Currently the only option - // supported is "DELIMITED_TEXT". - // - // This member is required. - DataFormat types.ImportSourceDataFormat - - // The source of the data that is being imported. The size of source must be no - // larger than 100 MB. Source must have no more than 100,000 cells and no more than - // 1,000 rows. - // - // This member is required. - DataSource *types.ImportDataSource - - // The ID of the table where the rows are being imported. - // - // If a table with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - DestinationTableId *string - - // The options for customizing this import request. - // - // This member is required. - ImportOptions *types.ImportOptions - - // The ID of the workbook where the rows are being imported. - // - // If a workbook with the specified id could not be found, this API throws - // ResourceNotFoundException. - // - // This member is required. - WorkbookId *string - - noSmithyDocumentSerde -} - -type StartTableDataImportJobOutput struct { - - // The id that is assigned to this import job. Future requests to find out the - // status of this import job need to send this id in the appropriate parameter in - // the request. - // - // This member is required. - JobId *string - - // The status of the import job immediately after submitting the request. - // - // This member is required. - JobStatus types.TableDataImportJobStatus - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationStartTableDataImportJobMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpStartTableDataImportJob{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartTableDataImportJob{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "StartTableDataImportJob"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpStartTableDataImportJobValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartTableDataImportJob(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opStartTableDataImportJob(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "StartTableDataImportJob", - } -} diff --git a/service/honeycode/api_op_TagResource.go b/service/honeycode/api_op_TagResource.go deleted file mode 100644 index ddf1e08b54d..00000000000 --- a/service/honeycode/api_op_TagResource.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The TagResource API allows you to add tags to an ARN-able resource. Resource -// -// includes workbook, table, screen and screen-automation. -func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { - if params == nil { - params = &TagResourceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*TagResourceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type TagResourceInput struct { - - // The resource's Amazon Resource Name (ARN). - // - // This member is required. - ResourceArn *string - - // A list of tags to apply to the resource. - // - // This member is required. - Tags map[string]string - - noSmithyDocumentSerde -} - -type TagResourceOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "TagResource"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpTagResourceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "TagResource", - } -} diff --git a/service/honeycode/api_op_UntagResource.go b/service/honeycode/api_op_UntagResource.go deleted file mode 100644 index 84ccd5cdc08..00000000000 --- a/service/honeycode/api_op_UntagResource.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The UntagResource API allows you to removes tags from an ARN-able resource. -// -// Resource includes workbook, table, screen and screen-automation. -func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { - if params == nil { - params = &UntagResourceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UntagResourceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UntagResourceInput struct { - - // The resource's Amazon Resource Name (ARN). - // - // This member is required. - ResourceArn *string - - // A list of tag keys to remove from the resource. - // - // This member is required. - TagKeys []string - - noSmithyDocumentSerde -} - -type UntagResourceOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UntagResource"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpUntagResourceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UntagResource", - } -} diff --git a/service/honeycode/auth.go b/service/honeycode/auth.go deleted file mode 100644 index 0b88434d806..00000000000 --- a/service/honeycode/auth.go +++ /dev/null @@ -1,284 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) { - params.Region = options.Region -} - -type setLegacyContextSigningOptionsMiddleware struct { -} - -func (*setLegacyContextSigningOptionsMiddleware) ID() string { - return "setLegacyContextSigningOptions" -} - -func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - rscheme := getResolvedAuthScheme(ctx) - schemeID := rscheme.Scheme.SchemeID() - - if sn := awsmiddleware.GetSigningName(ctx); sn != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) - } - } - - if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) - } - } - - return next.HandleFinalize(ctx, in) -} - -func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) -} - -type withAnonymous struct { - resolver AuthSchemeResolver -} - -var _ AuthSchemeResolver = (*withAnonymous)(nil) - -func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - opts, err := v.resolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return nil, err - } - - opts = append(opts, &smithyauth.Option{ - SchemeID: smithyauth.SchemeIDAnonymous, - }) - return opts, nil -} - -func wrapWithAnonymousAuth(options *Options) { - if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { - return - } - - options.AuthSchemeResolver = &withAnonymous{ - resolver: options.AuthSchemeResolver, - } -} - -// AuthResolverParameters contains the set of inputs necessary for auth scheme -// resolution. -type AuthResolverParameters struct { - // The name of the operation being invoked. - Operation string - - // The region in which the operation is being invoked. - Region string -} - -func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters { - params := &AuthResolverParameters{ - Operation: operation, - } - - bindAuthParamsRegion(params, input, options) - - return params -} - -// AuthSchemeResolver returns a set of possible authentication options for an -// operation. -type AuthSchemeResolver interface { - ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) -} - -type defaultAuthSchemeResolver struct{} - -var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) - -func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - if overrides, ok := operationAuthOptions[params.Operation]; ok { - return overrides(params), nil - } - return serviceAuthOptions(params), nil -} - -var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{} - -func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - { - SchemeID: smithyauth.SchemeIDSigV4, - SignerProperties: func() smithy.Properties { - var props smithy.Properties - smithyhttp.SetSigV4SigningName(&props, "honeycode") - smithyhttp.SetSigV4SigningRegion(&props, params.Region) - return props - }(), - }, - } -} - -type resolveAuthSchemeMiddleware struct { - operation string - options Options -} - -func (*resolveAuthSchemeMiddleware) ID() string { - return "ResolveAuthScheme" -} - -func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - params := bindAuthResolverParams(m.operation, getOperationInput(ctx), m.options) - options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) - } - - scheme, ok := m.selectScheme(options) - if !ok { - return out, metadata, fmt.Errorf("could not select an auth scheme") - } - - ctx = setResolvedAuthScheme(ctx, scheme) - return next.HandleFinalize(ctx, in) -} - -func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { - for _, option := range options { - if option.SchemeID == smithyauth.SchemeIDAnonymous { - return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true - } - - for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { - continue - } - - if scheme.IdentityResolver(m.options) != nil { - return newResolvedAuthScheme(scheme, option), true - } - } - } - - return nil, false -} - -type resolvedAuthSchemeKey struct{} - -type resolvedAuthScheme struct { - Scheme smithyhttp.AuthScheme - IdentityProperties smithy.Properties - SignerProperties smithy.Properties -} - -func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { - return &resolvedAuthScheme{ - Scheme: scheme, - IdentityProperties: option.IdentityProperties, - SignerProperties: option.SignerProperties, - } -} - -func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { - return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) -} - -func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { - v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) - return v -} - -type getIdentityMiddleware struct { - options Options -} - -func (*getIdentityMiddleware) ID() string { - return "GetIdentity" -} - -func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - resolver := rscheme.Scheme.IdentityResolver(m.options) - if resolver == nil { - return out, metadata, fmt.Errorf("no identity resolver") - } - - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) - if err != nil { - return out, metadata, fmt.Errorf("get identity: %w", err) - } - - ctx = setIdentity(ctx, identity) - return next.HandleFinalize(ctx, in) -} - -type identityKey struct{} - -func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { - return middleware.WithStackValue(ctx, identityKey{}, identity) -} - -func getIdentity(ctx context.Context) smithyauth.Identity { - v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) - return v -} - -type signRequestMiddleware struct { -} - -func (*signRequestMiddleware) ID() string { - return "Signing" -} - -func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - identity := getIdentity(ctx) - if identity == nil { - return out, metadata, fmt.Errorf("no identity") - } - - signer := rscheme.Scheme.Signer() - if signer == nil { - return out, metadata, fmt.Errorf("no signer") - } - - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { - return out, metadata, fmt.Errorf("sign request: %w", err) - } - - return next.HandleFinalize(ctx, in) -} diff --git a/service/honeycode/deserializers.go b/service/honeycode/deserializers.go deleted file mode 100644 index 9359af52cf8..00000000000 --- a/service/honeycode/deserializers.go +++ /dev/null @@ -1,4823 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" - "github.com/aws/aws-sdk-go-v2/service/honeycode/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" - "strings" -) - -type awsRestjson1_deserializeOpBatchCreateTableRows struct { -} - -func (*awsRestjson1_deserializeOpBatchCreateTableRows) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpBatchCreateTableRows) 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_deserializeOpErrorBatchCreateTableRows(response, &metadata) - } - output := &BatchCreateTableRowsOutput{} - 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_deserializeOpDocumentBatchCreateTableRowsOutput(&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_deserializeOpErrorBatchCreateTableRows(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(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("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(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_deserializeOpDocumentBatchCreateTableRowsOutput(v **BatchCreateTableRowsOutput, 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 *BatchCreateTableRowsOutput - if *v == nil { - sv = &BatchCreateTableRowsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "createdRows": - if err := awsRestjson1_deserializeDocumentCreatedRowsMap(&sv.CreatedRows, value); err != nil { - return err - } - - case "failedBatchItems": - if err := awsRestjson1_deserializeDocumentFailedBatchItems(&sv.FailedBatchItems, value); err != nil { - return err - } - - case "workbookCursor": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected WorkbookCursor to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.WorkbookCursor = i64 - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpBatchDeleteTableRows struct { -} - -func (*awsRestjson1_deserializeOpBatchDeleteTableRows) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpBatchDeleteTableRows) 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_deserializeOpErrorBatchDeleteTableRows(response, &metadata) - } - output := &BatchDeleteTableRowsOutput{} - 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_deserializeOpDocumentBatchDeleteTableRowsOutput(&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_deserializeOpErrorBatchDeleteTableRows(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(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_deserializeOpDocumentBatchDeleteTableRowsOutput(v **BatchDeleteTableRowsOutput, 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 *BatchDeleteTableRowsOutput - if *v == nil { - sv = &BatchDeleteTableRowsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "failedBatchItems": - if err := awsRestjson1_deserializeDocumentFailedBatchItems(&sv.FailedBatchItems, value); err != nil { - return err - } - - case "workbookCursor": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected WorkbookCursor to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.WorkbookCursor = i64 - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpBatchUpdateTableRows struct { -} - -func (*awsRestjson1_deserializeOpBatchUpdateTableRows) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpBatchUpdateTableRows) 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_deserializeOpErrorBatchUpdateTableRows(response, &metadata) - } - output := &BatchUpdateTableRowsOutput{} - 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_deserializeOpDocumentBatchUpdateTableRowsOutput(&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_deserializeOpErrorBatchUpdateTableRows(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(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_deserializeOpDocumentBatchUpdateTableRowsOutput(v **BatchUpdateTableRowsOutput, 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 *BatchUpdateTableRowsOutput - if *v == nil { - sv = &BatchUpdateTableRowsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "failedBatchItems": - if err := awsRestjson1_deserializeDocumentFailedBatchItems(&sv.FailedBatchItems, value); err != nil { - return err - } - - case "workbookCursor": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected WorkbookCursor to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.WorkbookCursor = i64 - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpBatchUpsertTableRows struct { -} - -func (*awsRestjson1_deserializeOpBatchUpsertTableRows) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpBatchUpsertTableRows) 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_deserializeOpErrorBatchUpsertTableRows(response, &metadata) - } - output := &BatchUpsertTableRowsOutput{} - 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_deserializeOpDocumentBatchUpsertTableRowsOutput(&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_deserializeOpErrorBatchUpsertTableRows(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(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("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(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_deserializeOpDocumentBatchUpsertTableRowsOutput(v **BatchUpsertTableRowsOutput, 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 *BatchUpsertTableRowsOutput - if *v == nil { - sv = &BatchUpsertTableRowsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "failedBatchItems": - if err := awsRestjson1_deserializeDocumentFailedBatchItems(&sv.FailedBatchItems, value); err != nil { - return err - } - - case "rows": - if err := awsRestjson1_deserializeDocumentUpsertRowsResultMap(&sv.Rows, value); err != nil { - return err - } - - case "workbookCursor": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected WorkbookCursor to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.WorkbookCursor = i64 - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDescribeTableDataImportJob struct { -} - -func (*awsRestjson1_deserializeOpDescribeTableDataImportJob) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDescribeTableDataImportJob) 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_deserializeOpErrorDescribeTableDataImportJob(response, &metadata) - } - output := &DescribeTableDataImportJobOutput{} - 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_deserializeOpDocumentDescribeTableDataImportJobOutput(&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_deserializeOpErrorDescribeTableDataImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(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_deserializeOpDocumentDescribeTableDataImportJobOutput(v **DescribeTableDataImportJobOutput, 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 *DescribeTableDataImportJobOutput - if *v == nil { - sv = &DescribeTableDataImportJobOutput{} - } 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 ErrorCode to be of type string, got %T instead", value) - } - sv.ErrorCode = types.ErrorCode(jtv) - } - - case "jobMetadata": - if err := awsRestjson1_deserializeDocumentTableDataImportJobMetadata(&sv.JobMetadata, value); err != nil { - return err - } - - case "jobStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TableDataImportJobStatus to be of type string, got %T instead", value) - } - sv.JobStatus = types.TableDataImportJobStatus(jtv) - } - - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TableDataImportJobMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetScreenData struct { -} - -func (*awsRestjson1_deserializeOpGetScreenData) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetScreenData) 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_deserializeOpErrorGetScreenData(response, &metadata) - } - output := &GetScreenDataOutput{} - 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_deserializeOpDocumentGetScreenDataOutput(&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_deserializeOpErrorGetScreenData(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(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_deserializeOpDocumentGetScreenDataOutput(v **GetScreenDataOutput, 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 *GetScreenDataOutput - if *v == nil { - sv = &GetScreenDataOutput{} - } 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 PaginationToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "results": - if err := awsRestjson1_deserializeDocumentResultSetMap(&sv.Results, value); err != nil { - return err - } - - case "workbookCursor": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected WorkbookCursor to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.WorkbookCursor = i64 - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpInvokeScreenAutomation struct { -} - -func (*awsRestjson1_deserializeOpInvokeScreenAutomation) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpInvokeScreenAutomation) 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_deserializeOpErrorInvokeScreenAutomation(response, &metadata) - } - output := &InvokeScreenAutomationOutput{} - 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_deserializeOpDocumentInvokeScreenAutomationOutput(&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_deserializeOpErrorInvokeScreenAutomation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("AutomationExecutionException", errorCode): - return awsRestjson1_deserializeErrorAutomationExecutionException(response, errorBody) - - case strings.EqualFold("AutomationExecutionTimeoutException", errorCode): - return awsRestjson1_deserializeErrorAutomationExecutionTimeoutException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(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("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(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_deserializeOpDocumentInvokeScreenAutomationOutput(v **InvokeScreenAutomationOutput, 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 *InvokeScreenAutomationOutput - if *v == nil { - sv = &InvokeScreenAutomationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "workbookCursor": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected WorkbookCursor to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.WorkbookCursor = i64 - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListTableColumns struct { -} - -func (*awsRestjson1_deserializeOpListTableColumns) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListTableColumns) 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_deserializeOpErrorListTableColumns(response, &metadata) - } - output := &ListTableColumnsOutput{} - 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_deserializeOpDocumentListTableColumnsOutput(&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_deserializeOpErrorListTableColumns(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(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_deserializeOpDocumentListTableColumnsOutput(v **ListTableColumnsOutput, 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 *ListTableColumnsOutput - if *v == nil { - sv = &ListTableColumnsOutput{} - } 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 PaginationToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "tableColumns": - if err := awsRestjson1_deserializeDocumentTableColumns(&sv.TableColumns, value); err != nil { - return err - } - - case "workbookCursor": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected WorkbookCursor to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.WorkbookCursor = i64 - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListTableRows struct { -} - -func (*awsRestjson1_deserializeOpListTableRows) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListTableRows) 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_deserializeOpErrorListTableRows(response, &metadata) - } - output := &ListTableRowsOutput{} - 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_deserializeOpDocumentListTableRowsOutput(&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_deserializeOpErrorListTableRows(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(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_deserializeOpDocumentListTableRowsOutput(v **ListTableRowsOutput, 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 *ListTableRowsOutput - if *v == nil { - sv = &ListTableRowsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "columnIds": - if err := awsRestjson1_deserializeDocumentResourceIds(&sv.ColumnIds, value); err != nil { - return err - } - - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "rowIdsNotFound": - if err := awsRestjson1_deserializeDocumentRowIdList(&sv.RowIdsNotFound, value); err != nil { - return err - } - - case "rows": - if err := awsRestjson1_deserializeDocumentTableRows(&sv.Rows, value); err != nil { - return err - } - - case "workbookCursor": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected WorkbookCursor to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.WorkbookCursor = i64 - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListTables struct { -} - -func (*awsRestjson1_deserializeOpListTables) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListTables) 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_deserializeOpErrorListTables(response, &metadata) - } - output := &ListTablesOutput{} - 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_deserializeOpDocumentListTablesOutput(&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_deserializeOpErrorListTables(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(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_deserializeOpDocumentListTablesOutput(v **ListTablesOutput, 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 *ListTablesOutput - if *v == nil { - sv = &ListTablesOutput{} - } 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 PaginationToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "tables": - if err := awsRestjson1_deserializeDocumentTables(&sv.Tables, value); err != nil { - return err - } - - case "workbookCursor": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected WorkbookCursor to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.WorkbookCursor = i64 - } - - 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 - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListTagsForResourceOutput - if *v == nil { - sv = &ListTagsForResourceOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "tags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpQueryTableRows struct { -} - -func (*awsRestjson1_deserializeOpQueryTableRows) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpQueryTableRows) 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_deserializeOpErrorQueryTableRows(response, &metadata) - } - output := &QueryTableRowsOutput{} - 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_deserializeOpDocumentQueryTableRowsOutput(&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_deserializeOpErrorQueryTableRows(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(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_deserializeOpDocumentQueryTableRowsOutput(v **QueryTableRowsOutput, 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 *QueryTableRowsOutput - if *v == nil { - sv = &QueryTableRowsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "columnIds": - if err := awsRestjson1_deserializeDocumentResourceIds(&sv.ColumnIds, value); err != nil { - return err - } - - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "rows": - if err := awsRestjson1_deserializeDocumentTableRows(&sv.Rows, value); err != nil { - return err - } - - case "workbookCursor": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected WorkbookCursor to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.WorkbookCursor = i64 - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpStartTableDataImportJob struct { -} - -func (*awsRestjson1_deserializeOpStartTableDataImportJob) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpStartTableDataImportJob) 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_deserializeOpErrorStartTableDataImportJob(response, &metadata) - } - output := &StartTableDataImportJobOutput{} - 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_deserializeOpDocumentStartTableDataImportJobOutput(&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_deserializeOpErrorStartTableDataImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(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("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(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_deserializeOpDocumentStartTableDataImportJobOutput(v **StartTableDataImportJobOutput, 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 *StartTableDataImportJobOutput - if *v == nil { - sv = &StartTableDataImportJobOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "jobId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected JobId to be of type string, got %T instead", value) - } - sv.JobId = ptr.String(jtv) - } - - case "jobStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TableDataImportJobStatus to be of type string, got %T instead", value) - } - sv.JobStatus = types.TableDataImportJobStatus(jtv) - } - - 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 - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(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 - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(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_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_deserializeErrorAutomationExecutionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AutomationExecutionException{} - 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_deserializeDocumentAutomationExecutionException(&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_deserializeErrorAutomationExecutionTimeoutException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AutomationExecutionTimeoutException{} - 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_deserializeDocumentAutomationExecutionTimeoutException(&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) - - return output -} - -func awsRestjson1_deserializeErrorRequestTimeoutException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.RequestTimeoutException{} - 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_deserializeDocumentRequestTimeoutException(&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_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ServiceUnavailableException{} - 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_deserializeDocumentServiceUnavailableException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ThrottlingException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentThrottlingException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ValidationException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentValidationException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AccessDeniedException - if *v == nil { - sv = &types.AccessDeniedException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAutomationExecutionException(v **types.AutomationExecutionException, 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.AutomationExecutionException - if *v == nil { - sv = &types.AutomationExecutionException{} - } 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 ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAutomationExecutionTimeoutException(v **types.AutomationExecutionTimeoutException, 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.AutomationExecutionTimeoutException - if *v == nil { - sv = &types.AutomationExecutionTimeoutException{} - } 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 ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentCell(v **types.Cell, 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.Cell - if *v == nil { - sv = &types.Cell{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "format": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Format to be of type string, got %T instead", value) - } - sv.Format = types.Format(jtv) - } - - case "formattedValue": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected FormattedValue to be of type string, got %T instead", value) - } - sv.FormattedValue = ptr.String(jtv) - } - - case "formattedValues": - if err := awsRestjson1_deserializeDocumentFormattedValuesList(&sv.FormattedValues, value); err != nil { - return err - } - - case "formula": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Formula to be of type string, got %T instead", value) - } - sv.Formula = ptr.String(jtv) - } - - case "rawValue": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RawValue to be of type string, got %T instead", value) - } - sv.RawValue = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentCells(v *[]types.Cell, 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.Cell - if *v == nil { - cv = []types.Cell{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.Cell - destAddr := &col - if err := awsRestjson1_deserializeDocumentCell(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentColumnMetadata(v **types.ColumnMetadata, 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.ColumnMetadata - if *v == nil { - sv = &types.ColumnMetadata{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "format": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Format to be of type string, got %T instead", value) - } - sv.Format = types.Format(jtv) - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Name to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentCreatedRowsMap(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 RowId to be of type string, got %T instead", value) - } - parsedVal = jtv - } - mv[key] = parsedVal - - } - *v = mv - return nil -} - -func awsRestjson1_deserializeDocumentDataItem(v **types.DataItem, 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.DataItem - if *v == nil { - sv = &types.DataItem{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "formattedValue": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected FormattedValue to be of type string, got %T instead", value) - } - sv.FormattedValue = ptr.String(jtv) - } - - case "overrideFormat": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Format to be of type string, got %T instead", value) - } - sv.OverrideFormat = types.Format(jtv) - } - - case "rawValue": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RawValue to be of type string, got %T instead", value) - } - sv.RawValue = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentDataItems(v *[]types.DataItem, 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.DataItem - if *v == nil { - cv = []types.DataItem{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.DataItem - destAddr := &col - if err := awsRestjson1_deserializeDocumentDataItem(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentDelimitedTextImportOptions(v **types.DelimitedTextImportOptions, 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.DelimitedTextImportOptions - if *v == nil { - sv = &types.DelimitedTextImportOptions{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "dataCharacterEncoding": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ImportDataCharacterEncoding to be of type string, got %T instead", value) - } - sv.DataCharacterEncoding = types.ImportDataCharacterEncoding(jtv) - } - - case "delimiter": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DelimitedTextDelimiter to be of type string, got %T instead", value) - } - sv.Delimiter = ptr.String(jtv) - } - - case "hasHeaderRow": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected HasHeaderRow to be of type *bool, got %T instead", value) - } - sv.HasHeaderRow = jtv - } - - case "ignoreEmptyRows": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected IgnoreEmptyRows to be of type *bool, got %T instead", value) - } - sv.IgnoreEmptyRows = jtv - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentDestinationOptions(v **types.DestinationOptions, 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.DestinationOptions - if *v == nil { - sv = &types.DestinationOptions{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "columnMap": - if err := awsRestjson1_deserializeDocumentImportColumnMap(&sv.ColumnMap, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentFailedBatchItem(v **types.FailedBatchItem, 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.FailedBatchItem - if *v == nil { - sv = &types.FailedBatchItem{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "errorMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected BatchErrorMessage to be of type string, got %T instead", value) - } - sv.ErrorMessage = ptr.String(jtv) - } - - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected BatchItemId to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentFailedBatchItems(v *[]types.FailedBatchItem, 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.FailedBatchItem - if *v == nil { - cv = []types.FailedBatchItem{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.FailedBatchItem - destAddr := &col - if err := awsRestjson1_deserializeDocumentFailedBatchItem(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentFormattedValuesList(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 FormattedValue to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentImportColumnMap(v *map[string]types.SourceDataColumnProperties, 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.SourceDataColumnProperties - if *v == nil { - mv = map[string]types.SourceDataColumnProperties{} - } else { - mv = *v - } - - for key, value := range shape { - var parsedVal types.SourceDataColumnProperties - mapVar := parsedVal - destAddr := &mapVar - if err := awsRestjson1_deserializeDocumentSourceDataColumnProperties(&destAddr, value); err != nil { - return err - } - parsedVal = *destAddr - mv[key] = parsedVal - - } - *v = mv - return nil -} - -func awsRestjson1_deserializeDocumentImportDataSource(v **types.ImportDataSource, 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.ImportDataSource - if *v == nil { - sv = &types.ImportDataSource{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "dataSourceConfig": - if err := awsRestjson1_deserializeDocumentImportDataSourceConfig(&sv.DataSourceConfig, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentImportDataSourceConfig(v **types.ImportDataSourceConfig, 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.ImportDataSourceConfig - if *v == nil { - sv = &types.ImportDataSourceConfig{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "dataSourceUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecureURL to be of type string, got %T instead", value) - } - sv.DataSourceUrl = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentImportJobSubmitter(v **types.ImportJobSubmitter, 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.ImportJobSubmitter - if *v == nil { - sv = &types.ImportJobSubmitter{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "email": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Email to be of type string, got %T instead", value) - } - sv.Email = ptr.String(jtv) - } - - case "userArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AwsUserArn to be of type string, got %T instead", value) - } - sv.UserArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentImportOptions(v **types.ImportOptions, 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.ImportOptions - if *v == nil { - sv = &types.ImportOptions{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "delimitedTextOptions": - if err := awsRestjson1_deserializeDocumentDelimitedTextImportOptions(&sv.DelimitedTextOptions, value); err != nil { - return err - } - - case "destinationOptions": - if err := awsRestjson1_deserializeDocumentDestinationOptions(&sv.DestinationOptions, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - 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 ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentRequestTimeoutException(v **types.RequestTimeoutException, 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.RequestTimeoutException - if *v == nil { - sv = &types.RequestTimeoutException{} - } 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 ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentResourceIds(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 ResourceId to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - 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 ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentResultHeader(v *[]types.ColumnMetadata, 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.ColumnMetadata - if *v == nil { - cv = []types.ColumnMetadata{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ColumnMetadata - destAddr := &col - if err := awsRestjson1_deserializeDocumentColumnMetadata(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentResultRow(v **types.ResultRow, 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.ResultRow - if *v == nil { - sv = &types.ResultRow{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "dataItems": - if err := awsRestjson1_deserializeDocumentDataItems(&sv.DataItems, value); err != nil { - return err - } - - case "rowId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RowId to be of type string, got %T instead", value) - } - sv.RowId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentResultRows(v *[]types.ResultRow, 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.ResultRow - if *v == nil { - cv = []types.ResultRow{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ResultRow - destAddr := &col - if err := awsRestjson1_deserializeDocumentResultRow(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentResultSet(v **types.ResultSet, 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.ResultSet - if *v == nil { - sv = &types.ResultSet{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "headers": - if err := awsRestjson1_deserializeDocumentResultHeader(&sv.Headers, value); err != nil { - return err - } - - case "rows": - if err := awsRestjson1_deserializeDocumentResultRows(&sv.Rows, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentResultSetMap(v *map[string]types.ResultSet, 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.ResultSet - if *v == nil { - mv = map[string]types.ResultSet{} - } else { - mv = *v - } - - for key, value := range shape { - var parsedVal types.ResultSet - mapVar := parsedVal - destAddr := &mapVar - if err := awsRestjson1_deserializeDocumentResultSet(&destAddr, value); err != nil { - return err - } - parsedVal = *destAddr - mv[key] = parsedVal - - } - *v = mv - return nil -} - -func awsRestjson1_deserializeDocumentRowIdList(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 RowId to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - 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 ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, 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.ServiceUnavailableException - if *v == nil { - sv = &types.ServiceUnavailableException{} - } 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 ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentSourceDataColumnProperties(v **types.SourceDataColumnProperties, 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.SourceDataColumnProperties - if *v == nil { - sv = &types.SourceDataColumnProperties{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "columnIndex": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected SourceDataColumnIndex to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ColumnIndex = ptr.Int32(int32(i64)) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentTable(v **types.Table, 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.Table - if *v == nil { - sv = &types.Table{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "tableId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) - } - sv.TableId = ptr.String(jtv) - } - - case "tableName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TableName to be of type string, got %T instead", value) - } - sv.TableName = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentTableColumn(v **types.TableColumn, 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.TableColumn - if *v == nil { - sv = &types.TableColumn{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "format": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Format to be of type string, got %T instead", value) - } - sv.Format = types.Format(jtv) - } - - case "tableColumnId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) - } - sv.TableColumnId = ptr.String(jtv) - } - - case "tableColumnName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TableColumnName to be of type string, got %T instead", value) - } - sv.TableColumnName = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentTableColumns(v *[]types.TableColumn, 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.TableColumn - if *v == nil { - cv = []types.TableColumn{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.TableColumn - destAddr := &col - if err := awsRestjson1_deserializeDocumentTableColumn(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentTableDataImportJobMetadata(v **types.TableDataImportJobMetadata, 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.TableDataImportJobMetadata - if *v == nil { - sv = &types.TableDataImportJobMetadata{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "dataSource": - if err := awsRestjson1_deserializeDocumentImportDataSource(&sv.DataSource, value); err != nil { - return err - } - - case "importOptions": - if err := awsRestjson1_deserializeDocumentImportOptions(&sv.ImportOptions, value); err != nil { - return err - } - - case "submitter": - if err := awsRestjson1_deserializeDocumentImportJobSubmitter(&sv.Submitter, value); err != nil { - return err - } - - case "submitTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.SubmitTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected TimestampInMillis to be a JSON Number, got %T instead", value) - - } - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentTableRow(v **types.TableRow, 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.TableRow - if *v == nil { - sv = &types.TableRow{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "cells": - if err := awsRestjson1_deserializeDocumentCells(&sv.Cells, value); err != nil { - return err - } - - case "rowId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RowId to be of type string, got %T instead", value) - } - sv.RowId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentTableRows(v *[]types.TableRow, 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.TableRow - if *v == nil { - cv = []types.TableRow{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.TableRow - destAddr := &col - if err := awsRestjson1_deserializeDocumentTableRow(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentTables(v *[]types.Table, 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.Table - if *v == nil { - cv = []types.Table{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.Table - destAddr := &col - if err := awsRestjson1_deserializeDocumentTable(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentTagsMap(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_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 ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentUpsertRowsResult(v **types.UpsertRowsResult, 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.UpsertRowsResult - if *v == nil { - sv = &types.UpsertRowsResult{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "rowIds": - if err := awsRestjson1_deserializeDocumentRowIdList(&sv.RowIds, value); err != nil { - return err - } - - case "upsertAction": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UpsertAction to be of type string, got %T instead", value) - } - sv.UpsertAction = types.UpsertAction(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentUpsertRowsResultMap(v *map[string]types.UpsertRowsResult, 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.UpsertRowsResult - if *v == nil { - mv = map[string]types.UpsertRowsResult{} - } else { - mv = *v - } - - for key, value := range shape { - var parsedVal types.UpsertRowsResult - mapVar := parsedVal - destAddr := &mapVar - if err := awsRestjson1_deserializeDocumentUpsertRowsResult(&destAddr, value); err != nil { - return err - } - parsedVal = *destAddr - mv[key] = parsedVal - - } - *v = mv - return nil -} - -func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ValidationException - if *v == nil { - sv = &types.ValidationException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} diff --git a/service/honeycode/doc.go b/service/honeycode/doc.go deleted file mode 100644 index 322ca7443dd..00000000000 --- a/service/honeycode/doc.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -// Package honeycode provides the API client, operations, and parameter types for -// Amazon Honeycode. -// -// Amazon Honeycode is a fully managed service that allows you to quickly build -// -// mobile and web apps for teams—without programming. Build Honeycode apps for -// managing almost anything, like projects, customers, operations, approvals, -// resources, and even your team. -package honeycode diff --git a/service/honeycode/endpoints.go b/service/honeycode/endpoints.go deleted file mode 100644 index 5bb99625bed..00000000000 --- a/service/honeycode/endpoints.go +++ /dev/null @@ -1,516 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - "github.com/aws/aws-sdk-go-v2/internal/endpoints" - "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" - internalendpoints "github.com/aws/aws-sdk-go-v2/service/honeycode/internal/endpoints" - smithyauth "github.com/aws/smithy-go/auth" - smithyendpoints "github.com/aws/smithy-go/endpoints" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" - "net/url" - "os" - "strings" -) - -// EndpointResolverOptions is the service endpoint resolver options -type EndpointResolverOptions = internalendpoints.Options - -// EndpointResolver interface for resolving service endpoints. -type EndpointResolver interface { - ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) -} - -var _ EndpointResolver = &internalendpoints.Resolver{} - -// NewDefaultEndpointResolver constructs a new service endpoint resolver -func NewDefaultEndpointResolver() *internalendpoints.Resolver { - return internalendpoints.New() -} - -// EndpointResolverFunc is a helper utility that wraps a function so it satisfies -// the EndpointResolver interface. This is useful when you want to add additional -// endpoint resolving logic, or stub out specific endpoints with custom values. -type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) - -func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return fn(region, options) -} - -// EndpointResolverFromURL returns an EndpointResolver configured using the -// provided endpoint url. By default, the resolved endpoint resolver uses the -// client region as signing region, and the endpoint source is set to -// EndpointSourceCustom.You can provide functional options to configure endpoint -// values for the resolved endpoint. -func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { - e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} - for _, fn := range optFns { - fn(&e) - } - - return EndpointResolverFunc( - func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { - if len(e.SigningRegion) == 0 { - e.SigningRegion = region - } - return e, nil - }, - ) -} - -type ResolveEndpoint struct { - Resolver EndpointResolver - Options EndpointResolverOptions -} - -func (*ResolveEndpoint) ID() string { - return "ResolveEndpoint" -} - -func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleSerialize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.Resolver == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - eo := m.Options - eo.Logger = middleware.GetLogger(ctx) - - var endpoint aws.Endpoint - endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) - if err != nil { - nf := (&aws.EndpointNotFoundError{}) - if errors.As(err, &nf) { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) - return next.HandleSerialize(ctx, in) - } - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - req.URL, err = url.Parse(endpoint.URL) - if err != nil { - return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) - } - - if len(awsmiddleware.GetSigningName(ctx)) == 0 { - signingName := endpoint.SigningName - if len(signingName) == 0 { - signingName = "honeycode" - } - ctx = awsmiddleware.SetSigningName(ctx, signingName) - } - ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) - ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) - ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) - ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) - return next.HandleSerialize(ctx, in) -} -func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { - return stack.Serialize.Insert(&ResolveEndpoint{ - Resolver: o.EndpointResolver, - Options: o.EndpointOptions, - }, "OperationSerializer", middleware.Before) -} - -func removeResolveEndpointMiddleware(stack *middleware.Stack) error { - _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) - return err -} - -type wrappedEndpointResolver struct { - awsResolver aws.EndpointResolverWithOptions -} - -func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return w.awsResolver.ResolveEndpoint(ServiceID, region, options) -} - -type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) - -func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { - return a(service, region) -} - -var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) - -// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. -// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, -// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked -// via its middleware. -// -// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. -func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { - var resolver aws.EndpointResolverWithOptions - - if awsResolverWithOptions != nil { - resolver = awsResolverWithOptions - } else if awsResolver != nil { - resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) - } - - return &wrappedEndpointResolver{ - awsResolver: resolver, - } -} - -func finalizeClientEndpointResolverOptions(options *Options) { - options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() - - if len(options.EndpointOptions.ResolvedRegion) == 0 { - const fipsInfix = "-fips-" - const fipsPrefix = "fips-" - const fipsSuffix = "-fips" - - if strings.Contains(options.Region, fipsInfix) || - strings.Contains(options.Region, fipsPrefix) || - strings.Contains(options.Region, fipsSuffix) { - options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( - options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") - options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled - } - } - -} - -func resolveEndpointResolverV2(options *Options) { - if options.EndpointResolverV2 == nil { - options.EndpointResolverV2 = NewDefaultEndpointResolverV2() - } -} - -func resolveBaseEndpoint(cfg aws.Config, o *Options) { - if cfg.BaseEndpoint != nil { - o.BaseEndpoint = cfg.BaseEndpoint - } - - _, g := os.LookupEnv("AWS_ENDPOINT_URL") - _, s := os.LookupEnv("AWS_ENDPOINT_URL_HONEYCODE") - - if g && !s { - return - } - - value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "Honeycode", cfg.ConfigSources) - if found && err == nil { - o.BaseEndpoint = &value - } -} - -func bindRegion(region string) *string { - if region == "" { - return nil - } - return aws.String(endpoints.MapFIPSRegion(region)) -} - -// EndpointParameters provides the parameters that influence how endpoints are -// resolved. -type EndpointParameters struct { - // The AWS region used to dispatch the request. - // - // Parameter is - // required. - // - // AWS::Region - Region *string - - // When true, use the dual-stack endpoint. If the configured endpoint does not - // support dual-stack, dispatching the request MAY return an error. - // - // Defaults to - // false if no value is provided. - // - // AWS::UseDualStack - UseDualStack *bool - - // When true, send this request to the FIPS-compliant regional endpoint. If the - // configured endpoint does not have a FIPS compliant endpoint, dispatching the - // request will return an error. - // - // Defaults to false if no value is - // provided. - // - // AWS::UseFIPS - UseFIPS *bool - - // Override the endpoint used to send this request - // - // Parameter is - // required. - // - // SDK::Endpoint - Endpoint *string -} - -// ValidateRequired validates required parameters are set. -func (p EndpointParameters) ValidateRequired() error { - if p.UseDualStack == nil { - return fmt.Errorf("parameter UseDualStack is required") - } - - if p.UseFIPS == nil { - return fmt.Errorf("parameter UseFIPS is required") - } - - return nil -} - -// WithDefaults returns a shallow copy of EndpointParameterswith default values -// applied to members where applicable. -func (p EndpointParameters) WithDefaults() EndpointParameters { - if p.UseDualStack == nil { - p.UseDualStack = ptr.Bool(false) - } - - if p.UseFIPS == nil { - p.UseFIPS = ptr.Bool(false) - } - return p -} - -// EndpointResolverV2 provides the interface for resolving service endpoints. -type EndpointResolverV2 interface { - // ResolveEndpoint attempts to resolve the endpoint with the provided options, - // returning the endpoint if found. Otherwise an error is returned. - ResolveEndpoint(ctx context.Context, params EndpointParameters) ( - smithyendpoints.Endpoint, error, - ) -} - -// resolver provides the implementation for resolving endpoints. -type resolver struct{} - -func NewDefaultEndpointResolverV2() EndpointResolverV2 { - return &resolver{} -} - -// ResolveEndpoint attempts to resolve the endpoint with the provided options, -// returning the endpoint if found. Otherwise an error is returned. -func (r *resolver) ResolveEndpoint( - ctx context.Context, params EndpointParameters, -) ( - endpoint smithyendpoints.Endpoint, err error, -) { - params = params.WithDefaults() - if err = params.ValidateRequired(); err != nil { - return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) - } - _UseDualStack := *params.UseDualStack - _UseFIPS := *params.UseFIPS - - if exprVal := params.Endpoint; exprVal != nil { - _Endpoint := *exprVal - _ = _Endpoint - if _UseFIPS == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") - } - if _UseDualStack == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") - } - uriString := _Endpoint - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if exprVal := params.Region; exprVal != nil { - _Region := *exprVal - _ = _Region - if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { - _PartitionResult := *exprVal - _ = _PartitionResult - if _UseFIPS == true { - if _UseDualStack == true { - if true == _PartitionResult.SupportsFIPS { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://honeycode-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - } - } - if _UseFIPS == true { - if _PartitionResult.SupportsFIPS == true { - uriString := func() string { - var out strings.Builder - out.WriteString("https://honeycode-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") - } - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://honeycode.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://honeycode.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") -} - -type endpointParamsBinder interface { - bindEndpointParams(*EndpointParameters) -} - -func bindEndpointParams(input interface{}, options Options) *EndpointParameters { - params := &EndpointParameters{} - - params.Region = bindRegion(options.Region) - params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) - params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) - params.Endpoint = options.BaseEndpoint - - if b, ok := input.(endpointParamsBinder); ok { - b.bindEndpointParams(params) - } - - return params -} - -type resolveEndpointV2Middleware struct { - options Options -} - -func (*resolveEndpointV2Middleware) ID() string { - return "ResolveEndpointV2" -} - -func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.options.EndpointResolverV2 == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - params := bindEndpointParams(getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) - if err != nil { - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - if endpt.URI.RawPath == "" && req.URL.RawPath != "" { - endpt.URI.RawPath = endpt.URI.Path - } - req.URL.Scheme = endpt.URI.Scheme - req.URL.Host = endpt.URI.Host - req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) - req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) - for k := range endpt.Headers { - req.Header.Set(k, endpt.Headers.Get(k)) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) - for _, o := range opts { - rscheme.SignerProperties.SetAll(&o.SignerProperties) - } - - return next.HandleFinalize(ctx, in) -} diff --git a/service/honeycode/endpoints_config_test.go b/service/honeycode/endpoints_config_test.go deleted file mode 100644 index 65bf17efb33..00000000000 --- a/service/honeycode/endpoints_config_test.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - "os" - "reflect" - "testing" -) - -type mockConfigSource struct { - global string - service string - ignore bool -} - -// GetIgnoreConfiguredEndpoints is used in knowing when to disable configured -// endpoints feature. -func (m mockConfigSource) GetIgnoreConfiguredEndpoints(context.Context) (bool, bool, error) { - return m.ignore, m.ignore, nil -} - -// GetServiceBaseEndpoint is used to retrieve a normalized SDK ID for use -// with configured endpoints. -func (m mockConfigSource) GetServiceBaseEndpoint(ctx context.Context, sdkID string) (string, bool, error) { - if m.service != "" { - return m.service, true, nil - } - return "", false, nil -} - -func TestResolveBaseEndpoint(t *testing.T) { - cases := map[string]struct { - envGlobal string - envService string - envIgnore bool - configGlobal string - configService string - configIgnore bool - clientEndpoint *string - expectURL *string - }{ - "env ignore": { - envGlobal: "https://env-global.dev", - envService: "https://env-honeycode.dev", - envIgnore: true, - configGlobal: "http://config-global.dev", - configService: "http://config-honeycode.dev", - expectURL: nil, - }, - "env global": { - envGlobal: "https://env-global.dev", - configGlobal: "http://config-global.dev", - configService: "http://config-honeycode.dev", - expectURL: aws.String("https://env-global.dev"), - }, - "env service": { - envGlobal: "https://env-global.dev", - envService: "https://env-honeycode.dev", - configGlobal: "http://config-global.dev", - configService: "http://config-honeycode.dev", - expectURL: aws.String("https://env-honeycode.dev"), - }, - "config ignore": { - envGlobal: "https://env-global.dev", - envService: "https://env-honeycode.dev", - configGlobal: "http://config-global.dev", - configService: "http://config-honeycode.dev", - configIgnore: true, - expectURL: nil, - }, - "config global": { - configGlobal: "http://config-global.dev", - expectURL: aws.String("http://config-global.dev"), - }, - "config service": { - configGlobal: "http://config-global.dev", - configService: "http://config-honeycode.dev", - expectURL: aws.String("http://config-honeycode.dev"), - }, - "client": { - envGlobal: "https://env-global.dev", - envService: "https://env-honeycode.dev", - configGlobal: "http://config-global.dev", - configService: "http://config-honeycode.dev", - clientEndpoint: aws.String("https://client-honeycode.dev"), - expectURL: aws.String("https://client-honeycode.dev"), - }, - } - - for name, c := range cases { - t.Run(name, func(t *testing.T) { - os.Clearenv() - - awsConfig := aws.Config{} - ignore := c.envIgnore || c.configIgnore - - if c.configGlobal != "" && !ignore { - awsConfig.BaseEndpoint = aws.String(c.configGlobal) - } - - if c.envGlobal != "" { - t.Setenv("AWS_ENDPOINT_URL", c.envGlobal) - if !ignore { - awsConfig.BaseEndpoint = aws.String(c.envGlobal) - } - } - - if c.envService != "" { - t.Setenv("AWS_ENDPOINT_URL_HONEYCODE", c.envService) - } - - awsConfig.ConfigSources = []interface{}{ - mockConfigSource{ - global: c.envGlobal, - service: c.envService, - ignore: c.envIgnore, - }, - mockConfigSource{ - global: c.configGlobal, - service: c.configService, - ignore: c.configIgnore, - }, - } - - client := NewFromConfig(awsConfig, func(o *Options) { - if c.clientEndpoint != nil { - o.BaseEndpoint = c.clientEndpoint - } - }) - - if e, a := c.expectURL, client.options.BaseEndpoint; !reflect.DeepEqual(e, a) { - t.Errorf("expect endpoint %v , got %v", e, a) - } - }) - } -} diff --git a/service/honeycode/endpoints_test.go b/service/honeycode/endpoints_test.go deleted file mode 100644 index 2eac267e7b6..00000000000 --- a/service/honeycode/endpoints_test.go +++ /dev/null @@ -1,857 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - smithy "github.com/aws/smithy-go" - smithyendpoints "github.com/aws/smithy-go/endpoints" - "github.com/aws/smithy-go/ptr" - "net/http" - "net/url" - "reflect" - "strings" - "testing" -) - -// For region us-west-2 with FIPS disabled and DualStack disabled -func TestEndpointCase0(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-west-2"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode.us-west-2.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase1(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode-fips.us-east-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase2(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode-fips.us-east-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase3(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode.us-east-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase4(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode.us-east-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region cn-north-1 with FIPS enabled and DualStack enabled -func TestEndpointCase5(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode-fips.cn-north-1.api.amazonwebservices.com.cn") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region cn-north-1 with FIPS enabled and DualStack disabled -func TestEndpointCase6(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode-fips.cn-north-1.amazonaws.com.cn") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region cn-north-1 with FIPS disabled and DualStack enabled -func TestEndpointCase7(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode.cn-north-1.api.amazonwebservices.com.cn") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region cn-north-1 with FIPS disabled and DualStack disabled -func TestEndpointCase8(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode.cn-north-1.amazonaws.com.cn") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-gov-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode-fips.us-gov-east-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-gov-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode-fips.us-gov-east-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-gov-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase11(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode.us-gov-east-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-gov-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase12(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode.us-gov-east-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase13(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode-fips.us-iso-east-1.c2s.ic.gov") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase15(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode.us-iso-east-1.c2s.ic.gov") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-isob-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase17(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-isob-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase18(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-isob-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode-fips.us-isob-east-1.sc2s.sgov.gov") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-isob-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase19(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-isob-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-isob-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://honeycode.us-isob-east-1.sc2s.sgov.gov") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase21(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - Endpoint: ptr.String("https://example.com"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://example.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase22(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - Endpoint: ptr.String("https://example.com"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://example.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase23(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - Endpoint: ptr.String("https://example.com"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "Invalid Configuration: FIPS and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase24(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - Endpoint: ptr.String("https://example.com"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "Invalid Configuration: Dualstack and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// Missing region -func TestEndpointCase25(t *testing.T) { - var params = EndpointParameters{} - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} diff --git a/service/honeycode/generated.json b/service/honeycode/generated.json deleted file mode 100644 index 256dbbeb5cb..00000000000 --- a/service/honeycode/generated.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "dependencies": { - "github.com/aws/aws-sdk-go-v2": "v1.4.0", - "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", - "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/smithy-go": "v1.4.0" - }, - "files": [ - "api_client.go", - "api_client_test.go", - "api_op_BatchCreateTableRows.go", - "api_op_BatchDeleteTableRows.go", - "api_op_BatchUpdateTableRows.go", - "api_op_BatchUpsertTableRows.go", - "api_op_DescribeTableDataImportJob.go", - "api_op_GetScreenData.go", - "api_op_InvokeScreenAutomation.go", - "api_op_ListTableColumns.go", - "api_op_ListTableRows.go", - "api_op_ListTables.go", - "api_op_ListTagsForResource.go", - "api_op_QueryTableRows.go", - "api_op_StartTableDataImportJob.go", - "api_op_TagResource.go", - "api_op_UntagResource.go", - "auth.go", - "deserializers.go", - "doc.go", - "endpoints.go", - "endpoints_config_test.go", - "endpoints_test.go", - "generated.json", - "internal/endpoints/endpoints.go", - "internal/endpoints/endpoints_test.go", - "options.go", - "protocol_test.go", - "serializers.go", - "snapshot_test.go", - "types/enums.go", - "types/errors.go", - "types/types.go", - "validators.go" - ], - "go": "1.15", - "module": "github.com/aws/aws-sdk-go-v2/service/honeycode", - "unstable": false -} diff --git a/service/honeycode/go.mod b/service/honeycode/go.mod deleted file mode 100644 index 1f0e73415ef..00000000000 --- a/service/honeycode/go.mod +++ /dev/null @@ -1,16 +0,0 @@ -module github.com/aws/aws-sdk-go-v2/service/honeycode - -go 1.20 - -require ( - github.com/aws/aws-sdk-go-v2 v1.26.1 - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 - github.com/aws/smithy-go v1.20.2 -) - -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/honeycode/go.sum b/service/honeycode/go.sum deleted file mode 100644 index 4641fc37614..00000000000 --- a/service/honeycode/go.sum +++ /dev/null @@ -1,2 +0,0 @@ -github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= -github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= diff --git a/service/honeycode/go_module_metadata.go b/service/honeycode/go_module_metadata.go deleted file mode 100644 index ffc7862646d..00000000000 --- a/service/honeycode/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package honeycode - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.21.5" diff --git a/service/honeycode/internal/endpoints/endpoints.go b/service/honeycode/internal/endpoints/endpoints.go deleted file mode 100644 index 6f47775abc0..00000000000 --- a/service/honeycode/internal/endpoints/endpoints.go +++ /dev/null @@ -1,301 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package endpoints - -import ( - "github.com/aws/aws-sdk-go-v2/aws" - endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" - "github.com/aws/smithy-go/logging" - "regexp" -) - -// Options is the endpoint resolver configuration options -type Options struct { - // Logger is a logging implementation that log events should be sent to. - Logger logging.Logger - - // LogDeprecated indicates that deprecated endpoints should be logged to the - // provided logger. - LogDeprecated bool - - // ResolvedRegion is used to override the region to be resolved, rather then the - // using the value passed to the ResolveEndpoint method. This value is used by the - // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative - // name. You must not set this value directly in your application. - ResolvedRegion string - - // DisableHTTPS informs the resolver to return an endpoint that does not use the - // HTTPS scheme. - DisableHTTPS bool - - // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. - UseDualStackEndpoint aws.DualStackEndpointState - - // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. - UseFIPSEndpoint aws.FIPSEndpointState -} - -func (o Options) GetResolvedRegion() string { - return o.ResolvedRegion -} - -func (o Options) GetDisableHTTPS() bool { - return o.DisableHTTPS -} - -func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { - return o.UseDualStackEndpoint -} - -func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { - return o.UseFIPSEndpoint -} - -func transformToSharedOptions(options Options) endpoints.Options { - return endpoints.Options{ - Logger: options.Logger, - LogDeprecated: options.LogDeprecated, - ResolvedRegion: options.ResolvedRegion, - DisableHTTPS: options.DisableHTTPS, - UseDualStackEndpoint: options.UseDualStackEndpoint, - UseFIPSEndpoint: options.UseFIPSEndpoint, - } -} - -// Resolver Honeycode endpoint resolver -type Resolver struct { - partitions endpoints.Partitions -} - -// ResolveEndpoint resolves the service endpoint for the given region and options -func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { - if len(region) == 0 { - return endpoint, &aws.MissingRegionError{} - } - - opt := transformToSharedOptions(options) - return r.partitions.ResolveEndpoint(region, opt) -} - -// New returns a new Resolver -func New() *Resolver { - return &Resolver{ - partitions: defaultPartitions, - } -} - -var partitionRegexp = struct { - Aws *regexp.Regexp - AwsCn *regexp.Regexp - AwsIso *regexp.Regexp - AwsIsoB *regexp.Regexp - AwsIsoE *regexp.Regexp - AwsIsoF *regexp.Regexp - AwsUsGov *regexp.Regexp -}{ - - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), - AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), - AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), - AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), - AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), - AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), - AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), -} - -var defaultPartitions = endpoints.Partitions{ - { - ID: "aws", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "honeycode.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "honeycode-fips.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "honeycode-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "honeycode.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.Aws, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "us-west-2", - }: endpoints.Endpoint{}, - }, - }, - { - ID: "aws-cn", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "honeycode.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "honeycode-fips.{region}.amazonaws.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "honeycode-fips.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "honeycode.{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: "honeycode-fips.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "honeycode.{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: "honeycode-fips.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "honeycode.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoB, - IsRegionalized: true, - }, - { - ID: "aws-iso-e", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "honeycode-fips.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "honeycode.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoE, - IsRegionalized: true, - }, - { - ID: "aws-iso-f", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "honeycode-fips.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "honeycode.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoF, - IsRegionalized: true, - }, - { - ID: "aws-us-gov", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "honeycode.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "honeycode-fips.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "honeycode-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "honeycode.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsUsGov, - IsRegionalized: true, - }, -} diff --git a/service/honeycode/internal/endpoints/endpoints_test.go b/service/honeycode/internal/endpoints/endpoints_test.go deleted file mode 100644 index 08e5da2d833..00000000000 --- a/service/honeycode/internal/endpoints/endpoints_test.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package endpoints - -import ( - "testing" -) - -func TestRegexCompile(t *testing.T) { - _ = defaultPartitions -} diff --git a/service/honeycode/options.go b/service/honeycode/options.go deleted file mode 100644 index 3cc0428c01b..00000000000 --- a/service/honeycode/options.go +++ /dev/null @@ -1,224 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" -) - -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -type Options struct { - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - APIOptions []func(*middleware.Stack) error - - // The optional application specific identifier appended to the User-Agent header. - AppID string - - // This endpoint will be given as input to an EndpointResolverV2. It is used for - // providing a custom base endpoint that is subject to modifications by the - // processing EndpointResolverV2. - BaseEndpoint *string - - // Configures the events that will be sent to the configured logger. - ClientLogMode aws.ClientLogMode - - // The credentials object to use when signing requests. - Credentials aws.CredentialsProvider - - // The configuration DefaultsMode that the SDK should use when constructing the - // clients initial default settings. - DefaultsMode aws.DefaultsMode - - // The endpoint options to be used when attempting to resolve an endpoint. - EndpointOptions EndpointResolverOptions - - // The service endpoint resolver. - // - // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a - // value for this field will likely prevent you from using any endpoint-related - // service features released after the introduction of EndpointResolverV2 and - // BaseEndpoint. - // - // To migrate an EndpointResolver implementation that uses a custom endpoint, set - // the client option BaseEndpoint instead. - EndpointResolver EndpointResolver - - // Resolves the endpoint used for a particular service operation. This should be - // used over the deprecated EndpointResolver. - EndpointResolverV2 EndpointResolverV2 - - // Signature Version 4 (SigV4) Signer - HTTPSignerV4 HTTPSignerV4 - - // The logger writer interface to write logging messages to. - Logger logging.Logger - - // The region to send requests to. (Required) - Region string - - // RetryMaxAttempts specifies the maximum number attempts an API client will call - // an operation that fails with a retryable error. A value of 0 is ignored, and - // will not be used to configure the API client created default retryer, or modify - // per operation call's retry max attempts. - // - // If specified in an operation call's functional options with a value that is - // different than the constructed client's Options, the Client's Retryer will be - // wrapped to use the operation's specific RetryMaxAttempts value. - RetryMaxAttempts int - - // RetryMode specifies the retry mode the API client will be created with, if - // Retryer option is not also specified. - // - // When creating a new API Clients this member will only be used if the Retryer - // Options member is nil. This value will be ignored if Retryer is not nil. - // - // Currently does not support per operation call overrides, may in the future. - RetryMode aws.RetryMode - - // Retryer guides how HTTP requests should be retried in case of recoverable - // failures. When nil the API client will use a default retryer. The kind of - // default retry created by the API client can be changed with the RetryMode - // option. - Retryer aws.Retryer - - // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set - // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You - // should not populate this structure programmatically, or rely on the values here - // within your applications. - RuntimeEnvironment aws.RuntimeEnvironment - - // The initial DefaultsMode used when the client options were constructed. If the - // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved - // value was at that point in time. - // - // Currently does not support per operation call overrides, may in the future. - resolvedDefaultsMode aws.DefaultsMode - - // The HTTP client to invoke API calls with. Defaults to client's default HTTP - // implementation if nil. - HTTPClient HTTPClient - - // The auth scheme resolver which determines how to authenticate for each - // operation. - AuthSchemeResolver AuthSchemeResolver - - // The list of auth schemes supported by the client. - AuthSchemes []smithyhttp.AuthScheme -} - -// Copy creates a clone where the APIOptions list is deep copied. -func (o Options) Copy() Options { - to := o - to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) - copy(to.APIOptions, o.APIOptions) - - return to -} - -func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { - if schemeID == "aws.auth#sigv4" { - return getSigV4IdentityResolver(o) - } - if schemeID == "smithy.api#noAuth" { - return &smithyauth.AnonymousIdentityResolver{} - } - return nil -} - -// WithAPIOptions returns a functional option for setting the Client's APIOptions -// option. -func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { - return func(o *Options) { - o.APIOptions = append(o.APIOptions, optFns...) - } -} - -// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for -// this field will likely prevent you from using any endpoint-related service -// features released after the introduction of EndpointResolverV2 and BaseEndpoint. -// -// To migrate an EndpointResolver implementation that uses a custom endpoint, set -// the client option BaseEndpoint instead. -func WithEndpointResolver(v EndpointResolver) func(*Options) { - return func(o *Options) { - o.EndpointResolver = v - } -} - -// WithEndpointResolverV2 returns a functional option for setting the Client's -// EndpointResolverV2 option. -func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { - return func(o *Options) { - o.EndpointResolverV2 = v - } -} - -func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { - if o.Credentials != nil { - return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} - } - return nil -} - -// WithSigV4SigningName applies an override to the authentication workflow to -// use the given signing name for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing name from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningName(name string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), - middleware.Before, - ) - }) - } -} - -// WithSigV4SigningRegion applies an override to the authentication workflow to -// use the given signing region for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing region from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningRegion(region string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), - middleware.Before, - ) - }) - } -} - -func ignoreAnonymousAuth(options *Options) { - if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { - options.Credentials = nil - } -} diff --git a/service/honeycode/protocol_test.go b/service/honeycode/protocol_test.go deleted file mode 100644 index ef0394df1d5..00000000000 --- a/service/honeycode/protocol_test.go +++ /dev/null @@ -1,3 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode diff --git a/service/honeycode/serializers.go b/service/honeycode/serializers.go deleted file mode 100644 index 84f012764ea..00000000000 --- a/service/honeycode/serializers.go +++ /dev/null @@ -1,1780 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "bytes" - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/honeycode/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_serializeOpBatchCreateTableRows struct { -} - -func (*awsRestjson1_serializeOpBatchCreateTableRows) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpBatchCreateTableRows) 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.(*BatchCreateTableRowsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/workbooks/{workbookId}/tables/{tableId}/rows/batchcreate") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsBatchCreateTableRowsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentBatchCreateTableRowsInput(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_serializeOpHttpBindingsBatchCreateTableRowsInput(v *BatchCreateTableRowsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.TableId == nil || len(*v.TableId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member tableId must not be empty")} - } - if v.TableId != nil { - if err := encoder.SetURI("tableId").String(*v.TableId); err != nil { - return err - } - } - - if v.WorkbookId == nil || len(*v.WorkbookId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member workbookId must not be empty")} - } - if v.WorkbookId != nil { - if err := encoder.SetURI("workbookId").String(*v.WorkbookId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentBatchCreateTableRowsInput(v *BatchCreateTableRowsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("clientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.RowsToCreate != nil { - ok := object.Key("rowsToCreate") - if err := awsRestjson1_serializeDocumentCreateRowDataList(v.RowsToCreate, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpBatchDeleteTableRows struct { -} - -func (*awsRestjson1_serializeOpBatchDeleteTableRows) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpBatchDeleteTableRows) 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.(*BatchDeleteTableRowsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/workbooks/{workbookId}/tables/{tableId}/rows/batchdelete") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsBatchDeleteTableRowsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentBatchDeleteTableRowsInput(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_serializeOpHttpBindingsBatchDeleteTableRowsInput(v *BatchDeleteTableRowsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.TableId == nil || len(*v.TableId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member tableId must not be empty")} - } - if v.TableId != nil { - if err := encoder.SetURI("tableId").String(*v.TableId); err != nil { - return err - } - } - - if v.WorkbookId == nil || len(*v.WorkbookId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member workbookId must not be empty")} - } - if v.WorkbookId != nil { - if err := encoder.SetURI("workbookId").String(*v.WorkbookId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentBatchDeleteTableRowsInput(v *BatchDeleteTableRowsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("clientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.RowIds != nil { - ok := object.Key("rowIds") - if err := awsRestjson1_serializeDocumentRowIdList(v.RowIds, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpBatchUpdateTableRows struct { -} - -func (*awsRestjson1_serializeOpBatchUpdateTableRows) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpBatchUpdateTableRows) 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.(*BatchUpdateTableRowsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/workbooks/{workbookId}/tables/{tableId}/rows/batchupdate") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsBatchUpdateTableRowsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentBatchUpdateTableRowsInput(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_serializeOpHttpBindingsBatchUpdateTableRowsInput(v *BatchUpdateTableRowsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.TableId == nil || len(*v.TableId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member tableId must not be empty")} - } - if v.TableId != nil { - if err := encoder.SetURI("tableId").String(*v.TableId); err != nil { - return err - } - } - - if v.WorkbookId == nil || len(*v.WorkbookId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member workbookId must not be empty")} - } - if v.WorkbookId != nil { - if err := encoder.SetURI("workbookId").String(*v.WorkbookId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentBatchUpdateTableRowsInput(v *BatchUpdateTableRowsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("clientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.RowsToUpdate != nil { - ok := object.Key("rowsToUpdate") - if err := awsRestjson1_serializeDocumentUpdateRowDataList(v.RowsToUpdate, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpBatchUpsertTableRows struct { -} - -func (*awsRestjson1_serializeOpBatchUpsertTableRows) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpBatchUpsertTableRows) 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.(*BatchUpsertTableRowsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/workbooks/{workbookId}/tables/{tableId}/rows/batchupsert") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsBatchUpsertTableRowsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentBatchUpsertTableRowsInput(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_serializeOpHttpBindingsBatchUpsertTableRowsInput(v *BatchUpsertTableRowsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.TableId == nil || len(*v.TableId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member tableId must not be empty")} - } - if v.TableId != nil { - if err := encoder.SetURI("tableId").String(*v.TableId); err != nil { - return err - } - } - - if v.WorkbookId == nil || len(*v.WorkbookId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member workbookId must not be empty")} - } - if v.WorkbookId != nil { - if err := encoder.SetURI("workbookId").String(*v.WorkbookId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentBatchUpsertTableRowsInput(v *BatchUpsertTableRowsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("clientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.RowsToUpsert != nil { - ok := object.Key("rowsToUpsert") - if err := awsRestjson1_serializeDocumentUpsertRowDataList(v.RowsToUpsert, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDescribeTableDataImportJob struct { -} - -func (*awsRestjson1_serializeOpDescribeTableDataImportJob) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDescribeTableDataImportJob) 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.(*DescribeTableDataImportJobInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/workbooks/{workbookId}/tables/{tableId}/import/{jobId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDescribeTableDataImportJobInput(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_serializeOpHttpBindingsDescribeTableDataImportJobInput(v *DescribeTableDataImportJobInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.JobId == nil || len(*v.JobId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member jobId must not be empty")} - } - if v.JobId != nil { - if err := encoder.SetURI("jobId").String(*v.JobId); err != nil { - return err - } - } - - if v.TableId == nil || len(*v.TableId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member tableId must not be empty")} - } - if v.TableId != nil { - if err := encoder.SetURI("tableId").String(*v.TableId); err != nil { - return err - } - } - - if v.WorkbookId == nil || len(*v.WorkbookId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member workbookId must not be empty")} - } - if v.WorkbookId != nil { - if err := encoder.SetURI("workbookId").String(*v.WorkbookId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetScreenData struct { -} - -func (*awsRestjson1_serializeOpGetScreenData) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetScreenData) 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.(*GetScreenDataInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/screendata") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentGetScreenDataInput(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_serializeOpHttpBindingsGetScreenDataInput(v *GetScreenDataInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentGetScreenDataInput(v *GetScreenDataInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AppId != nil { - ok := object.Key("appId") - ok.String(*v.AppId) - } - - if v.MaxResults != nil { - ok := object.Key("maxResults") - ok.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - ok := object.Key("nextToken") - ok.String(*v.NextToken) - } - - if v.ScreenId != nil { - ok := object.Key("screenId") - ok.String(*v.ScreenId) - } - - if v.Variables != nil { - ok := object.Key("variables") - if err := awsRestjson1_serializeDocumentVariableValueMap(v.Variables, ok); err != nil { - return err - } - } - - if v.WorkbookId != nil { - ok := object.Key("workbookId") - ok.String(*v.WorkbookId) - } - - return nil -} - -type awsRestjson1_serializeOpInvokeScreenAutomation struct { -} - -func (*awsRestjson1_serializeOpInvokeScreenAutomation) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpInvokeScreenAutomation) 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.(*InvokeScreenAutomationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/workbooks/{workbookId}/apps/{appId}/screens/{screenId}/automations/{screenAutomationId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsInvokeScreenAutomationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentInvokeScreenAutomationInput(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_serializeOpHttpBindingsInvokeScreenAutomationInput(v *InvokeScreenAutomationInput, 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.ScreenAutomationId == nil || len(*v.ScreenAutomationId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member screenAutomationId must not be empty")} - } - if v.ScreenAutomationId != nil { - if err := encoder.SetURI("screenAutomationId").String(*v.ScreenAutomationId); err != nil { - return err - } - } - - if v.ScreenId == nil || len(*v.ScreenId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member screenId must not be empty")} - } - if v.ScreenId != nil { - if err := encoder.SetURI("screenId").String(*v.ScreenId); err != nil { - return err - } - } - - if v.WorkbookId == nil || len(*v.WorkbookId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member workbookId must not be empty")} - } - if v.WorkbookId != nil { - if err := encoder.SetURI("workbookId").String(*v.WorkbookId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentInvokeScreenAutomationInput(v *InvokeScreenAutomationInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("clientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.RowId != nil { - ok := object.Key("rowId") - ok.String(*v.RowId) - } - - if v.Variables != nil { - ok := object.Key("variables") - if err := awsRestjson1_serializeDocumentVariableValueMap(v.Variables, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListTableColumns struct { -} - -func (*awsRestjson1_serializeOpListTableColumns) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListTableColumns) 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.(*ListTableColumnsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/workbooks/{workbookId}/tables/{tableId}/columns") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListTableColumnsInput(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_serializeOpHttpBindingsListTableColumnsInput(v *ListTableColumnsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - - if v.TableId == nil || len(*v.TableId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member tableId must not be empty")} - } - if v.TableId != nil { - if err := encoder.SetURI("tableId").String(*v.TableId); err != nil { - return err - } - } - - if v.WorkbookId == nil || len(*v.WorkbookId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member workbookId must not be empty")} - } - if v.WorkbookId != nil { - if err := encoder.SetURI("workbookId").String(*v.WorkbookId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListTableRows struct { -} - -func (*awsRestjson1_serializeOpListTableRows) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListTableRows) 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.(*ListTableRowsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/workbooks/{workbookId}/tables/{tableId}/rows/list") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListTableRowsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentListTableRowsInput(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_serializeOpHttpBindingsListTableRowsInput(v *ListTableRowsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.TableId == nil || len(*v.TableId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member tableId must not be empty")} - } - if v.TableId != nil { - if err := encoder.SetURI("tableId").String(*v.TableId); err != nil { - return err - } - } - - if v.WorkbookId == nil || len(*v.WorkbookId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member workbookId must not be empty")} - } - if v.WorkbookId != nil { - if err := encoder.SetURI("workbookId").String(*v.WorkbookId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentListTableRowsInput(v *ListTableRowsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.MaxResults != nil { - ok := object.Key("maxResults") - ok.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - ok := object.Key("nextToken") - ok.String(*v.NextToken) - } - - if v.RowIds != nil { - ok := object.Key("rowIds") - if err := awsRestjson1_serializeDocumentRowIdList(v.RowIds, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListTables struct { -} - -func (*awsRestjson1_serializeOpListTables) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListTables) 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.(*ListTablesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/workbooks/{workbookId}/tables") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListTablesInput(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_serializeOpHttpBindingsListTablesInput(v *ListTablesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - - if v.WorkbookId == nil || len(*v.WorkbookId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member workbookId must not be empty")} - } - if v.WorkbookId != nil { - if err := encoder.SetURI("workbookId").String(*v.WorkbookId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListTagsForResource struct { -} - -func (*awsRestjson1_serializeOpListTagsForResource) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListTagsForResourceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} - } - if v.ResourceArn != nil { - if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpQueryTableRows struct { -} - -func (*awsRestjson1_serializeOpQueryTableRows) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpQueryTableRows) 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.(*QueryTableRowsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/workbooks/{workbookId}/tables/{tableId}/rows/query") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsQueryTableRowsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentQueryTableRowsInput(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_serializeOpHttpBindingsQueryTableRowsInput(v *QueryTableRowsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.TableId == nil || len(*v.TableId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member tableId must not be empty")} - } - if v.TableId != nil { - if err := encoder.SetURI("tableId").String(*v.TableId); err != nil { - return err - } - } - - if v.WorkbookId == nil || len(*v.WorkbookId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member workbookId must not be empty")} - } - if v.WorkbookId != nil { - if err := encoder.SetURI("workbookId").String(*v.WorkbookId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentQueryTableRowsInput(v *QueryTableRowsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.FilterFormula != nil { - ok := object.Key("filterFormula") - if err := awsRestjson1_serializeDocumentFilter(v.FilterFormula, ok); err != nil { - return err - } - } - - if v.MaxResults != nil { - ok := object.Key("maxResults") - ok.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - ok := object.Key("nextToken") - ok.String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpStartTableDataImportJob struct { -} - -func (*awsRestjson1_serializeOpStartTableDataImportJob) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpStartTableDataImportJob) 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.(*StartTableDataImportJobInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/workbooks/{workbookId}/tables/{destinationTableId}/import") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsStartTableDataImportJobInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentStartTableDataImportJobInput(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_serializeOpHttpBindingsStartTableDataImportJobInput(v *StartTableDataImportJobInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.DestinationTableId == nil || len(*v.DestinationTableId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member destinationTableId must not be empty")} - } - if v.DestinationTableId != nil { - if err := encoder.SetURI("destinationTableId").String(*v.DestinationTableId); err != nil { - return err - } - } - - if v.WorkbookId == nil || len(*v.WorkbookId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member workbookId must not be empty")} - } - if v.WorkbookId != nil { - if err := encoder.SetURI("workbookId").String(*v.WorkbookId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentStartTableDataImportJobInput(v *StartTableDataImportJobInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("clientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if len(v.DataFormat) > 0 { - ok := object.Key("dataFormat") - ok.String(string(v.DataFormat)) - } - - if v.DataSource != nil { - ok := object.Key("dataSource") - if err := awsRestjson1_serializeDocumentImportDataSource(v.DataSource, ok); err != nil { - return err - } - } - - if v.ImportOptions != nil { - ok := object.Key("importOptions") - if err := awsRestjson1_serializeDocumentImportOptions(v.ImportOptions, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpTagResource struct { -} - -func (*awsRestjson1_serializeOpTagResource) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*TagResourceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} - } - if v.ResourceArn != nil { - if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Tags != nil { - ok := object.Key("tags") - if err := awsRestjson1_serializeDocumentTagsMap(v.Tags, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpUntagResource struct { -} - -func (*awsRestjson1_serializeOpUntagResource) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UntagResourceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} - } - if v.ResourceArn != nil { - if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { - return err - } - } - - if v.TagKeys != nil { - for i := range v.TagKeys { - encoder.AddQuery("tagKeys").String(v.TagKeys[i]) - } - } - - return nil -} - -func awsRestjson1_serializeDocumentCellInput(v *types.CellInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Fact != nil { - ok := object.Key("fact") - ok.String(*v.Fact) - } - - if v.Facts != nil { - ok := object.Key("facts") - if err := awsRestjson1_serializeDocumentFactList(v.Facts, ok); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeDocumentCreateRowData(v *types.CreateRowData, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.BatchItemId != nil { - ok := object.Key("batchItemId") - ok.String(*v.BatchItemId) - } - - if v.CellsToCreate != nil { - ok := object.Key("cellsToCreate") - if err := awsRestjson1_serializeDocumentRowDataInput(v.CellsToCreate, ok); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeDocumentCreateRowDataList(v []types.CreateRowData, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentCreateRowData(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentDelimitedTextImportOptions(v *types.DelimitedTextImportOptions, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.DataCharacterEncoding) > 0 { - ok := object.Key("dataCharacterEncoding") - ok.String(string(v.DataCharacterEncoding)) - } - - if v.Delimiter != nil { - ok := object.Key("delimiter") - ok.String(*v.Delimiter) - } - - if v.HasHeaderRow { - ok := object.Key("hasHeaderRow") - ok.Boolean(v.HasHeaderRow) - } - - if v.IgnoreEmptyRows { - ok := object.Key("ignoreEmptyRows") - ok.Boolean(v.IgnoreEmptyRows) - } - - return nil -} - -func awsRestjson1_serializeDocumentDestinationOptions(v *types.DestinationOptions, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ColumnMap != nil { - ok := object.Key("columnMap") - if err := awsRestjson1_serializeDocumentImportColumnMap(v.ColumnMap, ok); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeDocumentFactList(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_serializeDocumentFilter(v *types.Filter, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ContextRowId != nil { - ok := object.Key("contextRowId") - ok.String(*v.ContextRowId) - } - - if v.Formula != nil { - ok := object.Key("formula") - ok.String(*v.Formula) - } - - return nil -} - -func awsRestjson1_serializeDocumentImportColumnMap(v map[string]types.SourceDataColumnProperties, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - for key := range v { - om := object.Key(key) - mapVar := v[key] - if err := awsRestjson1_serializeDocumentSourceDataColumnProperties(&mapVar, om); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentImportDataSource(v *types.ImportDataSource, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.DataSourceConfig != nil { - ok := object.Key("dataSourceConfig") - if err := awsRestjson1_serializeDocumentImportDataSourceConfig(v.DataSourceConfig, ok); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeDocumentImportDataSourceConfig(v *types.ImportDataSourceConfig, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.DataSourceUrl != nil { - ok := object.Key("dataSourceUrl") - ok.String(*v.DataSourceUrl) - } - - return nil -} - -func awsRestjson1_serializeDocumentImportOptions(v *types.ImportOptions, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.DelimitedTextOptions != nil { - ok := object.Key("delimitedTextOptions") - if err := awsRestjson1_serializeDocumentDelimitedTextImportOptions(v.DelimitedTextOptions, ok); err != nil { - return err - } - } - - if v.DestinationOptions != nil { - ok := object.Key("destinationOptions") - if err := awsRestjson1_serializeDocumentDestinationOptions(v.DestinationOptions, ok); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeDocumentRowDataInput(v map[string]types.CellInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - for key := range v { - om := object.Key(key) - mapVar := v[key] - if err := awsRestjson1_serializeDocumentCellInput(&mapVar, om); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentRowIdList(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_serializeDocumentSourceDataColumnProperties(v *types.SourceDataColumnProperties, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ColumnIndex != nil { - ok := object.Key("columnIndex") - ok.Integer(*v.ColumnIndex) - } - - return nil -} - -func awsRestjson1_serializeDocumentTagsMap(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_serializeDocumentUpdateRowData(v *types.UpdateRowData, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.CellsToUpdate != nil { - ok := object.Key("cellsToUpdate") - if err := awsRestjson1_serializeDocumentRowDataInput(v.CellsToUpdate, ok); err != nil { - return err - } - } - - if v.RowId != nil { - ok := object.Key("rowId") - ok.String(*v.RowId) - } - - return nil -} - -func awsRestjson1_serializeDocumentUpdateRowDataList(v []types.UpdateRowData, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentUpdateRowData(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentUpsertRowData(v *types.UpsertRowData, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.BatchItemId != nil { - ok := object.Key("batchItemId") - ok.String(*v.BatchItemId) - } - - if v.CellsToUpdate != nil { - ok := object.Key("cellsToUpdate") - if err := awsRestjson1_serializeDocumentRowDataInput(v.CellsToUpdate, ok); err != nil { - return err - } - } - - if v.Filter != nil { - ok := object.Key("filter") - if err := awsRestjson1_serializeDocumentFilter(v.Filter, ok); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeDocumentUpsertRowDataList(v []types.UpsertRowData, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentUpsertRowData(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentVariableValue(v *types.VariableValue, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.RawValue != nil { - ok := object.Key("rawValue") - ok.String(*v.RawValue) - } - - return nil -} - -func awsRestjson1_serializeDocumentVariableValueMap(v map[string]types.VariableValue, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - for key := range v { - om := object.Key(key) - mapVar := v[key] - if err := awsRestjson1_serializeDocumentVariableValue(&mapVar, om); err != nil { - return err - } - } - return nil -} diff --git a/service/honeycode/snapshot/api_op_BatchCreateTableRows.go.snap b/service/honeycode/snapshot/api_op_BatchCreateTableRows.go.snap deleted file mode 100644 index b4b766ef7db..00000000000 --- a/service/honeycode/snapshot/api_op_BatchCreateTableRows.go.snap +++ /dev/null @@ -1,34 +0,0 @@ -BatchCreateTableRows - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - RecordResponseTiming - RequestResponseLogger diff --git a/service/honeycode/snapshot/api_op_BatchDeleteTableRows.go.snap b/service/honeycode/snapshot/api_op_BatchDeleteTableRows.go.snap deleted file mode 100644 index 02ea74f761c..00000000000 --- a/service/honeycode/snapshot/api_op_BatchDeleteTableRows.go.snap +++ /dev/null @@ -1,34 +0,0 @@ -BatchDeleteTableRows - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - RecordResponseTiming - RequestResponseLogger diff --git a/service/honeycode/snapshot/api_op_BatchUpdateTableRows.go.snap b/service/honeycode/snapshot/api_op_BatchUpdateTableRows.go.snap deleted file mode 100644 index c393577dcaa..00000000000 --- a/service/honeycode/snapshot/api_op_BatchUpdateTableRows.go.snap +++ /dev/null @@ -1,34 +0,0 @@ -BatchUpdateTableRows - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - RecordResponseTiming - RequestResponseLogger diff --git a/service/honeycode/snapshot/api_op_BatchUpsertTableRows.go.snap b/service/honeycode/snapshot/api_op_BatchUpsertTableRows.go.snap deleted file mode 100644 index bbfbd00b0c3..00000000000 --- a/service/honeycode/snapshot/api_op_BatchUpsertTableRows.go.snap +++ /dev/null @@ -1,34 +0,0 @@ -BatchUpsertTableRows - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - RecordResponseTiming - RequestResponseLogger diff --git a/service/honeycode/snapshot/api_op_DescribeTableDataImportJob.go.snap b/service/honeycode/snapshot/api_op_DescribeTableDataImportJob.go.snap deleted file mode 100644 index 2010fe98523..00000000000 --- a/service/honeycode/snapshot/api_op_DescribeTableDataImportJob.go.snap +++ /dev/null @@ -1,34 +0,0 @@ -DescribeTableDataImportJob - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - RecordResponseTiming - RequestResponseLogger diff --git a/service/honeycode/snapshot/api_op_GetScreenData.go.snap b/service/honeycode/snapshot/api_op_GetScreenData.go.snap deleted file mode 100644 index 7583439c3c8..00000000000 --- a/service/honeycode/snapshot/api_op_GetScreenData.go.snap +++ /dev/null @@ -1,34 +0,0 @@ -GetScreenData - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - RecordResponseTiming - RequestResponseLogger diff --git a/service/honeycode/snapshot/api_op_InvokeScreenAutomation.go.snap b/service/honeycode/snapshot/api_op_InvokeScreenAutomation.go.snap deleted file mode 100644 index c674dfb894e..00000000000 --- a/service/honeycode/snapshot/api_op_InvokeScreenAutomation.go.snap +++ /dev/null @@ -1,34 +0,0 @@ -InvokeScreenAutomation - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - RecordResponseTiming - RequestResponseLogger diff --git a/service/honeycode/snapshot/api_op_ListTableColumns.go.snap b/service/honeycode/snapshot/api_op_ListTableColumns.go.snap deleted file mode 100644 index 18cbd1e95e2..00000000000 --- a/service/honeycode/snapshot/api_op_ListTableColumns.go.snap +++ /dev/null @@ -1,34 +0,0 @@ -ListTableColumns - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - RecordResponseTiming - RequestResponseLogger diff --git a/service/honeycode/snapshot/api_op_ListTableRows.go.snap b/service/honeycode/snapshot/api_op_ListTableRows.go.snap deleted file mode 100644 index d9e01b075f8..00000000000 --- a/service/honeycode/snapshot/api_op_ListTableRows.go.snap +++ /dev/null @@ -1,34 +0,0 @@ -ListTableRows - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - RecordResponseTiming - RequestResponseLogger diff --git a/service/honeycode/snapshot/api_op_ListTables.go.snap b/service/honeycode/snapshot/api_op_ListTables.go.snap deleted file mode 100644 index 1959c7a37c3..00000000000 --- a/service/honeycode/snapshot/api_op_ListTables.go.snap +++ /dev/null @@ -1,34 +0,0 @@ -ListTables - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - RecordResponseTiming - RequestResponseLogger diff --git a/service/honeycode/snapshot/api_op_ListTagsForResource.go.snap b/service/honeycode/snapshot/api_op_ListTagsForResource.go.snap deleted file mode 100644 index 7cac42da90f..00000000000 --- a/service/honeycode/snapshot/api_op_ListTagsForResource.go.snap +++ /dev/null @@ -1,34 +0,0 @@ -ListTagsForResource - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - RecordResponseTiming - RequestResponseLogger diff --git a/service/honeycode/snapshot/api_op_QueryTableRows.go.snap b/service/honeycode/snapshot/api_op_QueryTableRows.go.snap deleted file mode 100644 index 141b01d40ab..00000000000 --- a/service/honeycode/snapshot/api_op_QueryTableRows.go.snap +++ /dev/null @@ -1,34 +0,0 @@ -QueryTableRows - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - RecordResponseTiming - RequestResponseLogger diff --git a/service/honeycode/snapshot/api_op_StartTableDataImportJob.go.snap b/service/honeycode/snapshot/api_op_StartTableDataImportJob.go.snap deleted file mode 100644 index 3ff7e11e8f2..00000000000 --- a/service/honeycode/snapshot/api_op_StartTableDataImportJob.go.snap +++ /dev/null @@ -1,34 +0,0 @@ -StartTableDataImportJob - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - RecordResponseTiming - RequestResponseLogger diff --git a/service/honeycode/snapshot/api_op_TagResource.go.snap b/service/honeycode/snapshot/api_op_TagResource.go.snap deleted file mode 100644 index 8cbd140ba62..00000000000 --- a/service/honeycode/snapshot/api_op_TagResource.go.snap +++ /dev/null @@ -1,34 +0,0 @@ -TagResource - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - RecordResponseTiming - RequestResponseLogger diff --git a/service/honeycode/snapshot/api_op_UntagResource.go.snap b/service/honeycode/snapshot/api_op_UntagResource.go.snap deleted file mode 100644 index 78e1acab599..00000000000 --- a/service/honeycode/snapshot/api_op_UntagResource.go.snap +++ /dev/null @@ -1,34 +0,0 @@ -UntagResource - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - RecordResponseTiming - RequestResponseLogger diff --git a/service/honeycode/snapshot_test.go b/service/honeycode/snapshot_test.go deleted file mode 100644 index fea40d5ebd3..00000000000 --- a/service/honeycode/snapshot_test.go +++ /dev/null @@ -1,422 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -//go:build snapshot - -package honeycode - -import ( - "context" - "errors" - "fmt" - "github.com/aws/smithy-go/middleware" - "io" - "io/fs" - "os" - "testing" -) - -const ssprefix = "snapshot" - -type snapshotOK struct{} - -func (snapshotOK) Error() string { return "error: success" } - -func createp(path string) (*os.File, error) { - if err := os.Mkdir(ssprefix, 0700); err != nil && !errors.Is(err, fs.ErrExist) { - return nil, err - } - return os.Create(path) -} - -func sspath(op string) string { - return fmt.Sprintf("%s/api_op_%s.go.snap", ssprefix, op) -} - -func updateSnapshot(stack *middleware.Stack, operation string) error { - f, err := createp(sspath(operation)) - if err != nil { - return err - } - defer f.Close() - if _, err := f.Write([]byte(stack.String())); err != nil { - return err - } - return snapshotOK{} -} - -func testSnapshot(stack *middleware.Stack, operation string) error { - f, err := os.Open(sspath(operation)) - if errors.Is(err, fs.ErrNotExist) { - return snapshotOK{} - } - if err != nil { - return err - } - defer f.Close() - expected, err := io.ReadAll(f) - if err != nil { - return err - } - if actual := stack.String(); actual != string(expected) { - return fmt.Errorf("%s != %s", expected, actual) - } - return snapshotOK{} -} -func TestCheckSnapshot_BatchCreateTableRows(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchCreateTableRows(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "BatchCreateTableRows") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_BatchDeleteTableRows(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchDeleteTableRows(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "BatchDeleteTableRows") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_BatchUpdateTableRows(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchUpdateTableRows(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "BatchUpdateTableRows") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_BatchUpsertTableRows(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchUpsertTableRows(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "BatchUpsertTableRows") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_DescribeTableDataImportJob(t *testing.T) { - svc := New(Options{}) - _, err := svc.DescribeTableDataImportJob(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DescribeTableDataImportJob") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetScreenData(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetScreenData(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetScreenData") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_InvokeScreenAutomation(t *testing.T) { - svc := New(Options{}) - _, err := svc.InvokeScreenAutomation(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "InvokeScreenAutomation") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListTableColumns(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListTableColumns(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListTableColumns") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListTableRows(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListTableRows(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListTableRows") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListTables(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListTables(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListTables") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListTagsForResource(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListTagsForResource") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_QueryTableRows(t *testing.T) { - svc := New(Options{}) - _, err := svc.QueryTableRows(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "QueryTableRows") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_StartTableDataImportJob(t *testing.T) { - svc := New(Options{}) - _, err := svc.StartTableDataImportJob(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "StartTableDataImportJob") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_TagResource(t *testing.T) { - svc := New(Options{}) - _, err := svc.TagResource(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "TagResource") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UntagResource(t *testing.T) { - svc := New(Options{}) - _, err := svc.UntagResource(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UntagResource") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} -func TestUpdateSnapshot_BatchCreateTableRows(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchCreateTableRows(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "BatchCreateTableRows") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_BatchDeleteTableRows(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchDeleteTableRows(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "BatchDeleteTableRows") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_BatchUpdateTableRows(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchUpdateTableRows(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "BatchUpdateTableRows") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_BatchUpsertTableRows(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchUpsertTableRows(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "BatchUpsertTableRows") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DescribeTableDataImportJob(t *testing.T) { - svc := New(Options{}) - _, err := svc.DescribeTableDataImportJob(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DescribeTableDataImportJob") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetScreenData(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetScreenData(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetScreenData") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_InvokeScreenAutomation(t *testing.T) { - svc := New(Options{}) - _, err := svc.InvokeScreenAutomation(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "InvokeScreenAutomation") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListTableColumns(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListTableColumns(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListTableColumns") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListTableRows(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListTableRows(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListTableRows") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListTables(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListTables(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListTables") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListTagsForResource(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListTagsForResource") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_QueryTableRows(t *testing.T) { - svc := New(Options{}) - _, err := svc.QueryTableRows(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "QueryTableRows") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_StartTableDataImportJob(t *testing.T) { - svc := New(Options{}) - _, err := svc.StartTableDataImportJob(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "StartTableDataImportJob") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_TagResource(t *testing.T) { - svc := New(Options{}) - _, err := svc.TagResource(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "TagResource") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_UntagResource(t *testing.T) { - svc := New(Options{}) - _, err := svc.UntagResource(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UntagResource") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} diff --git a/service/honeycode/types/enums.go b/service/honeycode/types/enums.go deleted file mode 100644 index 575c9889f11..00000000000 --- a/service/honeycode/types/enums.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -type ErrorCode string - -// Enum values for ErrorCode -const ( - ErrorCodeAccessDenied ErrorCode = "ACCESS_DENIED" - ErrorCodeInvalidUrlError ErrorCode = "INVALID_URL_ERROR" - ErrorCodeInvalidImportOptionsError ErrorCode = "INVALID_IMPORT_OPTIONS_ERROR" - ErrorCodeInvalidTableIdError ErrorCode = "INVALID_TABLE_ID_ERROR" - ErrorCodeInvalidTableColumnIdError ErrorCode = "INVALID_TABLE_COLUMN_ID_ERROR" - ErrorCodeTableNotFoundError ErrorCode = "TABLE_NOT_FOUND_ERROR" - ErrorCodeFileEmptyError ErrorCode = "FILE_EMPTY_ERROR" - ErrorCodeInvalidFileTypeError ErrorCode = "INVALID_FILE_TYPE_ERROR" - ErrorCodeFileParsingError ErrorCode = "FILE_PARSING_ERROR" - ErrorCodeFileSizeLimitError ErrorCode = "FILE_SIZE_LIMIT_ERROR" - ErrorCodeFileNotFoundError ErrorCode = "FILE_NOT_FOUND_ERROR" - ErrorCodeUnknownError ErrorCode = "UNKNOWN_ERROR" - ErrorCodeResourceNotFoundError ErrorCode = "RESOURCE_NOT_FOUND_ERROR" - ErrorCodeSystemLimitError ErrorCode = "SYSTEM_LIMIT_ERROR" -) - -// Values returns all known values for ErrorCode. 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 (ErrorCode) Values() []ErrorCode { - return []ErrorCode{ - "ACCESS_DENIED", - "INVALID_URL_ERROR", - "INVALID_IMPORT_OPTIONS_ERROR", - "INVALID_TABLE_ID_ERROR", - "INVALID_TABLE_COLUMN_ID_ERROR", - "TABLE_NOT_FOUND_ERROR", - "FILE_EMPTY_ERROR", - "INVALID_FILE_TYPE_ERROR", - "FILE_PARSING_ERROR", - "FILE_SIZE_LIMIT_ERROR", - "FILE_NOT_FOUND_ERROR", - "UNKNOWN_ERROR", - "RESOURCE_NOT_FOUND_ERROR", - "SYSTEM_LIMIT_ERROR", - } -} - -type Format string - -// Enum values for Format -const ( - FormatAuto Format = "AUTO" - FormatNumber Format = "NUMBER" - FormatCurrency Format = "CURRENCY" - FormatDate Format = "DATE" - FormatTime Format = "TIME" - FormatDateTime Format = "DATE_TIME" - FormatPercentage Format = "PERCENTAGE" - FormatText Format = "TEXT" - FormatAccounting Format = "ACCOUNTING" - FormatContact Format = "CONTACT" - FormatRowlink Format = "ROWLINK" - FormatRowset Format = "ROWSET" -) - -// Values returns all known values for Format. 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 (Format) Values() []Format { - return []Format{ - "AUTO", - "NUMBER", - "CURRENCY", - "DATE", - "TIME", - "DATE_TIME", - "PERCENTAGE", - "TEXT", - "ACCOUNTING", - "CONTACT", - "ROWLINK", - "ROWSET", - } -} - -type ImportDataCharacterEncoding string - -// Enum values for ImportDataCharacterEncoding -const ( - ImportDataCharacterEncodingUtf8 ImportDataCharacterEncoding = "UTF-8" - ImportDataCharacterEncodingUsAscii ImportDataCharacterEncoding = "US-ASCII" - ImportDataCharacterEncodingIso88591 ImportDataCharacterEncoding = "ISO-8859-1" - ImportDataCharacterEncodingUtf16be ImportDataCharacterEncoding = "UTF-16BE" - ImportDataCharacterEncodingUtf16le ImportDataCharacterEncoding = "UTF-16LE" - ImportDataCharacterEncodingUtf16 ImportDataCharacterEncoding = "UTF-16" -) - -// Values returns all known values for ImportDataCharacterEncoding. 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 (ImportDataCharacterEncoding) Values() []ImportDataCharacterEncoding { - return []ImportDataCharacterEncoding{ - "UTF-8", - "US-ASCII", - "ISO-8859-1", - "UTF-16BE", - "UTF-16LE", - "UTF-16", - } -} - -type ImportSourceDataFormat string - -// Enum values for ImportSourceDataFormat -const ( - ImportSourceDataFormatDelimitedText ImportSourceDataFormat = "DELIMITED_TEXT" -) - -// Values returns all known values for ImportSourceDataFormat. 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 (ImportSourceDataFormat) Values() []ImportSourceDataFormat { - return []ImportSourceDataFormat{ - "DELIMITED_TEXT", - } -} - -type TableDataImportJobStatus string - -// Enum values for TableDataImportJobStatus -const ( - TableDataImportJobStatusSubmitted TableDataImportJobStatus = "SUBMITTED" - TableDataImportJobStatusInProgress TableDataImportJobStatus = "IN_PROGRESS" - TableDataImportJobStatusCompleted TableDataImportJobStatus = "COMPLETED" - TableDataImportJobStatusFailed TableDataImportJobStatus = "FAILED" -) - -// Values returns all known values for TableDataImportJobStatus. 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 (TableDataImportJobStatus) Values() []TableDataImportJobStatus { - return []TableDataImportJobStatus{ - "SUBMITTED", - "IN_PROGRESS", - "COMPLETED", - "FAILED", - } -} - -type UpsertAction string - -// Enum values for UpsertAction -const ( - UpsertActionUpdated UpsertAction = "UPDATED" - UpsertActionAppended UpsertAction = "APPENDED" -) - -// Values returns all known values for UpsertAction. 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 (UpsertAction) Values() []UpsertAction { - return []UpsertAction{ - "UPDATED", - "APPENDED", - } -} diff --git a/service/honeycode/types/errors.go b/service/honeycode/types/errors.go deleted file mode 100644 index 8320a1e9cd3..00000000000 --- a/service/honeycode/types/errors.go +++ /dev/null @@ -1,276 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - "fmt" - smithy "github.com/aws/smithy-go" -) - -// You do not have sufficient access to perform this action. Check that the -// -// workbook is owned by you and your IAM policy allows access to the resource in -// the request. -type AccessDeniedException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *AccessDeniedException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *AccessDeniedException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *AccessDeniedException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "AccessDeniedException" - } - return *e.ErrorCodeOverride -} -func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The automation execution did not end successfully. -type AutomationExecutionException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *AutomationExecutionException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *AutomationExecutionException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *AutomationExecutionException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "AutomationExecutionException" - } - return *e.ErrorCodeOverride -} -func (e *AutomationExecutionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The automation execution timed out. -type AutomationExecutionTimeoutException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *AutomationExecutionTimeoutException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *AutomationExecutionTimeoutException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *AutomationExecutionTimeoutException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "AutomationExecutionTimeoutException" - } - return *e.ErrorCodeOverride -} -func (e *AutomationExecutionTimeoutException) ErrorFault() smithy.ErrorFault { - return smithy.FaultServer -} - -// There were unexpected errors from the server. -type InternalServerException struct { - Message *string - - ErrorCodeOverride *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 { - if e == nil || e.ErrorCodeOverride == nil { - return "InternalServerException" - } - return *e.ErrorCodeOverride -} -func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } - -// The request timed out. -type RequestTimeoutException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *RequestTimeoutException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *RequestTimeoutException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *RequestTimeoutException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "RequestTimeoutException" - } - return *e.ErrorCodeOverride -} -func (e *RequestTimeoutException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } - -// A Workbook, Table, App, Screen or Screen Automation was not found with the -// given ID. -type ResourceNotFoundException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ResourceNotFoundException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ResourceNotFoundException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ResourceNotFoundException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ResourceNotFoundException" - } - return *e.ErrorCodeOverride -} -func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The request caused service quota to be breached. -type ServiceQuotaExceededException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ServiceQuotaExceededException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ServiceQuotaExceededException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ServiceQuotaExceededException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ServiceQuotaExceededException" - } - return *e.ErrorCodeOverride -} -func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Remote service is unreachable. -type ServiceUnavailableException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ServiceUnavailableException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ServiceUnavailableException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ServiceUnavailableException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ServiceUnavailableException" - } - return *e.ErrorCodeOverride -} -func (e *ServiceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } - -// Tps(transactions per second) rate reached. -type ThrottlingException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ThrottlingException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ThrottlingException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ThrottlingException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ThrottlingException" - } - return *e.ErrorCodeOverride -} -func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Request is invalid. The message in the response contains details on why the -// -// request is invalid. -type ValidationException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ValidationException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ValidationException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ValidationException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ValidationException" - } - return *e.ErrorCodeOverride -} -func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/honeycode/types/types.go b/service/honeycode/types/types.go deleted file mode 100644 index 3d5e8e510eb..00000000000 --- a/service/honeycode/types/types.go +++ /dev/null @@ -1,517 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - smithydocument "github.com/aws/smithy-go/document" - "time" -) - -// An object that represents a single cell in a table. -type Cell struct { - - // The format of the cell. If this field is empty, then the format is either not - // specified in the workbook or the format is set to AUTO. - Format Format - - // The formatted value of the cell. This is the value that you see displayed in - // the cell in the UI. - // - // Note that the formatted value of a cell is always represented as a string - // irrespective of the data that is stored in the cell. For example, if a cell - // contains a date, the formatted value of the cell is the string representation of - // the formatted date being shown in the cell in the UI. See details in the - // rawValue field below for how cells of different formats will have different raw - // and formatted values. - FormattedValue *string - - // A list of formatted values of the cell. This field is only returned when the - // cell is ROWSET format (aka multi-select or multi-record picklist). Values in the - // list are always represented as strings. The formattedValue field will be empty - // if this field is returned. - FormattedValues []string - - // The formula contained in the cell. This field is empty if a cell does not have - // a formula. - Formula *string - - // The raw value of the data contained in the cell. The raw value depends on the - // format of the data in the cell. However the attribute in the API return value is - // always a string containing the raw value. - // - // Cells with format DATE, DATE_TIME or TIME have the raw value as a floating - // point number where the whole number represents the number of days since 1/1/1900 - // and the fractional part represents the fraction of the day since midnight. For - // example, a cell with date 11/3/2020 has the raw value "44138". A cell with the - // time 9:00 AM has the raw value "0.375" and a cell with date/time value of - // 11/3/2020 9:00 AM has the raw value "44138.375". Notice that even though the raw - // value is a number in all three cases, it is still represented as a string. - // - // Cells with format NUMBER, CURRENCY, PERCENTAGE and ACCOUNTING have the raw - // value of the data as the number representing the data being displayed. For - // example, the number 1.325 with two decimal places in the format will have it's - // raw value as "1.325" and formatted value as "1.33". A currency value for $10 - // will have the raw value as "10" and formatted value as "$10.00". A value - // representing 20% with two decimal places in the format will have its raw value - // as "0.2" and the formatted value as "20.00%". An accounting value of -$25 will - // have "-25" as the raw value and "$ (25.00)" as the formatted value. - // - // Cells with format TEXT will have the raw text as the raw value. For example, a - // cell with text "John Smith" will have "John Smith" as both the raw value and the - // formatted value. - // - // Cells with format CONTACT will have the name of the contact as a formatted - // value and the email address of the contact as the raw value. For example, a - // contact for John Smith will have "John Smith" as the formatted value and - // "john.smith@example.com" as the raw value. - // - // Cells with format ROWLINK (aka picklist) will have the first column of the - // linked row as the formatted value and the row id of the linked row as the raw - // value. For example, a cell containing a picklist to a table that displays task - // status might have "Completed" as the formatted value and - // "row:dfcefaee-5b37-4355-8f28-40c3e4ff5dd4/ca432b2f-b8eb-431d-9fb5-cbe0342f9f03" - // as the raw value. - // - // Cells with format ROWSET (aka multi-select or multi-record picklist) will by - // default have the first column of each of the linked rows as the formatted value - // in the list, and the rowset id of the linked rows as the raw value. For example, - // a cell containing a multi-select picklist to a table that contains items might - // have "Item A", "Item B" in the formatted value list and - // "rows:b742c1f4-6cb0-4650-a845-35eb86fcc2bb/ - // [fdea123b-8f68-474a-aa8a-5ff87aa333af,6daf41f0-a138-4eee-89da-123086d36ecf]" as - // the raw value. - // - // Cells with format ATTACHMENT will have the name of the attachment as the - // formatted value and the attachment id as the raw value. For example, a cell - // containing an attachment named "image.jpeg" will have "image.jpeg" as the - // formatted value and "attachment:ca432b2f-b8eb-431d-9fb5-cbe0342f9f03" as the raw - // value. - // - // Cells with format AUTO or cells without any format that are auto-detected as - // one of the formats above will contain the raw and formatted values as mentioned - // above, based on the auto-detected formats. If there is no auto-detected format, - // the raw and formatted values will be the same as the data in the cell. - RawValue *string - - noSmithyDocumentSerde -} - -// CellInput object contains the data needed to create or update cells in a -// -// table. -// -// CellInput object has only a facts field or a fact field, but not both. A 400 -// bad request will be thrown if both fact and facts field are present. -type CellInput struct { - - // Fact represents the data that is entered into a cell. This data can be free - // text or a formula. Formulas need to start with the equals (=) sign. - Fact *string - - // A list representing the values that are entered into a ROWSET cell. Facts list - // can have either only values or rowIDs, and rowIDs should from the same table. - Facts []string - - noSmithyDocumentSerde -} - -// Metadata for column in the table. -type ColumnMetadata struct { - - // The format of the column. - // - // This member is required. - Format Format - - // The name of the column. - // - // This member is required. - Name *string - - noSmithyDocumentSerde -} - -// Data needed to create a single row in a table as part of the -// -// BatchCreateTableRows request. -type CreateRowData struct { - - // An external identifier that represents the single row that is being created as - // part of the BatchCreateTableRows request. This can be any string that you can - // use to identify the row in the request. The BatchCreateTableRows API puts the - // batch item id in the results to allow you to link data in the request to data in - // the results. - // - // This member is required. - BatchItemId *string - - // A map representing the cells to create in the new row. The key is the column - // id of the cell and the value is the CellInput object that represents the data to - // set in that cell. - // - // This member is required. - CellsToCreate map[string]CellInput - - noSmithyDocumentSerde -} - -// The data in a particular data cell defined on the screen. -type DataItem struct { - - // The formatted value of the data. e.g. John Smith. - FormattedValue *string - - // The overrideFormat is optional and is specified only if a particular row of - // data has a different format for the data than the default format defined on the - // screen or the table. - OverrideFormat Format - - // The raw value of the data. e.g. jsmith@example.com - RawValue *string - - noSmithyDocumentSerde -} - -// An object that contains the options relating to parsing delimited text as part -// -// of an import request. -type DelimitedTextImportOptions struct { - - // The delimiter to use for separating columns in a single row of the input. - // - // This member is required. - Delimiter *string - - // The encoding of the data in the input file. - DataCharacterEncoding ImportDataCharacterEncoding - - // Indicates whether the input file has a header row at the top containing the - // column names. - HasHeaderRow bool - - // A parameter to indicate whether empty rows should be ignored or be included in - // the import. - IgnoreEmptyRows bool - - noSmithyDocumentSerde -} - -// An object that contains the options relating to the destination of the import -// request. -type DestinationOptions struct { - - // A map of the column id to the import properties for each column. - ColumnMap map[string]SourceDataColumnProperties - - noSmithyDocumentSerde -} - -// A single item in a batch that failed to perform the intended action because of -// -// an error preventing it from succeeding. -type FailedBatchItem struct { - - // The error message that indicates why the batch item failed. - // - // This member is required. - ErrorMessage *string - - // The id of the batch item that failed. This is the batch item id for the - // BatchCreateTableRows and BatchUpsertTableRows operations and the row id for the - // BatchUpdateTableRows and BatchDeleteTableRows operations. - // - // This member is required. - Id *string - - noSmithyDocumentSerde -} - -// An object that represents a filter formula along with the id of the context -// -// row under which the filter function needs to evaluate. -type Filter struct { - - // A formula representing a filter function that returns zero or more matching - // rows from a table. Valid formulas in this field return a list of rows from a - // table. The most common ways of writing a formula to return a list of rows are to - // use the FindRow() or Filter() functions. Any other formula that returns zero or - // more rows is also acceptable. For example, you can use a formula that points to - // a cell that contains a filter function. - // - // This member is required. - Formula *string - - // The optional contextRowId attribute can be used to specify the row id of the - // context row if the filter formula contains unqualified references to table - // columns and needs a context row to evaluate them successfully. - ContextRowId *string - - noSmithyDocumentSerde -} - -// An object that has details about the source of the data that was submitted for -// import. -type ImportDataSource struct { - - // The configuration parameters for the data source of the import - // - // This member is required. - DataSourceConfig *ImportDataSourceConfig - - noSmithyDocumentSerde -} - -// An object that contains the configuration parameters for the data source of an -// -// import request. -type ImportDataSourceConfig struct { - - // The URL from which source data will be downloaded for the import request. - DataSourceUrl *string - - noSmithyDocumentSerde -} - -// An object that contains the attributes of the submitter of the import job. -type ImportJobSubmitter struct { - - // The email id of the submitter of the import job, if available. - Email *string - - // The AWS user ARN of the submitter of the import job, if available. - UserArn *string - - noSmithyDocumentSerde -} - -// An object that contains the options specified by the sumitter of the import -// request. -type ImportOptions struct { - - // Options relating to parsing delimited text. Required if dataFormat is - // DELIMITED_TEXT. - DelimitedTextOptions *DelimitedTextImportOptions - - // Options relating to the destination of the import request. - DestinationOptions *DestinationOptions - - noSmithyDocumentSerde -} - -// A single row in the ResultSet. -type ResultRow struct { - - // List of all the data cells in a row. - // - // This member is required. - DataItems []DataItem - - // The ID for a particular row. - RowId *string - - noSmithyDocumentSerde -} - -// ResultSet contains the results of the request for a single block or list -// -// defined on the screen. -type ResultSet struct { - - // List of headers for all the data cells in the block. The header identifies the - // name and default format of the data cell. Data cells appear in the same order in - // all rows as defined in the header. The names and formats are not repeated in the - // rows. If a particular row does not have a value for a data cell, a blank value - // is used. - // - // For example, a task list that displays the task name, due date and assigned - // person might have headers [ { "name": "Task Name"}, {"name": "Due Date", - // "format": "DATE"}, {"name": "Assigned", "format": "CONTACT"} ]. Every row in the - // result will have the task name as the first item, due date as the second item - // and assigned person as the third item. If a particular task does not have a due - // date, that row will still have a blank value in the second element and the - // assigned person will still be in the third element. - // - // This member is required. - Headers []ColumnMetadata - - // List of rows returned by the request. Each row has a row Id and a list of data - // cells in that row. The data cells will be present in the same order as they are - // defined in the header. - // - // This member is required. - Rows []ResultRow - - noSmithyDocumentSerde -} - -// An object that contains the properties for importing data to a specific column -// in a table. -type SourceDataColumnProperties struct { - - // The index of the column in the input file. - ColumnIndex *int32 - - noSmithyDocumentSerde -} - -// An object representing the properties of a table in a workbook. -type Table struct { - - // The id of the table. - TableId *string - - // The name of the table. - TableName *string - - noSmithyDocumentSerde -} - -// An object that contains attributes about a single column in a table -type TableColumn struct { - - // The column level format that is applied in the table. An empty value in this - // field means that the column format is the default value 'AUTO'. - Format Format - - // The id of the column in the table. - TableColumnId *string - - // The name of the column in the table. - TableColumnName *string - - noSmithyDocumentSerde -} - -// The metadata associated with the table data import job that was submitted. -type TableDataImportJobMetadata struct { - - // The source of the data that was submitted for import. - // - // This member is required. - DataSource *ImportDataSource - - // The options that was specified at the time of submitting the import request. - // - // This member is required. - ImportOptions *ImportOptions - - // The timestamp when the job was submitted for import. - // - // This member is required. - SubmitTime *time.Time - - // Details about the submitter of the import request. - // - // This member is required. - Submitter *ImportJobSubmitter - - noSmithyDocumentSerde -} - -// An object that contains attributes about a single row in a table -type TableRow struct { - - // A list of cells in the table row. The cells appear in the same order as the - // columns of the table. - // - // This member is required. - Cells []Cell - - // The id of the row in the table. - // - // This member is required. - RowId *string - - noSmithyDocumentSerde -} - -// Data needed to create a single row in a table as part of the -// -// BatchCreateTableRows request. -type UpdateRowData struct { - - // A map representing the cells to update in the given row. The key is the column - // id of the cell and the value is the CellInput object that represents the data to - // set in that cell. - // - // This member is required. - CellsToUpdate map[string]CellInput - - // The id of the row that needs to be updated. - // - // This member is required. - RowId *string - - noSmithyDocumentSerde -} - -// Data needed to upsert rows in a table as part of a single item in the -// -// BatchUpsertTableRows request. -type UpsertRowData struct { - - // An external identifier that represents a single item in the request that is - // being upserted as part of the BatchUpsertTableRows request. This can be any - // string that you can use to identify the item in the request. The - // BatchUpsertTableRows API puts the batch item id in the results to allow you to - // link data in the request to data in the results. - // - // This member is required. - BatchItemId *string - - // A map representing the cells to update for the matching rows or an appended - // row. The key is the column id of the cell and the value is the CellInput object - // that represents the data to set in that cell. - // - // This member is required. - CellsToUpdate map[string]CellInput - - // The filter formula to use to find existing matching rows to update. The - // formula needs to return zero or more rows. If the formula returns 0 rows, then a - // new row will be appended in the target table. If the formula returns one or more - // rows, then the returned rows will be updated. - // - // Note that the filter formula needs to return rows from the target table for the - // upsert operation to succeed. If the filter formula has a syntax error or it - // doesn't evaluate to zero or more rows in the target table for any one item in - // the input list, then the entire BatchUpsertTableRows request fails and no - // updates are made to the table. - // - // This member is required. - Filter *Filter - - noSmithyDocumentSerde -} - -// An object that represents the result of a single upsert row request. -type UpsertRowsResult struct { - - // The list of row ids that were changed as part of an upsert row operation. If - // the upsert resulted in an update, this list could potentially contain multiple - // rows that matched the filter and hence got updated. If the upsert resulted in an - // append, this list would only have the single row that was appended. - // - // This member is required. - RowIds []string - - // The result of the upsert action. - // - // This member is required. - UpsertAction UpsertAction - - noSmithyDocumentSerde -} - -// The input variables to the app to be used by the InvokeScreenAutomation action -// request. -type VariableValue struct { - - // Raw value of the variable. - // - // This member is required. - RawValue *string - - noSmithyDocumentSerde -} - -type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/honeycode/validators.go b/service/honeycode/validators.go deleted file mode 100644 index 21a97b3af7d..00000000000 --- a/service/honeycode/validators.go +++ /dev/null @@ -1,915 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package honeycode - -import ( - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/honeycode/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" -) - -type validateOpBatchCreateTableRows struct { -} - -func (*validateOpBatchCreateTableRows) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpBatchCreateTableRows) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*BatchCreateTableRowsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpBatchCreateTableRowsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpBatchDeleteTableRows struct { -} - -func (*validateOpBatchDeleteTableRows) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpBatchDeleteTableRows) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*BatchDeleteTableRowsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpBatchDeleteTableRowsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpBatchUpdateTableRows struct { -} - -func (*validateOpBatchUpdateTableRows) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpBatchUpdateTableRows) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*BatchUpdateTableRowsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpBatchUpdateTableRowsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpBatchUpsertTableRows struct { -} - -func (*validateOpBatchUpsertTableRows) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpBatchUpsertTableRows) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*BatchUpsertTableRowsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpBatchUpsertTableRowsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeTableDataImportJob struct { -} - -func (*validateOpDescribeTableDataImportJob) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeTableDataImportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeTableDataImportJobInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeTableDataImportJobInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetScreenData struct { -} - -func (*validateOpGetScreenData) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetScreenData) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetScreenDataInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetScreenDataInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpInvokeScreenAutomation struct { -} - -func (*validateOpInvokeScreenAutomation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpInvokeScreenAutomation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*InvokeScreenAutomationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpInvokeScreenAutomationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListTableColumns struct { -} - -func (*validateOpListTableColumns) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListTableColumns) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListTableColumnsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListTableColumnsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListTableRows struct { -} - -func (*validateOpListTableRows) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListTableRows) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListTableRowsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListTableRowsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListTables struct { -} - -func (*validateOpListTables) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListTables) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListTablesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListTablesInput(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 validateOpQueryTableRows struct { -} - -func (*validateOpQueryTableRows) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpQueryTableRows) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*QueryTableRowsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpQueryTableRowsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpStartTableDataImportJob struct { -} - -func (*validateOpStartTableDataImportJob) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpStartTableDataImportJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*StartTableDataImportJobInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpStartTableDataImportJobInput(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) -} - -func addOpBatchCreateTableRowsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpBatchCreateTableRows{}, middleware.After) -} - -func addOpBatchDeleteTableRowsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpBatchDeleteTableRows{}, middleware.After) -} - -func addOpBatchUpdateTableRowsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpBatchUpdateTableRows{}, middleware.After) -} - -func addOpBatchUpsertTableRowsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpBatchUpsertTableRows{}, middleware.After) -} - -func addOpDescribeTableDataImportJobValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeTableDataImportJob{}, middleware.After) -} - -func addOpGetScreenDataValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetScreenData{}, middleware.After) -} - -func addOpInvokeScreenAutomationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpInvokeScreenAutomation{}, middleware.After) -} - -func addOpListTableColumnsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListTableColumns{}, middleware.After) -} - -func addOpListTableRowsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListTableRows{}, middleware.After) -} - -func addOpListTablesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListTables{}, middleware.After) -} - -func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) -} - -func addOpQueryTableRowsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpQueryTableRows{}, middleware.After) -} - -func addOpStartTableDataImportJobValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStartTableDataImportJob{}, 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 validateCreateRowData(v *types.CreateRowData) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateRowData"} - if v.BatchItemId == nil { - invalidParams.Add(smithy.NewErrParamRequired("BatchItemId")) - } - if v.CellsToCreate == nil { - invalidParams.Add(smithy.NewErrParamRequired("CellsToCreate")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateCreateRowDataList(v []types.CreateRowData) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateRowDataList"} - for i := range v { - if err := validateCreateRowData(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateDelimitedTextImportOptions(v *types.DelimitedTextImportOptions) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DelimitedTextImportOptions"} - if v.Delimiter == nil { - invalidParams.Add(smithy.NewErrParamRequired("Delimiter")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateFilter(v *types.Filter) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "Filter"} - if v.Formula == nil { - invalidParams.Add(smithy.NewErrParamRequired("Formula")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateImportDataSource(v *types.ImportDataSource) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ImportDataSource"} - if v.DataSourceConfig == nil { - invalidParams.Add(smithy.NewErrParamRequired("DataSourceConfig")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateImportOptions(v *types.ImportOptions) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ImportOptions"} - if v.DelimitedTextOptions != nil { - if err := validateDelimitedTextImportOptions(v.DelimitedTextOptions); err != nil { - invalidParams.AddNested("DelimitedTextOptions", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateUpdateRowData(v *types.UpdateRowData) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateRowData"} - if v.RowId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RowId")) - } - if v.CellsToUpdate == nil { - invalidParams.Add(smithy.NewErrParamRequired("CellsToUpdate")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateUpdateRowDataList(v []types.UpdateRowData) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateRowDataList"} - for i := range v { - if err := validateUpdateRowData(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateUpsertRowData(v *types.UpsertRowData) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpsertRowData"} - if v.BatchItemId == nil { - invalidParams.Add(smithy.NewErrParamRequired("BatchItemId")) - } - if v.Filter == nil { - invalidParams.Add(smithy.NewErrParamRequired("Filter")) - } else if v.Filter != nil { - if err := validateFilter(v.Filter); err != nil { - invalidParams.AddNested("Filter", err.(smithy.InvalidParamsError)) - } - } - if v.CellsToUpdate == nil { - invalidParams.Add(smithy.NewErrParamRequired("CellsToUpdate")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateUpsertRowDataList(v []types.UpsertRowData) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpsertRowDataList"} - for i := range v { - if err := validateUpsertRowData(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateVariableValue(v *types.VariableValue) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "VariableValue"} - if v.RawValue == nil { - invalidParams.Add(smithy.NewErrParamRequired("RawValue")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateVariableValueMap(v map[string]types.VariableValue) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "VariableValueMap"} - for key := range v { - value := v[key] - if err := validateVariableValue(&value); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%q]", key), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpBatchCreateTableRowsInput(v *BatchCreateTableRowsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "BatchCreateTableRowsInput"} - if v.WorkbookId == nil { - invalidParams.Add(smithy.NewErrParamRequired("WorkbookId")) - } - if v.TableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TableId")) - } - if v.RowsToCreate == nil { - invalidParams.Add(smithy.NewErrParamRequired("RowsToCreate")) - } else if v.RowsToCreate != nil { - if err := validateCreateRowDataList(v.RowsToCreate); err != nil { - invalidParams.AddNested("RowsToCreate", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpBatchDeleteTableRowsInput(v *BatchDeleteTableRowsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "BatchDeleteTableRowsInput"} - if v.WorkbookId == nil { - invalidParams.Add(smithy.NewErrParamRequired("WorkbookId")) - } - if v.TableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TableId")) - } - if v.RowIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("RowIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpBatchUpdateTableRowsInput(v *BatchUpdateTableRowsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateTableRowsInput"} - if v.WorkbookId == nil { - invalidParams.Add(smithy.NewErrParamRequired("WorkbookId")) - } - if v.TableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TableId")) - } - if v.RowsToUpdate == nil { - invalidParams.Add(smithy.NewErrParamRequired("RowsToUpdate")) - } else if v.RowsToUpdate != nil { - if err := validateUpdateRowDataList(v.RowsToUpdate); err != nil { - invalidParams.AddNested("RowsToUpdate", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpBatchUpsertTableRowsInput(v *BatchUpsertTableRowsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "BatchUpsertTableRowsInput"} - if v.WorkbookId == nil { - invalidParams.Add(smithy.NewErrParamRequired("WorkbookId")) - } - if v.TableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TableId")) - } - if v.RowsToUpsert == nil { - invalidParams.Add(smithy.NewErrParamRequired("RowsToUpsert")) - } else if v.RowsToUpsert != nil { - if err := validateUpsertRowDataList(v.RowsToUpsert); err != nil { - invalidParams.AddNested("RowsToUpsert", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeTableDataImportJobInput(v *DescribeTableDataImportJobInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeTableDataImportJobInput"} - if v.WorkbookId == nil { - invalidParams.Add(smithy.NewErrParamRequired("WorkbookId")) - } - if v.TableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TableId")) - } - if v.JobId == nil { - invalidParams.Add(smithy.NewErrParamRequired("JobId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetScreenDataInput(v *GetScreenDataInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetScreenDataInput"} - if v.WorkbookId == nil { - invalidParams.Add(smithy.NewErrParamRequired("WorkbookId")) - } - if v.AppId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppId")) - } - if v.ScreenId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ScreenId")) - } - if v.Variables != nil { - if err := validateVariableValueMap(v.Variables); err != nil { - invalidParams.AddNested("Variables", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpInvokeScreenAutomationInput(v *InvokeScreenAutomationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "InvokeScreenAutomationInput"} - if v.WorkbookId == nil { - invalidParams.Add(smithy.NewErrParamRequired("WorkbookId")) - } - if v.AppId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppId")) - } - if v.ScreenId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ScreenId")) - } - if v.ScreenAutomationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ScreenAutomationId")) - } - if v.Variables != nil { - if err := validateVariableValueMap(v.Variables); err != nil { - invalidParams.AddNested("Variables", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListTableColumnsInput(v *ListTableColumnsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListTableColumnsInput"} - if v.WorkbookId == nil { - invalidParams.Add(smithy.NewErrParamRequired("WorkbookId")) - } - if v.TableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListTableRowsInput(v *ListTableRowsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListTableRowsInput"} - if v.WorkbookId == nil { - invalidParams.Add(smithy.NewErrParamRequired("WorkbookId")) - } - if v.TableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListTablesInput(v *ListTablesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListTablesInput"} - if v.WorkbookId == nil { - invalidParams.Add(smithy.NewErrParamRequired("WorkbookId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} - if v.ResourceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpQueryTableRowsInput(v *QueryTableRowsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "QueryTableRowsInput"} - if v.WorkbookId == nil { - invalidParams.Add(smithy.NewErrParamRequired("WorkbookId")) - } - if v.TableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TableId")) - } - if v.FilterFormula == nil { - invalidParams.Add(smithy.NewErrParamRequired("FilterFormula")) - } else if v.FilterFormula != nil { - if err := validateFilter(v.FilterFormula); err != nil { - invalidParams.AddNested("FilterFormula", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpStartTableDataImportJobInput(v *StartTableDataImportJobInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StartTableDataImportJobInput"} - if v.WorkbookId == nil { - invalidParams.Add(smithy.NewErrParamRequired("WorkbookId")) - } - if v.DataSource == nil { - invalidParams.Add(smithy.NewErrParamRequired("DataSource")) - } else if v.DataSource != nil { - if err := validateImportDataSource(v.DataSource); err != nil { - invalidParams.AddNested("DataSource", err.(smithy.InvalidParamsError)) - } - } - if len(v.DataFormat) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("DataFormat")) - } - if v.DestinationTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("DestinationTableId")) - } - if v.ImportOptions == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImportOptions")) - } else if v.ImportOptions != nil { - if err := validateImportOptions(v.ImportOptions); err != nil { - invalidParams.AddNested("ImportOptions", err.(smithy.InvalidParamsError)) - } - } - if v.ClientRequestToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpTagResourceInput(v *TagResourceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} - if v.ResourceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) - } - if v.Tags == nil { - invalidParams.Add(smithy.NewErrParamRequired("Tags")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUntagResourceInput(v *UntagResourceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} - if v.ResourceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) - } - if v.TagKeys == nil { - invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -}