@aws-sdk/client-managedblockchain 3.33.0 → 3.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/{dist/cjs → dist-cjs}/ManagedBlockchain.js +2 -9
- package/dist-cjs/ManagedBlockchainClient.js +35 -0
- package/{dist/cjs → dist-cjs}/commands/CreateMemberCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/CreateNetworkCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/CreateNodeCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/CreateProposalCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/DeleteMemberCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/DeleteNodeCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/GetMemberCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/GetNetworkCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/GetNodeCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/GetProposalCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/ListInvitationsCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/ListMembersCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/ListNetworksCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/ListNodesCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/ListProposalVotesCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/ListProposalsCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/ListTagsForResourceCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/RejectInvitationCommand.js +2 -28
- package/dist-cjs/commands/TagResourceCommand.js +36 -0
- package/{dist/cjs → dist-cjs}/commands/UntagResourceCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/UpdateMemberCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/UpdateNodeCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/commands/VoteOnProposalCommand.js +2 -28
- package/{dist/cjs → dist-cjs}/endpoints.js +0 -1
- package/{dist/cjs → dist-cjs}/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/models_0.js +0 -274
- package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
- package/{dist/cjs → dist-cjs}/pagination/ListInvitationsPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListMembersPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListNetworksPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListNodesPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListProposalVotesPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/pagination/ListProposalsPaginator.js +1 -12
- package/{dist/cjs → dist-cjs}/protocols/Aws_restJson1.js +3 -9
- package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
- package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
- package/{dist/es → dist-es}/ManagedBlockchain.js +3 -10
- package/{dist/es → dist-es}/ManagedBlockchainClient.js +2 -14
- package/{dist/es → dist-es}/commands/CreateMemberCommand.js +4 -31
- package/{dist/es → dist-es}/commands/CreateNetworkCommand.js +4 -31
- package/{dist/es → dist-es}/commands/CreateNodeCommand.js +4 -31
- package/{dist/es → dist-es}/commands/CreateProposalCommand.js +4 -31
- package/{dist/es → dist-es}/commands/DeleteMemberCommand.js +4 -31
- package/{dist/es → dist-es}/commands/DeleteNodeCommand.js +4 -31
- package/{dist/es → dist-es}/commands/GetMemberCommand.js +4 -31
- package/{dist/es → dist-es}/commands/GetNetworkCommand.js +4 -31
- package/{dist/es → dist-es}/commands/GetNodeCommand.js +4 -31
- package/{dist/es → dist-es}/commands/GetProposalCommand.js +4 -31
- package/{dist/es → dist-es}/commands/ListInvitationsCommand.js +4 -31
- package/{dist/es → dist-es}/commands/ListMembersCommand.js +4 -31
- package/{dist/es → dist-es}/commands/ListNetworksCommand.js +4 -31
- package/{dist/es → dist-es}/commands/ListNodesCommand.js +4 -31
- package/{dist/es → dist-es}/commands/ListProposalVotesCommand.js +4 -31
- package/{dist/es → dist-es}/commands/ListProposalsCommand.js +4 -31
- package/{dist/es → dist-es}/commands/ListTagsForResourceCommand.js +4 -31
- package/{dist/es → dist-es}/commands/RejectInvitationCommand.js +4 -31
- package/dist-es/commands/TagResourceCommand.js +39 -0
- package/{dist/es → dist-es}/commands/UntagResourceCommand.js +4 -31
- package/{dist/es → dist-es}/commands/UpdateMemberCommand.js +4 -31
- package/{dist/es → dist-es}/commands/UpdateNodeCommand.js +4 -31
- package/{dist/es → dist-es}/commands/VoteOnProposalCommand.js +4 -31
- package/{dist/es → dist-es}/endpoints.js +1 -2
- package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
- package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
- package/{dist/es → dist-es}/models/models_0.js +0 -274
- package/dist-es/pagination/Interfaces.js +1 -0
- package/{dist/es → dist-es}/pagination/ListInvitationsPaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/ListMembersPaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/ListNetworksPaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/ListNodesPaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/ListProposalVotesPaginator.js +17 -30
- package/{dist/es → dist-es}/pagination/ListProposalsPaginator.js +17 -30
- package/{dist/es → dist-es}/protocols/Aws_restJson1.js +721 -727
- package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.native.js +0 -4
- package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -5
- package/{dist/types → dist-types}/ManagedBlockchain.d.ts +3 -3
- package/{dist/types → dist-types}/ManagedBlockchainClient.d.ts +9 -9
- package/{dist/types → dist-types}/commands/CreateMemberCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/CreateNetworkCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/CreateNodeCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/CreateProposalCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/DeleteMemberCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/DeleteNodeCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/GetMemberCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/GetNetworkCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/GetNodeCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/GetProposalCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListInvitationsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListMembersCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListNetworksCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListNodesCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListProposalVotesCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListProposalsCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/ListTagsForResourceCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/RejectInvitationCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/TagResourceCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/UntagResourceCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/UpdateMemberCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/UpdateNodeCommand.d.ts +2 -2
- package/{dist/types → dist-types}/commands/VoteOnProposalCommand.d.ts +2 -2
- package/{dist/types → dist-types}/endpoints.d.ts +0 -0
- package/{index.ts → dist-types/index.d.ts} +0 -0
- package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
- package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
- package/{dist/types → dist-types}/pagination/Interfaces.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListInvitationsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListMembersPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListNetworksPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListNodesPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListProposalVotesPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/pagination/ListProposalsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/protocols/Aws_restJson1.d.ts +3 -3
- package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.d.ts +1 -1
- package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/ManagedBlockchain.d.ts +27 -103
- package/{dist/types → dist-types}/ts3.4/ManagedBlockchainClient.d.ts +33 -101
- package/dist-types/ts3.4/commands/CreateMemberCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateNetworkCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateNodeCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateProposalCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteMemberCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteNodeCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetMemberCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetNetworkCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetNodeCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetProposalCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListInvitationsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListMembersCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListNetworksCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListNodesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListProposalVotesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListProposalsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/RejectInvitationCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateMemberCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateNodeCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/VoteOnProposalCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
- package/dist-types/ts3.4/models/models_0.d.ts +1171 -0
- package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListInvitationsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListMembersPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListNetworksPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListNodesPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListProposalVotesPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/pagination/ListProposalsPaginator.d.ts +1 -1
- package/{dist/types → dist-types}/ts3.4/protocols/Aws_restJson1.d.ts +3 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +2 -4
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +52 -49
- package/ManagedBlockchain.ts +0 -774
- package/ManagedBlockchainClient.ts +0 -310
- package/commands/CreateMemberCommand.ts +0 -99
- package/commands/CreateNetworkCommand.ts +0 -99
- package/commands/CreateNodeCommand.ts +0 -99
- package/commands/CreateProposalCommand.ts +0 -99
- package/commands/DeleteMemberCommand.ts +0 -99
- package/commands/DeleteNodeCommand.ts +0 -99
- package/commands/GetMemberCommand.ts +0 -99
- package/commands/GetNetworkCommand.ts +0 -99
- package/commands/GetNodeCommand.ts +0 -99
- package/commands/GetProposalCommand.ts +0 -99
- package/commands/ListInvitationsCommand.ts +0 -99
- package/commands/ListMembersCommand.ts +0 -99
- package/commands/ListNetworksCommand.ts +0 -99
- package/commands/ListNodesCommand.ts +0 -99
- package/commands/ListProposalVotesCommand.ts +0 -99
- package/commands/ListProposalsCommand.ts +0 -99
- package/commands/ListTagsForResourceCommand.ts +0 -99
- package/commands/RejectInvitationCommand.ts +0 -99
- package/commands/TagResourceCommand.ts +0 -101
- package/commands/UntagResourceCommand.ts +0 -99
- package/commands/UpdateMemberCommand.ts +0 -99
- package/commands/UpdateNodeCommand.ts +0 -99
- package/commands/VoteOnProposalCommand.ts +0 -99
- package/dist/cjs/ManagedBlockchain.js.map +0 -1
- package/dist/cjs/ManagedBlockchainClient.js +0 -47
- package/dist/cjs/ManagedBlockchainClient.js.map +0 -1
- package/dist/cjs/commands/CreateMemberCommand.js.map +0 -1
- package/dist/cjs/commands/CreateNetworkCommand.js.map +0 -1
- package/dist/cjs/commands/CreateNodeCommand.js.map +0 -1
- package/dist/cjs/commands/CreateProposalCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteMemberCommand.js.map +0 -1
- package/dist/cjs/commands/DeleteNodeCommand.js.map +0 -1
- package/dist/cjs/commands/GetMemberCommand.js.map +0 -1
- package/dist/cjs/commands/GetNetworkCommand.js.map +0 -1
- package/dist/cjs/commands/GetNodeCommand.js.map +0 -1
- package/dist/cjs/commands/GetProposalCommand.js.map +0 -1
- package/dist/cjs/commands/ListInvitationsCommand.js.map +0 -1
- package/dist/cjs/commands/ListMembersCommand.js.map +0 -1
- package/dist/cjs/commands/ListNetworksCommand.js.map +0 -1
- package/dist/cjs/commands/ListNodesCommand.js.map +0 -1
- package/dist/cjs/commands/ListProposalVotesCommand.js.map +0 -1
- package/dist/cjs/commands/ListProposalsCommand.js.map +0 -1
- package/dist/cjs/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist/cjs/commands/RejectInvitationCommand.js.map +0 -1
- package/dist/cjs/commands/TagResourceCommand.js +0 -64
- package/dist/cjs/commands/TagResourceCommand.js.map +0 -1
- package/dist/cjs/commands/UntagResourceCommand.js.map +0 -1
- package/dist/cjs/commands/UpdateMemberCommand.js.map +0 -1
- package/dist/cjs/commands/UpdateNodeCommand.js.map +0 -1
- package/dist/cjs/commands/VoteOnProposalCommand.js.map +0 -1
- package/dist/cjs/endpoints.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/models/index.js.map +0 -1
- package/dist/cjs/models/models_0.js.map +0 -1
- package/dist/cjs/package.json +0 -93
- package/dist/cjs/pagination/Interfaces.js.map +0 -1
- package/dist/cjs/pagination/ListInvitationsPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListMembersPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListNetworksPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListNodesPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListProposalVotesPaginator.js.map +0 -1
- package/dist/cjs/pagination/ListProposalsPaginator.js.map +0 -1
- package/dist/cjs/protocols/Aws_restJson1.js.map +0 -1
- package/dist/cjs/runtimeConfig.browser.js.map +0 -1
- package/dist/cjs/runtimeConfig.js.map +0 -1
- package/dist/cjs/runtimeConfig.native.js.map +0 -1
- package/dist/cjs/runtimeConfig.shared.js.map +0 -1
- package/dist/es/ManagedBlockchain.js.map +0 -1
- package/dist/es/ManagedBlockchainClient.js.map +0 -1
- package/dist/es/commands/CreateMemberCommand.js.map +0 -1
- package/dist/es/commands/CreateNetworkCommand.js.map +0 -1
- package/dist/es/commands/CreateNodeCommand.js.map +0 -1
- package/dist/es/commands/CreateProposalCommand.js.map +0 -1
- package/dist/es/commands/DeleteMemberCommand.js.map +0 -1
- package/dist/es/commands/DeleteNodeCommand.js.map +0 -1
- package/dist/es/commands/GetMemberCommand.js.map +0 -1
- package/dist/es/commands/GetNetworkCommand.js.map +0 -1
- package/dist/es/commands/GetNodeCommand.js.map +0 -1
- package/dist/es/commands/GetProposalCommand.js.map +0 -1
- package/dist/es/commands/ListInvitationsCommand.js.map +0 -1
- package/dist/es/commands/ListMembersCommand.js.map +0 -1
- package/dist/es/commands/ListNetworksCommand.js.map +0 -1
- package/dist/es/commands/ListNodesCommand.js.map +0 -1
- package/dist/es/commands/ListProposalVotesCommand.js.map +0 -1
- package/dist/es/commands/ListProposalsCommand.js.map +0 -1
- package/dist/es/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist/es/commands/RejectInvitationCommand.js.map +0 -1
- package/dist/es/commands/TagResourceCommand.js +0 -68
- package/dist/es/commands/TagResourceCommand.js.map +0 -1
- package/dist/es/commands/UntagResourceCommand.js.map +0 -1
- package/dist/es/commands/UpdateMemberCommand.js.map +0 -1
- package/dist/es/commands/UpdateNodeCommand.js.map +0 -1
- package/dist/es/commands/VoteOnProposalCommand.js.map +0 -1
- package/dist/es/endpoints.js.map +0 -1
- package/dist/es/index.js +0 -34
- package/dist/es/index.js.map +0 -1
- package/dist/es/models/index.js +0 -2
- package/dist/es/models/index.js.map +0 -1
- package/dist/es/models/models_0.js.map +0 -1
- package/dist/es/package.json +0 -93
- package/dist/es/pagination/Interfaces.js +0 -2
- package/dist/es/pagination/Interfaces.js.map +0 -1
- package/dist/es/pagination/ListInvitationsPaginator.js.map +0 -1
- package/dist/es/pagination/ListMembersPaginator.js.map +0 -1
- package/dist/es/pagination/ListNetworksPaginator.js.map +0 -1
- package/dist/es/pagination/ListNodesPaginator.js.map +0 -1
- package/dist/es/pagination/ListProposalVotesPaginator.js.map +0 -1
- package/dist/es/pagination/ListProposalsPaginator.js.map +0 -1
- package/dist/es/protocols/Aws_restJson1.js.map +0 -1
- package/dist/es/runtimeConfig.browser.js.map +0 -1
- package/dist/es/runtimeConfig.js.map +0 -1
- package/dist/es/runtimeConfig.native.js.map +0 -1
- package/dist/es/runtimeConfig.shared.js.map +0 -1
- package/dist/types/ts3.4/commands/CreateMemberCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/CreateNetworkCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/CreateNodeCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/CreateProposalCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/DeleteMemberCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/DeleteNodeCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/GetMemberCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/GetNetworkCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/GetNodeCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/GetProposalCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/ListInvitationsCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/ListMembersCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/ListNetworksCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/ListNodesCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/ListProposalVotesCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/ListProposalsCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/ListTagsForResourceCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/RejectInvitationCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/TagResourceCommand.d.ts +0 -38
- package/dist/types/ts3.4/commands/UntagResourceCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/UpdateMemberCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/UpdateNodeCommand.d.ts +0 -36
- package/dist/types/ts3.4/commands/VoteOnProposalCommand.d.ts +0 -36
- package/dist/types/ts3.4/models/models_0.d.ts +0 -2255
- package/endpoints.ts +0 -57
- package/jest.config.js +0 -4
- package/models/models_0.ts +0 -2773
- package/pagination/Interfaces.ts +0 -7
- package/pagination/ListInvitationsPaginator.ts +0 -58
- package/pagination/ListMembersPaginator.ts +0 -54
- package/pagination/ListNetworksPaginator.ts +0 -58
- package/pagination/ListNodesPaginator.ts +0 -54
- package/pagination/ListProposalVotesPaginator.ts +0 -58
- package/pagination/ListProposalsPaginator.ts +0 -58
- package/protocols/Aws_restJson1.ts +0 -4005
- package/runtimeConfig.browser.ts +0 -40
- package/runtimeConfig.native.ts +0 -16
- package/runtimeConfig.shared.ts +0 -16
- package/runtimeConfig.ts +0 -45
- package/tsconfig.es.json +0 -12
- package/tsconfig.json +0 -32
|
@@ -1,4005 +0,0 @@
|
|
|
1
|
-
import { CreateMemberCommandInput, CreateMemberCommandOutput } from "../commands/CreateMemberCommand";
|
|
2
|
-
import { CreateNetworkCommandInput, CreateNetworkCommandOutput } from "../commands/CreateNetworkCommand";
|
|
3
|
-
import { CreateNodeCommandInput, CreateNodeCommandOutput } from "../commands/CreateNodeCommand";
|
|
4
|
-
import { CreateProposalCommandInput, CreateProposalCommandOutput } from "../commands/CreateProposalCommand";
|
|
5
|
-
import { DeleteMemberCommandInput, DeleteMemberCommandOutput } from "../commands/DeleteMemberCommand";
|
|
6
|
-
import { DeleteNodeCommandInput, DeleteNodeCommandOutput } from "../commands/DeleteNodeCommand";
|
|
7
|
-
import { GetMemberCommandInput, GetMemberCommandOutput } from "../commands/GetMemberCommand";
|
|
8
|
-
import { GetNetworkCommandInput, GetNetworkCommandOutput } from "../commands/GetNetworkCommand";
|
|
9
|
-
import { GetNodeCommandInput, GetNodeCommandOutput } from "../commands/GetNodeCommand";
|
|
10
|
-
import { GetProposalCommandInput, GetProposalCommandOutput } from "../commands/GetProposalCommand";
|
|
11
|
-
import { ListInvitationsCommandInput, ListInvitationsCommandOutput } from "../commands/ListInvitationsCommand";
|
|
12
|
-
import { ListMembersCommandInput, ListMembersCommandOutput } from "../commands/ListMembersCommand";
|
|
13
|
-
import { ListNetworksCommandInput, ListNetworksCommandOutput } from "../commands/ListNetworksCommand";
|
|
14
|
-
import { ListNodesCommandInput, ListNodesCommandOutput } from "../commands/ListNodesCommand";
|
|
15
|
-
import { ListProposalVotesCommandInput, ListProposalVotesCommandOutput } from "../commands/ListProposalVotesCommand";
|
|
16
|
-
import { ListProposalsCommandInput, ListProposalsCommandOutput } from "../commands/ListProposalsCommand";
|
|
17
|
-
import {
|
|
18
|
-
ListTagsForResourceCommandInput,
|
|
19
|
-
ListTagsForResourceCommandOutput,
|
|
20
|
-
} from "../commands/ListTagsForResourceCommand";
|
|
21
|
-
import { RejectInvitationCommandInput, RejectInvitationCommandOutput } from "../commands/RejectInvitationCommand";
|
|
22
|
-
import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
|
|
23
|
-
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
|
|
24
|
-
import { UpdateMemberCommandInput, UpdateMemberCommandOutput } from "../commands/UpdateMemberCommand";
|
|
25
|
-
import { UpdateNodeCommandInput, UpdateNodeCommandOutput } from "../commands/UpdateNodeCommand";
|
|
26
|
-
import { VoteOnProposalCommandInput, VoteOnProposalCommandOutput } from "../commands/VoteOnProposalCommand";
|
|
27
|
-
import {
|
|
28
|
-
AccessDeniedException,
|
|
29
|
-
ApprovalThresholdPolicy,
|
|
30
|
-
IllegalActionException,
|
|
31
|
-
InternalServiceErrorException,
|
|
32
|
-
InvalidRequestException,
|
|
33
|
-
Invitation,
|
|
34
|
-
InviteAction,
|
|
35
|
-
LogConfiguration,
|
|
36
|
-
LogConfigurations,
|
|
37
|
-
Member,
|
|
38
|
-
MemberConfiguration,
|
|
39
|
-
MemberFabricAttributes,
|
|
40
|
-
MemberFabricConfiguration,
|
|
41
|
-
MemberFabricLogPublishingConfiguration,
|
|
42
|
-
MemberFrameworkAttributes,
|
|
43
|
-
MemberFrameworkConfiguration,
|
|
44
|
-
MemberLogPublishingConfiguration,
|
|
45
|
-
MemberSummary,
|
|
46
|
-
Network,
|
|
47
|
-
NetworkEthereumAttributes,
|
|
48
|
-
NetworkFabricAttributes,
|
|
49
|
-
NetworkFabricConfiguration,
|
|
50
|
-
NetworkFrameworkAttributes,
|
|
51
|
-
NetworkFrameworkConfiguration,
|
|
52
|
-
NetworkSummary,
|
|
53
|
-
Node,
|
|
54
|
-
NodeConfiguration,
|
|
55
|
-
NodeEthereumAttributes,
|
|
56
|
-
NodeFabricAttributes,
|
|
57
|
-
NodeFabricLogPublishingConfiguration,
|
|
58
|
-
NodeFrameworkAttributes,
|
|
59
|
-
NodeLogPublishingConfiguration,
|
|
60
|
-
NodeSummary,
|
|
61
|
-
Proposal,
|
|
62
|
-
ProposalActions,
|
|
63
|
-
ProposalSummary,
|
|
64
|
-
RemoveAction,
|
|
65
|
-
ResourceAlreadyExistsException,
|
|
66
|
-
ResourceLimitExceededException,
|
|
67
|
-
ResourceNotFoundException,
|
|
68
|
-
ResourceNotReadyException,
|
|
69
|
-
ThrottlingException,
|
|
70
|
-
TooManyTagsException,
|
|
71
|
-
VoteSummary,
|
|
72
|
-
VotingPolicy,
|
|
73
|
-
} from "../models/models_0";
|
|
74
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
75
|
-
import {
|
|
76
|
-
expectBoolean as __expectBoolean,
|
|
77
|
-
expectInt32 as __expectInt32,
|
|
78
|
-
expectNonNull as __expectNonNull,
|
|
79
|
-
expectObject as __expectObject,
|
|
80
|
-
expectString as __expectString,
|
|
81
|
-
extendedEncodeURIComponent as __extendedEncodeURIComponent,
|
|
82
|
-
parseRfc3339DateTime as __parseRfc3339DateTime,
|
|
83
|
-
} from "@aws-sdk/smithy-client";
|
|
84
|
-
import {
|
|
85
|
-
Endpoint as __Endpoint,
|
|
86
|
-
MetadataBearer as __MetadataBearer,
|
|
87
|
-
ResponseMetadata as __ResponseMetadata,
|
|
88
|
-
SerdeContext as __SerdeContext,
|
|
89
|
-
SmithyException as __SmithyException,
|
|
90
|
-
} from "@aws-sdk/types";
|
|
91
|
-
import { v4 as generateIdempotencyToken } from "uuid";
|
|
92
|
-
|
|
93
|
-
export const serializeAws_restJson1CreateMemberCommand = async (
|
|
94
|
-
input: CreateMemberCommandInput,
|
|
95
|
-
context: __SerdeContext
|
|
96
|
-
): Promise<__HttpRequest> => {
|
|
97
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
98
|
-
const headers: any = {
|
|
99
|
-
"content-type": "application/json",
|
|
100
|
-
};
|
|
101
|
-
let resolvedPath =
|
|
102
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members";
|
|
103
|
-
if (input.NetworkId !== undefined) {
|
|
104
|
-
const labelValue: string = input.NetworkId;
|
|
105
|
-
if (labelValue.length <= 0) {
|
|
106
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
107
|
-
}
|
|
108
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
109
|
-
} else {
|
|
110
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
111
|
-
}
|
|
112
|
-
let body: any;
|
|
113
|
-
body = JSON.stringify({
|
|
114
|
-
ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
|
|
115
|
-
...(input.InvitationId !== undefined && input.InvitationId !== null && { InvitationId: input.InvitationId }),
|
|
116
|
-
...(input.MemberConfiguration !== undefined &&
|
|
117
|
-
input.MemberConfiguration !== null && {
|
|
118
|
-
MemberConfiguration: serializeAws_restJson1MemberConfiguration(input.MemberConfiguration, context),
|
|
119
|
-
}),
|
|
120
|
-
});
|
|
121
|
-
return new __HttpRequest({
|
|
122
|
-
protocol,
|
|
123
|
-
hostname,
|
|
124
|
-
port,
|
|
125
|
-
method: "POST",
|
|
126
|
-
headers,
|
|
127
|
-
path: resolvedPath,
|
|
128
|
-
body,
|
|
129
|
-
});
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
export const serializeAws_restJson1CreateNetworkCommand = async (
|
|
133
|
-
input: CreateNetworkCommandInput,
|
|
134
|
-
context: __SerdeContext
|
|
135
|
-
): Promise<__HttpRequest> => {
|
|
136
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
137
|
-
const headers: any = {
|
|
138
|
-
"content-type": "application/json",
|
|
139
|
-
};
|
|
140
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks";
|
|
141
|
-
let body: any;
|
|
142
|
-
body = JSON.stringify({
|
|
143
|
-
ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
|
|
144
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
145
|
-
...(input.Framework !== undefined && input.Framework !== null && { Framework: input.Framework }),
|
|
146
|
-
...(input.FrameworkConfiguration !== undefined &&
|
|
147
|
-
input.FrameworkConfiguration !== null && {
|
|
148
|
-
FrameworkConfiguration: serializeAws_restJson1NetworkFrameworkConfiguration(
|
|
149
|
-
input.FrameworkConfiguration,
|
|
150
|
-
context
|
|
151
|
-
),
|
|
152
|
-
}),
|
|
153
|
-
...(input.FrameworkVersion !== undefined &&
|
|
154
|
-
input.FrameworkVersion !== null && { FrameworkVersion: input.FrameworkVersion }),
|
|
155
|
-
...(input.MemberConfiguration !== undefined &&
|
|
156
|
-
input.MemberConfiguration !== null && {
|
|
157
|
-
MemberConfiguration: serializeAws_restJson1MemberConfiguration(input.MemberConfiguration, context),
|
|
158
|
-
}),
|
|
159
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
160
|
-
...(input.Tags !== undefined &&
|
|
161
|
-
input.Tags !== null && { Tags: serializeAws_restJson1InputTagMap(input.Tags, context) }),
|
|
162
|
-
...(input.VotingPolicy !== undefined &&
|
|
163
|
-
input.VotingPolicy !== null && { VotingPolicy: serializeAws_restJson1VotingPolicy(input.VotingPolicy, context) }),
|
|
164
|
-
});
|
|
165
|
-
return new __HttpRequest({
|
|
166
|
-
protocol,
|
|
167
|
-
hostname,
|
|
168
|
-
port,
|
|
169
|
-
method: "POST",
|
|
170
|
-
headers,
|
|
171
|
-
path: resolvedPath,
|
|
172
|
-
body,
|
|
173
|
-
});
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
export const serializeAws_restJson1CreateNodeCommand = async (
|
|
177
|
-
input: CreateNodeCommandInput,
|
|
178
|
-
context: __SerdeContext
|
|
179
|
-
): Promise<__HttpRequest> => {
|
|
180
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
181
|
-
const headers: any = {
|
|
182
|
-
"content-type": "application/json",
|
|
183
|
-
};
|
|
184
|
-
let resolvedPath =
|
|
185
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes";
|
|
186
|
-
if (input.NetworkId !== undefined) {
|
|
187
|
-
const labelValue: string = input.NetworkId;
|
|
188
|
-
if (labelValue.length <= 0) {
|
|
189
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
190
|
-
}
|
|
191
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
192
|
-
} else {
|
|
193
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
194
|
-
}
|
|
195
|
-
let body: any;
|
|
196
|
-
body = JSON.stringify({
|
|
197
|
-
ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
|
|
198
|
-
...(input.MemberId !== undefined && input.MemberId !== null && { MemberId: input.MemberId }),
|
|
199
|
-
...(input.NodeConfiguration !== undefined &&
|
|
200
|
-
input.NodeConfiguration !== null && {
|
|
201
|
-
NodeConfiguration: serializeAws_restJson1NodeConfiguration(input.NodeConfiguration, context),
|
|
202
|
-
}),
|
|
203
|
-
...(input.Tags !== undefined &&
|
|
204
|
-
input.Tags !== null && { Tags: serializeAws_restJson1InputTagMap(input.Tags, context) }),
|
|
205
|
-
});
|
|
206
|
-
return new __HttpRequest({
|
|
207
|
-
protocol,
|
|
208
|
-
hostname,
|
|
209
|
-
port,
|
|
210
|
-
method: "POST",
|
|
211
|
-
headers,
|
|
212
|
-
path: resolvedPath,
|
|
213
|
-
body,
|
|
214
|
-
});
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
export const serializeAws_restJson1CreateProposalCommand = async (
|
|
218
|
-
input: CreateProposalCommandInput,
|
|
219
|
-
context: __SerdeContext
|
|
220
|
-
): Promise<__HttpRequest> => {
|
|
221
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
222
|
-
const headers: any = {
|
|
223
|
-
"content-type": "application/json",
|
|
224
|
-
};
|
|
225
|
-
let resolvedPath =
|
|
226
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/proposals";
|
|
227
|
-
if (input.NetworkId !== undefined) {
|
|
228
|
-
const labelValue: string = input.NetworkId;
|
|
229
|
-
if (labelValue.length <= 0) {
|
|
230
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
231
|
-
}
|
|
232
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
233
|
-
} else {
|
|
234
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
235
|
-
}
|
|
236
|
-
let body: any;
|
|
237
|
-
body = JSON.stringify({
|
|
238
|
-
...(input.Actions !== undefined &&
|
|
239
|
-
input.Actions !== null && { Actions: serializeAws_restJson1ProposalActions(input.Actions, context) }),
|
|
240
|
-
ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
|
|
241
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
242
|
-
...(input.MemberId !== undefined && input.MemberId !== null && { MemberId: input.MemberId }),
|
|
243
|
-
...(input.Tags !== undefined &&
|
|
244
|
-
input.Tags !== null && { Tags: serializeAws_restJson1InputTagMap(input.Tags, context) }),
|
|
245
|
-
});
|
|
246
|
-
return new __HttpRequest({
|
|
247
|
-
protocol,
|
|
248
|
-
hostname,
|
|
249
|
-
port,
|
|
250
|
-
method: "POST",
|
|
251
|
-
headers,
|
|
252
|
-
path: resolvedPath,
|
|
253
|
-
body,
|
|
254
|
-
});
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
export const serializeAws_restJson1DeleteMemberCommand = async (
|
|
258
|
-
input: DeleteMemberCommandInput,
|
|
259
|
-
context: __SerdeContext
|
|
260
|
-
): Promise<__HttpRequest> => {
|
|
261
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
262
|
-
const headers: any = {};
|
|
263
|
-
let resolvedPath =
|
|
264
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members/{MemberId}";
|
|
265
|
-
if (input.NetworkId !== undefined) {
|
|
266
|
-
const labelValue: string = input.NetworkId;
|
|
267
|
-
if (labelValue.length <= 0) {
|
|
268
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
269
|
-
}
|
|
270
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
271
|
-
} else {
|
|
272
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
273
|
-
}
|
|
274
|
-
if (input.MemberId !== undefined) {
|
|
275
|
-
const labelValue: string = input.MemberId;
|
|
276
|
-
if (labelValue.length <= 0) {
|
|
277
|
-
throw new Error("Empty value provided for input HTTP label: MemberId.");
|
|
278
|
-
}
|
|
279
|
-
resolvedPath = resolvedPath.replace("{MemberId}", __extendedEncodeURIComponent(labelValue));
|
|
280
|
-
} else {
|
|
281
|
-
throw new Error("No value provided for input HTTP label: MemberId.");
|
|
282
|
-
}
|
|
283
|
-
let body: any;
|
|
284
|
-
return new __HttpRequest({
|
|
285
|
-
protocol,
|
|
286
|
-
hostname,
|
|
287
|
-
port,
|
|
288
|
-
method: "DELETE",
|
|
289
|
-
headers,
|
|
290
|
-
path: resolvedPath,
|
|
291
|
-
body,
|
|
292
|
-
});
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
export const serializeAws_restJson1DeleteNodeCommand = async (
|
|
296
|
-
input: DeleteNodeCommandInput,
|
|
297
|
-
context: __SerdeContext
|
|
298
|
-
): Promise<__HttpRequest> => {
|
|
299
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
300
|
-
const headers: any = {};
|
|
301
|
-
let resolvedPath =
|
|
302
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes/{NodeId}";
|
|
303
|
-
if (input.NetworkId !== undefined) {
|
|
304
|
-
const labelValue: string = input.NetworkId;
|
|
305
|
-
if (labelValue.length <= 0) {
|
|
306
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
307
|
-
}
|
|
308
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
309
|
-
} else {
|
|
310
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
311
|
-
}
|
|
312
|
-
if (input.NodeId !== undefined) {
|
|
313
|
-
const labelValue: string = input.NodeId;
|
|
314
|
-
if (labelValue.length <= 0) {
|
|
315
|
-
throw new Error("Empty value provided for input HTTP label: NodeId.");
|
|
316
|
-
}
|
|
317
|
-
resolvedPath = resolvedPath.replace("{NodeId}", __extendedEncodeURIComponent(labelValue));
|
|
318
|
-
} else {
|
|
319
|
-
throw new Error("No value provided for input HTTP label: NodeId.");
|
|
320
|
-
}
|
|
321
|
-
const query: any = {
|
|
322
|
-
...(input.MemberId !== undefined && { memberId: input.MemberId }),
|
|
323
|
-
};
|
|
324
|
-
let body: any;
|
|
325
|
-
return new __HttpRequest({
|
|
326
|
-
protocol,
|
|
327
|
-
hostname,
|
|
328
|
-
port,
|
|
329
|
-
method: "DELETE",
|
|
330
|
-
headers,
|
|
331
|
-
path: resolvedPath,
|
|
332
|
-
query,
|
|
333
|
-
body,
|
|
334
|
-
});
|
|
335
|
-
};
|
|
336
|
-
|
|
337
|
-
export const serializeAws_restJson1GetMemberCommand = async (
|
|
338
|
-
input: GetMemberCommandInput,
|
|
339
|
-
context: __SerdeContext
|
|
340
|
-
): Promise<__HttpRequest> => {
|
|
341
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
342
|
-
const headers: any = {};
|
|
343
|
-
let resolvedPath =
|
|
344
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members/{MemberId}";
|
|
345
|
-
if (input.NetworkId !== undefined) {
|
|
346
|
-
const labelValue: string = input.NetworkId;
|
|
347
|
-
if (labelValue.length <= 0) {
|
|
348
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
349
|
-
}
|
|
350
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
351
|
-
} else {
|
|
352
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
353
|
-
}
|
|
354
|
-
if (input.MemberId !== undefined) {
|
|
355
|
-
const labelValue: string = input.MemberId;
|
|
356
|
-
if (labelValue.length <= 0) {
|
|
357
|
-
throw new Error("Empty value provided for input HTTP label: MemberId.");
|
|
358
|
-
}
|
|
359
|
-
resolvedPath = resolvedPath.replace("{MemberId}", __extendedEncodeURIComponent(labelValue));
|
|
360
|
-
} else {
|
|
361
|
-
throw new Error("No value provided for input HTTP label: MemberId.");
|
|
362
|
-
}
|
|
363
|
-
let body: any;
|
|
364
|
-
return new __HttpRequest({
|
|
365
|
-
protocol,
|
|
366
|
-
hostname,
|
|
367
|
-
port,
|
|
368
|
-
method: "GET",
|
|
369
|
-
headers,
|
|
370
|
-
path: resolvedPath,
|
|
371
|
-
body,
|
|
372
|
-
});
|
|
373
|
-
};
|
|
374
|
-
|
|
375
|
-
export const serializeAws_restJson1GetNetworkCommand = async (
|
|
376
|
-
input: GetNetworkCommandInput,
|
|
377
|
-
context: __SerdeContext
|
|
378
|
-
): Promise<__HttpRequest> => {
|
|
379
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
380
|
-
const headers: any = {};
|
|
381
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}";
|
|
382
|
-
if (input.NetworkId !== undefined) {
|
|
383
|
-
const labelValue: string = input.NetworkId;
|
|
384
|
-
if (labelValue.length <= 0) {
|
|
385
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
386
|
-
}
|
|
387
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
388
|
-
} else {
|
|
389
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
390
|
-
}
|
|
391
|
-
let body: any;
|
|
392
|
-
return new __HttpRequest({
|
|
393
|
-
protocol,
|
|
394
|
-
hostname,
|
|
395
|
-
port,
|
|
396
|
-
method: "GET",
|
|
397
|
-
headers,
|
|
398
|
-
path: resolvedPath,
|
|
399
|
-
body,
|
|
400
|
-
});
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
export const serializeAws_restJson1GetNodeCommand = async (
|
|
404
|
-
input: GetNodeCommandInput,
|
|
405
|
-
context: __SerdeContext
|
|
406
|
-
): Promise<__HttpRequest> => {
|
|
407
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
408
|
-
const headers: any = {};
|
|
409
|
-
let resolvedPath =
|
|
410
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes/{NodeId}";
|
|
411
|
-
if (input.NetworkId !== undefined) {
|
|
412
|
-
const labelValue: string = input.NetworkId;
|
|
413
|
-
if (labelValue.length <= 0) {
|
|
414
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
415
|
-
}
|
|
416
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
417
|
-
} else {
|
|
418
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
419
|
-
}
|
|
420
|
-
if (input.NodeId !== undefined) {
|
|
421
|
-
const labelValue: string = input.NodeId;
|
|
422
|
-
if (labelValue.length <= 0) {
|
|
423
|
-
throw new Error("Empty value provided for input HTTP label: NodeId.");
|
|
424
|
-
}
|
|
425
|
-
resolvedPath = resolvedPath.replace("{NodeId}", __extendedEncodeURIComponent(labelValue));
|
|
426
|
-
} else {
|
|
427
|
-
throw new Error("No value provided for input HTTP label: NodeId.");
|
|
428
|
-
}
|
|
429
|
-
const query: any = {
|
|
430
|
-
...(input.MemberId !== undefined && { memberId: input.MemberId }),
|
|
431
|
-
};
|
|
432
|
-
let body: any;
|
|
433
|
-
return new __HttpRequest({
|
|
434
|
-
protocol,
|
|
435
|
-
hostname,
|
|
436
|
-
port,
|
|
437
|
-
method: "GET",
|
|
438
|
-
headers,
|
|
439
|
-
path: resolvedPath,
|
|
440
|
-
query,
|
|
441
|
-
body,
|
|
442
|
-
});
|
|
443
|
-
};
|
|
444
|
-
|
|
445
|
-
export const serializeAws_restJson1GetProposalCommand = async (
|
|
446
|
-
input: GetProposalCommandInput,
|
|
447
|
-
context: __SerdeContext
|
|
448
|
-
): Promise<__HttpRequest> => {
|
|
449
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
450
|
-
const headers: any = {};
|
|
451
|
-
let resolvedPath =
|
|
452
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
453
|
-
"/networks/{NetworkId}/proposals/{ProposalId}";
|
|
454
|
-
if (input.NetworkId !== undefined) {
|
|
455
|
-
const labelValue: string = input.NetworkId;
|
|
456
|
-
if (labelValue.length <= 0) {
|
|
457
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
458
|
-
}
|
|
459
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
460
|
-
} else {
|
|
461
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
462
|
-
}
|
|
463
|
-
if (input.ProposalId !== undefined) {
|
|
464
|
-
const labelValue: string = input.ProposalId;
|
|
465
|
-
if (labelValue.length <= 0) {
|
|
466
|
-
throw new Error("Empty value provided for input HTTP label: ProposalId.");
|
|
467
|
-
}
|
|
468
|
-
resolvedPath = resolvedPath.replace("{ProposalId}", __extendedEncodeURIComponent(labelValue));
|
|
469
|
-
} else {
|
|
470
|
-
throw new Error("No value provided for input HTTP label: ProposalId.");
|
|
471
|
-
}
|
|
472
|
-
let body: any;
|
|
473
|
-
return new __HttpRequest({
|
|
474
|
-
protocol,
|
|
475
|
-
hostname,
|
|
476
|
-
port,
|
|
477
|
-
method: "GET",
|
|
478
|
-
headers,
|
|
479
|
-
path: resolvedPath,
|
|
480
|
-
body,
|
|
481
|
-
});
|
|
482
|
-
};
|
|
483
|
-
|
|
484
|
-
export const serializeAws_restJson1ListInvitationsCommand = async (
|
|
485
|
-
input: ListInvitationsCommandInput,
|
|
486
|
-
context: __SerdeContext
|
|
487
|
-
): Promise<__HttpRequest> => {
|
|
488
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
489
|
-
const headers: any = {};
|
|
490
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitations";
|
|
491
|
-
const query: any = {
|
|
492
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
493
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
494
|
-
};
|
|
495
|
-
let body: any;
|
|
496
|
-
return new __HttpRequest({
|
|
497
|
-
protocol,
|
|
498
|
-
hostname,
|
|
499
|
-
port,
|
|
500
|
-
method: "GET",
|
|
501
|
-
headers,
|
|
502
|
-
path: resolvedPath,
|
|
503
|
-
query,
|
|
504
|
-
body,
|
|
505
|
-
});
|
|
506
|
-
};
|
|
507
|
-
|
|
508
|
-
export const serializeAws_restJson1ListMembersCommand = async (
|
|
509
|
-
input: ListMembersCommandInput,
|
|
510
|
-
context: __SerdeContext
|
|
511
|
-
): Promise<__HttpRequest> => {
|
|
512
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
513
|
-
const headers: any = {};
|
|
514
|
-
let resolvedPath =
|
|
515
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members";
|
|
516
|
-
if (input.NetworkId !== undefined) {
|
|
517
|
-
const labelValue: string = input.NetworkId;
|
|
518
|
-
if (labelValue.length <= 0) {
|
|
519
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
520
|
-
}
|
|
521
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
522
|
-
} else {
|
|
523
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
524
|
-
}
|
|
525
|
-
const query: any = {
|
|
526
|
-
...(input.Name !== undefined && { name: input.Name }),
|
|
527
|
-
...(input.Status !== undefined && { status: input.Status }),
|
|
528
|
-
...(input.IsOwned !== undefined && { isOwned: input.IsOwned.toString() }),
|
|
529
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
530
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
531
|
-
};
|
|
532
|
-
let body: any;
|
|
533
|
-
return new __HttpRequest({
|
|
534
|
-
protocol,
|
|
535
|
-
hostname,
|
|
536
|
-
port,
|
|
537
|
-
method: "GET",
|
|
538
|
-
headers,
|
|
539
|
-
path: resolvedPath,
|
|
540
|
-
query,
|
|
541
|
-
body,
|
|
542
|
-
});
|
|
543
|
-
};
|
|
544
|
-
|
|
545
|
-
export const serializeAws_restJson1ListNetworksCommand = async (
|
|
546
|
-
input: ListNetworksCommandInput,
|
|
547
|
-
context: __SerdeContext
|
|
548
|
-
): Promise<__HttpRequest> => {
|
|
549
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
550
|
-
const headers: any = {};
|
|
551
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks";
|
|
552
|
-
const query: any = {
|
|
553
|
-
...(input.Name !== undefined && { name: input.Name }),
|
|
554
|
-
...(input.Framework !== undefined && { framework: input.Framework }),
|
|
555
|
-
...(input.Status !== undefined && { status: input.Status }),
|
|
556
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
557
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
558
|
-
};
|
|
559
|
-
let body: any;
|
|
560
|
-
return new __HttpRequest({
|
|
561
|
-
protocol,
|
|
562
|
-
hostname,
|
|
563
|
-
port,
|
|
564
|
-
method: "GET",
|
|
565
|
-
headers,
|
|
566
|
-
path: resolvedPath,
|
|
567
|
-
query,
|
|
568
|
-
body,
|
|
569
|
-
});
|
|
570
|
-
};
|
|
571
|
-
|
|
572
|
-
export const serializeAws_restJson1ListNodesCommand = async (
|
|
573
|
-
input: ListNodesCommandInput,
|
|
574
|
-
context: __SerdeContext
|
|
575
|
-
): Promise<__HttpRequest> => {
|
|
576
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
577
|
-
const headers: any = {};
|
|
578
|
-
let resolvedPath =
|
|
579
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes";
|
|
580
|
-
if (input.NetworkId !== undefined) {
|
|
581
|
-
const labelValue: string = input.NetworkId;
|
|
582
|
-
if (labelValue.length <= 0) {
|
|
583
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
584
|
-
}
|
|
585
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
586
|
-
} else {
|
|
587
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
588
|
-
}
|
|
589
|
-
const query: any = {
|
|
590
|
-
...(input.MemberId !== undefined && { memberId: input.MemberId }),
|
|
591
|
-
...(input.Status !== undefined && { status: input.Status }),
|
|
592
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
593
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
594
|
-
};
|
|
595
|
-
let body: any;
|
|
596
|
-
return new __HttpRequest({
|
|
597
|
-
protocol,
|
|
598
|
-
hostname,
|
|
599
|
-
port,
|
|
600
|
-
method: "GET",
|
|
601
|
-
headers,
|
|
602
|
-
path: resolvedPath,
|
|
603
|
-
query,
|
|
604
|
-
body,
|
|
605
|
-
});
|
|
606
|
-
};
|
|
607
|
-
|
|
608
|
-
export const serializeAws_restJson1ListProposalsCommand = async (
|
|
609
|
-
input: ListProposalsCommandInput,
|
|
610
|
-
context: __SerdeContext
|
|
611
|
-
): Promise<__HttpRequest> => {
|
|
612
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
613
|
-
const headers: any = {};
|
|
614
|
-
let resolvedPath =
|
|
615
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/proposals";
|
|
616
|
-
if (input.NetworkId !== undefined) {
|
|
617
|
-
const labelValue: string = input.NetworkId;
|
|
618
|
-
if (labelValue.length <= 0) {
|
|
619
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
620
|
-
}
|
|
621
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
622
|
-
} else {
|
|
623
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
624
|
-
}
|
|
625
|
-
const query: any = {
|
|
626
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
627
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
628
|
-
};
|
|
629
|
-
let body: any;
|
|
630
|
-
return new __HttpRequest({
|
|
631
|
-
protocol,
|
|
632
|
-
hostname,
|
|
633
|
-
port,
|
|
634
|
-
method: "GET",
|
|
635
|
-
headers,
|
|
636
|
-
path: resolvedPath,
|
|
637
|
-
query,
|
|
638
|
-
body,
|
|
639
|
-
});
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
export const serializeAws_restJson1ListProposalVotesCommand = async (
|
|
643
|
-
input: ListProposalVotesCommandInput,
|
|
644
|
-
context: __SerdeContext
|
|
645
|
-
): Promise<__HttpRequest> => {
|
|
646
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
647
|
-
const headers: any = {};
|
|
648
|
-
let resolvedPath =
|
|
649
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
650
|
-
"/networks/{NetworkId}/proposals/{ProposalId}/votes";
|
|
651
|
-
if (input.NetworkId !== undefined) {
|
|
652
|
-
const labelValue: string = input.NetworkId;
|
|
653
|
-
if (labelValue.length <= 0) {
|
|
654
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
655
|
-
}
|
|
656
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
657
|
-
} else {
|
|
658
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
659
|
-
}
|
|
660
|
-
if (input.ProposalId !== undefined) {
|
|
661
|
-
const labelValue: string = input.ProposalId;
|
|
662
|
-
if (labelValue.length <= 0) {
|
|
663
|
-
throw new Error("Empty value provided for input HTTP label: ProposalId.");
|
|
664
|
-
}
|
|
665
|
-
resolvedPath = resolvedPath.replace("{ProposalId}", __extendedEncodeURIComponent(labelValue));
|
|
666
|
-
} else {
|
|
667
|
-
throw new Error("No value provided for input HTTP label: ProposalId.");
|
|
668
|
-
}
|
|
669
|
-
const query: any = {
|
|
670
|
-
...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
|
|
671
|
-
...(input.NextToken !== undefined && { nextToken: input.NextToken }),
|
|
672
|
-
};
|
|
673
|
-
let body: any;
|
|
674
|
-
return new __HttpRequest({
|
|
675
|
-
protocol,
|
|
676
|
-
hostname,
|
|
677
|
-
port,
|
|
678
|
-
method: "GET",
|
|
679
|
-
headers,
|
|
680
|
-
path: resolvedPath,
|
|
681
|
-
query,
|
|
682
|
-
body,
|
|
683
|
-
});
|
|
684
|
-
};
|
|
685
|
-
|
|
686
|
-
export const serializeAws_restJson1ListTagsForResourceCommand = async (
|
|
687
|
-
input: ListTagsForResourceCommandInput,
|
|
688
|
-
context: __SerdeContext
|
|
689
|
-
): Promise<__HttpRequest> => {
|
|
690
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
691
|
-
const headers: any = {};
|
|
692
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
693
|
-
if (input.ResourceArn !== undefined) {
|
|
694
|
-
const labelValue: string = input.ResourceArn;
|
|
695
|
-
if (labelValue.length <= 0) {
|
|
696
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
697
|
-
}
|
|
698
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
699
|
-
} else {
|
|
700
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
701
|
-
}
|
|
702
|
-
let body: any;
|
|
703
|
-
return new __HttpRequest({
|
|
704
|
-
protocol,
|
|
705
|
-
hostname,
|
|
706
|
-
port,
|
|
707
|
-
method: "GET",
|
|
708
|
-
headers,
|
|
709
|
-
path: resolvedPath,
|
|
710
|
-
body,
|
|
711
|
-
});
|
|
712
|
-
};
|
|
713
|
-
|
|
714
|
-
export const serializeAws_restJson1RejectInvitationCommand = async (
|
|
715
|
-
input: RejectInvitationCommandInput,
|
|
716
|
-
context: __SerdeContext
|
|
717
|
-
): Promise<__HttpRequest> => {
|
|
718
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
719
|
-
const headers: any = {};
|
|
720
|
-
let resolvedPath =
|
|
721
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitations/{InvitationId}";
|
|
722
|
-
if (input.InvitationId !== undefined) {
|
|
723
|
-
const labelValue: string = input.InvitationId;
|
|
724
|
-
if (labelValue.length <= 0) {
|
|
725
|
-
throw new Error("Empty value provided for input HTTP label: InvitationId.");
|
|
726
|
-
}
|
|
727
|
-
resolvedPath = resolvedPath.replace("{InvitationId}", __extendedEncodeURIComponent(labelValue));
|
|
728
|
-
} else {
|
|
729
|
-
throw new Error("No value provided for input HTTP label: InvitationId.");
|
|
730
|
-
}
|
|
731
|
-
let body: any;
|
|
732
|
-
return new __HttpRequest({
|
|
733
|
-
protocol,
|
|
734
|
-
hostname,
|
|
735
|
-
port,
|
|
736
|
-
method: "DELETE",
|
|
737
|
-
headers,
|
|
738
|
-
path: resolvedPath,
|
|
739
|
-
body,
|
|
740
|
-
});
|
|
741
|
-
};
|
|
742
|
-
|
|
743
|
-
export const serializeAws_restJson1TagResourceCommand = async (
|
|
744
|
-
input: TagResourceCommandInput,
|
|
745
|
-
context: __SerdeContext
|
|
746
|
-
): Promise<__HttpRequest> => {
|
|
747
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
748
|
-
const headers: any = {
|
|
749
|
-
"content-type": "application/json",
|
|
750
|
-
};
|
|
751
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
752
|
-
if (input.ResourceArn !== undefined) {
|
|
753
|
-
const labelValue: string = input.ResourceArn;
|
|
754
|
-
if (labelValue.length <= 0) {
|
|
755
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
756
|
-
}
|
|
757
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
758
|
-
} else {
|
|
759
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
760
|
-
}
|
|
761
|
-
let body: any;
|
|
762
|
-
body = JSON.stringify({
|
|
763
|
-
...(input.Tags !== undefined &&
|
|
764
|
-
input.Tags !== null && { Tags: serializeAws_restJson1InputTagMap(input.Tags, context) }),
|
|
765
|
-
});
|
|
766
|
-
return new __HttpRequest({
|
|
767
|
-
protocol,
|
|
768
|
-
hostname,
|
|
769
|
-
port,
|
|
770
|
-
method: "POST",
|
|
771
|
-
headers,
|
|
772
|
-
path: resolvedPath,
|
|
773
|
-
body,
|
|
774
|
-
});
|
|
775
|
-
};
|
|
776
|
-
|
|
777
|
-
export const serializeAws_restJson1UntagResourceCommand = async (
|
|
778
|
-
input: UntagResourceCommandInput,
|
|
779
|
-
context: __SerdeContext
|
|
780
|
-
): Promise<__HttpRequest> => {
|
|
781
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
782
|
-
const headers: any = {};
|
|
783
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
784
|
-
if (input.ResourceArn !== undefined) {
|
|
785
|
-
const labelValue: string = input.ResourceArn;
|
|
786
|
-
if (labelValue.length <= 0) {
|
|
787
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
788
|
-
}
|
|
789
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
790
|
-
} else {
|
|
791
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
792
|
-
}
|
|
793
|
-
const query: any = {
|
|
794
|
-
...(input.TagKeys !== undefined && { tagKeys: (input.TagKeys || []).map((_entry) => _entry as any) }),
|
|
795
|
-
};
|
|
796
|
-
let body: any;
|
|
797
|
-
return new __HttpRequest({
|
|
798
|
-
protocol,
|
|
799
|
-
hostname,
|
|
800
|
-
port,
|
|
801
|
-
method: "DELETE",
|
|
802
|
-
headers,
|
|
803
|
-
path: resolvedPath,
|
|
804
|
-
query,
|
|
805
|
-
body,
|
|
806
|
-
});
|
|
807
|
-
};
|
|
808
|
-
|
|
809
|
-
export const serializeAws_restJson1UpdateMemberCommand = async (
|
|
810
|
-
input: UpdateMemberCommandInput,
|
|
811
|
-
context: __SerdeContext
|
|
812
|
-
): Promise<__HttpRequest> => {
|
|
813
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
814
|
-
const headers: any = {
|
|
815
|
-
"content-type": "application/json",
|
|
816
|
-
};
|
|
817
|
-
let resolvedPath =
|
|
818
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members/{MemberId}";
|
|
819
|
-
if (input.NetworkId !== undefined) {
|
|
820
|
-
const labelValue: string = input.NetworkId;
|
|
821
|
-
if (labelValue.length <= 0) {
|
|
822
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
823
|
-
}
|
|
824
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
825
|
-
} else {
|
|
826
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
827
|
-
}
|
|
828
|
-
if (input.MemberId !== undefined) {
|
|
829
|
-
const labelValue: string = input.MemberId;
|
|
830
|
-
if (labelValue.length <= 0) {
|
|
831
|
-
throw new Error("Empty value provided for input HTTP label: MemberId.");
|
|
832
|
-
}
|
|
833
|
-
resolvedPath = resolvedPath.replace("{MemberId}", __extendedEncodeURIComponent(labelValue));
|
|
834
|
-
} else {
|
|
835
|
-
throw new Error("No value provided for input HTTP label: MemberId.");
|
|
836
|
-
}
|
|
837
|
-
let body: any;
|
|
838
|
-
body = JSON.stringify({
|
|
839
|
-
...(input.LogPublishingConfiguration !== undefined &&
|
|
840
|
-
input.LogPublishingConfiguration !== null && {
|
|
841
|
-
LogPublishingConfiguration: serializeAws_restJson1MemberLogPublishingConfiguration(
|
|
842
|
-
input.LogPublishingConfiguration,
|
|
843
|
-
context
|
|
844
|
-
),
|
|
845
|
-
}),
|
|
846
|
-
});
|
|
847
|
-
return new __HttpRequest({
|
|
848
|
-
protocol,
|
|
849
|
-
hostname,
|
|
850
|
-
port,
|
|
851
|
-
method: "PATCH",
|
|
852
|
-
headers,
|
|
853
|
-
path: resolvedPath,
|
|
854
|
-
body,
|
|
855
|
-
});
|
|
856
|
-
};
|
|
857
|
-
|
|
858
|
-
export const serializeAws_restJson1UpdateNodeCommand = async (
|
|
859
|
-
input: UpdateNodeCommandInput,
|
|
860
|
-
context: __SerdeContext
|
|
861
|
-
): Promise<__HttpRequest> => {
|
|
862
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
863
|
-
const headers: any = {
|
|
864
|
-
"content-type": "application/json",
|
|
865
|
-
};
|
|
866
|
-
let resolvedPath =
|
|
867
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes/{NodeId}";
|
|
868
|
-
if (input.NetworkId !== undefined) {
|
|
869
|
-
const labelValue: string = input.NetworkId;
|
|
870
|
-
if (labelValue.length <= 0) {
|
|
871
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
872
|
-
}
|
|
873
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
874
|
-
} else {
|
|
875
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
876
|
-
}
|
|
877
|
-
if (input.NodeId !== undefined) {
|
|
878
|
-
const labelValue: string = input.NodeId;
|
|
879
|
-
if (labelValue.length <= 0) {
|
|
880
|
-
throw new Error("Empty value provided for input HTTP label: NodeId.");
|
|
881
|
-
}
|
|
882
|
-
resolvedPath = resolvedPath.replace("{NodeId}", __extendedEncodeURIComponent(labelValue));
|
|
883
|
-
} else {
|
|
884
|
-
throw new Error("No value provided for input HTTP label: NodeId.");
|
|
885
|
-
}
|
|
886
|
-
let body: any;
|
|
887
|
-
body = JSON.stringify({
|
|
888
|
-
...(input.LogPublishingConfiguration !== undefined &&
|
|
889
|
-
input.LogPublishingConfiguration !== null && {
|
|
890
|
-
LogPublishingConfiguration: serializeAws_restJson1NodeLogPublishingConfiguration(
|
|
891
|
-
input.LogPublishingConfiguration,
|
|
892
|
-
context
|
|
893
|
-
),
|
|
894
|
-
}),
|
|
895
|
-
...(input.MemberId !== undefined && input.MemberId !== null && { MemberId: input.MemberId }),
|
|
896
|
-
});
|
|
897
|
-
return new __HttpRequest({
|
|
898
|
-
protocol,
|
|
899
|
-
hostname,
|
|
900
|
-
port,
|
|
901
|
-
method: "PATCH",
|
|
902
|
-
headers,
|
|
903
|
-
path: resolvedPath,
|
|
904
|
-
body,
|
|
905
|
-
});
|
|
906
|
-
};
|
|
907
|
-
|
|
908
|
-
export const serializeAws_restJson1VoteOnProposalCommand = async (
|
|
909
|
-
input: VoteOnProposalCommandInput,
|
|
910
|
-
context: __SerdeContext
|
|
911
|
-
): Promise<__HttpRequest> => {
|
|
912
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
913
|
-
const headers: any = {
|
|
914
|
-
"content-type": "application/json",
|
|
915
|
-
};
|
|
916
|
-
let resolvedPath =
|
|
917
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
918
|
-
"/networks/{NetworkId}/proposals/{ProposalId}/votes";
|
|
919
|
-
if (input.NetworkId !== undefined) {
|
|
920
|
-
const labelValue: string = input.NetworkId;
|
|
921
|
-
if (labelValue.length <= 0) {
|
|
922
|
-
throw new Error("Empty value provided for input HTTP label: NetworkId.");
|
|
923
|
-
}
|
|
924
|
-
resolvedPath = resolvedPath.replace("{NetworkId}", __extendedEncodeURIComponent(labelValue));
|
|
925
|
-
} else {
|
|
926
|
-
throw new Error("No value provided for input HTTP label: NetworkId.");
|
|
927
|
-
}
|
|
928
|
-
if (input.ProposalId !== undefined) {
|
|
929
|
-
const labelValue: string = input.ProposalId;
|
|
930
|
-
if (labelValue.length <= 0) {
|
|
931
|
-
throw new Error("Empty value provided for input HTTP label: ProposalId.");
|
|
932
|
-
}
|
|
933
|
-
resolvedPath = resolvedPath.replace("{ProposalId}", __extendedEncodeURIComponent(labelValue));
|
|
934
|
-
} else {
|
|
935
|
-
throw new Error("No value provided for input HTTP label: ProposalId.");
|
|
936
|
-
}
|
|
937
|
-
let body: any;
|
|
938
|
-
body = JSON.stringify({
|
|
939
|
-
...(input.Vote !== undefined && input.Vote !== null && { Vote: input.Vote }),
|
|
940
|
-
...(input.VoterMemberId !== undefined && input.VoterMemberId !== null && { VoterMemberId: input.VoterMemberId }),
|
|
941
|
-
});
|
|
942
|
-
return new __HttpRequest({
|
|
943
|
-
protocol,
|
|
944
|
-
hostname,
|
|
945
|
-
port,
|
|
946
|
-
method: "POST",
|
|
947
|
-
headers,
|
|
948
|
-
path: resolvedPath,
|
|
949
|
-
body,
|
|
950
|
-
});
|
|
951
|
-
};
|
|
952
|
-
|
|
953
|
-
export const deserializeAws_restJson1CreateMemberCommand = async (
|
|
954
|
-
output: __HttpResponse,
|
|
955
|
-
context: __SerdeContext
|
|
956
|
-
): Promise<CreateMemberCommandOutput> => {
|
|
957
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
958
|
-
return deserializeAws_restJson1CreateMemberCommandError(output, context);
|
|
959
|
-
}
|
|
960
|
-
const contents: CreateMemberCommandOutput = {
|
|
961
|
-
$metadata: deserializeMetadata(output),
|
|
962
|
-
MemberId: undefined,
|
|
963
|
-
};
|
|
964
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
965
|
-
if (data.MemberId !== undefined && data.MemberId !== null) {
|
|
966
|
-
contents.MemberId = __expectString(data.MemberId);
|
|
967
|
-
}
|
|
968
|
-
return Promise.resolve(contents);
|
|
969
|
-
};
|
|
970
|
-
|
|
971
|
-
const deserializeAws_restJson1CreateMemberCommandError = async (
|
|
972
|
-
output: __HttpResponse,
|
|
973
|
-
context: __SerdeContext
|
|
974
|
-
): Promise<CreateMemberCommandOutput> => {
|
|
975
|
-
const parsedOutput: any = {
|
|
976
|
-
...output,
|
|
977
|
-
body: await parseBody(output.body, context),
|
|
978
|
-
};
|
|
979
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
980
|
-
let errorCode: string = "UnknownError";
|
|
981
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
982
|
-
switch (errorCode) {
|
|
983
|
-
case "AccessDeniedException":
|
|
984
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
985
|
-
response = {
|
|
986
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
987
|
-
name: errorCode,
|
|
988
|
-
$metadata: deserializeMetadata(output),
|
|
989
|
-
};
|
|
990
|
-
break;
|
|
991
|
-
case "InternalServiceErrorException":
|
|
992
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
993
|
-
response = {
|
|
994
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
995
|
-
name: errorCode,
|
|
996
|
-
$metadata: deserializeMetadata(output),
|
|
997
|
-
};
|
|
998
|
-
break;
|
|
999
|
-
case "InvalidRequestException":
|
|
1000
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
1001
|
-
response = {
|
|
1002
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1003
|
-
name: errorCode,
|
|
1004
|
-
$metadata: deserializeMetadata(output),
|
|
1005
|
-
};
|
|
1006
|
-
break;
|
|
1007
|
-
case "ResourceAlreadyExistsException":
|
|
1008
|
-
case "com.amazonaws.managedblockchain#ResourceAlreadyExistsException":
|
|
1009
|
-
response = {
|
|
1010
|
-
...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
|
|
1011
|
-
name: errorCode,
|
|
1012
|
-
$metadata: deserializeMetadata(output),
|
|
1013
|
-
};
|
|
1014
|
-
break;
|
|
1015
|
-
case "ResourceLimitExceededException":
|
|
1016
|
-
case "com.amazonaws.managedblockchain#ResourceLimitExceededException":
|
|
1017
|
-
response = {
|
|
1018
|
-
...(await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context)),
|
|
1019
|
-
name: errorCode,
|
|
1020
|
-
$metadata: deserializeMetadata(output),
|
|
1021
|
-
};
|
|
1022
|
-
break;
|
|
1023
|
-
case "ResourceNotFoundException":
|
|
1024
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
1025
|
-
response = {
|
|
1026
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1027
|
-
name: errorCode,
|
|
1028
|
-
$metadata: deserializeMetadata(output),
|
|
1029
|
-
};
|
|
1030
|
-
break;
|
|
1031
|
-
case "ResourceNotReadyException":
|
|
1032
|
-
case "com.amazonaws.managedblockchain#ResourceNotReadyException":
|
|
1033
|
-
response = {
|
|
1034
|
-
...(await deserializeAws_restJson1ResourceNotReadyExceptionResponse(parsedOutput, context)),
|
|
1035
|
-
name: errorCode,
|
|
1036
|
-
$metadata: deserializeMetadata(output),
|
|
1037
|
-
};
|
|
1038
|
-
break;
|
|
1039
|
-
case "ThrottlingException":
|
|
1040
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
1041
|
-
response = {
|
|
1042
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1043
|
-
name: errorCode,
|
|
1044
|
-
$metadata: deserializeMetadata(output),
|
|
1045
|
-
};
|
|
1046
|
-
break;
|
|
1047
|
-
case "TooManyTagsException":
|
|
1048
|
-
case "com.amazonaws.managedblockchain#TooManyTagsException":
|
|
1049
|
-
response = {
|
|
1050
|
-
...(await deserializeAws_restJson1TooManyTagsExceptionResponse(parsedOutput, context)),
|
|
1051
|
-
name: errorCode,
|
|
1052
|
-
$metadata: deserializeMetadata(output),
|
|
1053
|
-
};
|
|
1054
|
-
break;
|
|
1055
|
-
default:
|
|
1056
|
-
const parsedBody = parsedOutput.body;
|
|
1057
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1058
|
-
response = {
|
|
1059
|
-
...parsedBody,
|
|
1060
|
-
name: `${errorCode}`,
|
|
1061
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1062
|
-
$fault: "client",
|
|
1063
|
-
$metadata: deserializeMetadata(output),
|
|
1064
|
-
} as any;
|
|
1065
|
-
}
|
|
1066
|
-
const message = response.message || response.Message || errorCode;
|
|
1067
|
-
response.message = message;
|
|
1068
|
-
delete response.Message;
|
|
1069
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1070
|
-
};
|
|
1071
|
-
|
|
1072
|
-
export const deserializeAws_restJson1CreateNetworkCommand = async (
|
|
1073
|
-
output: __HttpResponse,
|
|
1074
|
-
context: __SerdeContext
|
|
1075
|
-
): Promise<CreateNetworkCommandOutput> => {
|
|
1076
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1077
|
-
return deserializeAws_restJson1CreateNetworkCommandError(output, context);
|
|
1078
|
-
}
|
|
1079
|
-
const contents: CreateNetworkCommandOutput = {
|
|
1080
|
-
$metadata: deserializeMetadata(output),
|
|
1081
|
-
MemberId: undefined,
|
|
1082
|
-
NetworkId: undefined,
|
|
1083
|
-
};
|
|
1084
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1085
|
-
if (data.MemberId !== undefined && data.MemberId !== null) {
|
|
1086
|
-
contents.MemberId = __expectString(data.MemberId);
|
|
1087
|
-
}
|
|
1088
|
-
if (data.NetworkId !== undefined && data.NetworkId !== null) {
|
|
1089
|
-
contents.NetworkId = __expectString(data.NetworkId);
|
|
1090
|
-
}
|
|
1091
|
-
return Promise.resolve(contents);
|
|
1092
|
-
};
|
|
1093
|
-
|
|
1094
|
-
const deserializeAws_restJson1CreateNetworkCommandError = async (
|
|
1095
|
-
output: __HttpResponse,
|
|
1096
|
-
context: __SerdeContext
|
|
1097
|
-
): Promise<CreateNetworkCommandOutput> => {
|
|
1098
|
-
const parsedOutput: any = {
|
|
1099
|
-
...output,
|
|
1100
|
-
body: await parseBody(output.body, context),
|
|
1101
|
-
};
|
|
1102
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1103
|
-
let errorCode: string = "UnknownError";
|
|
1104
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1105
|
-
switch (errorCode) {
|
|
1106
|
-
case "AccessDeniedException":
|
|
1107
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
1108
|
-
response = {
|
|
1109
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1110
|
-
name: errorCode,
|
|
1111
|
-
$metadata: deserializeMetadata(output),
|
|
1112
|
-
};
|
|
1113
|
-
break;
|
|
1114
|
-
case "InternalServiceErrorException":
|
|
1115
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
1116
|
-
response = {
|
|
1117
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
1118
|
-
name: errorCode,
|
|
1119
|
-
$metadata: deserializeMetadata(output),
|
|
1120
|
-
};
|
|
1121
|
-
break;
|
|
1122
|
-
case "InvalidRequestException":
|
|
1123
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
1124
|
-
response = {
|
|
1125
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1126
|
-
name: errorCode,
|
|
1127
|
-
$metadata: deserializeMetadata(output),
|
|
1128
|
-
};
|
|
1129
|
-
break;
|
|
1130
|
-
case "ResourceAlreadyExistsException":
|
|
1131
|
-
case "com.amazonaws.managedblockchain#ResourceAlreadyExistsException":
|
|
1132
|
-
response = {
|
|
1133
|
-
...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
|
|
1134
|
-
name: errorCode,
|
|
1135
|
-
$metadata: deserializeMetadata(output),
|
|
1136
|
-
};
|
|
1137
|
-
break;
|
|
1138
|
-
case "ResourceLimitExceededException":
|
|
1139
|
-
case "com.amazonaws.managedblockchain#ResourceLimitExceededException":
|
|
1140
|
-
response = {
|
|
1141
|
-
...(await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context)),
|
|
1142
|
-
name: errorCode,
|
|
1143
|
-
$metadata: deserializeMetadata(output),
|
|
1144
|
-
};
|
|
1145
|
-
break;
|
|
1146
|
-
case "ThrottlingException":
|
|
1147
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
1148
|
-
response = {
|
|
1149
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1150
|
-
name: errorCode,
|
|
1151
|
-
$metadata: deserializeMetadata(output),
|
|
1152
|
-
};
|
|
1153
|
-
break;
|
|
1154
|
-
case "TooManyTagsException":
|
|
1155
|
-
case "com.amazonaws.managedblockchain#TooManyTagsException":
|
|
1156
|
-
response = {
|
|
1157
|
-
...(await deserializeAws_restJson1TooManyTagsExceptionResponse(parsedOutput, context)),
|
|
1158
|
-
name: errorCode,
|
|
1159
|
-
$metadata: deserializeMetadata(output),
|
|
1160
|
-
};
|
|
1161
|
-
break;
|
|
1162
|
-
default:
|
|
1163
|
-
const parsedBody = parsedOutput.body;
|
|
1164
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1165
|
-
response = {
|
|
1166
|
-
...parsedBody,
|
|
1167
|
-
name: `${errorCode}`,
|
|
1168
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1169
|
-
$fault: "client",
|
|
1170
|
-
$metadata: deserializeMetadata(output),
|
|
1171
|
-
} as any;
|
|
1172
|
-
}
|
|
1173
|
-
const message = response.message || response.Message || errorCode;
|
|
1174
|
-
response.message = message;
|
|
1175
|
-
delete response.Message;
|
|
1176
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1177
|
-
};
|
|
1178
|
-
|
|
1179
|
-
export const deserializeAws_restJson1CreateNodeCommand = async (
|
|
1180
|
-
output: __HttpResponse,
|
|
1181
|
-
context: __SerdeContext
|
|
1182
|
-
): Promise<CreateNodeCommandOutput> => {
|
|
1183
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1184
|
-
return deserializeAws_restJson1CreateNodeCommandError(output, context);
|
|
1185
|
-
}
|
|
1186
|
-
const contents: CreateNodeCommandOutput = {
|
|
1187
|
-
$metadata: deserializeMetadata(output),
|
|
1188
|
-
NodeId: undefined,
|
|
1189
|
-
};
|
|
1190
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1191
|
-
if (data.NodeId !== undefined && data.NodeId !== null) {
|
|
1192
|
-
contents.NodeId = __expectString(data.NodeId);
|
|
1193
|
-
}
|
|
1194
|
-
return Promise.resolve(contents);
|
|
1195
|
-
};
|
|
1196
|
-
|
|
1197
|
-
const deserializeAws_restJson1CreateNodeCommandError = async (
|
|
1198
|
-
output: __HttpResponse,
|
|
1199
|
-
context: __SerdeContext
|
|
1200
|
-
): Promise<CreateNodeCommandOutput> => {
|
|
1201
|
-
const parsedOutput: any = {
|
|
1202
|
-
...output,
|
|
1203
|
-
body: await parseBody(output.body, context),
|
|
1204
|
-
};
|
|
1205
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1206
|
-
let errorCode: string = "UnknownError";
|
|
1207
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1208
|
-
switch (errorCode) {
|
|
1209
|
-
case "AccessDeniedException":
|
|
1210
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
1211
|
-
response = {
|
|
1212
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1213
|
-
name: errorCode,
|
|
1214
|
-
$metadata: deserializeMetadata(output),
|
|
1215
|
-
};
|
|
1216
|
-
break;
|
|
1217
|
-
case "InternalServiceErrorException":
|
|
1218
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
1219
|
-
response = {
|
|
1220
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
1221
|
-
name: errorCode,
|
|
1222
|
-
$metadata: deserializeMetadata(output),
|
|
1223
|
-
};
|
|
1224
|
-
break;
|
|
1225
|
-
case "InvalidRequestException":
|
|
1226
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
1227
|
-
response = {
|
|
1228
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1229
|
-
name: errorCode,
|
|
1230
|
-
$metadata: deserializeMetadata(output),
|
|
1231
|
-
};
|
|
1232
|
-
break;
|
|
1233
|
-
case "ResourceAlreadyExistsException":
|
|
1234
|
-
case "com.amazonaws.managedblockchain#ResourceAlreadyExistsException":
|
|
1235
|
-
response = {
|
|
1236
|
-
...(await deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
|
|
1237
|
-
name: errorCode,
|
|
1238
|
-
$metadata: deserializeMetadata(output),
|
|
1239
|
-
};
|
|
1240
|
-
break;
|
|
1241
|
-
case "ResourceLimitExceededException":
|
|
1242
|
-
case "com.amazonaws.managedblockchain#ResourceLimitExceededException":
|
|
1243
|
-
response = {
|
|
1244
|
-
...(await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context)),
|
|
1245
|
-
name: errorCode,
|
|
1246
|
-
$metadata: deserializeMetadata(output),
|
|
1247
|
-
};
|
|
1248
|
-
break;
|
|
1249
|
-
case "ResourceNotFoundException":
|
|
1250
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
1251
|
-
response = {
|
|
1252
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1253
|
-
name: errorCode,
|
|
1254
|
-
$metadata: deserializeMetadata(output),
|
|
1255
|
-
};
|
|
1256
|
-
break;
|
|
1257
|
-
case "ResourceNotReadyException":
|
|
1258
|
-
case "com.amazonaws.managedblockchain#ResourceNotReadyException":
|
|
1259
|
-
response = {
|
|
1260
|
-
...(await deserializeAws_restJson1ResourceNotReadyExceptionResponse(parsedOutput, context)),
|
|
1261
|
-
name: errorCode,
|
|
1262
|
-
$metadata: deserializeMetadata(output),
|
|
1263
|
-
};
|
|
1264
|
-
break;
|
|
1265
|
-
case "ThrottlingException":
|
|
1266
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
1267
|
-
response = {
|
|
1268
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1269
|
-
name: errorCode,
|
|
1270
|
-
$metadata: deserializeMetadata(output),
|
|
1271
|
-
};
|
|
1272
|
-
break;
|
|
1273
|
-
case "TooManyTagsException":
|
|
1274
|
-
case "com.amazonaws.managedblockchain#TooManyTagsException":
|
|
1275
|
-
response = {
|
|
1276
|
-
...(await deserializeAws_restJson1TooManyTagsExceptionResponse(parsedOutput, context)),
|
|
1277
|
-
name: errorCode,
|
|
1278
|
-
$metadata: deserializeMetadata(output),
|
|
1279
|
-
};
|
|
1280
|
-
break;
|
|
1281
|
-
default:
|
|
1282
|
-
const parsedBody = parsedOutput.body;
|
|
1283
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1284
|
-
response = {
|
|
1285
|
-
...parsedBody,
|
|
1286
|
-
name: `${errorCode}`,
|
|
1287
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1288
|
-
$fault: "client",
|
|
1289
|
-
$metadata: deserializeMetadata(output),
|
|
1290
|
-
} as any;
|
|
1291
|
-
}
|
|
1292
|
-
const message = response.message || response.Message || errorCode;
|
|
1293
|
-
response.message = message;
|
|
1294
|
-
delete response.Message;
|
|
1295
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1296
|
-
};
|
|
1297
|
-
|
|
1298
|
-
export const deserializeAws_restJson1CreateProposalCommand = async (
|
|
1299
|
-
output: __HttpResponse,
|
|
1300
|
-
context: __SerdeContext
|
|
1301
|
-
): Promise<CreateProposalCommandOutput> => {
|
|
1302
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1303
|
-
return deserializeAws_restJson1CreateProposalCommandError(output, context);
|
|
1304
|
-
}
|
|
1305
|
-
const contents: CreateProposalCommandOutput = {
|
|
1306
|
-
$metadata: deserializeMetadata(output),
|
|
1307
|
-
ProposalId: undefined,
|
|
1308
|
-
};
|
|
1309
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1310
|
-
if (data.ProposalId !== undefined && data.ProposalId !== null) {
|
|
1311
|
-
contents.ProposalId = __expectString(data.ProposalId);
|
|
1312
|
-
}
|
|
1313
|
-
return Promise.resolve(contents);
|
|
1314
|
-
};
|
|
1315
|
-
|
|
1316
|
-
const deserializeAws_restJson1CreateProposalCommandError = async (
|
|
1317
|
-
output: __HttpResponse,
|
|
1318
|
-
context: __SerdeContext
|
|
1319
|
-
): Promise<CreateProposalCommandOutput> => {
|
|
1320
|
-
const parsedOutput: any = {
|
|
1321
|
-
...output,
|
|
1322
|
-
body: await parseBody(output.body, context),
|
|
1323
|
-
};
|
|
1324
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1325
|
-
let errorCode: string = "UnknownError";
|
|
1326
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1327
|
-
switch (errorCode) {
|
|
1328
|
-
case "AccessDeniedException":
|
|
1329
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
1330
|
-
response = {
|
|
1331
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1332
|
-
name: errorCode,
|
|
1333
|
-
$metadata: deserializeMetadata(output),
|
|
1334
|
-
};
|
|
1335
|
-
break;
|
|
1336
|
-
case "InternalServiceErrorException":
|
|
1337
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
1338
|
-
response = {
|
|
1339
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
1340
|
-
name: errorCode,
|
|
1341
|
-
$metadata: deserializeMetadata(output),
|
|
1342
|
-
};
|
|
1343
|
-
break;
|
|
1344
|
-
case "InvalidRequestException":
|
|
1345
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
1346
|
-
response = {
|
|
1347
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1348
|
-
name: errorCode,
|
|
1349
|
-
$metadata: deserializeMetadata(output),
|
|
1350
|
-
};
|
|
1351
|
-
break;
|
|
1352
|
-
case "ResourceNotFoundException":
|
|
1353
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
1354
|
-
response = {
|
|
1355
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1356
|
-
name: errorCode,
|
|
1357
|
-
$metadata: deserializeMetadata(output),
|
|
1358
|
-
};
|
|
1359
|
-
break;
|
|
1360
|
-
case "ResourceNotReadyException":
|
|
1361
|
-
case "com.amazonaws.managedblockchain#ResourceNotReadyException":
|
|
1362
|
-
response = {
|
|
1363
|
-
...(await deserializeAws_restJson1ResourceNotReadyExceptionResponse(parsedOutput, context)),
|
|
1364
|
-
name: errorCode,
|
|
1365
|
-
$metadata: deserializeMetadata(output),
|
|
1366
|
-
};
|
|
1367
|
-
break;
|
|
1368
|
-
case "ThrottlingException":
|
|
1369
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
1370
|
-
response = {
|
|
1371
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1372
|
-
name: errorCode,
|
|
1373
|
-
$metadata: deserializeMetadata(output),
|
|
1374
|
-
};
|
|
1375
|
-
break;
|
|
1376
|
-
case "TooManyTagsException":
|
|
1377
|
-
case "com.amazonaws.managedblockchain#TooManyTagsException":
|
|
1378
|
-
response = {
|
|
1379
|
-
...(await deserializeAws_restJson1TooManyTagsExceptionResponse(parsedOutput, context)),
|
|
1380
|
-
name: errorCode,
|
|
1381
|
-
$metadata: deserializeMetadata(output),
|
|
1382
|
-
};
|
|
1383
|
-
break;
|
|
1384
|
-
default:
|
|
1385
|
-
const parsedBody = parsedOutput.body;
|
|
1386
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1387
|
-
response = {
|
|
1388
|
-
...parsedBody,
|
|
1389
|
-
name: `${errorCode}`,
|
|
1390
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1391
|
-
$fault: "client",
|
|
1392
|
-
$metadata: deserializeMetadata(output),
|
|
1393
|
-
} as any;
|
|
1394
|
-
}
|
|
1395
|
-
const message = response.message || response.Message || errorCode;
|
|
1396
|
-
response.message = message;
|
|
1397
|
-
delete response.Message;
|
|
1398
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1399
|
-
};
|
|
1400
|
-
|
|
1401
|
-
export const deserializeAws_restJson1DeleteMemberCommand = async (
|
|
1402
|
-
output: __HttpResponse,
|
|
1403
|
-
context: __SerdeContext
|
|
1404
|
-
): Promise<DeleteMemberCommandOutput> => {
|
|
1405
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1406
|
-
return deserializeAws_restJson1DeleteMemberCommandError(output, context);
|
|
1407
|
-
}
|
|
1408
|
-
const contents: DeleteMemberCommandOutput = {
|
|
1409
|
-
$metadata: deserializeMetadata(output),
|
|
1410
|
-
};
|
|
1411
|
-
await collectBody(output.body, context);
|
|
1412
|
-
return Promise.resolve(contents);
|
|
1413
|
-
};
|
|
1414
|
-
|
|
1415
|
-
const deserializeAws_restJson1DeleteMemberCommandError = async (
|
|
1416
|
-
output: __HttpResponse,
|
|
1417
|
-
context: __SerdeContext
|
|
1418
|
-
): Promise<DeleteMemberCommandOutput> => {
|
|
1419
|
-
const parsedOutput: any = {
|
|
1420
|
-
...output,
|
|
1421
|
-
body: await parseBody(output.body, context),
|
|
1422
|
-
};
|
|
1423
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1424
|
-
let errorCode: string = "UnknownError";
|
|
1425
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1426
|
-
switch (errorCode) {
|
|
1427
|
-
case "AccessDeniedException":
|
|
1428
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
1429
|
-
response = {
|
|
1430
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1431
|
-
name: errorCode,
|
|
1432
|
-
$metadata: deserializeMetadata(output),
|
|
1433
|
-
};
|
|
1434
|
-
break;
|
|
1435
|
-
case "InternalServiceErrorException":
|
|
1436
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
1437
|
-
response = {
|
|
1438
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
1439
|
-
name: errorCode,
|
|
1440
|
-
$metadata: deserializeMetadata(output),
|
|
1441
|
-
};
|
|
1442
|
-
break;
|
|
1443
|
-
case "InvalidRequestException":
|
|
1444
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
1445
|
-
response = {
|
|
1446
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1447
|
-
name: errorCode,
|
|
1448
|
-
$metadata: deserializeMetadata(output),
|
|
1449
|
-
};
|
|
1450
|
-
break;
|
|
1451
|
-
case "ResourceNotFoundException":
|
|
1452
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
1453
|
-
response = {
|
|
1454
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1455
|
-
name: errorCode,
|
|
1456
|
-
$metadata: deserializeMetadata(output),
|
|
1457
|
-
};
|
|
1458
|
-
break;
|
|
1459
|
-
case "ResourceNotReadyException":
|
|
1460
|
-
case "com.amazonaws.managedblockchain#ResourceNotReadyException":
|
|
1461
|
-
response = {
|
|
1462
|
-
...(await deserializeAws_restJson1ResourceNotReadyExceptionResponse(parsedOutput, context)),
|
|
1463
|
-
name: errorCode,
|
|
1464
|
-
$metadata: deserializeMetadata(output),
|
|
1465
|
-
};
|
|
1466
|
-
break;
|
|
1467
|
-
case "ThrottlingException":
|
|
1468
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
1469
|
-
response = {
|
|
1470
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1471
|
-
name: errorCode,
|
|
1472
|
-
$metadata: deserializeMetadata(output),
|
|
1473
|
-
};
|
|
1474
|
-
break;
|
|
1475
|
-
default:
|
|
1476
|
-
const parsedBody = parsedOutput.body;
|
|
1477
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1478
|
-
response = {
|
|
1479
|
-
...parsedBody,
|
|
1480
|
-
name: `${errorCode}`,
|
|
1481
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1482
|
-
$fault: "client",
|
|
1483
|
-
$metadata: deserializeMetadata(output),
|
|
1484
|
-
} as any;
|
|
1485
|
-
}
|
|
1486
|
-
const message = response.message || response.Message || errorCode;
|
|
1487
|
-
response.message = message;
|
|
1488
|
-
delete response.Message;
|
|
1489
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1490
|
-
};
|
|
1491
|
-
|
|
1492
|
-
export const deserializeAws_restJson1DeleteNodeCommand = async (
|
|
1493
|
-
output: __HttpResponse,
|
|
1494
|
-
context: __SerdeContext
|
|
1495
|
-
): Promise<DeleteNodeCommandOutput> => {
|
|
1496
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1497
|
-
return deserializeAws_restJson1DeleteNodeCommandError(output, context);
|
|
1498
|
-
}
|
|
1499
|
-
const contents: DeleteNodeCommandOutput = {
|
|
1500
|
-
$metadata: deserializeMetadata(output),
|
|
1501
|
-
};
|
|
1502
|
-
await collectBody(output.body, context);
|
|
1503
|
-
return Promise.resolve(contents);
|
|
1504
|
-
};
|
|
1505
|
-
|
|
1506
|
-
const deserializeAws_restJson1DeleteNodeCommandError = async (
|
|
1507
|
-
output: __HttpResponse,
|
|
1508
|
-
context: __SerdeContext
|
|
1509
|
-
): Promise<DeleteNodeCommandOutput> => {
|
|
1510
|
-
const parsedOutput: any = {
|
|
1511
|
-
...output,
|
|
1512
|
-
body: await parseBody(output.body, context),
|
|
1513
|
-
};
|
|
1514
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1515
|
-
let errorCode: string = "UnknownError";
|
|
1516
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1517
|
-
switch (errorCode) {
|
|
1518
|
-
case "AccessDeniedException":
|
|
1519
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
1520
|
-
response = {
|
|
1521
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1522
|
-
name: errorCode,
|
|
1523
|
-
$metadata: deserializeMetadata(output),
|
|
1524
|
-
};
|
|
1525
|
-
break;
|
|
1526
|
-
case "InternalServiceErrorException":
|
|
1527
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
1528
|
-
response = {
|
|
1529
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
1530
|
-
name: errorCode,
|
|
1531
|
-
$metadata: deserializeMetadata(output),
|
|
1532
|
-
};
|
|
1533
|
-
break;
|
|
1534
|
-
case "InvalidRequestException":
|
|
1535
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
1536
|
-
response = {
|
|
1537
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1538
|
-
name: errorCode,
|
|
1539
|
-
$metadata: deserializeMetadata(output),
|
|
1540
|
-
};
|
|
1541
|
-
break;
|
|
1542
|
-
case "ResourceNotFoundException":
|
|
1543
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
1544
|
-
response = {
|
|
1545
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1546
|
-
name: errorCode,
|
|
1547
|
-
$metadata: deserializeMetadata(output),
|
|
1548
|
-
};
|
|
1549
|
-
break;
|
|
1550
|
-
case "ResourceNotReadyException":
|
|
1551
|
-
case "com.amazonaws.managedblockchain#ResourceNotReadyException":
|
|
1552
|
-
response = {
|
|
1553
|
-
...(await deserializeAws_restJson1ResourceNotReadyExceptionResponse(parsedOutput, context)),
|
|
1554
|
-
name: errorCode,
|
|
1555
|
-
$metadata: deserializeMetadata(output),
|
|
1556
|
-
};
|
|
1557
|
-
break;
|
|
1558
|
-
case "ThrottlingException":
|
|
1559
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
1560
|
-
response = {
|
|
1561
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1562
|
-
name: errorCode,
|
|
1563
|
-
$metadata: deserializeMetadata(output),
|
|
1564
|
-
};
|
|
1565
|
-
break;
|
|
1566
|
-
default:
|
|
1567
|
-
const parsedBody = parsedOutput.body;
|
|
1568
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1569
|
-
response = {
|
|
1570
|
-
...parsedBody,
|
|
1571
|
-
name: `${errorCode}`,
|
|
1572
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1573
|
-
$fault: "client",
|
|
1574
|
-
$metadata: deserializeMetadata(output),
|
|
1575
|
-
} as any;
|
|
1576
|
-
}
|
|
1577
|
-
const message = response.message || response.Message || errorCode;
|
|
1578
|
-
response.message = message;
|
|
1579
|
-
delete response.Message;
|
|
1580
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1581
|
-
};
|
|
1582
|
-
|
|
1583
|
-
export const deserializeAws_restJson1GetMemberCommand = async (
|
|
1584
|
-
output: __HttpResponse,
|
|
1585
|
-
context: __SerdeContext
|
|
1586
|
-
): Promise<GetMemberCommandOutput> => {
|
|
1587
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1588
|
-
return deserializeAws_restJson1GetMemberCommandError(output, context);
|
|
1589
|
-
}
|
|
1590
|
-
const contents: GetMemberCommandOutput = {
|
|
1591
|
-
$metadata: deserializeMetadata(output),
|
|
1592
|
-
Member: undefined,
|
|
1593
|
-
};
|
|
1594
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1595
|
-
if (data.Member !== undefined && data.Member !== null) {
|
|
1596
|
-
contents.Member = deserializeAws_restJson1Member(data.Member, context);
|
|
1597
|
-
}
|
|
1598
|
-
return Promise.resolve(contents);
|
|
1599
|
-
};
|
|
1600
|
-
|
|
1601
|
-
const deserializeAws_restJson1GetMemberCommandError = async (
|
|
1602
|
-
output: __HttpResponse,
|
|
1603
|
-
context: __SerdeContext
|
|
1604
|
-
): Promise<GetMemberCommandOutput> => {
|
|
1605
|
-
const parsedOutput: any = {
|
|
1606
|
-
...output,
|
|
1607
|
-
body: await parseBody(output.body, context),
|
|
1608
|
-
};
|
|
1609
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1610
|
-
let errorCode: string = "UnknownError";
|
|
1611
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1612
|
-
switch (errorCode) {
|
|
1613
|
-
case "AccessDeniedException":
|
|
1614
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
1615
|
-
response = {
|
|
1616
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1617
|
-
name: errorCode,
|
|
1618
|
-
$metadata: deserializeMetadata(output),
|
|
1619
|
-
};
|
|
1620
|
-
break;
|
|
1621
|
-
case "InternalServiceErrorException":
|
|
1622
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
1623
|
-
response = {
|
|
1624
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
1625
|
-
name: errorCode,
|
|
1626
|
-
$metadata: deserializeMetadata(output),
|
|
1627
|
-
};
|
|
1628
|
-
break;
|
|
1629
|
-
case "InvalidRequestException":
|
|
1630
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
1631
|
-
response = {
|
|
1632
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1633
|
-
name: errorCode,
|
|
1634
|
-
$metadata: deserializeMetadata(output),
|
|
1635
|
-
};
|
|
1636
|
-
break;
|
|
1637
|
-
case "ResourceNotFoundException":
|
|
1638
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
1639
|
-
response = {
|
|
1640
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1641
|
-
name: errorCode,
|
|
1642
|
-
$metadata: deserializeMetadata(output),
|
|
1643
|
-
};
|
|
1644
|
-
break;
|
|
1645
|
-
case "ThrottlingException":
|
|
1646
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
1647
|
-
response = {
|
|
1648
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1649
|
-
name: errorCode,
|
|
1650
|
-
$metadata: deserializeMetadata(output),
|
|
1651
|
-
};
|
|
1652
|
-
break;
|
|
1653
|
-
default:
|
|
1654
|
-
const parsedBody = parsedOutput.body;
|
|
1655
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1656
|
-
response = {
|
|
1657
|
-
...parsedBody,
|
|
1658
|
-
name: `${errorCode}`,
|
|
1659
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1660
|
-
$fault: "client",
|
|
1661
|
-
$metadata: deserializeMetadata(output),
|
|
1662
|
-
} as any;
|
|
1663
|
-
}
|
|
1664
|
-
const message = response.message || response.Message || errorCode;
|
|
1665
|
-
response.message = message;
|
|
1666
|
-
delete response.Message;
|
|
1667
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1668
|
-
};
|
|
1669
|
-
|
|
1670
|
-
export const deserializeAws_restJson1GetNetworkCommand = async (
|
|
1671
|
-
output: __HttpResponse,
|
|
1672
|
-
context: __SerdeContext
|
|
1673
|
-
): Promise<GetNetworkCommandOutput> => {
|
|
1674
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1675
|
-
return deserializeAws_restJson1GetNetworkCommandError(output, context);
|
|
1676
|
-
}
|
|
1677
|
-
const contents: GetNetworkCommandOutput = {
|
|
1678
|
-
$metadata: deserializeMetadata(output),
|
|
1679
|
-
Network: undefined,
|
|
1680
|
-
};
|
|
1681
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1682
|
-
if (data.Network !== undefined && data.Network !== null) {
|
|
1683
|
-
contents.Network = deserializeAws_restJson1Network(data.Network, context);
|
|
1684
|
-
}
|
|
1685
|
-
return Promise.resolve(contents);
|
|
1686
|
-
};
|
|
1687
|
-
|
|
1688
|
-
const deserializeAws_restJson1GetNetworkCommandError = async (
|
|
1689
|
-
output: __HttpResponse,
|
|
1690
|
-
context: __SerdeContext
|
|
1691
|
-
): Promise<GetNetworkCommandOutput> => {
|
|
1692
|
-
const parsedOutput: any = {
|
|
1693
|
-
...output,
|
|
1694
|
-
body: await parseBody(output.body, context),
|
|
1695
|
-
};
|
|
1696
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1697
|
-
let errorCode: string = "UnknownError";
|
|
1698
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1699
|
-
switch (errorCode) {
|
|
1700
|
-
case "AccessDeniedException":
|
|
1701
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
1702
|
-
response = {
|
|
1703
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1704
|
-
name: errorCode,
|
|
1705
|
-
$metadata: deserializeMetadata(output),
|
|
1706
|
-
};
|
|
1707
|
-
break;
|
|
1708
|
-
case "InternalServiceErrorException":
|
|
1709
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
1710
|
-
response = {
|
|
1711
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
1712
|
-
name: errorCode,
|
|
1713
|
-
$metadata: deserializeMetadata(output),
|
|
1714
|
-
};
|
|
1715
|
-
break;
|
|
1716
|
-
case "InvalidRequestException":
|
|
1717
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
1718
|
-
response = {
|
|
1719
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1720
|
-
name: errorCode,
|
|
1721
|
-
$metadata: deserializeMetadata(output),
|
|
1722
|
-
};
|
|
1723
|
-
break;
|
|
1724
|
-
case "ResourceNotFoundException":
|
|
1725
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
1726
|
-
response = {
|
|
1727
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1728
|
-
name: errorCode,
|
|
1729
|
-
$metadata: deserializeMetadata(output),
|
|
1730
|
-
};
|
|
1731
|
-
break;
|
|
1732
|
-
case "ThrottlingException":
|
|
1733
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
1734
|
-
response = {
|
|
1735
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1736
|
-
name: errorCode,
|
|
1737
|
-
$metadata: deserializeMetadata(output),
|
|
1738
|
-
};
|
|
1739
|
-
break;
|
|
1740
|
-
default:
|
|
1741
|
-
const parsedBody = parsedOutput.body;
|
|
1742
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1743
|
-
response = {
|
|
1744
|
-
...parsedBody,
|
|
1745
|
-
name: `${errorCode}`,
|
|
1746
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1747
|
-
$fault: "client",
|
|
1748
|
-
$metadata: deserializeMetadata(output),
|
|
1749
|
-
} as any;
|
|
1750
|
-
}
|
|
1751
|
-
const message = response.message || response.Message || errorCode;
|
|
1752
|
-
response.message = message;
|
|
1753
|
-
delete response.Message;
|
|
1754
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1755
|
-
};
|
|
1756
|
-
|
|
1757
|
-
export const deserializeAws_restJson1GetNodeCommand = async (
|
|
1758
|
-
output: __HttpResponse,
|
|
1759
|
-
context: __SerdeContext
|
|
1760
|
-
): Promise<GetNodeCommandOutput> => {
|
|
1761
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1762
|
-
return deserializeAws_restJson1GetNodeCommandError(output, context);
|
|
1763
|
-
}
|
|
1764
|
-
const contents: GetNodeCommandOutput = {
|
|
1765
|
-
$metadata: deserializeMetadata(output),
|
|
1766
|
-
Node: undefined,
|
|
1767
|
-
};
|
|
1768
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1769
|
-
if (data.Node !== undefined && data.Node !== null) {
|
|
1770
|
-
contents.Node = deserializeAws_restJson1Node(data.Node, context);
|
|
1771
|
-
}
|
|
1772
|
-
return Promise.resolve(contents);
|
|
1773
|
-
};
|
|
1774
|
-
|
|
1775
|
-
const deserializeAws_restJson1GetNodeCommandError = async (
|
|
1776
|
-
output: __HttpResponse,
|
|
1777
|
-
context: __SerdeContext
|
|
1778
|
-
): Promise<GetNodeCommandOutput> => {
|
|
1779
|
-
const parsedOutput: any = {
|
|
1780
|
-
...output,
|
|
1781
|
-
body: await parseBody(output.body, context),
|
|
1782
|
-
};
|
|
1783
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1784
|
-
let errorCode: string = "UnknownError";
|
|
1785
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1786
|
-
switch (errorCode) {
|
|
1787
|
-
case "AccessDeniedException":
|
|
1788
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
1789
|
-
response = {
|
|
1790
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1791
|
-
name: errorCode,
|
|
1792
|
-
$metadata: deserializeMetadata(output),
|
|
1793
|
-
};
|
|
1794
|
-
break;
|
|
1795
|
-
case "InternalServiceErrorException":
|
|
1796
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
1797
|
-
response = {
|
|
1798
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
1799
|
-
name: errorCode,
|
|
1800
|
-
$metadata: deserializeMetadata(output),
|
|
1801
|
-
};
|
|
1802
|
-
break;
|
|
1803
|
-
case "InvalidRequestException":
|
|
1804
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
1805
|
-
response = {
|
|
1806
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1807
|
-
name: errorCode,
|
|
1808
|
-
$metadata: deserializeMetadata(output),
|
|
1809
|
-
};
|
|
1810
|
-
break;
|
|
1811
|
-
case "ResourceNotFoundException":
|
|
1812
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
1813
|
-
response = {
|
|
1814
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1815
|
-
name: errorCode,
|
|
1816
|
-
$metadata: deserializeMetadata(output),
|
|
1817
|
-
};
|
|
1818
|
-
break;
|
|
1819
|
-
case "ThrottlingException":
|
|
1820
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
1821
|
-
response = {
|
|
1822
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1823
|
-
name: errorCode,
|
|
1824
|
-
$metadata: deserializeMetadata(output),
|
|
1825
|
-
};
|
|
1826
|
-
break;
|
|
1827
|
-
default:
|
|
1828
|
-
const parsedBody = parsedOutput.body;
|
|
1829
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1830
|
-
response = {
|
|
1831
|
-
...parsedBody,
|
|
1832
|
-
name: `${errorCode}`,
|
|
1833
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1834
|
-
$fault: "client",
|
|
1835
|
-
$metadata: deserializeMetadata(output),
|
|
1836
|
-
} as any;
|
|
1837
|
-
}
|
|
1838
|
-
const message = response.message || response.Message || errorCode;
|
|
1839
|
-
response.message = message;
|
|
1840
|
-
delete response.Message;
|
|
1841
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1842
|
-
};
|
|
1843
|
-
|
|
1844
|
-
export const deserializeAws_restJson1GetProposalCommand = async (
|
|
1845
|
-
output: __HttpResponse,
|
|
1846
|
-
context: __SerdeContext
|
|
1847
|
-
): Promise<GetProposalCommandOutput> => {
|
|
1848
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1849
|
-
return deserializeAws_restJson1GetProposalCommandError(output, context);
|
|
1850
|
-
}
|
|
1851
|
-
const contents: GetProposalCommandOutput = {
|
|
1852
|
-
$metadata: deserializeMetadata(output),
|
|
1853
|
-
Proposal: undefined,
|
|
1854
|
-
};
|
|
1855
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1856
|
-
if (data.Proposal !== undefined && data.Proposal !== null) {
|
|
1857
|
-
contents.Proposal = deserializeAws_restJson1Proposal(data.Proposal, context);
|
|
1858
|
-
}
|
|
1859
|
-
return Promise.resolve(contents);
|
|
1860
|
-
};
|
|
1861
|
-
|
|
1862
|
-
const deserializeAws_restJson1GetProposalCommandError = async (
|
|
1863
|
-
output: __HttpResponse,
|
|
1864
|
-
context: __SerdeContext
|
|
1865
|
-
): Promise<GetProposalCommandOutput> => {
|
|
1866
|
-
const parsedOutput: any = {
|
|
1867
|
-
...output,
|
|
1868
|
-
body: await parseBody(output.body, context),
|
|
1869
|
-
};
|
|
1870
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1871
|
-
let errorCode: string = "UnknownError";
|
|
1872
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1873
|
-
switch (errorCode) {
|
|
1874
|
-
case "AccessDeniedException":
|
|
1875
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
1876
|
-
response = {
|
|
1877
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1878
|
-
name: errorCode,
|
|
1879
|
-
$metadata: deserializeMetadata(output),
|
|
1880
|
-
};
|
|
1881
|
-
break;
|
|
1882
|
-
case "InternalServiceErrorException":
|
|
1883
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
1884
|
-
response = {
|
|
1885
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
1886
|
-
name: errorCode,
|
|
1887
|
-
$metadata: deserializeMetadata(output),
|
|
1888
|
-
};
|
|
1889
|
-
break;
|
|
1890
|
-
case "InvalidRequestException":
|
|
1891
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
1892
|
-
response = {
|
|
1893
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1894
|
-
name: errorCode,
|
|
1895
|
-
$metadata: deserializeMetadata(output),
|
|
1896
|
-
};
|
|
1897
|
-
break;
|
|
1898
|
-
case "ResourceNotFoundException":
|
|
1899
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
1900
|
-
response = {
|
|
1901
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1902
|
-
name: errorCode,
|
|
1903
|
-
$metadata: deserializeMetadata(output),
|
|
1904
|
-
};
|
|
1905
|
-
break;
|
|
1906
|
-
case "ThrottlingException":
|
|
1907
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
1908
|
-
response = {
|
|
1909
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1910
|
-
name: errorCode,
|
|
1911
|
-
$metadata: deserializeMetadata(output),
|
|
1912
|
-
};
|
|
1913
|
-
break;
|
|
1914
|
-
default:
|
|
1915
|
-
const parsedBody = parsedOutput.body;
|
|
1916
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1917
|
-
response = {
|
|
1918
|
-
...parsedBody,
|
|
1919
|
-
name: `${errorCode}`,
|
|
1920
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1921
|
-
$fault: "client",
|
|
1922
|
-
$metadata: deserializeMetadata(output),
|
|
1923
|
-
} as any;
|
|
1924
|
-
}
|
|
1925
|
-
const message = response.message || response.Message || errorCode;
|
|
1926
|
-
response.message = message;
|
|
1927
|
-
delete response.Message;
|
|
1928
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1929
|
-
};
|
|
1930
|
-
|
|
1931
|
-
export const deserializeAws_restJson1ListInvitationsCommand = async (
|
|
1932
|
-
output: __HttpResponse,
|
|
1933
|
-
context: __SerdeContext
|
|
1934
|
-
): Promise<ListInvitationsCommandOutput> => {
|
|
1935
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1936
|
-
return deserializeAws_restJson1ListInvitationsCommandError(output, context);
|
|
1937
|
-
}
|
|
1938
|
-
const contents: ListInvitationsCommandOutput = {
|
|
1939
|
-
$metadata: deserializeMetadata(output),
|
|
1940
|
-
Invitations: undefined,
|
|
1941
|
-
NextToken: undefined,
|
|
1942
|
-
};
|
|
1943
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1944
|
-
if (data.Invitations !== undefined && data.Invitations !== null) {
|
|
1945
|
-
contents.Invitations = deserializeAws_restJson1InvitationList(data.Invitations, context);
|
|
1946
|
-
}
|
|
1947
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
1948
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
1949
|
-
}
|
|
1950
|
-
return Promise.resolve(contents);
|
|
1951
|
-
};
|
|
1952
|
-
|
|
1953
|
-
const deserializeAws_restJson1ListInvitationsCommandError = async (
|
|
1954
|
-
output: __HttpResponse,
|
|
1955
|
-
context: __SerdeContext
|
|
1956
|
-
): Promise<ListInvitationsCommandOutput> => {
|
|
1957
|
-
const parsedOutput: any = {
|
|
1958
|
-
...output,
|
|
1959
|
-
body: await parseBody(output.body, context),
|
|
1960
|
-
};
|
|
1961
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1962
|
-
let errorCode: string = "UnknownError";
|
|
1963
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1964
|
-
switch (errorCode) {
|
|
1965
|
-
case "AccessDeniedException":
|
|
1966
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
1967
|
-
response = {
|
|
1968
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1969
|
-
name: errorCode,
|
|
1970
|
-
$metadata: deserializeMetadata(output),
|
|
1971
|
-
};
|
|
1972
|
-
break;
|
|
1973
|
-
case "InternalServiceErrorException":
|
|
1974
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
1975
|
-
response = {
|
|
1976
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
1977
|
-
name: errorCode,
|
|
1978
|
-
$metadata: deserializeMetadata(output),
|
|
1979
|
-
};
|
|
1980
|
-
break;
|
|
1981
|
-
case "InvalidRequestException":
|
|
1982
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
1983
|
-
response = {
|
|
1984
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1985
|
-
name: errorCode,
|
|
1986
|
-
$metadata: deserializeMetadata(output),
|
|
1987
|
-
};
|
|
1988
|
-
break;
|
|
1989
|
-
case "ResourceLimitExceededException":
|
|
1990
|
-
case "com.amazonaws.managedblockchain#ResourceLimitExceededException":
|
|
1991
|
-
response = {
|
|
1992
|
-
...(await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context)),
|
|
1993
|
-
name: errorCode,
|
|
1994
|
-
$metadata: deserializeMetadata(output),
|
|
1995
|
-
};
|
|
1996
|
-
break;
|
|
1997
|
-
case "ResourceNotFoundException":
|
|
1998
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
1999
|
-
response = {
|
|
2000
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2001
|
-
name: errorCode,
|
|
2002
|
-
$metadata: deserializeMetadata(output),
|
|
2003
|
-
};
|
|
2004
|
-
break;
|
|
2005
|
-
case "ThrottlingException":
|
|
2006
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
2007
|
-
response = {
|
|
2008
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2009
|
-
name: errorCode,
|
|
2010
|
-
$metadata: deserializeMetadata(output),
|
|
2011
|
-
};
|
|
2012
|
-
break;
|
|
2013
|
-
default:
|
|
2014
|
-
const parsedBody = parsedOutput.body;
|
|
2015
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2016
|
-
response = {
|
|
2017
|
-
...parsedBody,
|
|
2018
|
-
name: `${errorCode}`,
|
|
2019
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2020
|
-
$fault: "client",
|
|
2021
|
-
$metadata: deserializeMetadata(output),
|
|
2022
|
-
} as any;
|
|
2023
|
-
}
|
|
2024
|
-
const message = response.message || response.Message || errorCode;
|
|
2025
|
-
response.message = message;
|
|
2026
|
-
delete response.Message;
|
|
2027
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2028
|
-
};
|
|
2029
|
-
|
|
2030
|
-
export const deserializeAws_restJson1ListMembersCommand = async (
|
|
2031
|
-
output: __HttpResponse,
|
|
2032
|
-
context: __SerdeContext
|
|
2033
|
-
): Promise<ListMembersCommandOutput> => {
|
|
2034
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2035
|
-
return deserializeAws_restJson1ListMembersCommandError(output, context);
|
|
2036
|
-
}
|
|
2037
|
-
const contents: ListMembersCommandOutput = {
|
|
2038
|
-
$metadata: deserializeMetadata(output),
|
|
2039
|
-
Members: undefined,
|
|
2040
|
-
NextToken: undefined,
|
|
2041
|
-
};
|
|
2042
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2043
|
-
if (data.Members !== undefined && data.Members !== null) {
|
|
2044
|
-
contents.Members = deserializeAws_restJson1MemberSummaryList(data.Members, context);
|
|
2045
|
-
}
|
|
2046
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2047
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
2048
|
-
}
|
|
2049
|
-
return Promise.resolve(contents);
|
|
2050
|
-
};
|
|
2051
|
-
|
|
2052
|
-
const deserializeAws_restJson1ListMembersCommandError = async (
|
|
2053
|
-
output: __HttpResponse,
|
|
2054
|
-
context: __SerdeContext
|
|
2055
|
-
): Promise<ListMembersCommandOutput> => {
|
|
2056
|
-
const parsedOutput: any = {
|
|
2057
|
-
...output,
|
|
2058
|
-
body: await parseBody(output.body, context),
|
|
2059
|
-
};
|
|
2060
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2061
|
-
let errorCode: string = "UnknownError";
|
|
2062
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2063
|
-
switch (errorCode) {
|
|
2064
|
-
case "AccessDeniedException":
|
|
2065
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
2066
|
-
response = {
|
|
2067
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2068
|
-
name: errorCode,
|
|
2069
|
-
$metadata: deserializeMetadata(output),
|
|
2070
|
-
};
|
|
2071
|
-
break;
|
|
2072
|
-
case "InternalServiceErrorException":
|
|
2073
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
2074
|
-
response = {
|
|
2075
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
2076
|
-
name: errorCode,
|
|
2077
|
-
$metadata: deserializeMetadata(output),
|
|
2078
|
-
};
|
|
2079
|
-
break;
|
|
2080
|
-
case "InvalidRequestException":
|
|
2081
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
2082
|
-
response = {
|
|
2083
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2084
|
-
name: errorCode,
|
|
2085
|
-
$metadata: deserializeMetadata(output),
|
|
2086
|
-
};
|
|
2087
|
-
break;
|
|
2088
|
-
case "ThrottlingException":
|
|
2089
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
2090
|
-
response = {
|
|
2091
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2092
|
-
name: errorCode,
|
|
2093
|
-
$metadata: deserializeMetadata(output),
|
|
2094
|
-
};
|
|
2095
|
-
break;
|
|
2096
|
-
default:
|
|
2097
|
-
const parsedBody = parsedOutput.body;
|
|
2098
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2099
|
-
response = {
|
|
2100
|
-
...parsedBody,
|
|
2101
|
-
name: `${errorCode}`,
|
|
2102
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2103
|
-
$fault: "client",
|
|
2104
|
-
$metadata: deserializeMetadata(output),
|
|
2105
|
-
} as any;
|
|
2106
|
-
}
|
|
2107
|
-
const message = response.message || response.Message || errorCode;
|
|
2108
|
-
response.message = message;
|
|
2109
|
-
delete response.Message;
|
|
2110
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2111
|
-
};
|
|
2112
|
-
|
|
2113
|
-
export const deserializeAws_restJson1ListNetworksCommand = async (
|
|
2114
|
-
output: __HttpResponse,
|
|
2115
|
-
context: __SerdeContext
|
|
2116
|
-
): Promise<ListNetworksCommandOutput> => {
|
|
2117
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2118
|
-
return deserializeAws_restJson1ListNetworksCommandError(output, context);
|
|
2119
|
-
}
|
|
2120
|
-
const contents: ListNetworksCommandOutput = {
|
|
2121
|
-
$metadata: deserializeMetadata(output),
|
|
2122
|
-
Networks: undefined,
|
|
2123
|
-
NextToken: undefined,
|
|
2124
|
-
};
|
|
2125
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2126
|
-
if (data.Networks !== undefined && data.Networks !== null) {
|
|
2127
|
-
contents.Networks = deserializeAws_restJson1NetworkSummaryList(data.Networks, context);
|
|
2128
|
-
}
|
|
2129
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2130
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
2131
|
-
}
|
|
2132
|
-
return Promise.resolve(contents);
|
|
2133
|
-
};
|
|
2134
|
-
|
|
2135
|
-
const deserializeAws_restJson1ListNetworksCommandError = async (
|
|
2136
|
-
output: __HttpResponse,
|
|
2137
|
-
context: __SerdeContext
|
|
2138
|
-
): Promise<ListNetworksCommandOutput> => {
|
|
2139
|
-
const parsedOutput: any = {
|
|
2140
|
-
...output,
|
|
2141
|
-
body: await parseBody(output.body, context),
|
|
2142
|
-
};
|
|
2143
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2144
|
-
let errorCode: string = "UnknownError";
|
|
2145
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2146
|
-
switch (errorCode) {
|
|
2147
|
-
case "AccessDeniedException":
|
|
2148
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
2149
|
-
response = {
|
|
2150
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2151
|
-
name: errorCode,
|
|
2152
|
-
$metadata: deserializeMetadata(output),
|
|
2153
|
-
};
|
|
2154
|
-
break;
|
|
2155
|
-
case "InternalServiceErrorException":
|
|
2156
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
2157
|
-
response = {
|
|
2158
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
2159
|
-
name: errorCode,
|
|
2160
|
-
$metadata: deserializeMetadata(output),
|
|
2161
|
-
};
|
|
2162
|
-
break;
|
|
2163
|
-
case "InvalidRequestException":
|
|
2164
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
2165
|
-
response = {
|
|
2166
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2167
|
-
name: errorCode,
|
|
2168
|
-
$metadata: deserializeMetadata(output),
|
|
2169
|
-
};
|
|
2170
|
-
break;
|
|
2171
|
-
case "ThrottlingException":
|
|
2172
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
2173
|
-
response = {
|
|
2174
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2175
|
-
name: errorCode,
|
|
2176
|
-
$metadata: deserializeMetadata(output),
|
|
2177
|
-
};
|
|
2178
|
-
break;
|
|
2179
|
-
default:
|
|
2180
|
-
const parsedBody = parsedOutput.body;
|
|
2181
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2182
|
-
response = {
|
|
2183
|
-
...parsedBody,
|
|
2184
|
-
name: `${errorCode}`,
|
|
2185
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2186
|
-
$fault: "client",
|
|
2187
|
-
$metadata: deserializeMetadata(output),
|
|
2188
|
-
} as any;
|
|
2189
|
-
}
|
|
2190
|
-
const message = response.message || response.Message || errorCode;
|
|
2191
|
-
response.message = message;
|
|
2192
|
-
delete response.Message;
|
|
2193
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2194
|
-
};
|
|
2195
|
-
|
|
2196
|
-
export const deserializeAws_restJson1ListNodesCommand = async (
|
|
2197
|
-
output: __HttpResponse,
|
|
2198
|
-
context: __SerdeContext
|
|
2199
|
-
): Promise<ListNodesCommandOutput> => {
|
|
2200
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2201
|
-
return deserializeAws_restJson1ListNodesCommandError(output, context);
|
|
2202
|
-
}
|
|
2203
|
-
const contents: ListNodesCommandOutput = {
|
|
2204
|
-
$metadata: deserializeMetadata(output),
|
|
2205
|
-
NextToken: undefined,
|
|
2206
|
-
Nodes: undefined,
|
|
2207
|
-
};
|
|
2208
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2209
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2210
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
2211
|
-
}
|
|
2212
|
-
if (data.Nodes !== undefined && data.Nodes !== null) {
|
|
2213
|
-
contents.Nodes = deserializeAws_restJson1NodeSummaryList(data.Nodes, context);
|
|
2214
|
-
}
|
|
2215
|
-
return Promise.resolve(contents);
|
|
2216
|
-
};
|
|
2217
|
-
|
|
2218
|
-
const deserializeAws_restJson1ListNodesCommandError = async (
|
|
2219
|
-
output: __HttpResponse,
|
|
2220
|
-
context: __SerdeContext
|
|
2221
|
-
): Promise<ListNodesCommandOutput> => {
|
|
2222
|
-
const parsedOutput: any = {
|
|
2223
|
-
...output,
|
|
2224
|
-
body: await parseBody(output.body, context),
|
|
2225
|
-
};
|
|
2226
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2227
|
-
let errorCode: string = "UnknownError";
|
|
2228
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2229
|
-
switch (errorCode) {
|
|
2230
|
-
case "AccessDeniedException":
|
|
2231
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
2232
|
-
response = {
|
|
2233
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2234
|
-
name: errorCode,
|
|
2235
|
-
$metadata: deserializeMetadata(output),
|
|
2236
|
-
};
|
|
2237
|
-
break;
|
|
2238
|
-
case "InternalServiceErrorException":
|
|
2239
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
2240
|
-
response = {
|
|
2241
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
2242
|
-
name: errorCode,
|
|
2243
|
-
$metadata: deserializeMetadata(output),
|
|
2244
|
-
};
|
|
2245
|
-
break;
|
|
2246
|
-
case "InvalidRequestException":
|
|
2247
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
2248
|
-
response = {
|
|
2249
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2250
|
-
name: errorCode,
|
|
2251
|
-
$metadata: deserializeMetadata(output),
|
|
2252
|
-
};
|
|
2253
|
-
break;
|
|
2254
|
-
case "ThrottlingException":
|
|
2255
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
2256
|
-
response = {
|
|
2257
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2258
|
-
name: errorCode,
|
|
2259
|
-
$metadata: deserializeMetadata(output),
|
|
2260
|
-
};
|
|
2261
|
-
break;
|
|
2262
|
-
default:
|
|
2263
|
-
const parsedBody = parsedOutput.body;
|
|
2264
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2265
|
-
response = {
|
|
2266
|
-
...parsedBody,
|
|
2267
|
-
name: `${errorCode}`,
|
|
2268
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2269
|
-
$fault: "client",
|
|
2270
|
-
$metadata: deserializeMetadata(output),
|
|
2271
|
-
} as any;
|
|
2272
|
-
}
|
|
2273
|
-
const message = response.message || response.Message || errorCode;
|
|
2274
|
-
response.message = message;
|
|
2275
|
-
delete response.Message;
|
|
2276
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2277
|
-
};
|
|
2278
|
-
|
|
2279
|
-
export const deserializeAws_restJson1ListProposalsCommand = async (
|
|
2280
|
-
output: __HttpResponse,
|
|
2281
|
-
context: __SerdeContext
|
|
2282
|
-
): Promise<ListProposalsCommandOutput> => {
|
|
2283
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2284
|
-
return deserializeAws_restJson1ListProposalsCommandError(output, context);
|
|
2285
|
-
}
|
|
2286
|
-
const contents: ListProposalsCommandOutput = {
|
|
2287
|
-
$metadata: deserializeMetadata(output),
|
|
2288
|
-
NextToken: undefined,
|
|
2289
|
-
Proposals: undefined,
|
|
2290
|
-
};
|
|
2291
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2292
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2293
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
2294
|
-
}
|
|
2295
|
-
if (data.Proposals !== undefined && data.Proposals !== null) {
|
|
2296
|
-
contents.Proposals = deserializeAws_restJson1ProposalSummaryList(data.Proposals, context);
|
|
2297
|
-
}
|
|
2298
|
-
return Promise.resolve(contents);
|
|
2299
|
-
};
|
|
2300
|
-
|
|
2301
|
-
const deserializeAws_restJson1ListProposalsCommandError = async (
|
|
2302
|
-
output: __HttpResponse,
|
|
2303
|
-
context: __SerdeContext
|
|
2304
|
-
): Promise<ListProposalsCommandOutput> => {
|
|
2305
|
-
const parsedOutput: any = {
|
|
2306
|
-
...output,
|
|
2307
|
-
body: await parseBody(output.body, context),
|
|
2308
|
-
};
|
|
2309
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2310
|
-
let errorCode: string = "UnknownError";
|
|
2311
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2312
|
-
switch (errorCode) {
|
|
2313
|
-
case "AccessDeniedException":
|
|
2314
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
2315
|
-
response = {
|
|
2316
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2317
|
-
name: errorCode,
|
|
2318
|
-
$metadata: deserializeMetadata(output),
|
|
2319
|
-
};
|
|
2320
|
-
break;
|
|
2321
|
-
case "InternalServiceErrorException":
|
|
2322
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
2323
|
-
response = {
|
|
2324
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
2325
|
-
name: errorCode,
|
|
2326
|
-
$metadata: deserializeMetadata(output),
|
|
2327
|
-
};
|
|
2328
|
-
break;
|
|
2329
|
-
case "InvalidRequestException":
|
|
2330
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
2331
|
-
response = {
|
|
2332
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2333
|
-
name: errorCode,
|
|
2334
|
-
$metadata: deserializeMetadata(output),
|
|
2335
|
-
};
|
|
2336
|
-
break;
|
|
2337
|
-
case "ResourceNotFoundException":
|
|
2338
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
2339
|
-
response = {
|
|
2340
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2341
|
-
name: errorCode,
|
|
2342
|
-
$metadata: deserializeMetadata(output),
|
|
2343
|
-
};
|
|
2344
|
-
break;
|
|
2345
|
-
case "ThrottlingException":
|
|
2346
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
2347
|
-
response = {
|
|
2348
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2349
|
-
name: errorCode,
|
|
2350
|
-
$metadata: deserializeMetadata(output),
|
|
2351
|
-
};
|
|
2352
|
-
break;
|
|
2353
|
-
default:
|
|
2354
|
-
const parsedBody = parsedOutput.body;
|
|
2355
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2356
|
-
response = {
|
|
2357
|
-
...parsedBody,
|
|
2358
|
-
name: `${errorCode}`,
|
|
2359
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2360
|
-
$fault: "client",
|
|
2361
|
-
$metadata: deserializeMetadata(output),
|
|
2362
|
-
} as any;
|
|
2363
|
-
}
|
|
2364
|
-
const message = response.message || response.Message || errorCode;
|
|
2365
|
-
response.message = message;
|
|
2366
|
-
delete response.Message;
|
|
2367
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2368
|
-
};
|
|
2369
|
-
|
|
2370
|
-
export const deserializeAws_restJson1ListProposalVotesCommand = async (
|
|
2371
|
-
output: __HttpResponse,
|
|
2372
|
-
context: __SerdeContext
|
|
2373
|
-
): Promise<ListProposalVotesCommandOutput> => {
|
|
2374
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2375
|
-
return deserializeAws_restJson1ListProposalVotesCommandError(output, context);
|
|
2376
|
-
}
|
|
2377
|
-
const contents: ListProposalVotesCommandOutput = {
|
|
2378
|
-
$metadata: deserializeMetadata(output),
|
|
2379
|
-
NextToken: undefined,
|
|
2380
|
-
ProposalVotes: undefined,
|
|
2381
|
-
};
|
|
2382
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2383
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
2384
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
2385
|
-
}
|
|
2386
|
-
if (data.ProposalVotes !== undefined && data.ProposalVotes !== null) {
|
|
2387
|
-
contents.ProposalVotes = deserializeAws_restJson1ProposalVoteList(data.ProposalVotes, context);
|
|
2388
|
-
}
|
|
2389
|
-
return Promise.resolve(contents);
|
|
2390
|
-
};
|
|
2391
|
-
|
|
2392
|
-
const deserializeAws_restJson1ListProposalVotesCommandError = async (
|
|
2393
|
-
output: __HttpResponse,
|
|
2394
|
-
context: __SerdeContext
|
|
2395
|
-
): Promise<ListProposalVotesCommandOutput> => {
|
|
2396
|
-
const parsedOutput: any = {
|
|
2397
|
-
...output,
|
|
2398
|
-
body: await parseBody(output.body, context),
|
|
2399
|
-
};
|
|
2400
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2401
|
-
let errorCode: string = "UnknownError";
|
|
2402
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2403
|
-
switch (errorCode) {
|
|
2404
|
-
case "AccessDeniedException":
|
|
2405
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
2406
|
-
response = {
|
|
2407
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2408
|
-
name: errorCode,
|
|
2409
|
-
$metadata: deserializeMetadata(output),
|
|
2410
|
-
};
|
|
2411
|
-
break;
|
|
2412
|
-
case "InternalServiceErrorException":
|
|
2413
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
2414
|
-
response = {
|
|
2415
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
2416
|
-
name: errorCode,
|
|
2417
|
-
$metadata: deserializeMetadata(output),
|
|
2418
|
-
};
|
|
2419
|
-
break;
|
|
2420
|
-
case "InvalidRequestException":
|
|
2421
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
2422
|
-
response = {
|
|
2423
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2424
|
-
name: errorCode,
|
|
2425
|
-
$metadata: deserializeMetadata(output),
|
|
2426
|
-
};
|
|
2427
|
-
break;
|
|
2428
|
-
case "ThrottlingException":
|
|
2429
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
2430
|
-
response = {
|
|
2431
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2432
|
-
name: errorCode,
|
|
2433
|
-
$metadata: deserializeMetadata(output),
|
|
2434
|
-
};
|
|
2435
|
-
break;
|
|
2436
|
-
default:
|
|
2437
|
-
const parsedBody = parsedOutput.body;
|
|
2438
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2439
|
-
response = {
|
|
2440
|
-
...parsedBody,
|
|
2441
|
-
name: `${errorCode}`,
|
|
2442
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2443
|
-
$fault: "client",
|
|
2444
|
-
$metadata: deserializeMetadata(output),
|
|
2445
|
-
} as any;
|
|
2446
|
-
}
|
|
2447
|
-
const message = response.message || response.Message || errorCode;
|
|
2448
|
-
response.message = message;
|
|
2449
|
-
delete response.Message;
|
|
2450
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2451
|
-
};
|
|
2452
|
-
|
|
2453
|
-
export const deserializeAws_restJson1ListTagsForResourceCommand = async (
|
|
2454
|
-
output: __HttpResponse,
|
|
2455
|
-
context: __SerdeContext
|
|
2456
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
2457
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2458
|
-
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
2459
|
-
}
|
|
2460
|
-
const contents: ListTagsForResourceCommandOutput = {
|
|
2461
|
-
$metadata: deserializeMetadata(output),
|
|
2462
|
-
Tags: undefined,
|
|
2463
|
-
};
|
|
2464
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
2465
|
-
if (data.Tags !== undefined && data.Tags !== null) {
|
|
2466
|
-
contents.Tags = deserializeAws_restJson1OutputTagMap(data.Tags, context);
|
|
2467
|
-
}
|
|
2468
|
-
return Promise.resolve(contents);
|
|
2469
|
-
};
|
|
2470
|
-
|
|
2471
|
-
const deserializeAws_restJson1ListTagsForResourceCommandError = async (
|
|
2472
|
-
output: __HttpResponse,
|
|
2473
|
-
context: __SerdeContext
|
|
2474
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
2475
|
-
const parsedOutput: any = {
|
|
2476
|
-
...output,
|
|
2477
|
-
body: await parseBody(output.body, context),
|
|
2478
|
-
};
|
|
2479
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2480
|
-
let errorCode: string = "UnknownError";
|
|
2481
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2482
|
-
switch (errorCode) {
|
|
2483
|
-
case "InternalServiceErrorException":
|
|
2484
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
2485
|
-
response = {
|
|
2486
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
2487
|
-
name: errorCode,
|
|
2488
|
-
$metadata: deserializeMetadata(output),
|
|
2489
|
-
};
|
|
2490
|
-
break;
|
|
2491
|
-
case "InvalidRequestException":
|
|
2492
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
2493
|
-
response = {
|
|
2494
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2495
|
-
name: errorCode,
|
|
2496
|
-
$metadata: deserializeMetadata(output),
|
|
2497
|
-
};
|
|
2498
|
-
break;
|
|
2499
|
-
case "ResourceNotFoundException":
|
|
2500
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
2501
|
-
response = {
|
|
2502
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2503
|
-
name: errorCode,
|
|
2504
|
-
$metadata: deserializeMetadata(output),
|
|
2505
|
-
};
|
|
2506
|
-
break;
|
|
2507
|
-
case "ResourceNotReadyException":
|
|
2508
|
-
case "com.amazonaws.managedblockchain#ResourceNotReadyException":
|
|
2509
|
-
response = {
|
|
2510
|
-
...(await deserializeAws_restJson1ResourceNotReadyExceptionResponse(parsedOutput, context)),
|
|
2511
|
-
name: errorCode,
|
|
2512
|
-
$metadata: deserializeMetadata(output),
|
|
2513
|
-
};
|
|
2514
|
-
break;
|
|
2515
|
-
default:
|
|
2516
|
-
const parsedBody = parsedOutput.body;
|
|
2517
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2518
|
-
response = {
|
|
2519
|
-
...parsedBody,
|
|
2520
|
-
name: `${errorCode}`,
|
|
2521
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2522
|
-
$fault: "client",
|
|
2523
|
-
$metadata: deserializeMetadata(output),
|
|
2524
|
-
} as any;
|
|
2525
|
-
}
|
|
2526
|
-
const message = response.message || response.Message || errorCode;
|
|
2527
|
-
response.message = message;
|
|
2528
|
-
delete response.Message;
|
|
2529
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2530
|
-
};
|
|
2531
|
-
|
|
2532
|
-
export const deserializeAws_restJson1RejectInvitationCommand = async (
|
|
2533
|
-
output: __HttpResponse,
|
|
2534
|
-
context: __SerdeContext
|
|
2535
|
-
): Promise<RejectInvitationCommandOutput> => {
|
|
2536
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2537
|
-
return deserializeAws_restJson1RejectInvitationCommandError(output, context);
|
|
2538
|
-
}
|
|
2539
|
-
const contents: RejectInvitationCommandOutput = {
|
|
2540
|
-
$metadata: deserializeMetadata(output),
|
|
2541
|
-
};
|
|
2542
|
-
await collectBody(output.body, context);
|
|
2543
|
-
return Promise.resolve(contents);
|
|
2544
|
-
};
|
|
2545
|
-
|
|
2546
|
-
const deserializeAws_restJson1RejectInvitationCommandError = async (
|
|
2547
|
-
output: __HttpResponse,
|
|
2548
|
-
context: __SerdeContext
|
|
2549
|
-
): Promise<RejectInvitationCommandOutput> => {
|
|
2550
|
-
const parsedOutput: any = {
|
|
2551
|
-
...output,
|
|
2552
|
-
body: await parseBody(output.body, context),
|
|
2553
|
-
};
|
|
2554
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2555
|
-
let errorCode: string = "UnknownError";
|
|
2556
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2557
|
-
switch (errorCode) {
|
|
2558
|
-
case "AccessDeniedException":
|
|
2559
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
2560
|
-
response = {
|
|
2561
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2562
|
-
name: errorCode,
|
|
2563
|
-
$metadata: deserializeMetadata(output),
|
|
2564
|
-
};
|
|
2565
|
-
break;
|
|
2566
|
-
case "IllegalActionException":
|
|
2567
|
-
case "com.amazonaws.managedblockchain#IllegalActionException":
|
|
2568
|
-
response = {
|
|
2569
|
-
...(await deserializeAws_restJson1IllegalActionExceptionResponse(parsedOutput, context)),
|
|
2570
|
-
name: errorCode,
|
|
2571
|
-
$metadata: deserializeMetadata(output),
|
|
2572
|
-
};
|
|
2573
|
-
break;
|
|
2574
|
-
case "InternalServiceErrorException":
|
|
2575
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
2576
|
-
response = {
|
|
2577
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
2578
|
-
name: errorCode,
|
|
2579
|
-
$metadata: deserializeMetadata(output),
|
|
2580
|
-
};
|
|
2581
|
-
break;
|
|
2582
|
-
case "InvalidRequestException":
|
|
2583
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
2584
|
-
response = {
|
|
2585
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2586
|
-
name: errorCode,
|
|
2587
|
-
$metadata: deserializeMetadata(output),
|
|
2588
|
-
};
|
|
2589
|
-
break;
|
|
2590
|
-
case "ResourceNotFoundException":
|
|
2591
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
2592
|
-
response = {
|
|
2593
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2594
|
-
name: errorCode,
|
|
2595
|
-
$metadata: deserializeMetadata(output),
|
|
2596
|
-
};
|
|
2597
|
-
break;
|
|
2598
|
-
case "ThrottlingException":
|
|
2599
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
2600
|
-
response = {
|
|
2601
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2602
|
-
name: errorCode,
|
|
2603
|
-
$metadata: deserializeMetadata(output),
|
|
2604
|
-
};
|
|
2605
|
-
break;
|
|
2606
|
-
default:
|
|
2607
|
-
const parsedBody = parsedOutput.body;
|
|
2608
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2609
|
-
response = {
|
|
2610
|
-
...parsedBody,
|
|
2611
|
-
name: `${errorCode}`,
|
|
2612
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2613
|
-
$fault: "client",
|
|
2614
|
-
$metadata: deserializeMetadata(output),
|
|
2615
|
-
} as any;
|
|
2616
|
-
}
|
|
2617
|
-
const message = response.message || response.Message || errorCode;
|
|
2618
|
-
response.message = message;
|
|
2619
|
-
delete response.Message;
|
|
2620
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2621
|
-
};
|
|
2622
|
-
|
|
2623
|
-
export const deserializeAws_restJson1TagResourceCommand = async (
|
|
2624
|
-
output: __HttpResponse,
|
|
2625
|
-
context: __SerdeContext
|
|
2626
|
-
): Promise<TagResourceCommandOutput> => {
|
|
2627
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2628
|
-
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
2629
|
-
}
|
|
2630
|
-
const contents: TagResourceCommandOutput = {
|
|
2631
|
-
$metadata: deserializeMetadata(output),
|
|
2632
|
-
};
|
|
2633
|
-
await collectBody(output.body, context);
|
|
2634
|
-
return Promise.resolve(contents);
|
|
2635
|
-
};
|
|
2636
|
-
|
|
2637
|
-
const deserializeAws_restJson1TagResourceCommandError = async (
|
|
2638
|
-
output: __HttpResponse,
|
|
2639
|
-
context: __SerdeContext
|
|
2640
|
-
): Promise<TagResourceCommandOutput> => {
|
|
2641
|
-
const parsedOutput: any = {
|
|
2642
|
-
...output,
|
|
2643
|
-
body: await parseBody(output.body, context),
|
|
2644
|
-
};
|
|
2645
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2646
|
-
let errorCode: string = "UnknownError";
|
|
2647
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2648
|
-
switch (errorCode) {
|
|
2649
|
-
case "InternalServiceErrorException":
|
|
2650
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
2651
|
-
response = {
|
|
2652
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
2653
|
-
name: errorCode,
|
|
2654
|
-
$metadata: deserializeMetadata(output),
|
|
2655
|
-
};
|
|
2656
|
-
break;
|
|
2657
|
-
case "InvalidRequestException":
|
|
2658
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
2659
|
-
response = {
|
|
2660
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2661
|
-
name: errorCode,
|
|
2662
|
-
$metadata: deserializeMetadata(output),
|
|
2663
|
-
};
|
|
2664
|
-
break;
|
|
2665
|
-
case "ResourceNotFoundException":
|
|
2666
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
2667
|
-
response = {
|
|
2668
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2669
|
-
name: errorCode,
|
|
2670
|
-
$metadata: deserializeMetadata(output),
|
|
2671
|
-
};
|
|
2672
|
-
break;
|
|
2673
|
-
case "ResourceNotReadyException":
|
|
2674
|
-
case "com.amazonaws.managedblockchain#ResourceNotReadyException":
|
|
2675
|
-
response = {
|
|
2676
|
-
...(await deserializeAws_restJson1ResourceNotReadyExceptionResponse(parsedOutput, context)),
|
|
2677
|
-
name: errorCode,
|
|
2678
|
-
$metadata: deserializeMetadata(output),
|
|
2679
|
-
};
|
|
2680
|
-
break;
|
|
2681
|
-
case "TooManyTagsException":
|
|
2682
|
-
case "com.amazonaws.managedblockchain#TooManyTagsException":
|
|
2683
|
-
response = {
|
|
2684
|
-
...(await deserializeAws_restJson1TooManyTagsExceptionResponse(parsedOutput, context)),
|
|
2685
|
-
name: errorCode,
|
|
2686
|
-
$metadata: deserializeMetadata(output),
|
|
2687
|
-
};
|
|
2688
|
-
break;
|
|
2689
|
-
default:
|
|
2690
|
-
const parsedBody = parsedOutput.body;
|
|
2691
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2692
|
-
response = {
|
|
2693
|
-
...parsedBody,
|
|
2694
|
-
name: `${errorCode}`,
|
|
2695
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2696
|
-
$fault: "client",
|
|
2697
|
-
$metadata: deserializeMetadata(output),
|
|
2698
|
-
} as any;
|
|
2699
|
-
}
|
|
2700
|
-
const message = response.message || response.Message || errorCode;
|
|
2701
|
-
response.message = message;
|
|
2702
|
-
delete response.Message;
|
|
2703
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2704
|
-
};
|
|
2705
|
-
|
|
2706
|
-
export const deserializeAws_restJson1UntagResourceCommand = async (
|
|
2707
|
-
output: __HttpResponse,
|
|
2708
|
-
context: __SerdeContext
|
|
2709
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
2710
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2711
|
-
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
2712
|
-
}
|
|
2713
|
-
const contents: UntagResourceCommandOutput = {
|
|
2714
|
-
$metadata: deserializeMetadata(output),
|
|
2715
|
-
};
|
|
2716
|
-
await collectBody(output.body, context);
|
|
2717
|
-
return Promise.resolve(contents);
|
|
2718
|
-
};
|
|
2719
|
-
|
|
2720
|
-
const deserializeAws_restJson1UntagResourceCommandError = async (
|
|
2721
|
-
output: __HttpResponse,
|
|
2722
|
-
context: __SerdeContext
|
|
2723
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
2724
|
-
const parsedOutput: any = {
|
|
2725
|
-
...output,
|
|
2726
|
-
body: await parseBody(output.body, context),
|
|
2727
|
-
};
|
|
2728
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2729
|
-
let errorCode: string = "UnknownError";
|
|
2730
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2731
|
-
switch (errorCode) {
|
|
2732
|
-
case "InternalServiceErrorException":
|
|
2733
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
2734
|
-
response = {
|
|
2735
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
2736
|
-
name: errorCode,
|
|
2737
|
-
$metadata: deserializeMetadata(output),
|
|
2738
|
-
};
|
|
2739
|
-
break;
|
|
2740
|
-
case "InvalidRequestException":
|
|
2741
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
2742
|
-
response = {
|
|
2743
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2744
|
-
name: errorCode,
|
|
2745
|
-
$metadata: deserializeMetadata(output),
|
|
2746
|
-
};
|
|
2747
|
-
break;
|
|
2748
|
-
case "ResourceNotFoundException":
|
|
2749
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
2750
|
-
response = {
|
|
2751
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2752
|
-
name: errorCode,
|
|
2753
|
-
$metadata: deserializeMetadata(output),
|
|
2754
|
-
};
|
|
2755
|
-
break;
|
|
2756
|
-
case "ResourceNotReadyException":
|
|
2757
|
-
case "com.amazonaws.managedblockchain#ResourceNotReadyException":
|
|
2758
|
-
response = {
|
|
2759
|
-
...(await deserializeAws_restJson1ResourceNotReadyExceptionResponse(parsedOutput, context)),
|
|
2760
|
-
name: errorCode,
|
|
2761
|
-
$metadata: deserializeMetadata(output),
|
|
2762
|
-
};
|
|
2763
|
-
break;
|
|
2764
|
-
default:
|
|
2765
|
-
const parsedBody = parsedOutput.body;
|
|
2766
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2767
|
-
response = {
|
|
2768
|
-
...parsedBody,
|
|
2769
|
-
name: `${errorCode}`,
|
|
2770
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2771
|
-
$fault: "client",
|
|
2772
|
-
$metadata: deserializeMetadata(output),
|
|
2773
|
-
} as any;
|
|
2774
|
-
}
|
|
2775
|
-
const message = response.message || response.Message || errorCode;
|
|
2776
|
-
response.message = message;
|
|
2777
|
-
delete response.Message;
|
|
2778
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2779
|
-
};
|
|
2780
|
-
|
|
2781
|
-
export const deserializeAws_restJson1UpdateMemberCommand = async (
|
|
2782
|
-
output: __HttpResponse,
|
|
2783
|
-
context: __SerdeContext
|
|
2784
|
-
): Promise<UpdateMemberCommandOutput> => {
|
|
2785
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2786
|
-
return deserializeAws_restJson1UpdateMemberCommandError(output, context);
|
|
2787
|
-
}
|
|
2788
|
-
const contents: UpdateMemberCommandOutput = {
|
|
2789
|
-
$metadata: deserializeMetadata(output),
|
|
2790
|
-
};
|
|
2791
|
-
await collectBody(output.body, context);
|
|
2792
|
-
return Promise.resolve(contents);
|
|
2793
|
-
};
|
|
2794
|
-
|
|
2795
|
-
const deserializeAws_restJson1UpdateMemberCommandError = async (
|
|
2796
|
-
output: __HttpResponse,
|
|
2797
|
-
context: __SerdeContext
|
|
2798
|
-
): Promise<UpdateMemberCommandOutput> => {
|
|
2799
|
-
const parsedOutput: any = {
|
|
2800
|
-
...output,
|
|
2801
|
-
body: await parseBody(output.body, context),
|
|
2802
|
-
};
|
|
2803
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2804
|
-
let errorCode: string = "UnknownError";
|
|
2805
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2806
|
-
switch (errorCode) {
|
|
2807
|
-
case "AccessDeniedException":
|
|
2808
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
2809
|
-
response = {
|
|
2810
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2811
|
-
name: errorCode,
|
|
2812
|
-
$metadata: deserializeMetadata(output),
|
|
2813
|
-
};
|
|
2814
|
-
break;
|
|
2815
|
-
case "InternalServiceErrorException":
|
|
2816
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
2817
|
-
response = {
|
|
2818
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
2819
|
-
name: errorCode,
|
|
2820
|
-
$metadata: deserializeMetadata(output),
|
|
2821
|
-
};
|
|
2822
|
-
break;
|
|
2823
|
-
case "InvalidRequestException":
|
|
2824
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
2825
|
-
response = {
|
|
2826
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2827
|
-
name: errorCode,
|
|
2828
|
-
$metadata: deserializeMetadata(output),
|
|
2829
|
-
};
|
|
2830
|
-
break;
|
|
2831
|
-
case "ResourceNotFoundException":
|
|
2832
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
2833
|
-
response = {
|
|
2834
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2835
|
-
name: errorCode,
|
|
2836
|
-
$metadata: deserializeMetadata(output),
|
|
2837
|
-
};
|
|
2838
|
-
break;
|
|
2839
|
-
case "ThrottlingException":
|
|
2840
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
2841
|
-
response = {
|
|
2842
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2843
|
-
name: errorCode,
|
|
2844
|
-
$metadata: deserializeMetadata(output),
|
|
2845
|
-
};
|
|
2846
|
-
break;
|
|
2847
|
-
default:
|
|
2848
|
-
const parsedBody = parsedOutput.body;
|
|
2849
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2850
|
-
response = {
|
|
2851
|
-
...parsedBody,
|
|
2852
|
-
name: `${errorCode}`,
|
|
2853
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2854
|
-
$fault: "client",
|
|
2855
|
-
$metadata: deserializeMetadata(output),
|
|
2856
|
-
} as any;
|
|
2857
|
-
}
|
|
2858
|
-
const message = response.message || response.Message || errorCode;
|
|
2859
|
-
response.message = message;
|
|
2860
|
-
delete response.Message;
|
|
2861
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2862
|
-
};
|
|
2863
|
-
|
|
2864
|
-
export const deserializeAws_restJson1UpdateNodeCommand = async (
|
|
2865
|
-
output: __HttpResponse,
|
|
2866
|
-
context: __SerdeContext
|
|
2867
|
-
): Promise<UpdateNodeCommandOutput> => {
|
|
2868
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2869
|
-
return deserializeAws_restJson1UpdateNodeCommandError(output, context);
|
|
2870
|
-
}
|
|
2871
|
-
const contents: UpdateNodeCommandOutput = {
|
|
2872
|
-
$metadata: deserializeMetadata(output),
|
|
2873
|
-
};
|
|
2874
|
-
await collectBody(output.body, context);
|
|
2875
|
-
return Promise.resolve(contents);
|
|
2876
|
-
};
|
|
2877
|
-
|
|
2878
|
-
const deserializeAws_restJson1UpdateNodeCommandError = async (
|
|
2879
|
-
output: __HttpResponse,
|
|
2880
|
-
context: __SerdeContext
|
|
2881
|
-
): Promise<UpdateNodeCommandOutput> => {
|
|
2882
|
-
const parsedOutput: any = {
|
|
2883
|
-
...output,
|
|
2884
|
-
body: await parseBody(output.body, context),
|
|
2885
|
-
};
|
|
2886
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2887
|
-
let errorCode: string = "UnknownError";
|
|
2888
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2889
|
-
switch (errorCode) {
|
|
2890
|
-
case "AccessDeniedException":
|
|
2891
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
2892
|
-
response = {
|
|
2893
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2894
|
-
name: errorCode,
|
|
2895
|
-
$metadata: deserializeMetadata(output),
|
|
2896
|
-
};
|
|
2897
|
-
break;
|
|
2898
|
-
case "InternalServiceErrorException":
|
|
2899
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
2900
|
-
response = {
|
|
2901
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
2902
|
-
name: errorCode,
|
|
2903
|
-
$metadata: deserializeMetadata(output),
|
|
2904
|
-
};
|
|
2905
|
-
break;
|
|
2906
|
-
case "InvalidRequestException":
|
|
2907
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
2908
|
-
response = {
|
|
2909
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2910
|
-
name: errorCode,
|
|
2911
|
-
$metadata: deserializeMetadata(output),
|
|
2912
|
-
};
|
|
2913
|
-
break;
|
|
2914
|
-
case "ResourceNotFoundException":
|
|
2915
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
2916
|
-
response = {
|
|
2917
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2918
|
-
name: errorCode,
|
|
2919
|
-
$metadata: deserializeMetadata(output),
|
|
2920
|
-
};
|
|
2921
|
-
break;
|
|
2922
|
-
case "ThrottlingException":
|
|
2923
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
2924
|
-
response = {
|
|
2925
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2926
|
-
name: errorCode,
|
|
2927
|
-
$metadata: deserializeMetadata(output),
|
|
2928
|
-
};
|
|
2929
|
-
break;
|
|
2930
|
-
default:
|
|
2931
|
-
const parsedBody = parsedOutput.body;
|
|
2932
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2933
|
-
response = {
|
|
2934
|
-
...parsedBody,
|
|
2935
|
-
name: `${errorCode}`,
|
|
2936
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2937
|
-
$fault: "client",
|
|
2938
|
-
$metadata: deserializeMetadata(output),
|
|
2939
|
-
} as any;
|
|
2940
|
-
}
|
|
2941
|
-
const message = response.message || response.Message || errorCode;
|
|
2942
|
-
response.message = message;
|
|
2943
|
-
delete response.Message;
|
|
2944
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2945
|
-
};
|
|
2946
|
-
|
|
2947
|
-
export const deserializeAws_restJson1VoteOnProposalCommand = async (
|
|
2948
|
-
output: __HttpResponse,
|
|
2949
|
-
context: __SerdeContext
|
|
2950
|
-
): Promise<VoteOnProposalCommandOutput> => {
|
|
2951
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
2952
|
-
return deserializeAws_restJson1VoteOnProposalCommandError(output, context);
|
|
2953
|
-
}
|
|
2954
|
-
const contents: VoteOnProposalCommandOutput = {
|
|
2955
|
-
$metadata: deserializeMetadata(output),
|
|
2956
|
-
};
|
|
2957
|
-
await collectBody(output.body, context);
|
|
2958
|
-
return Promise.resolve(contents);
|
|
2959
|
-
};
|
|
2960
|
-
|
|
2961
|
-
const deserializeAws_restJson1VoteOnProposalCommandError = async (
|
|
2962
|
-
output: __HttpResponse,
|
|
2963
|
-
context: __SerdeContext
|
|
2964
|
-
): Promise<VoteOnProposalCommandOutput> => {
|
|
2965
|
-
const parsedOutput: any = {
|
|
2966
|
-
...output,
|
|
2967
|
-
body: await parseBody(output.body, context),
|
|
2968
|
-
};
|
|
2969
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
2970
|
-
let errorCode: string = "UnknownError";
|
|
2971
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2972
|
-
switch (errorCode) {
|
|
2973
|
-
case "AccessDeniedException":
|
|
2974
|
-
case "com.amazonaws.managedblockchain#AccessDeniedException":
|
|
2975
|
-
response = {
|
|
2976
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2977
|
-
name: errorCode,
|
|
2978
|
-
$metadata: deserializeMetadata(output),
|
|
2979
|
-
};
|
|
2980
|
-
break;
|
|
2981
|
-
case "IllegalActionException":
|
|
2982
|
-
case "com.amazonaws.managedblockchain#IllegalActionException":
|
|
2983
|
-
response = {
|
|
2984
|
-
...(await deserializeAws_restJson1IllegalActionExceptionResponse(parsedOutput, context)),
|
|
2985
|
-
name: errorCode,
|
|
2986
|
-
$metadata: deserializeMetadata(output),
|
|
2987
|
-
};
|
|
2988
|
-
break;
|
|
2989
|
-
case "InternalServiceErrorException":
|
|
2990
|
-
case "com.amazonaws.managedblockchain#InternalServiceErrorException":
|
|
2991
|
-
response = {
|
|
2992
|
-
...(await deserializeAws_restJson1InternalServiceErrorExceptionResponse(parsedOutput, context)),
|
|
2993
|
-
name: errorCode,
|
|
2994
|
-
$metadata: deserializeMetadata(output),
|
|
2995
|
-
};
|
|
2996
|
-
break;
|
|
2997
|
-
case "InvalidRequestException":
|
|
2998
|
-
case "com.amazonaws.managedblockchain#InvalidRequestException":
|
|
2999
|
-
response = {
|
|
3000
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
3001
|
-
name: errorCode,
|
|
3002
|
-
$metadata: deserializeMetadata(output),
|
|
3003
|
-
};
|
|
3004
|
-
break;
|
|
3005
|
-
case "ResourceNotFoundException":
|
|
3006
|
-
case "com.amazonaws.managedblockchain#ResourceNotFoundException":
|
|
3007
|
-
response = {
|
|
3008
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
3009
|
-
name: errorCode,
|
|
3010
|
-
$metadata: deserializeMetadata(output),
|
|
3011
|
-
};
|
|
3012
|
-
break;
|
|
3013
|
-
case "ThrottlingException":
|
|
3014
|
-
case "com.amazonaws.managedblockchain#ThrottlingException":
|
|
3015
|
-
response = {
|
|
3016
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
3017
|
-
name: errorCode,
|
|
3018
|
-
$metadata: deserializeMetadata(output),
|
|
3019
|
-
};
|
|
3020
|
-
break;
|
|
3021
|
-
default:
|
|
3022
|
-
const parsedBody = parsedOutput.body;
|
|
3023
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
3024
|
-
response = {
|
|
3025
|
-
...parsedBody,
|
|
3026
|
-
name: `${errorCode}`,
|
|
3027
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
3028
|
-
$fault: "client",
|
|
3029
|
-
$metadata: deserializeMetadata(output),
|
|
3030
|
-
} as any;
|
|
3031
|
-
}
|
|
3032
|
-
const message = response.message || response.Message || errorCode;
|
|
3033
|
-
response.message = message;
|
|
3034
|
-
delete response.Message;
|
|
3035
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
3036
|
-
};
|
|
3037
|
-
|
|
3038
|
-
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (
|
|
3039
|
-
parsedOutput: any,
|
|
3040
|
-
context: __SerdeContext
|
|
3041
|
-
): Promise<AccessDeniedException> => {
|
|
3042
|
-
const contents: AccessDeniedException = {
|
|
3043
|
-
name: "AccessDeniedException",
|
|
3044
|
-
$fault: "client",
|
|
3045
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3046
|
-
Message: undefined,
|
|
3047
|
-
};
|
|
3048
|
-
const data: any = parsedOutput.body;
|
|
3049
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
3050
|
-
contents.Message = __expectString(data.Message);
|
|
3051
|
-
}
|
|
3052
|
-
return contents;
|
|
3053
|
-
};
|
|
3054
|
-
|
|
3055
|
-
const deserializeAws_restJson1IllegalActionExceptionResponse = async (
|
|
3056
|
-
parsedOutput: any,
|
|
3057
|
-
context: __SerdeContext
|
|
3058
|
-
): Promise<IllegalActionException> => {
|
|
3059
|
-
const contents: IllegalActionException = {
|
|
3060
|
-
name: "IllegalActionException",
|
|
3061
|
-
$fault: "client",
|
|
3062
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3063
|
-
Message: undefined,
|
|
3064
|
-
};
|
|
3065
|
-
const data: any = parsedOutput.body;
|
|
3066
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
3067
|
-
contents.Message = __expectString(data.Message);
|
|
3068
|
-
}
|
|
3069
|
-
return contents;
|
|
3070
|
-
};
|
|
3071
|
-
|
|
3072
|
-
const deserializeAws_restJson1InternalServiceErrorExceptionResponse = async (
|
|
3073
|
-
parsedOutput: any,
|
|
3074
|
-
context: __SerdeContext
|
|
3075
|
-
): Promise<InternalServiceErrorException> => {
|
|
3076
|
-
const contents: InternalServiceErrorException = {
|
|
3077
|
-
name: "InternalServiceErrorException",
|
|
3078
|
-
$fault: "server",
|
|
3079
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3080
|
-
};
|
|
3081
|
-
const data: any = parsedOutput.body;
|
|
3082
|
-
return contents;
|
|
3083
|
-
};
|
|
3084
|
-
|
|
3085
|
-
const deserializeAws_restJson1InvalidRequestExceptionResponse = async (
|
|
3086
|
-
parsedOutput: any,
|
|
3087
|
-
context: __SerdeContext
|
|
3088
|
-
): Promise<InvalidRequestException> => {
|
|
3089
|
-
const contents: InvalidRequestException = {
|
|
3090
|
-
name: "InvalidRequestException",
|
|
3091
|
-
$fault: "client",
|
|
3092
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3093
|
-
Message: undefined,
|
|
3094
|
-
};
|
|
3095
|
-
const data: any = parsedOutput.body;
|
|
3096
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
3097
|
-
contents.Message = __expectString(data.Message);
|
|
3098
|
-
}
|
|
3099
|
-
return contents;
|
|
3100
|
-
};
|
|
3101
|
-
|
|
3102
|
-
const deserializeAws_restJson1ResourceAlreadyExistsExceptionResponse = async (
|
|
3103
|
-
parsedOutput: any,
|
|
3104
|
-
context: __SerdeContext
|
|
3105
|
-
): Promise<ResourceAlreadyExistsException> => {
|
|
3106
|
-
const contents: ResourceAlreadyExistsException = {
|
|
3107
|
-
name: "ResourceAlreadyExistsException",
|
|
3108
|
-
$fault: "client",
|
|
3109
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3110
|
-
Message: undefined,
|
|
3111
|
-
};
|
|
3112
|
-
const data: any = parsedOutput.body;
|
|
3113
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
3114
|
-
contents.Message = __expectString(data.Message);
|
|
3115
|
-
}
|
|
3116
|
-
return contents;
|
|
3117
|
-
};
|
|
3118
|
-
|
|
3119
|
-
const deserializeAws_restJson1ResourceLimitExceededExceptionResponse = async (
|
|
3120
|
-
parsedOutput: any,
|
|
3121
|
-
context: __SerdeContext
|
|
3122
|
-
): Promise<ResourceLimitExceededException> => {
|
|
3123
|
-
const contents: ResourceLimitExceededException = {
|
|
3124
|
-
name: "ResourceLimitExceededException",
|
|
3125
|
-
$fault: "client",
|
|
3126
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3127
|
-
Message: undefined,
|
|
3128
|
-
};
|
|
3129
|
-
const data: any = parsedOutput.body;
|
|
3130
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
3131
|
-
contents.Message = __expectString(data.Message);
|
|
3132
|
-
}
|
|
3133
|
-
return contents;
|
|
3134
|
-
};
|
|
3135
|
-
|
|
3136
|
-
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (
|
|
3137
|
-
parsedOutput: any,
|
|
3138
|
-
context: __SerdeContext
|
|
3139
|
-
): Promise<ResourceNotFoundException> => {
|
|
3140
|
-
const contents: ResourceNotFoundException = {
|
|
3141
|
-
name: "ResourceNotFoundException",
|
|
3142
|
-
$fault: "client",
|
|
3143
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3144
|
-
Message: undefined,
|
|
3145
|
-
ResourceName: undefined,
|
|
3146
|
-
};
|
|
3147
|
-
const data: any = parsedOutput.body;
|
|
3148
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
3149
|
-
contents.Message = __expectString(data.Message);
|
|
3150
|
-
}
|
|
3151
|
-
if (data.ResourceName !== undefined && data.ResourceName !== null) {
|
|
3152
|
-
contents.ResourceName = __expectString(data.ResourceName);
|
|
3153
|
-
}
|
|
3154
|
-
return contents;
|
|
3155
|
-
};
|
|
3156
|
-
|
|
3157
|
-
const deserializeAws_restJson1ResourceNotReadyExceptionResponse = async (
|
|
3158
|
-
parsedOutput: any,
|
|
3159
|
-
context: __SerdeContext
|
|
3160
|
-
): Promise<ResourceNotReadyException> => {
|
|
3161
|
-
const contents: ResourceNotReadyException = {
|
|
3162
|
-
name: "ResourceNotReadyException",
|
|
3163
|
-
$fault: "client",
|
|
3164
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3165
|
-
Message: undefined,
|
|
3166
|
-
};
|
|
3167
|
-
const data: any = parsedOutput.body;
|
|
3168
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
3169
|
-
contents.Message = __expectString(data.Message);
|
|
3170
|
-
}
|
|
3171
|
-
return contents;
|
|
3172
|
-
};
|
|
3173
|
-
|
|
3174
|
-
const deserializeAws_restJson1ThrottlingExceptionResponse = async (
|
|
3175
|
-
parsedOutput: any,
|
|
3176
|
-
context: __SerdeContext
|
|
3177
|
-
): Promise<ThrottlingException> => {
|
|
3178
|
-
const contents: ThrottlingException = {
|
|
3179
|
-
name: "ThrottlingException",
|
|
3180
|
-
$fault: "client",
|
|
3181
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3182
|
-
};
|
|
3183
|
-
const data: any = parsedOutput.body;
|
|
3184
|
-
return contents;
|
|
3185
|
-
};
|
|
3186
|
-
|
|
3187
|
-
const deserializeAws_restJson1TooManyTagsExceptionResponse = async (
|
|
3188
|
-
parsedOutput: any,
|
|
3189
|
-
context: __SerdeContext
|
|
3190
|
-
): Promise<TooManyTagsException> => {
|
|
3191
|
-
const contents: TooManyTagsException = {
|
|
3192
|
-
name: "TooManyTagsException",
|
|
3193
|
-
$fault: "client",
|
|
3194
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
3195
|
-
Message: undefined,
|
|
3196
|
-
ResourceName: undefined,
|
|
3197
|
-
};
|
|
3198
|
-
const data: any = parsedOutput.body;
|
|
3199
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
3200
|
-
contents.Message = __expectString(data.Message);
|
|
3201
|
-
}
|
|
3202
|
-
if (data.ResourceName !== undefined && data.ResourceName !== null) {
|
|
3203
|
-
contents.ResourceName = __expectString(data.ResourceName);
|
|
3204
|
-
}
|
|
3205
|
-
return contents;
|
|
3206
|
-
};
|
|
3207
|
-
|
|
3208
|
-
const serializeAws_restJson1ApprovalThresholdPolicy = (
|
|
3209
|
-
input: ApprovalThresholdPolicy,
|
|
3210
|
-
context: __SerdeContext
|
|
3211
|
-
): any => {
|
|
3212
|
-
return {
|
|
3213
|
-
...(input.ProposalDurationInHours !== undefined &&
|
|
3214
|
-
input.ProposalDurationInHours !== null && { ProposalDurationInHours: input.ProposalDurationInHours }),
|
|
3215
|
-
...(input.ThresholdComparator !== undefined &&
|
|
3216
|
-
input.ThresholdComparator !== null && { ThresholdComparator: input.ThresholdComparator }),
|
|
3217
|
-
...(input.ThresholdPercentage !== undefined &&
|
|
3218
|
-
input.ThresholdPercentage !== null && { ThresholdPercentage: input.ThresholdPercentage }),
|
|
3219
|
-
};
|
|
3220
|
-
};
|
|
3221
|
-
|
|
3222
|
-
const serializeAws_restJson1InputTagMap = (input: { [key: string]: string }, context: __SerdeContext): any => {
|
|
3223
|
-
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
|
|
3224
|
-
if (value === null) {
|
|
3225
|
-
return acc;
|
|
3226
|
-
}
|
|
3227
|
-
return {
|
|
3228
|
-
...acc,
|
|
3229
|
-
[key]: value,
|
|
3230
|
-
};
|
|
3231
|
-
}, {});
|
|
3232
|
-
};
|
|
3233
|
-
|
|
3234
|
-
const serializeAws_restJson1InviteAction = (input: InviteAction, context: __SerdeContext): any => {
|
|
3235
|
-
return {
|
|
3236
|
-
...(input.Principal !== undefined && input.Principal !== null && { Principal: input.Principal }),
|
|
3237
|
-
};
|
|
3238
|
-
};
|
|
3239
|
-
|
|
3240
|
-
const serializeAws_restJson1InviteActionList = (input: InviteAction[], context: __SerdeContext): any => {
|
|
3241
|
-
return input
|
|
3242
|
-
.filter((e: any) => e != null)
|
|
3243
|
-
.map((entry) => {
|
|
3244
|
-
if (entry === null) {
|
|
3245
|
-
return null as any;
|
|
3246
|
-
}
|
|
3247
|
-
return serializeAws_restJson1InviteAction(entry, context);
|
|
3248
|
-
});
|
|
3249
|
-
};
|
|
3250
|
-
|
|
3251
|
-
const serializeAws_restJson1LogConfiguration = (input: LogConfiguration, context: __SerdeContext): any => {
|
|
3252
|
-
return {
|
|
3253
|
-
...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }),
|
|
3254
|
-
};
|
|
3255
|
-
};
|
|
3256
|
-
|
|
3257
|
-
const serializeAws_restJson1LogConfigurations = (input: LogConfigurations, context: __SerdeContext): any => {
|
|
3258
|
-
return {
|
|
3259
|
-
...(input.Cloudwatch !== undefined &&
|
|
3260
|
-
input.Cloudwatch !== null && { Cloudwatch: serializeAws_restJson1LogConfiguration(input.Cloudwatch, context) }),
|
|
3261
|
-
};
|
|
3262
|
-
};
|
|
3263
|
-
|
|
3264
|
-
const serializeAws_restJson1MemberConfiguration = (input: MemberConfiguration, context: __SerdeContext): any => {
|
|
3265
|
-
return {
|
|
3266
|
-
...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
|
|
3267
|
-
...(input.FrameworkConfiguration !== undefined &&
|
|
3268
|
-
input.FrameworkConfiguration !== null && {
|
|
3269
|
-
FrameworkConfiguration: serializeAws_restJson1MemberFrameworkConfiguration(
|
|
3270
|
-
input.FrameworkConfiguration,
|
|
3271
|
-
context
|
|
3272
|
-
),
|
|
3273
|
-
}),
|
|
3274
|
-
...(input.KmsKeyArn !== undefined && input.KmsKeyArn !== null && { KmsKeyArn: input.KmsKeyArn }),
|
|
3275
|
-
...(input.LogPublishingConfiguration !== undefined &&
|
|
3276
|
-
input.LogPublishingConfiguration !== null && {
|
|
3277
|
-
LogPublishingConfiguration: serializeAws_restJson1MemberLogPublishingConfiguration(
|
|
3278
|
-
input.LogPublishingConfiguration,
|
|
3279
|
-
context
|
|
3280
|
-
),
|
|
3281
|
-
}),
|
|
3282
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
3283
|
-
...(input.Tags !== undefined &&
|
|
3284
|
-
input.Tags !== null && { Tags: serializeAws_restJson1InputTagMap(input.Tags, context) }),
|
|
3285
|
-
};
|
|
3286
|
-
};
|
|
3287
|
-
|
|
3288
|
-
const serializeAws_restJson1MemberFabricConfiguration = (
|
|
3289
|
-
input: MemberFabricConfiguration,
|
|
3290
|
-
context: __SerdeContext
|
|
3291
|
-
): any => {
|
|
3292
|
-
return {
|
|
3293
|
-
...(input.AdminPassword !== undefined && input.AdminPassword !== null && { AdminPassword: input.AdminPassword }),
|
|
3294
|
-
...(input.AdminUsername !== undefined && input.AdminUsername !== null && { AdminUsername: input.AdminUsername }),
|
|
3295
|
-
};
|
|
3296
|
-
};
|
|
3297
|
-
|
|
3298
|
-
const serializeAws_restJson1MemberFabricLogPublishingConfiguration = (
|
|
3299
|
-
input: MemberFabricLogPublishingConfiguration,
|
|
3300
|
-
context: __SerdeContext
|
|
3301
|
-
): any => {
|
|
3302
|
-
return {
|
|
3303
|
-
...(input.CaLogs !== undefined &&
|
|
3304
|
-
input.CaLogs !== null && { CaLogs: serializeAws_restJson1LogConfigurations(input.CaLogs, context) }),
|
|
3305
|
-
};
|
|
3306
|
-
};
|
|
3307
|
-
|
|
3308
|
-
const serializeAws_restJson1MemberFrameworkConfiguration = (
|
|
3309
|
-
input: MemberFrameworkConfiguration,
|
|
3310
|
-
context: __SerdeContext
|
|
3311
|
-
): any => {
|
|
3312
|
-
return {
|
|
3313
|
-
...(input.Fabric !== undefined &&
|
|
3314
|
-
input.Fabric !== null && { Fabric: serializeAws_restJson1MemberFabricConfiguration(input.Fabric, context) }),
|
|
3315
|
-
};
|
|
3316
|
-
};
|
|
3317
|
-
|
|
3318
|
-
const serializeAws_restJson1MemberLogPublishingConfiguration = (
|
|
3319
|
-
input: MemberLogPublishingConfiguration,
|
|
3320
|
-
context: __SerdeContext
|
|
3321
|
-
): any => {
|
|
3322
|
-
return {
|
|
3323
|
-
...(input.Fabric !== undefined &&
|
|
3324
|
-
input.Fabric !== null && {
|
|
3325
|
-
Fabric: serializeAws_restJson1MemberFabricLogPublishingConfiguration(input.Fabric, context),
|
|
3326
|
-
}),
|
|
3327
|
-
};
|
|
3328
|
-
};
|
|
3329
|
-
|
|
3330
|
-
const serializeAws_restJson1NetworkFabricConfiguration = (
|
|
3331
|
-
input: NetworkFabricConfiguration,
|
|
3332
|
-
context: __SerdeContext
|
|
3333
|
-
): any => {
|
|
3334
|
-
return {
|
|
3335
|
-
...(input.Edition !== undefined && input.Edition !== null && { Edition: input.Edition }),
|
|
3336
|
-
};
|
|
3337
|
-
};
|
|
3338
|
-
|
|
3339
|
-
const serializeAws_restJson1NetworkFrameworkConfiguration = (
|
|
3340
|
-
input: NetworkFrameworkConfiguration,
|
|
3341
|
-
context: __SerdeContext
|
|
3342
|
-
): any => {
|
|
3343
|
-
return {
|
|
3344
|
-
...(input.Fabric !== undefined &&
|
|
3345
|
-
input.Fabric !== null && { Fabric: serializeAws_restJson1NetworkFabricConfiguration(input.Fabric, context) }),
|
|
3346
|
-
};
|
|
3347
|
-
};
|
|
3348
|
-
|
|
3349
|
-
const serializeAws_restJson1NodeConfiguration = (input: NodeConfiguration, context: __SerdeContext): any => {
|
|
3350
|
-
return {
|
|
3351
|
-
...(input.AvailabilityZone !== undefined &&
|
|
3352
|
-
input.AvailabilityZone !== null && { AvailabilityZone: input.AvailabilityZone }),
|
|
3353
|
-
...(input.InstanceType !== undefined && input.InstanceType !== null && { InstanceType: input.InstanceType }),
|
|
3354
|
-
...(input.LogPublishingConfiguration !== undefined &&
|
|
3355
|
-
input.LogPublishingConfiguration !== null && {
|
|
3356
|
-
LogPublishingConfiguration: serializeAws_restJson1NodeLogPublishingConfiguration(
|
|
3357
|
-
input.LogPublishingConfiguration,
|
|
3358
|
-
context
|
|
3359
|
-
),
|
|
3360
|
-
}),
|
|
3361
|
-
...(input.StateDB !== undefined && input.StateDB !== null && { StateDB: input.StateDB }),
|
|
3362
|
-
};
|
|
3363
|
-
};
|
|
3364
|
-
|
|
3365
|
-
const serializeAws_restJson1NodeFabricLogPublishingConfiguration = (
|
|
3366
|
-
input: NodeFabricLogPublishingConfiguration,
|
|
3367
|
-
context: __SerdeContext
|
|
3368
|
-
): any => {
|
|
3369
|
-
return {
|
|
3370
|
-
...(input.ChaincodeLogs !== undefined &&
|
|
3371
|
-
input.ChaincodeLogs !== null && {
|
|
3372
|
-
ChaincodeLogs: serializeAws_restJson1LogConfigurations(input.ChaincodeLogs, context),
|
|
3373
|
-
}),
|
|
3374
|
-
...(input.PeerLogs !== undefined &&
|
|
3375
|
-
input.PeerLogs !== null && { PeerLogs: serializeAws_restJson1LogConfigurations(input.PeerLogs, context) }),
|
|
3376
|
-
};
|
|
3377
|
-
};
|
|
3378
|
-
|
|
3379
|
-
const serializeAws_restJson1NodeLogPublishingConfiguration = (
|
|
3380
|
-
input: NodeLogPublishingConfiguration,
|
|
3381
|
-
context: __SerdeContext
|
|
3382
|
-
): any => {
|
|
3383
|
-
return {
|
|
3384
|
-
...(input.Fabric !== undefined &&
|
|
3385
|
-
input.Fabric !== null && {
|
|
3386
|
-
Fabric: serializeAws_restJson1NodeFabricLogPublishingConfiguration(input.Fabric, context),
|
|
3387
|
-
}),
|
|
3388
|
-
};
|
|
3389
|
-
};
|
|
3390
|
-
|
|
3391
|
-
const serializeAws_restJson1ProposalActions = (input: ProposalActions, context: __SerdeContext): any => {
|
|
3392
|
-
return {
|
|
3393
|
-
...(input.Invitations !== undefined &&
|
|
3394
|
-
input.Invitations !== null && {
|
|
3395
|
-
Invitations: serializeAws_restJson1InviteActionList(input.Invitations, context),
|
|
3396
|
-
}),
|
|
3397
|
-
...(input.Removals !== undefined &&
|
|
3398
|
-
input.Removals !== null && { Removals: serializeAws_restJson1RemoveActionList(input.Removals, context) }),
|
|
3399
|
-
};
|
|
3400
|
-
};
|
|
3401
|
-
|
|
3402
|
-
const serializeAws_restJson1RemoveAction = (input: RemoveAction, context: __SerdeContext): any => {
|
|
3403
|
-
return {
|
|
3404
|
-
...(input.MemberId !== undefined && input.MemberId !== null && { MemberId: input.MemberId }),
|
|
3405
|
-
};
|
|
3406
|
-
};
|
|
3407
|
-
|
|
3408
|
-
const serializeAws_restJson1RemoveActionList = (input: RemoveAction[], context: __SerdeContext): any => {
|
|
3409
|
-
return input
|
|
3410
|
-
.filter((e: any) => e != null)
|
|
3411
|
-
.map((entry) => {
|
|
3412
|
-
if (entry === null) {
|
|
3413
|
-
return null as any;
|
|
3414
|
-
}
|
|
3415
|
-
return serializeAws_restJson1RemoveAction(entry, context);
|
|
3416
|
-
});
|
|
3417
|
-
};
|
|
3418
|
-
|
|
3419
|
-
const serializeAws_restJson1VotingPolicy = (input: VotingPolicy, context: __SerdeContext): any => {
|
|
3420
|
-
return {
|
|
3421
|
-
...(input.ApprovalThresholdPolicy !== undefined &&
|
|
3422
|
-
input.ApprovalThresholdPolicy !== null && {
|
|
3423
|
-
ApprovalThresholdPolicy: serializeAws_restJson1ApprovalThresholdPolicy(input.ApprovalThresholdPolicy, context),
|
|
3424
|
-
}),
|
|
3425
|
-
};
|
|
3426
|
-
};
|
|
3427
|
-
|
|
3428
|
-
const deserializeAws_restJson1ApprovalThresholdPolicy = (
|
|
3429
|
-
output: any,
|
|
3430
|
-
context: __SerdeContext
|
|
3431
|
-
): ApprovalThresholdPolicy => {
|
|
3432
|
-
return {
|
|
3433
|
-
ProposalDurationInHours: __expectInt32(output.ProposalDurationInHours),
|
|
3434
|
-
ThresholdComparator: __expectString(output.ThresholdComparator),
|
|
3435
|
-
ThresholdPercentage: __expectInt32(output.ThresholdPercentage),
|
|
3436
|
-
} as any;
|
|
3437
|
-
};
|
|
3438
|
-
|
|
3439
|
-
const deserializeAws_restJson1Invitation = (output: any, context: __SerdeContext): Invitation => {
|
|
3440
|
-
return {
|
|
3441
|
-
Arn: __expectString(output.Arn),
|
|
3442
|
-
CreationDate:
|
|
3443
|
-
output.CreationDate !== undefined && output.CreationDate !== null
|
|
3444
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CreationDate))
|
|
3445
|
-
: undefined,
|
|
3446
|
-
ExpirationDate:
|
|
3447
|
-
output.ExpirationDate !== undefined && output.ExpirationDate !== null
|
|
3448
|
-
? __expectNonNull(__parseRfc3339DateTime(output.ExpirationDate))
|
|
3449
|
-
: undefined,
|
|
3450
|
-
InvitationId: __expectString(output.InvitationId),
|
|
3451
|
-
NetworkSummary:
|
|
3452
|
-
output.NetworkSummary !== undefined && output.NetworkSummary !== null
|
|
3453
|
-
? deserializeAws_restJson1NetworkSummary(output.NetworkSummary, context)
|
|
3454
|
-
: undefined,
|
|
3455
|
-
Status: __expectString(output.Status),
|
|
3456
|
-
} as any;
|
|
3457
|
-
};
|
|
3458
|
-
|
|
3459
|
-
const deserializeAws_restJson1InvitationList = (output: any, context: __SerdeContext): Invitation[] => {
|
|
3460
|
-
return (output || [])
|
|
3461
|
-
.filter((e: any) => e != null)
|
|
3462
|
-
.map((entry: any) => {
|
|
3463
|
-
if (entry === null) {
|
|
3464
|
-
return null as any;
|
|
3465
|
-
}
|
|
3466
|
-
return deserializeAws_restJson1Invitation(entry, context);
|
|
3467
|
-
});
|
|
3468
|
-
};
|
|
3469
|
-
|
|
3470
|
-
const deserializeAws_restJson1InviteAction = (output: any, context: __SerdeContext): InviteAction => {
|
|
3471
|
-
return {
|
|
3472
|
-
Principal: __expectString(output.Principal),
|
|
3473
|
-
} as any;
|
|
3474
|
-
};
|
|
3475
|
-
|
|
3476
|
-
const deserializeAws_restJson1InviteActionList = (output: any, context: __SerdeContext): InviteAction[] => {
|
|
3477
|
-
return (output || [])
|
|
3478
|
-
.filter((e: any) => e != null)
|
|
3479
|
-
.map((entry: any) => {
|
|
3480
|
-
if (entry === null) {
|
|
3481
|
-
return null as any;
|
|
3482
|
-
}
|
|
3483
|
-
return deserializeAws_restJson1InviteAction(entry, context);
|
|
3484
|
-
});
|
|
3485
|
-
};
|
|
3486
|
-
|
|
3487
|
-
const deserializeAws_restJson1LogConfiguration = (output: any, context: __SerdeContext): LogConfiguration => {
|
|
3488
|
-
return {
|
|
3489
|
-
Enabled: __expectBoolean(output.Enabled),
|
|
3490
|
-
} as any;
|
|
3491
|
-
};
|
|
3492
|
-
|
|
3493
|
-
const deserializeAws_restJson1LogConfigurations = (output: any, context: __SerdeContext): LogConfigurations => {
|
|
3494
|
-
return {
|
|
3495
|
-
Cloudwatch:
|
|
3496
|
-
output.Cloudwatch !== undefined && output.Cloudwatch !== null
|
|
3497
|
-
? deserializeAws_restJson1LogConfiguration(output.Cloudwatch, context)
|
|
3498
|
-
: undefined,
|
|
3499
|
-
} as any;
|
|
3500
|
-
};
|
|
3501
|
-
|
|
3502
|
-
const deserializeAws_restJson1Member = (output: any, context: __SerdeContext): Member => {
|
|
3503
|
-
return {
|
|
3504
|
-
Arn: __expectString(output.Arn),
|
|
3505
|
-
CreationDate:
|
|
3506
|
-
output.CreationDate !== undefined && output.CreationDate !== null
|
|
3507
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CreationDate))
|
|
3508
|
-
: undefined,
|
|
3509
|
-
Description: __expectString(output.Description),
|
|
3510
|
-
FrameworkAttributes:
|
|
3511
|
-
output.FrameworkAttributes !== undefined && output.FrameworkAttributes !== null
|
|
3512
|
-
? deserializeAws_restJson1MemberFrameworkAttributes(output.FrameworkAttributes, context)
|
|
3513
|
-
: undefined,
|
|
3514
|
-
Id: __expectString(output.Id),
|
|
3515
|
-
KmsKeyArn: __expectString(output.KmsKeyArn),
|
|
3516
|
-
LogPublishingConfiguration:
|
|
3517
|
-
output.LogPublishingConfiguration !== undefined && output.LogPublishingConfiguration !== null
|
|
3518
|
-
? deserializeAws_restJson1MemberLogPublishingConfiguration(output.LogPublishingConfiguration, context)
|
|
3519
|
-
: undefined,
|
|
3520
|
-
Name: __expectString(output.Name),
|
|
3521
|
-
NetworkId: __expectString(output.NetworkId),
|
|
3522
|
-
Status: __expectString(output.Status),
|
|
3523
|
-
Tags:
|
|
3524
|
-
output.Tags !== undefined && output.Tags !== null
|
|
3525
|
-
? deserializeAws_restJson1OutputTagMap(output.Tags, context)
|
|
3526
|
-
: undefined,
|
|
3527
|
-
} as any;
|
|
3528
|
-
};
|
|
3529
|
-
|
|
3530
|
-
const deserializeAws_restJson1MemberFabricAttributes = (
|
|
3531
|
-
output: any,
|
|
3532
|
-
context: __SerdeContext
|
|
3533
|
-
): MemberFabricAttributes => {
|
|
3534
|
-
return {
|
|
3535
|
-
AdminUsername: __expectString(output.AdminUsername),
|
|
3536
|
-
CaEndpoint: __expectString(output.CaEndpoint),
|
|
3537
|
-
} as any;
|
|
3538
|
-
};
|
|
3539
|
-
|
|
3540
|
-
const deserializeAws_restJson1MemberFabricLogPublishingConfiguration = (
|
|
3541
|
-
output: any,
|
|
3542
|
-
context: __SerdeContext
|
|
3543
|
-
): MemberFabricLogPublishingConfiguration => {
|
|
3544
|
-
return {
|
|
3545
|
-
CaLogs:
|
|
3546
|
-
output.CaLogs !== undefined && output.CaLogs !== null
|
|
3547
|
-
? deserializeAws_restJson1LogConfigurations(output.CaLogs, context)
|
|
3548
|
-
: undefined,
|
|
3549
|
-
} as any;
|
|
3550
|
-
};
|
|
3551
|
-
|
|
3552
|
-
const deserializeAws_restJson1MemberFrameworkAttributes = (
|
|
3553
|
-
output: any,
|
|
3554
|
-
context: __SerdeContext
|
|
3555
|
-
): MemberFrameworkAttributes => {
|
|
3556
|
-
return {
|
|
3557
|
-
Fabric:
|
|
3558
|
-
output.Fabric !== undefined && output.Fabric !== null
|
|
3559
|
-
? deserializeAws_restJson1MemberFabricAttributes(output.Fabric, context)
|
|
3560
|
-
: undefined,
|
|
3561
|
-
} as any;
|
|
3562
|
-
};
|
|
3563
|
-
|
|
3564
|
-
const deserializeAws_restJson1MemberLogPublishingConfiguration = (
|
|
3565
|
-
output: any,
|
|
3566
|
-
context: __SerdeContext
|
|
3567
|
-
): MemberLogPublishingConfiguration => {
|
|
3568
|
-
return {
|
|
3569
|
-
Fabric:
|
|
3570
|
-
output.Fabric !== undefined && output.Fabric !== null
|
|
3571
|
-
? deserializeAws_restJson1MemberFabricLogPublishingConfiguration(output.Fabric, context)
|
|
3572
|
-
: undefined,
|
|
3573
|
-
} as any;
|
|
3574
|
-
};
|
|
3575
|
-
|
|
3576
|
-
const deserializeAws_restJson1MemberSummary = (output: any, context: __SerdeContext): MemberSummary => {
|
|
3577
|
-
return {
|
|
3578
|
-
Arn: __expectString(output.Arn),
|
|
3579
|
-
CreationDate:
|
|
3580
|
-
output.CreationDate !== undefined && output.CreationDate !== null
|
|
3581
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CreationDate))
|
|
3582
|
-
: undefined,
|
|
3583
|
-
Description: __expectString(output.Description),
|
|
3584
|
-
Id: __expectString(output.Id),
|
|
3585
|
-
IsOwned: __expectBoolean(output.IsOwned),
|
|
3586
|
-
Name: __expectString(output.Name),
|
|
3587
|
-
Status: __expectString(output.Status),
|
|
3588
|
-
} as any;
|
|
3589
|
-
};
|
|
3590
|
-
|
|
3591
|
-
const deserializeAws_restJson1MemberSummaryList = (output: any, context: __SerdeContext): MemberSummary[] => {
|
|
3592
|
-
return (output || [])
|
|
3593
|
-
.filter((e: any) => e != null)
|
|
3594
|
-
.map((entry: any) => {
|
|
3595
|
-
if (entry === null) {
|
|
3596
|
-
return null as any;
|
|
3597
|
-
}
|
|
3598
|
-
return deserializeAws_restJson1MemberSummary(entry, context);
|
|
3599
|
-
});
|
|
3600
|
-
};
|
|
3601
|
-
|
|
3602
|
-
const deserializeAws_restJson1Network = (output: any, context: __SerdeContext): Network => {
|
|
3603
|
-
return {
|
|
3604
|
-
Arn: __expectString(output.Arn),
|
|
3605
|
-
CreationDate:
|
|
3606
|
-
output.CreationDate !== undefined && output.CreationDate !== null
|
|
3607
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CreationDate))
|
|
3608
|
-
: undefined,
|
|
3609
|
-
Description: __expectString(output.Description),
|
|
3610
|
-
Framework: __expectString(output.Framework),
|
|
3611
|
-
FrameworkAttributes:
|
|
3612
|
-
output.FrameworkAttributes !== undefined && output.FrameworkAttributes !== null
|
|
3613
|
-
? deserializeAws_restJson1NetworkFrameworkAttributes(output.FrameworkAttributes, context)
|
|
3614
|
-
: undefined,
|
|
3615
|
-
FrameworkVersion: __expectString(output.FrameworkVersion),
|
|
3616
|
-
Id: __expectString(output.Id),
|
|
3617
|
-
Name: __expectString(output.Name),
|
|
3618
|
-
Status: __expectString(output.Status),
|
|
3619
|
-
Tags:
|
|
3620
|
-
output.Tags !== undefined && output.Tags !== null
|
|
3621
|
-
? deserializeAws_restJson1OutputTagMap(output.Tags, context)
|
|
3622
|
-
: undefined,
|
|
3623
|
-
VotingPolicy:
|
|
3624
|
-
output.VotingPolicy !== undefined && output.VotingPolicy !== null
|
|
3625
|
-
? deserializeAws_restJson1VotingPolicy(output.VotingPolicy, context)
|
|
3626
|
-
: undefined,
|
|
3627
|
-
VpcEndpointServiceName: __expectString(output.VpcEndpointServiceName),
|
|
3628
|
-
} as any;
|
|
3629
|
-
};
|
|
3630
|
-
|
|
3631
|
-
const deserializeAws_restJson1NetworkEthereumAttributes = (
|
|
3632
|
-
output: any,
|
|
3633
|
-
context: __SerdeContext
|
|
3634
|
-
): NetworkEthereumAttributes => {
|
|
3635
|
-
return {
|
|
3636
|
-
ChainId: __expectString(output.ChainId),
|
|
3637
|
-
} as any;
|
|
3638
|
-
};
|
|
3639
|
-
|
|
3640
|
-
const deserializeAws_restJson1NetworkFabricAttributes = (
|
|
3641
|
-
output: any,
|
|
3642
|
-
context: __SerdeContext
|
|
3643
|
-
): NetworkFabricAttributes => {
|
|
3644
|
-
return {
|
|
3645
|
-
Edition: __expectString(output.Edition),
|
|
3646
|
-
OrderingServiceEndpoint: __expectString(output.OrderingServiceEndpoint),
|
|
3647
|
-
} as any;
|
|
3648
|
-
};
|
|
3649
|
-
|
|
3650
|
-
const deserializeAws_restJson1NetworkFrameworkAttributes = (
|
|
3651
|
-
output: any,
|
|
3652
|
-
context: __SerdeContext
|
|
3653
|
-
): NetworkFrameworkAttributes => {
|
|
3654
|
-
return {
|
|
3655
|
-
Ethereum:
|
|
3656
|
-
output.Ethereum !== undefined && output.Ethereum !== null
|
|
3657
|
-
? deserializeAws_restJson1NetworkEthereumAttributes(output.Ethereum, context)
|
|
3658
|
-
: undefined,
|
|
3659
|
-
Fabric:
|
|
3660
|
-
output.Fabric !== undefined && output.Fabric !== null
|
|
3661
|
-
? deserializeAws_restJson1NetworkFabricAttributes(output.Fabric, context)
|
|
3662
|
-
: undefined,
|
|
3663
|
-
} as any;
|
|
3664
|
-
};
|
|
3665
|
-
|
|
3666
|
-
const deserializeAws_restJson1NetworkSummary = (output: any, context: __SerdeContext): NetworkSummary => {
|
|
3667
|
-
return {
|
|
3668
|
-
Arn: __expectString(output.Arn),
|
|
3669
|
-
CreationDate:
|
|
3670
|
-
output.CreationDate !== undefined && output.CreationDate !== null
|
|
3671
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CreationDate))
|
|
3672
|
-
: undefined,
|
|
3673
|
-
Description: __expectString(output.Description),
|
|
3674
|
-
Framework: __expectString(output.Framework),
|
|
3675
|
-
FrameworkVersion: __expectString(output.FrameworkVersion),
|
|
3676
|
-
Id: __expectString(output.Id),
|
|
3677
|
-
Name: __expectString(output.Name),
|
|
3678
|
-
Status: __expectString(output.Status),
|
|
3679
|
-
} as any;
|
|
3680
|
-
};
|
|
3681
|
-
|
|
3682
|
-
const deserializeAws_restJson1NetworkSummaryList = (output: any, context: __SerdeContext): NetworkSummary[] => {
|
|
3683
|
-
return (output || [])
|
|
3684
|
-
.filter((e: any) => e != null)
|
|
3685
|
-
.map((entry: any) => {
|
|
3686
|
-
if (entry === null) {
|
|
3687
|
-
return null as any;
|
|
3688
|
-
}
|
|
3689
|
-
return deserializeAws_restJson1NetworkSummary(entry, context);
|
|
3690
|
-
});
|
|
3691
|
-
};
|
|
3692
|
-
|
|
3693
|
-
const deserializeAws_restJson1Node = (output: any, context: __SerdeContext): Node => {
|
|
3694
|
-
return {
|
|
3695
|
-
Arn: __expectString(output.Arn),
|
|
3696
|
-
AvailabilityZone: __expectString(output.AvailabilityZone),
|
|
3697
|
-
CreationDate:
|
|
3698
|
-
output.CreationDate !== undefined && output.CreationDate !== null
|
|
3699
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CreationDate))
|
|
3700
|
-
: undefined,
|
|
3701
|
-
FrameworkAttributes:
|
|
3702
|
-
output.FrameworkAttributes !== undefined && output.FrameworkAttributes !== null
|
|
3703
|
-
? deserializeAws_restJson1NodeFrameworkAttributes(output.FrameworkAttributes, context)
|
|
3704
|
-
: undefined,
|
|
3705
|
-
Id: __expectString(output.Id),
|
|
3706
|
-
InstanceType: __expectString(output.InstanceType),
|
|
3707
|
-
KmsKeyArn: __expectString(output.KmsKeyArn),
|
|
3708
|
-
LogPublishingConfiguration:
|
|
3709
|
-
output.LogPublishingConfiguration !== undefined && output.LogPublishingConfiguration !== null
|
|
3710
|
-
? deserializeAws_restJson1NodeLogPublishingConfiguration(output.LogPublishingConfiguration, context)
|
|
3711
|
-
: undefined,
|
|
3712
|
-
MemberId: __expectString(output.MemberId),
|
|
3713
|
-
NetworkId: __expectString(output.NetworkId),
|
|
3714
|
-
StateDB: __expectString(output.StateDB),
|
|
3715
|
-
Status: __expectString(output.Status),
|
|
3716
|
-
Tags:
|
|
3717
|
-
output.Tags !== undefined && output.Tags !== null
|
|
3718
|
-
? deserializeAws_restJson1OutputTagMap(output.Tags, context)
|
|
3719
|
-
: undefined,
|
|
3720
|
-
} as any;
|
|
3721
|
-
};
|
|
3722
|
-
|
|
3723
|
-
const deserializeAws_restJson1NodeEthereumAttributes = (
|
|
3724
|
-
output: any,
|
|
3725
|
-
context: __SerdeContext
|
|
3726
|
-
): NodeEthereumAttributes => {
|
|
3727
|
-
return {
|
|
3728
|
-
HttpEndpoint: __expectString(output.HttpEndpoint),
|
|
3729
|
-
WebSocketEndpoint: __expectString(output.WebSocketEndpoint),
|
|
3730
|
-
} as any;
|
|
3731
|
-
};
|
|
3732
|
-
|
|
3733
|
-
const deserializeAws_restJson1NodeFabricAttributes = (output: any, context: __SerdeContext): NodeFabricAttributes => {
|
|
3734
|
-
return {
|
|
3735
|
-
PeerEndpoint: __expectString(output.PeerEndpoint),
|
|
3736
|
-
PeerEventEndpoint: __expectString(output.PeerEventEndpoint),
|
|
3737
|
-
} as any;
|
|
3738
|
-
};
|
|
3739
|
-
|
|
3740
|
-
const deserializeAws_restJson1NodeFabricLogPublishingConfiguration = (
|
|
3741
|
-
output: any,
|
|
3742
|
-
context: __SerdeContext
|
|
3743
|
-
): NodeFabricLogPublishingConfiguration => {
|
|
3744
|
-
return {
|
|
3745
|
-
ChaincodeLogs:
|
|
3746
|
-
output.ChaincodeLogs !== undefined && output.ChaincodeLogs !== null
|
|
3747
|
-
? deserializeAws_restJson1LogConfigurations(output.ChaincodeLogs, context)
|
|
3748
|
-
: undefined,
|
|
3749
|
-
PeerLogs:
|
|
3750
|
-
output.PeerLogs !== undefined && output.PeerLogs !== null
|
|
3751
|
-
? deserializeAws_restJson1LogConfigurations(output.PeerLogs, context)
|
|
3752
|
-
: undefined,
|
|
3753
|
-
} as any;
|
|
3754
|
-
};
|
|
3755
|
-
|
|
3756
|
-
const deserializeAws_restJson1NodeFrameworkAttributes = (
|
|
3757
|
-
output: any,
|
|
3758
|
-
context: __SerdeContext
|
|
3759
|
-
): NodeFrameworkAttributes => {
|
|
3760
|
-
return {
|
|
3761
|
-
Ethereum:
|
|
3762
|
-
output.Ethereum !== undefined && output.Ethereum !== null
|
|
3763
|
-
? deserializeAws_restJson1NodeEthereumAttributes(output.Ethereum, context)
|
|
3764
|
-
: undefined,
|
|
3765
|
-
Fabric:
|
|
3766
|
-
output.Fabric !== undefined && output.Fabric !== null
|
|
3767
|
-
? deserializeAws_restJson1NodeFabricAttributes(output.Fabric, context)
|
|
3768
|
-
: undefined,
|
|
3769
|
-
} as any;
|
|
3770
|
-
};
|
|
3771
|
-
|
|
3772
|
-
const deserializeAws_restJson1NodeLogPublishingConfiguration = (
|
|
3773
|
-
output: any,
|
|
3774
|
-
context: __SerdeContext
|
|
3775
|
-
): NodeLogPublishingConfiguration => {
|
|
3776
|
-
return {
|
|
3777
|
-
Fabric:
|
|
3778
|
-
output.Fabric !== undefined && output.Fabric !== null
|
|
3779
|
-
? deserializeAws_restJson1NodeFabricLogPublishingConfiguration(output.Fabric, context)
|
|
3780
|
-
: undefined,
|
|
3781
|
-
} as any;
|
|
3782
|
-
};
|
|
3783
|
-
|
|
3784
|
-
const deserializeAws_restJson1NodeSummary = (output: any, context: __SerdeContext): NodeSummary => {
|
|
3785
|
-
return {
|
|
3786
|
-
Arn: __expectString(output.Arn),
|
|
3787
|
-
AvailabilityZone: __expectString(output.AvailabilityZone),
|
|
3788
|
-
CreationDate:
|
|
3789
|
-
output.CreationDate !== undefined && output.CreationDate !== null
|
|
3790
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CreationDate))
|
|
3791
|
-
: undefined,
|
|
3792
|
-
Id: __expectString(output.Id),
|
|
3793
|
-
InstanceType: __expectString(output.InstanceType),
|
|
3794
|
-
Status: __expectString(output.Status),
|
|
3795
|
-
} as any;
|
|
3796
|
-
};
|
|
3797
|
-
|
|
3798
|
-
const deserializeAws_restJson1NodeSummaryList = (output: any, context: __SerdeContext): NodeSummary[] => {
|
|
3799
|
-
return (output || [])
|
|
3800
|
-
.filter((e: any) => e != null)
|
|
3801
|
-
.map((entry: any) => {
|
|
3802
|
-
if (entry === null) {
|
|
3803
|
-
return null as any;
|
|
3804
|
-
}
|
|
3805
|
-
return deserializeAws_restJson1NodeSummary(entry, context);
|
|
3806
|
-
});
|
|
3807
|
-
};
|
|
3808
|
-
|
|
3809
|
-
const deserializeAws_restJson1OutputTagMap = (output: any, context: __SerdeContext): { [key: string]: string } => {
|
|
3810
|
-
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
|
|
3811
|
-
if (value === null) {
|
|
3812
|
-
return acc;
|
|
3813
|
-
}
|
|
3814
|
-
return {
|
|
3815
|
-
...acc,
|
|
3816
|
-
[key]: __expectString(value) as any,
|
|
3817
|
-
};
|
|
3818
|
-
}, {});
|
|
3819
|
-
};
|
|
3820
|
-
|
|
3821
|
-
const deserializeAws_restJson1Proposal = (output: any, context: __SerdeContext): Proposal => {
|
|
3822
|
-
return {
|
|
3823
|
-
Actions:
|
|
3824
|
-
output.Actions !== undefined && output.Actions !== null
|
|
3825
|
-
? deserializeAws_restJson1ProposalActions(output.Actions, context)
|
|
3826
|
-
: undefined,
|
|
3827
|
-
Arn: __expectString(output.Arn),
|
|
3828
|
-
CreationDate:
|
|
3829
|
-
output.CreationDate !== undefined && output.CreationDate !== null
|
|
3830
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CreationDate))
|
|
3831
|
-
: undefined,
|
|
3832
|
-
Description: __expectString(output.Description),
|
|
3833
|
-
ExpirationDate:
|
|
3834
|
-
output.ExpirationDate !== undefined && output.ExpirationDate !== null
|
|
3835
|
-
? __expectNonNull(__parseRfc3339DateTime(output.ExpirationDate))
|
|
3836
|
-
: undefined,
|
|
3837
|
-
NetworkId: __expectString(output.NetworkId),
|
|
3838
|
-
NoVoteCount: __expectInt32(output.NoVoteCount),
|
|
3839
|
-
OutstandingVoteCount: __expectInt32(output.OutstandingVoteCount),
|
|
3840
|
-
ProposalId: __expectString(output.ProposalId),
|
|
3841
|
-
ProposedByMemberId: __expectString(output.ProposedByMemberId),
|
|
3842
|
-
ProposedByMemberName: __expectString(output.ProposedByMemberName),
|
|
3843
|
-
Status: __expectString(output.Status),
|
|
3844
|
-
Tags:
|
|
3845
|
-
output.Tags !== undefined && output.Tags !== null
|
|
3846
|
-
? deserializeAws_restJson1OutputTagMap(output.Tags, context)
|
|
3847
|
-
: undefined,
|
|
3848
|
-
YesVoteCount: __expectInt32(output.YesVoteCount),
|
|
3849
|
-
} as any;
|
|
3850
|
-
};
|
|
3851
|
-
|
|
3852
|
-
const deserializeAws_restJson1ProposalActions = (output: any, context: __SerdeContext): ProposalActions => {
|
|
3853
|
-
return {
|
|
3854
|
-
Invitations:
|
|
3855
|
-
output.Invitations !== undefined && output.Invitations !== null
|
|
3856
|
-
? deserializeAws_restJson1InviteActionList(output.Invitations, context)
|
|
3857
|
-
: undefined,
|
|
3858
|
-
Removals:
|
|
3859
|
-
output.Removals !== undefined && output.Removals !== null
|
|
3860
|
-
? deserializeAws_restJson1RemoveActionList(output.Removals, context)
|
|
3861
|
-
: undefined,
|
|
3862
|
-
} as any;
|
|
3863
|
-
};
|
|
3864
|
-
|
|
3865
|
-
const deserializeAws_restJson1ProposalSummary = (output: any, context: __SerdeContext): ProposalSummary => {
|
|
3866
|
-
return {
|
|
3867
|
-
Arn: __expectString(output.Arn),
|
|
3868
|
-
CreationDate:
|
|
3869
|
-
output.CreationDate !== undefined && output.CreationDate !== null
|
|
3870
|
-
? __expectNonNull(__parseRfc3339DateTime(output.CreationDate))
|
|
3871
|
-
: undefined,
|
|
3872
|
-
Description: __expectString(output.Description),
|
|
3873
|
-
ExpirationDate:
|
|
3874
|
-
output.ExpirationDate !== undefined && output.ExpirationDate !== null
|
|
3875
|
-
? __expectNonNull(__parseRfc3339DateTime(output.ExpirationDate))
|
|
3876
|
-
: undefined,
|
|
3877
|
-
ProposalId: __expectString(output.ProposalId),
|
|
3878
|
-
ProposedByMemberId: __expectString(output.ProposedByMemberId),
|
|
3879
|
-
ProposedByMemberName: __expectString(output.ProposedByMemberName),
|
|
3880
|
-
Status: __expectString(output.Status),
|
|
3881
|
-
} as any;
|
|
3882
|
-
};
|
|
3883
|
-
|
|
3884
|
-
const deserializeAws_restJson1ProposalSummaryList = (output: any, context: __SerdeContext): ProposalSummary[] => {
|
|
3885
|
-
return (output || [])
|
|
3886
|
-
.filter((e: any) => e != null)
|
|
3887
|
-
.map((entry: any) => {
|
|
3888
|
-
if (entry === null) {
|
|
3889
|
-
return null as any;
|
|
3890
|
-
}
|
|
3891
|
-
return deserializeAws_restJson1ProposalSummary(entry, context);
|
|
3892
|
-
});
|
|
3893
|
-
};
|
|
3894
|
-
|
|
3895
|
-
const deserializeAws_restJson1ProposalVoteList = (output: any, context: __SerdeContext): VoteSummary[] => {
|
|
3896
|
-
return (output || [])
|
|
3897
|
-
.filter((e: any) => e != null)
|
|
3898
|
-
.map((entry: any) => {
|
|
3899
|
-
if (entry === null) {
|
|
3900
|
-
return null as any;
|
|
3901
|
-
}
|
|
3902
|
-
return deserializeAws_restJson1VoteSummary(entry, context);
|
|
3903
|
-
});
|
|
3904
|
-
};
|
|
3905
|
-
|
|
3906
|
-
const deserializeAws_restJson1RemoveAction = (output: any, context: __SerdeContext): RemoveAction => {
|
|
3907
|
-
return {
|
|
3908
|
-
MemberId: __expectString(output.MemberId),
|
|
3909
|
-
} as any;
|
|
3910
|
-
};
|
|
3911
|
-
|
|
3912
|
-
const deserializeAws_restJson1RemoveActionList = (output: any, context: __SerdeContext): RemoveAction[] => {
|
|
3913
|
-
return (output || [])
|
|
3914
|
-
.filter((e: any) => e != null)
|
|
3915
|
-
.map((entry: any) => {
|
|
3916
|
-
if (entry === null) {
|
|
3917
|
-
return null as any;
|
|
3918
|
-
}
|
|
3919
|
-
return deserializeAws_restJson1RemoveAction(entry, context);
|
|
3920
|
-
});
|
|
3921
|
-
};
|
|
3922
|
-
|
|
3923
|
-
const deserializeAws_restJson1VoteSummary = (output: any, context: __SerdeContext): VoteSummary => {
|
|
3924
|
-
return {
|
|
3925
|
-
MemberId: __expectString(output.MemberId),
|
|
3926
|
-
MemberName: __expectString(output.MemberName),
|
|
3927
|
-
Vote: __expectString(output.Vote),
|
|
3928
|
-
} as any;
|
|
3929
|
-
};
|
|
3930
|
-
|
|
3931
|
-
const deserializeAws_restJson1VotingPolicy = (output: any, context: __SerdeContext): VotingPolicy => {
|
|
3932
|
-
return {
|
|
3933
|
-
ApprovalThresholdPolicy:
|
|
3934
|
-
output.ApprovalThresholdPolicy !== undefined && output.ApprovalThresholdPolicy !== null
|
|
3935
|
-
? deserializeAws_restJson1ApprovalThresholdPolicy(output.ApprovalThresholdPolicy, context)
|
|
3936
|
-
: undefined,
|
|
3937
|
-
} as any;
|
|
3938
|
-
};
|
|
3939
|
-
|
|
3940
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
3941
|
-
httpStatusCode: output.statusCode,
|
|
3942
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
3943
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
3944
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
3945
|
-
});
|
|
3946
|
-
|
|
3947
|
-
// Collect low-level response body stream to Uint8Array.
|
|
3948
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
3949
|
-
if (streamBody instanceof Uint8Array) {
|
|
3950
|
-
return Promise.resolve(streamBody);
|
|
3951
|
-
}
|
|
3952
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
3953
|
-
};
|
|
3954
|
-
|
|
3955
|
-
// Encode Uint8Array data into string with utf-8.
|
|
3956
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
3957
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
3958
|
-
|
|
3959
|
-
const isSerializableHeaderValue = (value: any): boolean =>
|
|
3960
|
-
value !== undefined &&
|
|
3961
|
-
value !== null &&
|
|
3962
|
-
value !== "" &&
|
|
3963
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
3964
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
3965
|
-
|
|
3966
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
3967
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
3968
|
-
if (encoded.length) {
|
|
3969
|
-
return JSON.parse(encoded);
|
|
3970
|
-
}
|
|
3971
|
-
return {};
|
|
3972
|
-
});
|
|
3973
|
-
|
|
3974
|
-
/**
|
|
3975
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
3976
|
-
*/
|
|
3977
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
3978
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
3979
|
-
|
|
3980
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
3981
|
-
let cleanValue = rawValue;
|
|
3982
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
3983
|
-
cleanValue = cleanValue.split(":")[0];
|
|
3984
|
-
}
|
|
3985
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
3986
|
-
cleanValue = cleanValue.split("#")[1];
|
|
3987
|
-
}
|
|
3988
|
-
return cleanValue;
|
|
3989
|
-
};
|
|
3990
|
-
|
|
3991
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
3992
|
-
if (headerKey !== undefined) {
|
|
3993
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
3994
|
-
}
|
|
3995
|
-
|
|
3996
|
-
if (data.code !== undefined) {
|
|
3997
|
-
return sanitizeErrorCode(data.code);
|
|
3998
|
-
}
|
|
3999
|
-
|
|
4000
|
-
if (data["__type"] !== undefined) {
|
|
4001
|
-
return sanitizeErrorCode(data["__type"]);
|
|
4002
|
-
}
|
|
4003
|
-
|
|
4004
|
-
return "";
|
|
4005
|
-
};
|