1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package managedblockchain 4 5import ( 6 "fmt" 7 "time" 8 9 "github.com/aws/aws-sdk-go/aws" 10 "github.com/aws/aws-sdk-go/aws/awsutil" 11 "github.com/aws/aws-sdk-go/aws/request" 12 "github.com/aws/aws-sdk-go/private/protocol" 13 "github.com/aws/aws-sdk-go/private/protocol/restjson" 14) 15 16const opCreateMember = "CreateMember" 17 18// CreateMemberRequest generates a "aws/request.Request" representing the 19// client's request for the CreateMember operation. The "output" return 20// value will be populated with the request's response once the request completes 21// successfully. 22// 23// Use "Send" method on the returned Request to send the API call to the service. 24// the "output" return value is not valid until after Send returns without error. 25// 26// See CreateMember for more information on using the CreateMember 27// API call, and error handling. 28// 29// This method is useful when you want to inject custom logic or configuration 30// into the SDK's request lifecycle. Such as custom headers, or retry logic. 31// 32// 33// // Example sending a request using the CreateMemberRequest method. 34// req, resp := client.CreateMemberRequest(params) 35// 36// err := req.Send() 37// if err == nil { // resp is now filled 38// fmt.Println(resp) 39// } 40// 41// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/CreateMember 42func (c *ManagedBlockchain) CreateMemberRequest(input *CreateMemberInput) (req *request.Request, output *CreateMemberOutput) { 43 op := &request.Operation{ 44 Name: opCreateMember, 45 HTTPMethod: "POST", 46 HTTPPath: "/networks/{networkId}/members", 47 } 48 49 if input == nil { 50 input = &CreateMemberInput{} 51 } 52 53 output = &CreateMemberOutput{} 54 req = c.newRequest(op, input, output) 55 return 56} 57 58// CreateMember API operation for Amazon Managed Blockchain. 59// 60// Creates a member within a Managed Blockchain network. 61// 62// Applies only to Hyperledger Fabric. 63// 64// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 65// with awserr.Error's Code and Message methods to get detailed information about 66// the error. 67// 68// See the AWS API reference guide for Amazon Managed Blockchain's 69// API operation CreateMember for usage and error information. 70// 71// Returned Error Types: 72// * InvalidRequestException 73// The action or operation requested is invalid. Verify that the action is typed 74// correctly. 75// 76// * AccessDeniedException 77// You do not have sufficient access to perform this action. 78// 79// * ResourceNotFoundException 80// A requested resource does not exist on the network. It may have been deleted 81// or referenced inaccurately. 82// 83// * ResourceAlreadyExistsException 84// A resource request is issued for a resource that already exists. 85// 86// * ResourceNotReadyException 87// The requested resource exists but is not in a status that can complete the 88// operation. 89// 90// * ThrottlingException 91// The request or operation could not be performed because a service is throttling 92// requests. The most common source of throttling errors is launching EC2 instances 93// such that your service limit for EC2 instances is exceeded. Request a limit 94// increase or delete unused resources if possible. 95// 96// * ResourceLimitExceededException 97// The maximum number of resources of that type already exist. Ensure the resources 98// requested are within the boundaries of the service edition and your account 99// limits. 100// 101// * InternalServiceErrorException 102// The request processing has failed because of an unknown error, exception 103// or failure. 104// 105// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/CreateMember 106func (c *ManagedBlockchain) CreateMember(input *CreateMemberInput) (*CreateMemberOutput, error) { 107 req, out := c.CreateMemberRequest(input) 108 return out, req.Send() 109} 110 111// CreateMemberWithContext is the same as CreateMember with the addition of 112// the ability to pass a context and additional request options. 113// 114// See CreateMember for details on how to use this API operation. 115// 116// The context must be non-nil and will be used for request cancellation. If 117// the context is nil a panic will occur. In the future the SDK may create 118// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 119// for more information on using Contexts. 120func (c *ManagedBlockchain) CreateMemberWithContext(ctx aws.Context, input *CreateMemberInput, opts ...request.Option) (*CreateMemberOutput, error) { 121 req, out := c.CreateMemberRequest(input) 122 req.SetContext(ctx) 123 req.ApplyOptions(opts...) 124 return out, req.Send() 125} 126 127const opCreateNetwork = "CreateNetwork" 128 129// CreateNetworkRequest generates a "aws/request.Request" representing the 130// client's request for the CreateNetwork operation. The "output" return 131// value will be populated with the request's response once the request completes 132// successfully. 133// 134// Use "Send" method on the returned Request to send the API call to the service. 135// the "output" return value is not valid until after Send returns without error. 136// 137// See CreateNetwork for more information on using the CreateNetwork 138// API call, and error handling. 139// 140// This method is useful when you want to inject custom logic or configuration 141// into the SDK's request lifecycle. Such as custom headers, or retry logic. 142// 143// 144// // Example sending a request using the CreateNetworkRequest method. 145// req, resp := client.CreateNetworkRequest(params) 146// 147// err := req.Send() 148// if err == nil { // resp is now filled 149// fmt.Println(resp) 150// } 151// 152// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/CreateNetwork 153func (c *ManagedBlockchain) CreateNetworkRequest(input *CreateNetworkInput) (req *request.Request, output *CreateNetworkOutput) { 154 op := &request.Operation{ 155 Name: opCreateNetwork, 156 HTTPMethod: "POST", 157 HTTPPath: "/networks", 158 } 159 160 if input == nil { 161 input = &CreateNetworkInput{} 162 } 163 164 output = &CreateNetworkOutput{} 165 req = c.newRequest(op, input, output) 166 return 167} 168 169// CreateNetwork API operation for Amazon Managed Blockchain. 170// 171// Creates a new blockchain network using Amazon Managed Blockchain. 172// 173// Applies only to Hyperledger Fabric. 174// 175// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 176// with awserr.Error's Code and Message methods to get detailed information about 177// the error. 178// 179// See the AWS API reference guide for Amazon Managed Blockchain's 180// API operation CreateNetwork for usage and error information. 181// 182// Returned Error Types: 183// * InvalidRequestException 184// The action or operation requested is invalid. Verify that the action is typed 185// correctly. 186// 187// * AccessDeniedException 188// You do not have sufficient access to perform this action. 189// 190// * ResourceAlreadyExistsException 191// A resource request is issued for a resource that already exists. 192// 193// * ThrottlingException 194// The request or operation could not be performed because a service is throttling 195// requests. The most common source of throttling errors is launching EC2 instances 196// such that your service limit for EC2 instances is exceeded. Request a limit 197// increase or delete unused resources if possible. 198// 199// * ResourceLimitExceededException 200// The maximum number of resources of that type already exist. Ensure the resources 201// requested are within the boundaries of the service edition and your account 202// limits. 203// 204// * InternalServiceErrorException 205// The request processing has failed because of an unknown error, exception 206// or failure. 207// 208// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/CreateNetwork 209func (c *ManagedBlockchain) CreateNetwork(input *CreateNetworkInput) (*CreateNetworkOutput, error) { 210 req, out := c.CreateNetworkRequest(input) 211 return out, req.Send() 212} 213 214// CreateNetworkWithContext is the same as CreateNetwork with the addition of 215// the ability to pass a context and additional request options. 216// 217// See CreateNetwork for details on how to use this API operation. 218// 219// The context must be non-nil and will be used for request cancellation. If 220// the context is nil a panic will occur. In the future the SDK may create 221// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 222// for more information on using Contexts. 223func (c *ManagedBlockchain) CreateNetworkWithContext(ctx aws.Context, input *CreateNetworkInput, opts ...request.Option) (*CreateNetworkOutput, error) { 224 req, out := c.CreateNetworkRequest(input) 225 req.SetContext(ctx) 226 req.ApplyOptions(opts...) 227 return out, req.Send() 228} 229 230const opCreateNode = "CreateNode" 231 232// CreateNodeRequest generates a "aws/request.Request" representing the 233// client's request for the CreateNode operation. The "output" return 234// value will be populated with the request's response once the request completes 235// successfully. 236// 237// Use "Send" method on the returned Request to send the API call to the service. 238// the "output" return value is not valid until after Send returns without error. 239// 240// See CreateNode for more information on using the CreateNode 241// API call, and error handling. 242// 243// This method is useful when you want to inject custom logic or configuration 244// into the SDK's request lifecycle. Such as custom headers, or retry logic. 245// 246// 247// // Example sending a request using the CreateNodeRequest method. 248// req, resp := client.CreateNodeRequest(params) 249// 250// err := req.Send() 251// if err == nil { // resp is now filled 252// fmt.Println(resp) 253// } 254// 255// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/CreateNode 256func (c *ManagedBlockchain) CreateNodeRequest(input *CreateNodeInput) (req *request.Request, output *CreateNodeOutput) { 257 op := &request.Operation{ 258 Name: opCreateNode, 259 HTTPMethod: "POST", 260 HTTPPath: "/networks/{networkId}/nodes", 261 } 262 263 if input == nil { 264 input = &CreateNodeInput{} 265 } 266 267 output = &CreateNodeOutput{} 268 req = c.newRequest(op, input, output) 269 return 270} 271 272// CreateNode API operation for Amazon Managed Blockchain. 273// 274// Creates a node on the specified blockchain network. 275// 276// Applies to Hyperledger Fabric and Ethereum. 277// 278// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 279// with awserr.Error's Code and Message methods to get detailed information about 280// the error. 281// 282// See the AWS API reference guide for Amazon Managed Blockchain's 283// API operation CreateNode for usage and error information. 284// 285// Returned Error Types: 286// * InvalidRequestException 287// The action or operation requested is invalid. Verify that the action is typed 288// correctly. 289// 290// * AccessDeniedException 291// You do not have sufficient access to perform this action. 292// 293// * ResourceNotFoundException 294// A requested resource does not exist on the network. It may have been deleted 295// or referenced inaccurately. 296// 297// * ResourceAlreadyExistsException 298// A resource request is issued for a resource that already exists. 299// 300// * ResourceNotReadyException 301// The requested resource exists but is not in a status that can complete the 302// operation. 303// 304// * ThrottlingException 305// The request or operation could not be performed because a service is throttling 306// requests. The most common source of throttling errors is launching EC2 instances 307// such that your service limit for EC2 instances is exceeded. Request a limit 308// increase or delete unused resources if possible. 309// 310// * ResourceLimitExceededException 311// The maximum number of resources of that type already exist. Ensure the resources 312// requested are within the boundaries of the service edition and your account 313// limits. 314// 315// * InternalServiceErrorException 316// The request processing has failed because of an unknown error, exception 317// or failure. 318// 319// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/CreateNode 320func (c *ManagedBlockchain) CreateNode(input *CreateNodeInput) (*CreateNodeOutput, error) { 321 req, out := c.CreateNodeRequest(input) 322 return out, req.Send() 323} 324 325// CreateNodeWithContext is the same as CreateNode with the addition of 326// the ability to pass a context and additional request options. 327// 328// See CreateNode for details on how to use this API operation. 329// 330// The context must be non-nil and will be used for request cancellation. If 331// the context is nil a panic will occur. In the future the SDK may create 332// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 333// for more information on using Contexts. 334func (c *ManagedBlockchain) CreateNodeWithContext(ctx aws.Context, input *CreateNodeInput, opts ...request.Option) (*CreateNodeOutput, error) { 335 req, out := c.CreateNodeRequest(input) 336 req.SetContext(ctx) 337 req.ApplyOptions(opts...) 338 return out, req.Send() 339} 340 341const opCreateProposal = "CreateProposal" 342 343// CreateProposalRequest generates a "aws/request.Request" representing the 344// client's request for the CreateProposal operation. The "output" return 345// value will be populated with the request's response once the request completes 346// successfully. 347// 348// Use "Send" method on the returned Request to send the API call to the service. 349// the "output" return value is not valid until after Send returns without error. 350// 351// See CreateProposal for more information on using the CreateProposal 352// API call, and error handling. 353// 354// This method is useful when you want to inject custom logic or configuration 355// into the SDK's request lifecycle. Such as custom headers, or retry logic. 356// 357// 358// // Example sending a request using the CreateProposalRequest method. 359// req, resp := client.CreateProposalRequest(params) 360// 361// err := req.Send() 362// if err == nil { // resp is now filled 363// fmt.Println(resp) 364// } 365// 366// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/CreateProposal 367func (c *ManagedBlockchain) CreateProposalRequest(input *CreateProposalInput) (req *request.Request, output *CreateProposalOutput) { 368 op := &request.Operation{ 369 Name: opCreateProposal, 370 HTTPMethod: "POST", 371 HTTPPath: "/networks/{networkId}/proposals", 372 } 373 374 if input == nil { 375 input = &CreateProposalInput{} 376 } 377 378 output = &CreateProposalOutput{} 379 req = c.newRequest(op, input, output) 380 return 381} 382 383// CreateProposal API operation for Amazon Managed Blockchain. 384// 385// Creates a proposal for a change to the network that other members of the 386// network can vote on, for example, a proposal to add a new member to the network. 387// Any member can create a proposal. 388// 389// Applies only to Hyperledger Fabric. 390// 391// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 392// with awserr.Error's Code and Message methods to get detailed information about 393// the error. 394// 395// See the AWS API reference guide for Amazon Managed Blockchain's 396// API operation CreateProposal for usage and error information. 397// 398// Returned Error Types: 399// * InvalidRequestException 400// The action or operation requested is invalid. Verify that the action is typed 401// correctly. 402// 403// * AccessDeniedException 404// You do not have sufficient access to perform this action. 405// 406// * ResourceNotFoundException 407// A requested resource does not exist on the network. It may have been deleted 408// or referenced inaccurately. 409// 410// * ResourceNotReadyException 411// The requested resource exists but is not in a status that can complete the 412// operation. 413// 414// * ThrottlingException 415// The request or operation could not be performed because a service is throttling 416// requests. The most common source of throttling errors is launching EC2 instances 417// such that your service limit for EC2 instances is exceeded. Request a limit 418// increase or delete unused resources if possible. 419// 420// * InternalServiceErrorException 421// The request processing has failed because of an unknown error, exception 422// or failure. 423// 424// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/CreateProposal 425func (c *ManagedBlockchain) CreateProposal(input *CreateProposalInput) (*CreateProposalOutput, error) { 426 req, out := c.CreateProposalRequest(input) 427 return out, req.Send() 428} 429 430// CreateProposalWithContext is the same as CreateProposal with the addition of 431// the ability to pass a context and additional request options. 432// 433// See CreateProposal for details on how to use this API operation. 434// 435// The context must be non-nil and will be used for request cancellation. If 436// the context is nil a panic will occur. In the future the SDK may create 437// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 438// for more information on using Contexts. 439func (c *ManagedBlockchain) CreateProposalWithContext(ctx aws.Context, input *CreateProposalInput, opts ...request.Option) (*CreateProposalOutput, error) { 440 req, out := c.CreateProposalRequest(input) 441 req.SetContext(ctx) 442 req.ApplyOptions(opts...) 443 return out, req.Send() 444} 445 446const opDeleteMember = "DeleteMember" 447 448// DeleteMemberRequest generates a "aws/request.Request" representing the 449// client's request for the DeleteMember operation. The "output" return 450// value will be populated with the request's response once the request completes 451// successfully. 452// 453// Use "Send" method on the returned Request to send the API call to the service. 454// the "output" return value is not valid until after Send returns without error. 455// 456// See DeleteMember for more information on using the DeleteMember 457// API call, and error handling. 458// 459// This method is useful when you want to inject custom logic or configuration 460// into the SDK's request lifecycle. Such as custom headers, or retry logic. 461// 462// 463// // Example sending a request using the DeleteMemberRequest method. 464// req, resp := client.DeleteMemberRequest(params) 465// 466// err := req.Send() 467// if err == nil { // resp is now filled 468// fmt.Println(resp) 469// } 470// 471// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/DeleteMember 472func (c *ManagedBlockchain) DeleteMemberRequest(input *DeleteMemberInput) (req *request.Request, output *DeleteMemberOutput) { 473 op := &request.Operation{ 474 Name: opDeleteMember, 475 HTTPMethod: "DELETE", 476 HTTPPath: "/networks/{networkId}/members/{memberId}", 477 } 478 479 if input == nil { 480 input = &DeleteMemberInput{} 481 } 482 483 output = &DeleteMemberOutput{} 484 req = c.newRequest(op, input, output) 485 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 486 return 487} 488 489// DeleteMember API operation for Amazon Managed Blockchain. 490// 491// Deletes a member. Deleting a member removes the member and all associated 492// resources from the network. DeleteMember can only be called for a specified 493// MemberId if the principal performing the action is associated with the AWS 494// account that owns the member. In all other cases, the DeleteMember action 495// is carried out as the result of an approved proposal to remove a member. 496// If MemberId is the last member in a network specified by the last AWS account, 497// the network is deleted also. 498// 499// Applies only to Hyperledger Fabric. 500// 501// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 502// with awserr.Error's Code and Message methods to get detailed information about 503// the error. 504// 505// See the AWS API reference guide for Amazon Managed Blockchain's 506// API operation DeleteMember for usage and error information. 507// 508// Returned Error Types: 509// * InvalidRequestException 510// The action or operation requested is invalid. Verify that the action is typed 511// correctly. 512// 513// * AccessDeniedException 514// You do not have sufficient access to perform this action. 515// 516// * ResourceNotFoundException 517// A requested resource does not exist on the network. It may have been deleted 518// or referenced inaccurately. 519// 520// * ResourceNotReadyException 521// The requested resource exists but is not in a status that can complete the 522// operation. 523// 524// * ThrottlingException 525// The request or operation could not be performed because a service is throttling 526// requests. The most common source of throttling errors is launching EC2 instances 527// such that your service limit for EC2 instances is exceeded. Request a limit 528// increase or delete unused resources if possible. 529// 530// * InternalServiceErrorException 531// The request processing has failed because of an unknown error, exception 532// or failure. 533// 534// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/DeleteMember 535func (c *ManagedBlockchain) DeleteMember(input *DeleteMemberInput) (*DeleteMemberOutput, error) { 536 req, out := c.DeleteMemberRequest(input) 537 return out, req.Send() 538} 539 540// DeleteMemberWithContext is the same as DeleteMember with the addition of 541// the ability to pass a context and additional request options. 542// 543// See DeleteMember for details on how to use this API operation. 544// 545// The context must be non-nil and will be used for request cancellation. If 546// the context is nil a panic will occur. In the future the SDK may create 547// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 548// for more information on using Contexts. 549func (c *ManagedBlockchain) DeleteMemberWithContext(ctx aws.Context, input *DeleteMemberInput, opts ...request.Option) (*DeleteMemberOutput, error) { 550 req, out := c.DeleteMemberRequest(input) 551 req.SetContext(ctx) 552 req.ApplyOptions(opts...) 553 return out, req.Send() 554} 555 556const opDeleteNode = "DeleteNode" 557 558// DeleteNodeRequest generates a "aws/request.Request" representing the 559// client's request for the DeleteNode operation. The "output" return 560// value will be populated with the request's response once the request completes 561// successfully. 562// 563// Use "Send" method on the returned Request to send the API call to the service. 564// the "output" return value is not valid until after Send returns without error. 565// 566// See DeleteNode for more information on using the DeleteNode 567// API call, and error handling. 568// 569// This method is useful when you want to inject custom logic or configuration 570// into the SDK's request lifecycle. Such as custom headers, or retry logic. 571// 572// 573// // Example sending a request using the DeleteNodeRequest method. 574// req, resp := client.DeleteNodeRequest(params) 575// 576// err := req.Send() 577// if err == nil { // resp is now filled 578// fmt.Println(resp) 579// } 580// 581// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/DeleteNode 582func (c *ManagedBlockchain) DeleteNodeRequest(input *DeleteNodeInput) (req *request.Request, output *DeleteNodeOutput) { 583 op := &request.Operation{ 584 Name: opDeleteNode, 585 HTTPMethod: "DELETE", 586 HTTPPath: "/networks/{networkId}/nodes/{nodeId}", 587 } 588 589 if input == nil { 590 input = &DeleteNodeInput{} 591 } 592 593 output = &DeleteNodeOutput{} 594 req = c.newRequest(op, input, output) 595 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 596 return 597} 598 599// DeleteNode API operation for Amazon Managed Blockchain. 600// 601// Deletes a node that your AWS account owns. All data on the node is lost and 602// cannot be recovered. 603// 604// Applies to Hyperledger Fabric and Ethereum. 605// 606// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 607// with awserr.Error's Code and Message methods to get detailed information about 608// the error. 609// 610// See the AWS API reference guide for Amazon Managed Blockchain's 611// API operation DeleteNode for usage and error information. 612// 613// Returned Error Types: 614// * InvalidRequestException 615// The action or operation requested is invalid. Verify that the action is typed 616// correctly. 617// 618// * AccessDeniedException 619// You do not have sufficient access to perform this action. 620// 621// * ResourceNotFoundException 622// A requested resource does not exist on the network. It may have been deleted 623// or referenced inaccurately. 624// 625// * ResourceNotReadyException 626// The requested resource exists but is not in a status that can complete the 627// operation. 628// 629// * ThrottlingException 630// The request or operation could not be performed because a service is throttling 631// requests. The most common source of throttling errors is launching EC2 instances 632// such that your service limit for EC2 instances is exceeded. Request a limit 633// increase or delete unused resources if possible. 634// 635// * InternalServiceErrorException 636// The request processing has failed because of an unknown error, exception 637// or failure. 638// 639// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/DeleteNode 640func (c *ManagedBlockchain) DeleteNode(input *DeleteNodeInput) (*DeleteNodeOutput, error) { 641 req, out := c.DeleteNodeRequest(input) 642 return out, req.Send() 643} 644 645// DeleteNodeWithContext is the same as DeleteNode with the addition of 646// the ability to pass a context and additional request options. 647// 648// See DeleteNode for details on how to use this API operation. 649// 650// The context must be non-nil and will be used for request cancellation. If 651// the context is nil a panic will occur. In the future the SDK may create 652// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 653// for more information on using Contexts. 654func (c *ManagedBlockchain) DeleteNodeWithContext(ctx aws.Context, input *DeleteNodeInput, opts ...request.Option) (*DeleteNodeOutput, error) { 655 req, out := c.DeleteNodeRequest(input) 656 req.SetContext(ctx) 657 req.ApplyOptions(opts...) 658 return out, req.Send() 659} 660 661const opGetMember = "GetMember" 662 663// GetMemberRequest generates a "aws/request.Request" representing the 664// client's request for the GetMember operation. The "output" return 665// value will be populated with the request's response once the request completes 666// successfully. 667// 668// Use "Send" method on the returned Request to send the API call to the service. 669// the "output" return value is not valid until after Send returns without error. 670// 671// See GetMember for more information on using the GetMember 672// API call, and error handling. 673// 674// This method is useful when you want to inject custom logic or configuration 675// into the SDK's request lifecycle. Such as custom headers, or retry logic. 676// 677// 678// // Example sending a request using the GetMemberRequest method. 679// req, resp := client.GetMemberRequest(params) 680// 681// err := req.Send() 682// if err == nil { // resp is now filled 683// fmt.Println(resp) 684// } 685// 686// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/GetMember 687func (c *ManagedBlockchain) GetMemberRequest(input *GetMemberInput) (req *request.Request, output *GetMemberOutput) { 688 op := &request.Operation{ 689 Name: opGetMember, 690 HTTPMethod: "GET", 691 HTTPPath: "/networks/{networkId}/members/{memberId}", 692 } 693 694 if input == nil { 695 input = &GetMemberInput{} 696 } 697 698 output = &GetMemberOutput{} 699 req = c.newRequest(op, input, output) 700 return 701} 702 703// GetMember API operation for Amazon Managed Blockchain. 704// 705// Returns detailed information about a member. 706// 707// Applies only to Hyperledger Fabric. 708// 709// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 710// with awserr.Error's Code and Message methods to get detailed information about 711// the error. 712// 713// See the AWS API reference guide for Amazon Managed Blockchain's 714// API operation GetMember for usage and error information. 715// 716// Returned Error Types: 717// * InvalidRequestException 718// The action or operation requested is invalid. Verify that the action is typed 719// correctly. 720// 721// * AccessDeniedException 722// You do not have sufficient access to perform this action. 723// 724// * ResourceNotFoundException 725// A requested resource does not exist on the network. It may have been deleted 726// or referenced inaccurately. 727// 728// * ThrottlingException 729// The request or operation could not be performed because a service is throttling 730// requests. The most common source of throttling errors is launching EC2 instances 731// such that your service limit for EC2 instances is exceeded. Request a limit 732// increase or delete unused resources if possible. 733// 734// * InternalServiceErrorException 735// The request processing has failed because of an unknown error, exception 736// or failure. 737// 738// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/GetMember 739func (c *ManagedBlockchain) GetMember(input *GetMemberInput) (*GetMemberOutput, error) { 740 req, out := c.GetMemberRequest(input) 741 return out, req.Send() 742} 743 744// GetMemberWithContext is the same as GetMember with the addition of 745// the ability to pass a context and additional request options. 746// 747// See GetMember for details on how to use this API operation. 748// 749// The context must be non-nil and will be used for request cancellation. If 750// the context is nil a panic will occur. In the future the SDK may create 751// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 752// for more information on using Contexts. 753func (c *ManagedBlockchain) GetMemberWithContext(ctx aws.Context, input *GetMemberInput, opts ...request.Option) (*GetMemberOutput, error) { 754 req, out := c.GetMemberRequest(input) 755 req.SetContext(ctx) 756 req.ApplyOptions(opts...) 757 return out, req.Send() 758} 759 760const opGetNetwork = "GetNetwork" 761 762// GetNetworkRequest generates a "aws/request.Request" representing the 763// client's request for the GetNetwork operation. The "output" return 764// value will be populated with the request's response once the request completes 765// successfully. 766// 767// Use "Send" method on the returned Request to send the API call to the service. 768// the "output" return value is not valid until after Send returns without error. 769// 770// See GetNetwork for more information on using the GetNetwork 771// API call, and error handling. 772// 773// This method is useful when you want to inject custom logic or configuration 774// into the SDK's request lifecycle. Such as custom headers, or retry logic. 775// 776// 777// // Example sending a request using the GetNetworkRequest method. 778// req, resp := client.GetNetworkRequest(params) 779// 780// err := req.Send() 781// if err == nil { // resp is now filled 782// fmt.Println(resp) 783// } 784// 785// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/GetNetwork 786func (c *ManagedBlockchain) GetNetworkRequest(input *GetNetworkInput) (req *request.Request, output *GetNetworkOutput) { 787 op := &request.Operation{ 788 Name: opGetNetwork, 789 HTTPMethod: "GET", 790 HTTPPath: "/networks/{networkId}", 791 } 792 793 if input == nil { 794 input = &GetNetworkInput{} 795 } 796 797 output = &GetNetworkOutput{} 798 req = c.newRequest(op, input, output) 799 return 800} 801 802// GetNetwork API operation for Amazon Managed Blockchain. 803// 804// Returns detailed information about a network. 805// 806// Applies to Hyperledger Fabric and Ethereum. 807// 808// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 809// with awserr.Error's Code and Message methods to get detailed information about 810// the error. 811// 812// See the AWS API reference guide for Amazon Managed Blockchain's 813// API operation GetNetwork for usage and error information. 814// 815// Returned Error Types: 816// * InvalidRequestException 817// The action or operation requested is invalid. Verify that the action is typed 818// correctly. 819// 820// * AccessDeniedException 821// You do not have sufficient access to perform this action. 822// 823// * ResourceNotFoundException 824// A requested resource does not exist on the network. It may have been deleted 825// or referenced inaccurately. 826// 827// * ThrottlingException 828// The request or operation could not be performed because a service is throttling 829// requests. The most common source of throttling errors is launching EC2 instances 830// such that your service limit for EC2 instances is exceeded. Request a limit 831// increase or delete unused resources if possible. 832// 833// * InternalServiceErrorException 834// The request processing has failed because of an unknown error, exception 835// or failure. 836// 837// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/GetNetwork 838func (c *ManagedBlockchain) GetNetwork(input *GetNetworkInput) (*GetNetworkOutput, error) { 839 req, out := c.GetNetworkRequest(input) 840 return out, req.Send() 841} 842 843// GetNetworkWithContext is the same as GetNetwork with the addition of 844// the ability to pass a context and additional request options. 845// 846// See GetNetwork for details on how to use this API operation. 847// 848// The context must be non-nil and will be used for request cancellation. If 849// the context is nil a panic will occur. In the future the SDK may create 850// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 851// for more information on using Contexts. 852func (c *ManagedBlockchain) GetNetworkWithContext(ctx aws.Context, input *GetNetworkInput, opts ...request.Option) (*GetNetworkOutput, error) { 853 req, out := c.GetNetworkRequest(input) 854 req.SetContext(ctx) 855 req.ApplyOptions(opts...) 856 return out, req.Send() 857} 858 859const opGetNode = "GetNode" 860 861// GetNodeRequest generates a "aws/request.Request" representing the 862// client's request for the GetNode operation. The "output" return 863// value will be populated with the request's response once the request completes 864// successfully. 865// 866// Use "Send" method on the returned Request to send the API call to the service. 867// the "output" return value is not valid until after Send returns without error. 868// 869// See GetNode for more information on using the GetNode 870// API call, and error handling. 871// 872// This method is useful when you want to inject custom logic or configuration 873// into the SDK's request lifecycle. Such as custom headers, or retry logic. 874// 875// 876// // Example sending a request using the GetNodeRequest method. 877// req, resp := client.GetNodeRequest(params) 878// 879// err := req.Send() 880// if err == nil { // resp is now filled 881// fmt.Println(resp) 882// } 883// 884// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/GetNode 885func (c *ManagedBlockchain) GetNodeRequest(input *GetNodeInput) (req *request.Request, output *GetNodeOutput) { 886 op := &request.Operation{ 887 Name: opGetNode, 888 HTTPMethod: "GET", 889 HTTPPath: "/networks/{networkId}/nodes/{nodeId}", 890 } 891 892 if input == nil { 893 input = &GetNodeInput{} 894 } 895 896 output = &GetNodeOutput{} 897 req = c.newRequest(op, input, output) 898 return 899} 900 901// GetNode API operation for Amazon Managed Blockchain. 902// 903// Returns detailed information about a node. 904// 905// Applies to Hyperledger Fabric and Ethereum. 906// 907// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 908// with awserr.Error's Code and Message methods to get detailed information about 909// the error. 910// 911// See the AWS API reference guide for Amazon Managed Blockchain's 912// API operation GetNode for usage and error information. 913// 914// Returned Error Types: 915// * InvalidRequestException 916// The action or operation requested is invalid. Verify that the action is typed 917// correctly. 918// 919// * AccessDeniedException 920// You do not have sufficient access to perform this action. 921// 922// * ResourceNotFoundException 923// A requested resource does not exist on the network. It may have been deleted 924// or referenced inaccurately. 925// 926// * ThrottlingException 927// The request or operation could not be performed because a service is throttling 928// requests. The most common source of throttling errors is launching EC2 instances 929// such that your service limit for EC2 instances is exceeded. Request a limit 930// increase or delete unused resources if possible. 931// 932// * InternalServiceErrorException 933// The request processing has failed because of an unknown error, exception 934// or failure. 935// 936// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/GetNode 937func (c *ManagedBlockchain) GetNode(input *GetNodeInput) (*GetNodeOutput, error) { 938 req, out := c.GetNodeRequest(input) 939 return out, req.Send() 940} 941 942// GetNodeWithContext is the same as GetNode with the addition of 943// the ability to pass a context and additional request options. 944// 945// See GetNode for details on how to use this API operation. 946// 947// The context must be non-nil and will be used for request cancellation. If 948// the context is nil a panic will occur. In the future the SDK may create 949// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 950// for more information on using Contexts. 951func (c *ManagedBlockchain) GetNodeWithContext(ctx aws.Context, input *GetNodeInput, opts ...request.Option) (*GetNodeOutput, error) { 952 req, out := c.GetNodeRequest(input) 953 req.SetContext(ctx) 954 req.ApplyOptions(opts...) 955 return out, req.Send() 956} 957 958const opGetProposal = "GetProposal" 959 960// GetProposalRequest generates a "aws/request.Request" representing the 961// client's request for the GetProposal operation. The "output" return 962// value will be populated with the request's response once the request completes 963// successfully. 964// 965// Use "Send" method on the returned Request to send the API call to the service. 966// the "output" return value is not valid until after Send returns without error. 967// 968// See GetProposal for more information on using the GetProposal 969// API call, and error handling. 970// 971// This method is useful when you want to inject custom logic or configuration 972// into the SDK's request lifecycle. Such as custom headers, or retry logic. 973// 974// 975// // Example sending a request using the GetProposalRequest method. 976// req, resp := client.GetProposalRequest(params) 977// 978// err := req.Send() 979// if err == nil { // resp is now filled 980// fmt.Println(resp) 981// } 982// 983// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/GetProposal 984func (c *ManagedBlockchain) GetProposalRequest(input *GetProposalInput) (req *request.Request, output *GetProposalOutput) { 985 op := &request.Operation{ 986 Name: opGetProposal, 987 HTTPMethod: "GET", 988 HTTPPath: "/networks/{networkId}/proposals/{proposalId}", 989 } 990 991 if input == nil { 992 input = &GetProposalInput{} 993 } 994 995 output = &GetProposalOutput{} 996 req = c.newRequest(op, input, output) 997 return 998} 999 1000// GetProposal API operation for Amazon Managed Blockchain. 1001// 1002// Returns detailed information about a proposal. 1003// 1004// Applies only to Hyperledger Fabric. 1005// 1006// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1007// with awserr.Error's Code and Message methods to get detailed information about 1008// the error. 1009// 1010// See the AWS API reference guide for Amazon Managed Blockchain's 1011// API operation GetProposal for usage and error information. 1012// 1013// Returned Error Types: 1014// * InvalidRequestException 1015// The action or operation requested is invalid. Verify that the action is typed 1016// correctly. 1017// 1018// * AccessDeniedException 1019// You do not have sufficient access to perform this action. 1020// 1021// * ResourceNotFoundException 1022// A requested resource does not exist on the network. It may have been deleted 1023// or referenced inaccurately. 1024// 1025// * ThrottlingException 1026// The request or operation could not be performed because a service is throttling 1027// requests. The most common source of throttling errors is launching EC2 instances 1028// such that your service limit for EC2 instances is exceeded. Request a limit 1029// increase or delete unused resources if possible. 1030// 1031// * InternalServiceErrorException 1032// The request processing has failed because of an unknown error, exception 1033// or failure. 1034// 1035// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/GetProposal 1036func (c *ManagedBlockchain) GetProposal(input *GetProposalInput) (*GetProposalOutput, error) { 1037 req, out := c.GetProposalRequest(input) 1038 return out, req.Send() 1039} 1040 1041// GetProposalWithContext is the same as GetProposal with the addition of 1042// the ability to pass a context and additional request options. 1043// 1044// See GetProposal for details on how to use this API operation. 1045// 1046// The context must be non-nil and will be used for request cancellation. If 1047// the context is nil a panic will occur. In the future the SDK may create 1048// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1049// for more information on using Contexts. 1050func (c *ManagedBlockchain) GetProposalWithContext(ctx aws.Context, input *GetProposalInput, opts ...request.Option) (*GetProposalOutput, error) { 1051 req, out := c.GetProposalRequest(input) 1052 req.SetContext(ctx) 1053 req.ApplyOptions(opts...) 1054 return out, req.Send() 1055} 1056 1057const opListInvitations = "ListInvitations" 1058 1059// ListInvitationsRequest generates a "aws/request.Request" representing the 1060// client's request for the ListInvitations operation. The "output" return 1061// value will be populated with the request's response once the request completes 1062// successfully. 1063// 1064// Use "Send" method on the returned Request to send the API call to the service. 1065// the "output" return value is not valid until after Send returns without error. 1066// 1067// See ListInvitations for more information on using the ListInvitations 1068// API call, and error handling. 1069// 1070// This method is useful when you want to inject custom logic or configuration 1071// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1072// 1073// 1074// // Example sending a request using the ListInvitationsRequest method. 1075// req, resp := client.ListInvitationsRequest(params) 1076// 1077// err := req.Send() 1078// if err == nil { // resp is now filled 1079// fmt.Println(resp) 1080// } 1081// 1082// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListInvitations 1083func (c *ManagedBlockchain) ListInvitationsRequest(input *ListInvitationsInput) (req *request.Request, output *ListInvitationsOutput) { 1084 op := &request.Operation{ 1085 Name: opListInvitations, 1086 HTTPMethod: "GET", 1087 HTTPPath: "/invitations", 1088 Paginator: &request.Paginator{ 1089 InputTokens: []string{"NextToken"}, 1090 OutputTokens: []string{"NextToken"}, 1091 LimitToken: "MaxResults", 1092 TruncationToken: "", 1093 }, 1094 } 1095 1096 if input == nil { 1097 input = &ListInvitationsInput{} 1098 } 1099 1100 output = &ListInvitationsOutput{} 1101 req = c.newRequest(op, input, output) 1102 return 1103} 1104 1105// ListInvitations API operation for Amazon Managed Blockchain. 1106// 1107// Returns a list of all invitations for the current AWS account. 1108// 1109// Applies only to Hyperledger Fabric. 1110// 1111// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1112// with awserr.Error's Code and Message methods to get detailed information about 1113// the error. 1114// 1115// See the AWS API reference guide for Amazon Managed Blockchain's 1116// API operation ListInvitations for usage and error information. 1117// 1118// Returned Error Types: 1119// * InvalidRequestException 1120// The action or operation requested is invalid. Verify that the action is typed 1121// correctly. 1122// 1123// * AccessDeniedException 1124// You do not have sufficient access to perform this action. 1125// 1126// * ResourceNotFoundException 1127// A requested resource does not exist on the network. It may have been deleted 1128// or referenced inaccurately. 1129// 1130// * ThrottlingException 1131// The request or operation could not be performed because a service is throttling 1132// requests. The most common source of throttling errors is launching EC2 instances 1133// such that your service limit for EC2 instances is exceeded. Request a limit 1134// increase or delete unused resources if possible. 1135// 1136// * ResourceLimitExceededException 1137// The maximum number of resources of that type already exist. Ensure the resources 1138// requested are within the boundaries of the service edition and your account 1139// limits. 1140// 1141// * InternalServiceErrorException 1142// The request processing has failed because of an unknown error, exception 1143// or failure. 1144// 1145// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListInvitations 1146func (c *ManagedBlockchain) ListInvitations(input *ListInvitationsInput) (*ListInvitationsOutput, error) { 1147 req, out := c.ListInvitationsRequest(input) 1148 return out, req.Send() 1149} 1150 1151// ListInvitationsWithContext is the same as ListInvitations with the addition of 1152// the ability to pass a context and additional request options. 1153// 1154// See ListInvitations for details on how to use this API operation. 1155// 1156// The context must be non-nil and will be used for request cancellation. If 1157// the context is nil a panic will occur. In the future the SDK may create 1158// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1159// for more information on using Contexts. 1160func (c *ManagedBlockchain) ListInvitationsWithContext(ctx aws.Context, input *ListInvitationsInput, opts ...request.Option) (*ListInvitationsOutput, error) { 1161 req, out := c.ListInvitationsRequest(input) 1162 req.SetContext(ctx) 1163 req.ApplyOptions(opts...) 1164 return out, req.Send() 1165} 1166 1167// ListInvitationsPages iterates over the pages of a ListInvitations operation, 1168// calling the "fn" function with the response data for each page. To stop 1169// iterating, return false from the fn function. 1170// 1171// See ListInvitations method for more information on how to use this operation. 1172// 1173// Note: This operation can generate multiple requests to a service. 1174// 1175// // Example iterating over at most 3 pages of a ListInvitations operation. 1176// pageNum := 0 1177// err := client.ListInvitationsPages(params, 1178// func(page *managedblockchain.ListInvitationsOutput, lastPage bool) bool { 1179// pageNum++ 1180// fmt.Println(page) 1181// return pageNum <= 3 1182// }) 1183// 1184func (c *ManagedBlockchain) ListInvitationsPages(input *ListInvitationsInput, fn func(*ListInvitationsOutput, bool) bool) error { 1185 return c.ListInvitationsPagesWithContext(aws.BackgroundContext(), input, fn) 1186} 1187 1188// ListInvitationsPagesWithContext same as ListInvitationsPages except 1189// it takes a Context and allows setting request options on the pages. 1190// 1191// The context must be non-nil and will be used for request cancellation. If 1192// the context is nil a panic will occur. In the future the SDK may create 1193// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1194// for more information on using Contexts. 1195func (c *ManagedBlockchain) ListInvitationsPagesWithContext(ctx aws.Context, input *ListInvitationsInput, fn func(*ListInvitationsOutput, bool) bool, opts ...request.Option) error { 1196 p := request.Pagination{ 1197 NewRequest: func() (*request.Request, error) { 1198 var inCpy *ListInvitationsInput 1199 if input != nil { 1200 tmp := *input 1201 inCpy = &tmp 1202 } 1203 req, _ := c.ListInvitationsRequest(inCpy) 1204 req.SetContext(ctx) 1205 req.ApplyOptions(opts...) 1206 return req, nil 1207 }, 1208 } 1209 1210 for p.Next() { 1211 if !fn(p.Page().(*ListInvitationsOutput), !p.HasNextPage()) { 1212 break 1213 } 1214 } 1215 1216 return p.Err() 1217} 1218 1219const opListMembers = "ListMembers" 1220 1221// ListMembersRequest generates a "aws/request.Request" representing the 1222// client's request for the ListMembers operation. The "output" return 1223// value will be populated with the request's response once the request completes 1224// successfully. 1225// 1226// Use "Send" method on the returned Request to send the API call to the service. 1227// the "output" return value is not valid until after Send returns without error. 1228// 1229// See ListMembers for more information on using the ListMembers 1230// API call, and error handling. 1231// 1232// This method is useful when you want to inject custom logic or configuration 1233// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1234// 1235// 1236// // Example sending a request using the ListMembersRequest method. 1237// req, resp := client.ListMembersRequest(params) 1238// 1239// err := req.Send() 1240// if err == nil { // resp is now filled 1241// fmt.Println(resp) 1242// } 1243// 1244// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListMembers 1245func (c *ManagedBlockchain) ListMembersRequest(input *ListMembersInput) (req *request.Request, output *ListMembersOutput) { 1246 op := &request.Operation{ 1247 Name: opListMembers, 1248 HTTPMethod: "GET", 1249 HTTPPath: "/networks/{networkId}/members", 1250 Paginator: &request.Paginator{ 1251 InputTokens: []string{"NextToken"}, 1252 OutputTokens: []string{"NextToken"}, 1253 LimitToken: "MaxResults", 1254 TruncationToken: "", 1255 }, 1256 } 1257 1258 if input == nil { 1259 input = &ListMembersInput{} 1260 } 1261 1262 output = &ListMembersOutput{} 1263 req = c.newRequest(op, input, output) 1264 return 1265} 1266 1267// ListMembers API operation for Amazon Managed Blockchain. 1268// 1269// Returns a list of the members in a network and properties of their configurations. 1270// 1271// Applies only to Hyperledger Fabric. 1272// 1273// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1274// with awserr.Error's Code and Message methods to get detailed information about 1275// the error. 1276// 1277// See the AWS API reference guide for Amazon Managed Blockchain's 1278// API operation ListMembers for usage and error information. 1279// 1280// Returned Error Types: 1281// * InvalidRequestException 1282// The action or operation requested is invalid. Verify that the action is typed 1283// correctly. 1284// 1285// * AccessDeniedException 1286// You do not have sufficient access to perform this action. 1287// 1288// * ThrottlingException 1289// The request or operation could not be performed because a service is throttling 1290// requests. The most common source of throttling errors is launching EC2 instances 1291// such that your service limit for EC2 instances is exceeded. Request a limit 1292// increase or delete unused resources if possible. 1293// 1294// * InternalServiceErrorException 1295// The request processing has failed because of an unknown error, exception 1296// or failure. 1297// 1298// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListMembers 1299func (c *ManagedBlockchain) ListMembers(input *ListMembersInput) (*ListMembersOutput, error) { 1300 req, out := c.ListMembersRequest(input) 1301 return out, req.Send() 1302} 1303 1304// ListMembersWithContext is the same as ListMembers with the addition of 1305// the ability to pass a context and additional request options. 1306// 1307// See ListMembers for details on how to use this API operation. 1308// 1309// The context must be non-nil and will be used for request cancellation. If 1310// the context is nil a panic will occur. In the future the SDK may create 1311// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1312// for more information on using Contexts. 1313func (c *ManagedBlockchain) ListMembersWithContext(ctx aws.Context, input *ListMembersInput, opts ...request.Option) (*ListMembersOutput, error) { 1314 req, out := c.ListMembersRequest(input) 1315 req.SetContext(ctx) 1316 req.ApplyOptions(opts...) 1317 return out, req.Send() 1318} 1319 1320// ListMembersPages iterates over the pages of a ListMembers operation, 1321// calling the "fn" function with the response data for each page. To stop 1322// iterating, return false from the fn function. 1323// 1324// See ListMembers method for more information on how to use this operation. 1325// 1326// Note: This operation can generate multiple requests to a service. 1327// 1328// // Example iterating over at most 3 pages of a ListMembers operation. 1329// pageNum := 0 1330// err := client.ListMembersPages(params, 1331// func(page *managedblockchain.ListMembersOutput, lastPage bool) bool { 1332// pageNum++ 1333// fmt.Println(page) 1334// return pageNum <= 3 1335// }) 1336// 1337func (c *ManagedBlockchain) ListMembersPages(input *ListMembersInput, fn func(*ListMembersOutput, bool) bool) error { 1338 return c.ListMembersPagesWithContext(aws.BackgroundContext(), input, fn) 1339} 1340 1341// ListMembersPagesWithContext same as ListMembersPages except 1342// it takes a Context and allows setting request options on the pages. 1343// 1344// The context must be non-nil and will be used for request cancellation. If 1345// the context is nil a panic will occur. In the future the SDK may create 1346// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1347// for more information on using Contexts. 1348func (c *ManagedBlockchain) ListMembersPagesWithContext(ctx aws.Context, input *ListMembersInput, fn func(*ListMembersOutput, bool) bool, opts ...request.Option) error { 1349 p := request.Pagination{ 1350 NewRequest: func() (*request.Request, error) { 1351 var inCpy *ListMembersInput 1352 if input != nil { 1353 tmp := *input 1354 inCpy = &tmp 1355 } 1356 req, _ := c.ListMembersRequest(inCpy) 1357 req.SetContext(ctx) 1358 req.ApplyOptions(opts...) 1359 return req, nil 1360 }, 1361 } 1362 1363 for p.Next() { 1364 if !fn(p.Page().(*ListMembersOutput), !p.HasNextPage()) { 1365 break 1366 } 1367 } 1368 1369 return p.Err() 1370} 1371 1372const opListNetworks = "ListNetworks" 1373 1374// ListNetworksRequest generates a "aws/request.Request" representing the 1375// client's request for the ListNetworks operation. The "output" return 1376// value will be populated with the request's response once the request completes 1377// successfully. 1378// 1379// Use "Send" method on the returned Request to send the API call to the service. 1380// the "output" return value is not valid until after Send returns without error. 1381// 1382// See ListNetworks for more information on using the ListNetworks 1383// API call, and error handling. 1384// 1385// This method is useful when you want to inject custom logic or configuration 1386// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1387// 1388// 1389// // Example sending a request using the ListNetworksRequest method. 1390// req, resp := client.ListNetworksRequest(params) 1391// 1392// err := req.Send() 1393// if err == nil { // resp is now filled 1394// fmt.Println(resp) 1395// } 1396// 1397// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListNetworks 1398func (c *ManagedBlockchain) ListNetworksRequest(input *ListNetworksInput) (req *request.Request, output *ListNetworksOutput) { 1399 op := &request.Operation{ 1400 Name: opListNetworks, 1401 HTTPMethod: "GET", 1402 HTTPPath: "/networks", 1403 Paginator: &request.Paginator{ 1404 InputTokens: []string{"NextToken"}, 1405 OutputTokens: []string{"NextToken"}, 1406 LimitToken: "MaxResults", 1407 TruncationToken: "", 1408 }, 1409 } 1410 1411 if input == nil { 1412 input = &ListNetworksInput{} 1413 } 1414 1415 output = &ListNetworksOutput{} 1416 req = c.newRequest(op, input, output) 1417 return 1418} 1419 1420// ListNetworks API operation for Amazon Managed Blockchain. 1421// 1422// Returns information about the networks in which the current AWS account participates. 1423// 1424// Applies to Hyperledger Fabric and Ethereum. 1425// 1426// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1427// with awserr.Error's Code and Message methods to get detailed information about 1428// the error. 1429// 1430// See the AWS API reference guide for Amazon Managed Blockchain's 1431// API operation ListNetworks for usage and error information. 1432// 1433// Returned Error Types: 1434// * InvalidRequestException 1435// The action or operation requested is invalid. Verify that the action is typed 1436// correctly. 1437// 1438// * AccessDeniedException 1439// You do not have sufficient access to perform this action. 1440// 1441// * ThrottlingException 1442// The request or operation could not be performed because a service is throttling 1443// requests. The most common source of throttling errors is launching EC2 instances 1444// such that your service limit for EC2 instances is exceeded. Request a limit 1445// increase or delete unused resources if possible. 1446// 1447// * InternalServiceErrorException 1448// The request processing has failed because of an unknown error, exception 1449// or failure. 1450// 1451// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListNetworks 1452func (c *ManagedBlockchain) ListNetworks(input *ListNetworksInput) (*ListNetworksOutput, error) { 1453 req, out := c.ListNetworksRequest(input) 1454 return out, req.Send() 1455} 1456 1457// ListNetworksWithContext is the same as ListNetworks with the addition of 1458// the ability to pass a context and additional request options. 1459// 1460// See ListNetworks for details on how to use this API operation. 1461// 1462// The context must be non-nil and will be used for request cancellation. If 1463// the context is nil a panic will occur. In the future the SDK may create 1464// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1465// for more information on using Contexts. 1466func (c *ManagedBlockchain) ListNetworksWithContext(ctx aws.Context, input *ListNetworksInput, opts ...request.Option) (*ListNetworksOutput, error) { 1467 req, out := c.ListNetworksRequest(input) 1468 req.SetContext(ctx) 1469 req.ApplyOptions(opts...) 1470 return out, req.Send() 1471} 1472 1473// ListNetworksPages iterates over the pages of a ListNetworks operation, 1474// calling the "fn" function with the response data for each page. To stop 1475// iterating, return false from the fn function. 1476// 1477// See ListNetworks method for more information on how to use this operation. 1478// 1479// Note: This operation can generate multiple requests to a service. 1480// 1481// // Example iterating over at most 3 pages of a ListNetworks operation. 1482// pageNum := 0 1483// err := client.ListNetworksPages(params, 1484// func(page *managedblockchain.ListNetworksOutput, lastPage bool) bool { 1485// pageNum++ 1486// fmt.Println(page) 1487// return pageNum <= 3 1488// }) 1489// 1490func (c *ManagedBlockchain) ListNetworksPages(input *ListNetworksInput, fn func(*ListNetworksOutput, bool) bool) error { 1491 return c.ListNetworksPagesWithContext(aws.BackgroundContext(), input, fn) 1492} 1493 1494// ListNetworksPagesWithContext same as ListNetworksPages except 1495// it takes a Context and allows setting request options on the pages. 1496// 1497// The context must be non-nil and will be used for request cancellation. If 1498// the context is nil a panic will occur. In the future the SDK may create 1499// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1500// for more information on using Contexts. 1501func (c *ManagedBlockchain) ListNetworksPagesWithContext(ctx aws.Context, input *ListNetworksInput, fn func(*ListNetworksOutput, bool) bool, opts ...request.Option) error { 1502 p := request.Pagination{ 1503 NewRequest: func() (*request.Request, error) { 1504 var inCpy *ListNetworksInput 1505 if input != nil { 1506 tmp := *input 1507 inCpy = &tmp 1508 } 1509 req, _ := c.ListNetworksRequest(inCpy) 1510 req.SetContext(ctx) 1511 req.ApplyOptions(opts...) 1512 return req, nil 1513 }, 1514 } 1515 1516 for p.Next() { 1517 if !fn(p.Page().(*ListNetworksOutput), !p.HasNextPage()) { 1518 break 1519 } 1520 } 1521 1522 return p.Err() 1523} 1524 1525const opListNodes = "ListNodes" 1526 1527// ListNodesRequest generates a "aws/request.Request" representing the 1528// client's request for the ListNodes operation. The "output" return 1529// value will be populated with the request's response once the request completes 1530// successfully. 1531// 1532// Use "Send" method on the returned Request to send the API call to the service. 1533// the "output" return value is not valid until after Send returns without error. 1534// 1535// See ListNodes for more information on using the ListNodes 1536// API call, and error handling. 1537// 1538// This method is useful when you want to inject custom logic or configuration 1539// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1540// 1541// 1542// // Example sending a request using the ListNodesRequest method. 1543// req, resp := client.ListNodesRequest(params) 1544// 1545// err := req.Send() 1546// if err == nil { // resp is now filled 1547// fmt.Println(resp) 1548// } 1549// 1550// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListNodes 1551func (c *ManagedBlockchain) ListNodesRequest(input *ListNodesInput) (req *request.Request, output *ListNodesOutput) { 1552 op := &request.Operation{ 1553 Name: opListNodes, 1554 HTTPMethod: "GET", 1555 HTTPPath: "/networks/{networkId}/nodes", 1556 Paginator: &request.Paginator{ 1557 InputTokens: []string{"NextToken"}, 1558 OutputTokens: []string{"NextToken"}, 1559 LimitToken: "MaxResults", 1560 TruncationToken: "", 1561 }, 1562 } 1563 1564 if input == nil { 1565 input = &ListNodesInput{} 1566 } 1567 1568 output = &ListNodesOutput{} 1569 req = c.newRequest(op, input, output) 1570 return 1571} 1572 1573// ListNodes API operation for Amazon Managed Blockchain. 1574// 1575// Returns information about the nodes within a network. 1576// 1577// Applies to Hyperledger Fabric and Ethereum. 1578// 1579// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1580// with awserr.Error's Code and Message methods to get detailed information about 1581// the error. 1582// 1583// See the AWS API reference guide for Amazon Managed Blockchain's 1584// API operation ListNodes for usage and error information. 1585// 1586// Returned Error Types: 1587// * InvalidRequestException 1588// The action or operation requested is invalid. Verify that the action is typed 1589// correctly. 1590// 1591// * AccessDeniedException 1592// You do not have sufficient access to perform this action. 1593// 1594// * ThrottlingException 1595// The request or operation could not be performed because a service is throttling 1596// requests. The most common source of throttling errors is launching EC2 instances 1597// such that your service limit for EC2 instances is exceeded. Request a limit 1598// increase or delete unused resources if possible. 1599// 1600// * InternalServiceErrorException 1601// The request processing has failed because of an unknown error, exception 1602// or failure. 1603// 1604// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListNodes 1605func (c *ManagedBlockchain) ListNodes(input *ListNodesInput) (*ListNodesOutput, error) { 1606 req, out := c.ListNodesRequest(input) 1607 return out, req.Send() 1608} 1609 1610// ListNodesWithContext is the same as ListNodes with the addition of 1611// the ability to pass a context and additional request options. 1612// 1613// See ListNodes for details on how to use this API operation. 1614// 1615// The context must be non-nil and will be used for request cancellation. If 1616// the context is nil a panic will occur. In the future the SDK may create 1617// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1618// for more information on using Contexts. 1619func (c *ManagedBlockchain) ListNodesWithContext(ctx aws.Context, input *ListNodesInput, opts ...request.Option) (*ListNodesOutput, error) { 1620 req, out := c.ListNodesRequest(input) 1621 req.SetContext(ctx) 1622 req.ApplyOptions(opts...) 1623 return out, req.Send() 1624} 1625 1626// ListNodesPages iterates over the pages of a ListNodes operation, 1627// calling the "fn" function with the response data for each page. To stop 1628// iterating, return false from the fn function. 1629// 1630// See ListNodes method for more information on how to use this operation. 1631// 1632// Note: This operation can generate multiple requests to a service. 1633// 1634// // Example iterating over at most 3 pages of a ListNodes operation. 1635// pageNum := 0 1636// err := client.ListNodesPages(params, 1637// func(page *managedblockchain.ListNodesOutput, lastPage bool) bool { 1638// pageNum++ 1639// fmt.Println(page) 1640// return pageNum <= 3 1641// }) 1642// 1643func (c *ManagedBlockchain) ListNodesPages(input *ListNodesInput, fn func(*ListNodesOutput, bool) bool) error { 1644 return c.ListNodesPagesWithContext(aws.BackgroundContext(), input, fn) 1645} 1646 1647// ListNodesPagesWithContext same as ListNodesPages except 1648// it takes a Context and allows setting request options on the pages. 1649// 1650// The context must be non-nil and will be used for request cancellation. If 1651// the context is nil a panic will occur. In the future the SDK may create 1652// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1653// for more information on using Contexts. 1654func (c *ManagedBlockchain) ListNodesPagesWithContext(ctx aws.Context, input *ListNodesInput, fn func(*ListNodesOutput, bool) bool, opts ...request.Option) error { 1655 p := request.Pagination{ 1656 NewRequest: func() (*request.Request, error) { 1657 var inCpy *ListNodesInput 1658 if input != nil { 1659 tmp := *input 1660 inCpy = &tmp 1661 } 1662 req, _ := c.ListNodesRequest(inCpy) 1663 req.SetContext(ctx) 1664 req.ApplyOptions(opts...) 1665 return req, nil 1666 }, 1667 } 1668 1669 for p.Next() { 1670 if !fn(p.Page().(*ListNodesOutput), !p.HasNextPage()) { 1671 break 1672 } 1673 } 1674 1675 return p.Err() 1676} 1677 1678const opListProposalVotes = "ListProposalVotes" 1679 1680// ListProposalVotesRequest generates a "aws/request.Request" representing the 1681// client's request for the ListProposalVotes operation. The "output" return 1682// value will be populated with the request's response once the request completes 1683// successfully. 1684// 1685// Use "Send" method on the returned Request to send the API call to the service. 1686// the "output" return value is not valid until after Send returns without error. 1687// 1688// See ListProposalVotes for more information on using the ListProposalVotes 1689// API call, and error handling. 1690// 1691// This method is useful when you want to inject custom logic or configuration 1692// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1693// 1694// 1695// // Example sending a request using the ListProposalVotesRequest method. 1696// req, resp := client.ListProposalVotesRequest(params) 1697// 1698// err := req.Send() 1699// if err == nil { // resp is now filled 1700// fmt.Println(resp) 1701// } 1702// 1703// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListProposalVotes 1704func (c *ManagedBlockchain) ListProposalVotesRequest(input *ListProposalVotesInput) (req *request.Request, output *ListProposalVotesOutput) { 1705 op := &request.Operation{ 1706 Name: opListProposalVotes, 1707 HTTPMethod: "GET", 1708 HTTPPath: "/networks/{networkId}/proposals/{proposalId}/votes", 1709 Paginator: &request.Paginator{ 1710 InputTokens: []string{"NextToken"}, 1711 OutputTokens: []string{"NextToken"}, 1712 LimitToken: "MaxResults", 1713 TruncationToken: "", 1714 }, 1715 } 1716 1717 if input == nil { 1718 input = &ListProposalVotesInput{} 1719 } 1720 1721 output = &ListProposalVotesOutput{} 1722 req = c.newRequest(op, input, output) 1723 return 1724} 1725 1726// ListProposalVotes API operation for Amazon Managed Blockchain. 1727// 1728// Returns the list of votes for a specified proposal, including the value of 1729// each vote and the unique identifier of the member that cast the vote. 1730// 1731// Applies only to Hyperledger Fabric. 1732// 1733// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1734// with awserr.Error's Code and Message methods to get detailed information about 1735// the error. 1736// 1737// See the AWS API reference guide for Amazon Managed Blockchain's 1738// API operation ListProposalVotes for usage and error information. 1739// 1740// Returned Error Types: 1741// * InvalidRequestException 1742// The action or operation requested is invalid. Verify that the action is typed 1743// correctly. 1744// 1745// * AccessDeniedException 1746// You do not have sufficient access to perform this action. 1747// 1748// * ThrottlingException 1749// The request or operation could not be performed because a service is throttling 1750// requests. The most common source of throttling errors is launching EC2 instances 1751// such that your service limit for EC2 instances is exceeded. Request a limit 1752// increase or delete unused resources if possible. 1753// 1754// * InternalServiceErrorException 1755// The request processing has failed because of an unknown error, exception 1756// or failure. 1757// 1758// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListProposalVotes 1759func (c *ManagedBlockchain) ListProposalVotes(input *ListProposalVotesInput) (*ListProposalVotesOutput, error) { 1760 req, out := c.ListProposalVotesRequest(input) 1761 return out, req.Send() 1762} 1763 1764// ListProposalVotesWithContext is the same as ListProposalVotes with the addition of 1765// the ability to pass a context and additional request options. 1766// 1767// See ListProposalVotes for details on how to use this API operation. 1768// 1769// The context must be non-nil and will be used for request cancellation. If 1770// the context is nil a panic will occur. In the future the SDK may create 1771// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1772// for more information on using Contexts. 1773func (c *ManagedBlockchain) ListProposalVotesWithContext(ctx aws.Context, input *ListProposalVotesInput, opts ...request.Option) (*ListProposalVotesOutput, error) { 1774 req, out := c.ListProposalVotesRequest(input) 1775 req.SetContext(ctx) 1776 req.ApplyOptions(opts...) 1777 return out, req.Send() 1778} 1779 1780// ListProposalVotesPages iterates over the pages of a ListProposalVotes operation, 1781// calling the "fn" function with the response data for each page. To stop 1782// iterating, return false from the fn function. 1783// 1784// See ListProposalVotes method for more information on how to use this operation. 1785// 1786// Note: This operation can generate multiple requests to a service. 1787// 1788// // Example iterating over at most 3 pages of a ListProposalVotes operation. 1789// pageNum := 0 1790// err := client.ListProposalVotesPages(params, 1791// func(page *managedblockchain.ListProposalVotesOutput, lastPage bool) bool { 1792// pageNum++ 1793// fmt.Println(page) 1794// return pageNum <= 3 1795// }) 1796// 1797func (c *ManagedBlockchain) ListProposalVotesPages(input *ListProposalVotesInput, fn func(*ListProposalVotesOutput, bool) bool) error { 1798 return c.ListProposalVotesPagesWithContext(aws.BackgroundContext(), input, fn) 1799} 1800 1801// ListProposalVotesPagesWithContext same as ListProposalVotesPages except 1802// it takes a Context and allows setting request options on the pages. 1803// 1804// The context must be non-nil and will be used for request cancellation. If 1805// the context is nil a panic will occur. In the future the SDK may create 1806// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1807// for more information on using Contexts. 1808func (c *ManagedBlockchain) ListProposalVotesPagesWithContext(ctx aws.Context, input *ListProposalVotesInput, fn func(*ListProposalVotesOutput, bool) bool, opts ...request.Option) error { 1809 p := request.Pagination{ 1810 NewRequest: func() (*request.Request, error) { 1811 var inCpy *ListProposalVotesInput 1812 if input != nil { 1813 tmp := *input 1814 inCpy = &tmp 1815 } 1816 req, _ := c.ListProposalVotesRequest(inCpy) 1817 req.SetContext(ctx) 1818 req.ApplyOptions(opts...) 1819 return req, nil 1820 }, 1821 } 1822 1823 for p.Next() { 1824 if !fn(p.Page().(*ListProposalVotesOutput), !p.HasNextPage()) { 1825 break 1826 } 1827 } 1828 1829 return p.Err() 1830} 1831 1832const opListProposals = "ListProposals" 1833 1834// ListProposalsRequest generates a "aws/request.Request" representing the 1835// client's request for the ListProposals operation. The "output" return 1836// value will be populated with the request's response once the request completes 1837// successfully. 1838// 1839// Use "Send" method on the returned Request to send the API call to the service. 1840// the "output" return value is not valid until after Send returns without error. 1841// 1842// See ListProposals for more information on using the ListProposals 1843// API call, and error handling. 1844// 1845// This method is useful when you want to inject custom logic or configuration 1846// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1847// 1848// 1849// // Example sending a request using the ListProposalsRequest method. 1850// req, resp := client.ListProposalsRequest(params) 1851// 1852// err := req.Send() 1853// if err == nil { // resp is now filled 1854// fmt.Println(resp) 1855// } 1856// 1857// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListProposals 1858func (c *ManagedBlockchain) ListProposalsRequest(input *ListProposalsInput) (req *request.Request, output *ListProposalsOutput) { 1859 op := &request.Operation{ 1860 Name: opListProposals, 1861 HTTPMethod: "GET", 1862 HTTPPath: "/networks/{networkId}/proposals", 1863 Paginator: &request.Paginator{ 1864 InputTokens: []string{"NextToken"}, 1865 OutputTokens: []string{"NextToken"}, 1866 LimitToken: "MaxResults", 1867 TruncationToken: "", 1868 }, 1869 } 1870 1871 if input == nil { 1872 input = &ListProposalsInput{} 1873 } 1874 1875 output = &ListProposalsOutput{} 1876 req = c.newRequest(op, input, output) 1877 return 1878} 1879 1880// ListProposals API operation for Amazon Managed Blockchain. 1881// 1882// Returns a list of proposals for the network. 1883// 1884// Applies only to Hyperledger Fabric. 1885// 1886// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1887// with awserr.Error's Code and Message methods to get detailed information about 1888// the error. 1889// 1890// See the AWS API reference guide for Amazon Managed Blockchain's 1891// API operation ListProposals for usage and error information. 1892// 1893// Returned Error Types: 1894// * InvalidRequestException 1895// The action or operation requested is invalid. Verify that the action is typed 1896// correctly. 1897// 1898// * ResourceNotFoundException 1899// A requested resource does not exist on the network. It may have been deleted 1900// or referenced inaccurately. 1901// 1902// * AccessDeniedException 1903// You do not have sufficient access to perform this action. 1904// 1905// * ThrottlingException 1906// The request or operation could not be performed because a service is throttling 1907// requests. The most common source of throttling errors is launching EC2 instances 1908// such that your service limit for EC2 instances is exceeded. Request a limit 1909// increase or delete unused resources if possible. 1910// 1911// * InternalServiceErrorException 1912// The request processing has failed because of an unknown error, exception 1913// or failure. 1914// 1915// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/ListProposals 1916func (c *ManagedBlockchain) ListProposals(input *ListProposalsInput) (*ListProposalsOutput, error) { 1917 req, out := c.ListProposalsRequest(input) 1918 return out, req.Send() 1919} 1920 1921// ListProposalsWithContext is the same as ListProposals with the addition of 1922// the ability to pass a context and additional request options. 1923// 1924// See ListProposals for details on how to use this API operation. 1925// 1926// The context must be non-nil and will be used for request cancellation. If 1927// the context is nil a panic will occur. In the future the SDK may create 1928// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1929// for more information on using Contexts. 1930func (c *ManagedBlockchain) ListProposalsWithContext(ctx aws.Context, input *ListProposalsInput, opts ...request.Option) (*ListProposalsOutput, error) { 1931 req, out := c.ListProposalsRequest(input) 1932 req.SetContext(ctx) 1933 req.ApplyOptions(opts...) 1934 return out, req.Send() 1935} 1936 1937// ListProposalsPages iterates over the pages of a ListProposals operation, 1938// calling the "fn" function with the response data for each page. To stop 1939// iterating, return false from the fn function. 1940// 1941// See ListProposals method for more information on how to use this operation. 1942// 1943// Note: This operation can generate multiple requests to a service. 1944// 1945// // Example iterating over at most 3 pages of a ListProposals operation. 1946// pageNum := 0 1947// err := client.ListProposalsPages(params, 1948// func(page *managedblockchain.ListProposalsOutput, lastPage bool) bool { 1949// pageNum++ 1950// fmt.Println(page) 1951// return pageNum <= 3 1952// }) 1953// 1954func (c *ManagedBlockchain) ListProposalsPages(input *ListProposalsInput, fn func(*ListProposalsOutput, bool) bool) error { 1955 return c.ListProposalsPagesWithContext(aws.BackgroundContext(), input, fn) 1956} 1957 1958// ListProposalsPagesWithContext same as ListProposalsPages except 1959// it takes a Context and allows setting request options on the pages. 1960// 1961// The context must be non-nil and will be used for request cancellation. If 1962// the context is nil a panic will occur. In the future the SDK may create 1963// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1964// for more information on using Contexts. 1965func (c *ManagedBlockchain) ListProposalsPagesWithContext(ctx aws.Context, input *ListProposalsInput, fn func(*ListProposalsOutput, bool) bool, opts ...request.Option) error { 1966 p := request.Pagination{ 1967 NewRequest: func() (*request.Request, error) { 1968 var inCpy *ListProposalsInput 1969 if input != nil { 1970 tmp := *input 1971 inCpy = &tmp 1972 } 1973 req, _ := c.ListProposalsRequest(inCpy) 1974 req.SetContext(ctx) 1975 req.ApplyOptions(opts...) 1976 return req, nil 1977 }, 1978 } 1979 1980 for p.Next() { 1981 if !fn(p.Page().(*ListProposalsOutput), !p.HasNextPage()) { 1982 break 1983 } 1984 } 1985 1986 return p.Err() 1987} 1988 1989const opRejectInvitation = "RejectInvitation" 1990 1991// RejectInvitationRequest generates a "aws/request.Request" representing the 1992// client's request for the RejectInvitation operation. The "output" return 1993// value will be populated with the request's response once the request completes 1994// successfully. 1995// 1996// Use "Send" method on the returned Request to send the API call to the service. 1997// the "output" return value is not valid until after Send returns without error. 1998// 1999// See RejectInvitation for more information on using the RejectInvitation 2000// API call, and error handling. 2001// 2002// This method is useful when you want to inject custom logic or configuration 2003// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2004// 2005// 2006// // Example sending a request using the RejectInvitationRequest method. 2007// req, resp := client.RejectInvitationRequest(params) 2008// 2009// err := req.Send() 2010// if err == nil { // resp is now filled 2011// fmt.Println(resp) 2012// } 2013// 2014// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/RejectInvitation 2015func (c *ManagedBlockchain) RejectInvitationRequest(input *RejectInvitationInput) (req *request.Request, output *RejectInvitationOutput) { 2016 op := &request.Operation{ 2017 Name: opRejectInvitation, 2018 HTTPMethod: "DELETE", 2019 HTTPPath: "/invitations/{invitationId}", 2020 } 2021 2022 if input == nil { 2023 input = &RejectInvitationInput{} 2024 } 2025 2026 output = &RejectInvitationOutput{} 2027 req = c.newRequest(op, input, output) 2028 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2029 return 2030} 2031 2032// RejectInvitation API operation for Amazon Managed Blockchain. 2033// 2034// Rejects an invitation to join a network. This action can be called by a principal 2035// in an AWS account that has received an invitation to create a member and 2036// join a network. 2037// 2038// Applies only to Hyperledger Fabric. 2039// 2040// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2041// with awserr.Error's Code and Message methods to get detailed information about 2042// the error. 2043// 2044// See the AWS API reference guide for Amazon Managed Blockchain's 2045// API operation RejectInvitation for usage and error information. 2046// 2047// Returned Error Types: 2048// * InvalidRequestException 2049// The action or operation requested is invalid. Verify that the action is typed 2050// correctly. 2051// 2052// * IllegalActionException 2053// 2054// * AccessDeniedException 2055// You do not have sufficient access to perform this action. 2056// 2057// * ResourceNotFoundException 2058// A requested resource does not exist on the network. It may have been deleted 2059// or referenced inaccurately. 2060// 2061// * ThrottlingException 2062// The request or operation could not be performed because a service is throttling 2063// requests. The most common source of throttling errors is launching EC2 instances 2064// such that your service limit for EC2 instances is exceeded. Request a limit 2065// increase or delete unused resources if possible. 2066// 2067// * InternalServiceErrorException 2068// The request processing has failed because of an unknown error, exception 2069// or failure. 2070// 2071// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/RejectInvitation 2072func (c *ManagedBlockchain) RejectInvitation(input *RejectInvitationInput) (*RejectInvitationOutput, error) { 2073 req, out := c.RejectInvitationRequest(input) 2074 return out, req.Send() 2075} 2076 2077// RejectInvitationWithContext is the same as RejectInvitation with the addition of 2078// the ability to pass a context and additional request options. 2079// 2080// See RejectInvitation for details on how to use this API operation. 2081// 2082// The context must be non-nil and will be used for request cancellation. If 2083// the context is nil a panic will occur. In the future the SDK may create 2084// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2085// for more information on using Contexts. 2086func (c *ManagedBlockchain) RejectInvitationWithContext(ctx aws.Context, input *RejectInvitationInput, opts ...request.Option) (*RejectInvitationOutput, error) { 2087 req, out := c.RejectInvitationRequest(input) 2088 req.SetContext(ctx) 2089 req.ApplyOptions(opts...) 2090 return out, req.Send() 2091} 2092 2093const opUpdateMember = "UpdateMember" 2094 2095// UpdateMemberRequest generates a "aws/request.Request" representing the 2096// client's request for the UpdateMember operation. The "output" return 2097// value will be populated with the request's response once the request completes 2098// successfully. 2099// 2100// Use "Send" method on the returned Request to send the API call to the service. 2101// the "output" return value is not valid until after Send returns without error. 2102// 2103// See UpdateMember for more information on using the UpdateMember 2104// API call, and error handling. 2105// 2106// This method is useful when you want to inject custom logic or configuration 2107// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2108// 2109// 2110// // Example sending a request using the UpdateMemberRequest method. 2111// req, resp := client.UpdateMemberRequest(params) 2112// 2113// err := req.Send() 2114// if err == nil { // resp is now filled 2115// fmt.Println(resp) 2116// } 2117// 2118// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/UpdateMember 2119func (c *ManagedBlockchain) UpdateMemberRequest(input *UpdateMemberInput) (req *request.Request, output *UpdateMemberOutput) { 2120 op := &request.Operation{ 2121 Name: opUpdateMember, 2122 HTTPMethod: "PATCH", 2123 HTTPPath: "/networks/{networkId}/members/{memberId}", 2124 } 2125 2126 if input == nil { 2127 input = &UpdateMemberInput{} 2128 } 2129 2130 output = &UpdateMemberOutput{} 2131 req = c.newRequest(op, input, output) 2132 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2133 return 2134} 2135 2136// UpdateMember API operation for Amazon Managed Blockchain. 2137// 2138// Updates a member configuration with new parameters. 2139// 2140// Applies only to Hyperledger Fabric. 2141// 2142// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2143// with awserr.Error's Code and Message methods to get detailed information about 2144// the error. 2145// 2146// See the AWS API reference guide for Amazon Managed Blockchain's 2147// API operation UpdateMember for usage and error information. 2148// 2149// Returned Error Types: 2150// * InvalidRequestException 2151// The action or operation requested is invalid. Verify that the action is typed 2152// correctly. 2153// 2154// * AccessDeniedException 2155// You do not have sufficient access to perform this action. 2156// 2157// * ResourceNotFoundException 2158// A requested resource does not exist on the network. It may have been deleted 2159// or referenced inaccurately. 2160// 2161// * ThrottlingException 2162// The request or operation could not be performed because a service is throttling 2163// requests. The most common source of throttling errors is launching EC2 instances 2164// such that your service limit for EC2 instances is exceeded. Request a limit 2165// increase or delete unused resources if possible. 2166// 2167// * InternalServiceErrorException 2168// The request processing has failed because of an unknown error, exception 2169// or failure. 2170// 2171// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/UpdateMember 2172func (c *ManagedBlockchain) UpdateMember(input *UpdateMemberInput) (*UpdateMemberOutput, error) { 2173 req, out := c.UpdateMemberRequest(input) 2174 return out, req.Send() 2175} 2176 2177// UpdateMemberWithContext is the same as UpdateMember with the addition of 2178// the ability to pass a context and additional request options. 2179// 2180// See UpdateMember for details on how to use this API operation. 2181// 2182// The context must be non-nil and will be used for request cancellation. If 2183// the context is nil a panic will occur. In the future the SDK may create 2184// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2185// for more information on using Contexts. 2186func (c *ManagedBlockchain) UpdateMemberWithContext(ctx aws.Context, input *UpdateMemberInput, opts ...request.Option) (*UpdateMemberOutput, error) { 2187 req, out := c.UpdateMemberRequest(input) 2188 req.SetContext(ctx) 2189 req.ApplyOptions(opts...) 2190 return out, req.Send() 2191} 2192 2193const opUpdateNode = "UpdateNode" 2194 2195// UpdateNodeRequest generates a "aws/request.Request" representing the 2196// client's request for the UpdateNode operation. The "output" return 2197// value will be populated with the request's response once the request completes 2198// successfully. 2199// 2200// Use "Send" method on the returned Request to send the API call to the service. 2201// the "output" return value is not valid until after Send returns without error. 2202// 2203// See UpdateNode for more information on using the UpdateNode 2204// API call, and error handling. 2205// 2206// This method is useful when you want to inject custom logic or configuration 2207// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2208// 2209// 2210// // Example sending a request using the UpdateNodeRequest method. 2211// req, resp := client.UpdateNodeRequest(params) 2212// 2213// err := req.Send() 2214// if err == nil { // resp is now filled 2215// fmt.Println(resp) 2216// } 2217// 2218// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/UpdateNode 2219func (c *ManagedBlockchain) UpdateNodeRequest(input *UpdateNodeInput) (req *request.Request, output *UpdateNodeOutput) { 2220 op := &request.Operation{ 2221 Name: opUpdateNode, 2222 HTTPMethod: "PATCH", 2223 HTTPPath: "/networks/{networkId}/nodes/{nodeId}", 2224 } 2225 2226 if input == nil { 2227 input = &UpdateNodeInput{} 2228 } 2229 2230 output = &UpdateNodeOutput{} 2231 req = c.newRequest(op, input, output) 2232 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2233 return 2234} 2235 2236// UpdateNode API operation for Amazon Managed Blockchain. 2237// 2238// Updates a node configuration with new parameters. 2239// 2240// Applies only to Hyperledger Fabric. 2241// 2242// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2243// with awserr.Error's Code and Message methods to get detailed information about 2244// the error. 2245// 2246// See the AWS API reference guide for Amazon Managed Blockchain's 2247// API operation UpdateNode for usage and error information. 2248// 2249// Returned Error Types: 2250// * InvalidRequestException 2251// The action or operation requested is invalid. Verify that the action is typed 2252// correctly. 2253// 2254// * AccessDeniedException 2255// You do not have sufficient access to perform this action. 2256// 2257// * ResourceNotFoundException 2258// A requested resource does not exist on the network. It may have been deleted 2259// or referenced inaccurately. 2260// 2261// * ThrottlingException 2262// The request or operation could not be performed because a service is throttling 2263// requests. The most common source of throttling errors is launching EC2 instances 2264// such that your service limit for EC2 instances is exceeded. Request a limit 2265// increase or delete unused resources if possible. 2266// 2267// * InternalServiceErrorException 2268// The request processing has failed because of an unknown error, exception 2269// or failure. 2270// 2271// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/UpdateNode 2272func (c *ManagedBlockchain) UpdateNode(input *UpdateNodeInput) (*UpdateNodeOutput, error) { 2273 req, out := c.UpdateNodeRequest(input) 2274 return out, req.Send() 2275} 2276 2277// UpdateNodeWithContext is the same as UpdateNode with the addition of 2278// the ability to pass a context and additional request options. 2279// 2280// See UpdateNode for details on how to use this API operation. 2281// 2282// The context must be non-nil and will be used for request cancellation. If 2283// the context is nil a panic will occur. In the future the SDK may create 2284// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2285// for more information on using Contexts. 2286func (c *ManagedBlockchain) UpdateNodeWithContext(ctx aws.Context, input *UpdateNodeInput, opts ...request.Option) (*UpdateNodeOutput, error) { 2287 req, out := c.UpdateNodeRequest(input) 2288 req.SetContext(ctx) 2289 req.ApplyOptions(opts...) 2290 return out, req.Send() 2291} 2292 2293const opVoteOnProposal = "VoteOnProposal" 2294 2295// VoteOnProposalRequest generates a "aws/request.Request" representing the 2296// client's request for the VoteOnProposal operation. The "output" return 2297// value will be populated with the request's response once the request completes 2298// successfully. 2299// 2300// Use "Send" method on the returned Request to send the API call to the service. 2301// the "output" return value is not valid until after Send returns without error. 2302// 2303// See VoteOnProposal for more information on using the VoteOnProposal 2304// API call, and error handling. 2305// 2306// This method is useful when you want to inject custom logic or configuration 2307// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2308// 2309// 2310// // Example sending a request using the VoteOnProposalRequest method. 2311// req, resp := client.VoteOnProposalRequest(params) 2312// 2313// err := req.Send() 2314// if err == nil { // resp is now filled 2315// fmt.Println(resp) 2316// } 2317// 2318// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/VoteOnProposal 2319func (c *ManagedBlockchain) VoteOnProposalRequest(input *VoteOnProposalInput) (req *request.Request, output *VoteOnProposalOutput) { 2320 op := &request.Operation{ 2321 Name: opVoteOnProposal, 2322 HTTPMethod: "POST", 2323 HTTPPath: "/networks/{networkId}/proposals/{proposalId}/votes", 2324 } 2325 2326 if input == nil { 2327 input = &VoteOnProposalInput{} 2328 } 2329 2330 output = &VoteOnProposalOutput{} 2331 req = c.newRequest(op, input, output) 2332 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 2333 return 2334} 2335 2336// VoteOnProposal API operation for Amazon Managed Blockchain. 2337// 2338// Casts a vote for a specified ProposalId on behalf of a member. The member 2339// to vote as, specified by VoterMemberId, must be in the same AWS account as 2340// the principal that calls the action. 2341// 2342// Applies only to Hyperledger Fabric. 2343// 2344// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2345// with awserr.Error's Code and Message methods to get detailed information about 2346// the error. 2347// 2348// See the AWS API reference guide for Amazon Managed Blockchain's 2349// API operation VoteOnProposal for usage and error information. 2350// 2351// Returned Error Types: 2352// * InvalidRequestException 2353// The action or operation requested is invalid. Verify that the action is typed 2354// correctly. 2355// 2356// * IllegalActionException 2357// 2358// * AccessDeniedException 2359// You do not have sufficient access to perform this action. 2360// 2361// * ResourceNotFoundException 2362// A requested resource does not exist on the network. It may have been deleted 2363// or referenced inaccurately. 2364// 2365// * ThrottlingException 2366// The request or operation could not be performed because a service is throttling 2367// requests. The most common source of throttling errors is launching EC2 instances 2368// such that your service limit for EC2 instances is exceeded. Request a limit 2369// increase or delete unused resources if possible. 2370// 2371// * InternalServiceErrorException 2372// The request processing has failed because of an unknown error, exception 2373// or failure. 2374// 2375// See also, https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-2018-09-24/VoteOnProposal 2376func (c *ManagedBlockchain) VoteOnProposal(input *VoteOnProposalInput) (*VoteOnProposalOutput, error) { 2377 req, out := c.VoteOnProposalRequest(input) 2378 return out, req.Send() 2379} 2380 2381// VoteOnProposalWithContext is the same as VoteOnProposal with the addition of 2382// the ability to pass a context and additional request options. 2383// 2384// See VoteOnProposal for details on how to use this API operation. 2385// 2386// The context must be non-nil and will be used for request cancellation. If 2387// the context is nil a panic will occur. In the future the SDK may create 2388// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2389// for more information on using Contexts. 2390func (c *ManagedBlockchain) VoteOnProposalWithContext(ctx aws.Context, input *VoteOnProposalInput, opts ...request.Option) (*VoteOnProposalOutput, error) { 2391 req, out := c.VoteOnProposalRequest(input) 2392 req.SetContext(ctx) 2393 req.ApplyOptions(opts...) 2394 return out, req.Send() 2395} 2396 2397// You do not have sufficient access to perform this action. 2398type AccessDeniedException struct { 2399 _ struct{} `type:"structure"` 2400 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2401 2402 Message_ *string `locationName:"Message" type:"string"` 2403} 2404 2405// String returns the string representation 2406func (s AccessDeniedException) String() string { 2407 return awsutil.Prettify(s) 2408} 2409 2410// GoString returns the string representation 2411func (s AccessDeniedException) GoString() string { 2412 return s.String() 2413} 2414 2415func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 2416 return &AccessDeniedException{ 2417 RespMetadata: v, 2418 } 2419} 2420 2421// Code returns the exception type name. 2422func (s *AccessDeniedException) Code() string { 2423 return "AccessDeniedException" 2424} 2425 2426// Message returns the exception's message. 2427func (s *AccessDeniedException) Message() string { 2428 if s.Message_ != nil { 2429 return *s.Message_ 2430 } 2431 return "" 2432} 2433 2434// OrigErr always returns nil, satisfies awserr.Error interface. 2435func (s *AccessDeniedException) OrigErr() error { 2436 return nil 2437} 2438 2439func (s *AccessDeniedException) Error() string { 2440 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2441} 2442 2443// Status code returns the HTTP status code for the request's response error. 2444func (s *AccessDeniedException) StatusCode() int { 2445 return s.RespMetadata.StatusCode 2446} 2447 2448// RequestID returns the service's response RequestID for request. 2449func (s *AccessDeniedException) RequestID() string { 2450 return s.RespMetadata.RequestID 2451} 2452 2453// A policy type that defines the voting rules for the network. The rules decide 2454// if a proposal is approved. Approval may be based on criteria such as the 2455// percentage of YES votes and the duration of the proposal. The policy applies 2456// to all proposals and is specified when the network is created. 2457// 2458// Applies only to Hyperledger Fabric. 2459type ApprovalThresholdPolicy struct { 2460 _ struct{} `type:"structure"` 2461 2462 // The duration from the time that a proposal is created until it expires. If 2463 // members cast neither the required number of YES votes to approve the proposal 2464 // nor the number of NO votes required to reject it before the duration expires, 2465 // the proposal is EXPIRED and ProposalActions are not carried out. 2466 ProposalDurationInHours *int64 `min:"1" type:"integer"` 2467 2468 // Determines whether the vote percentage must be greater than the ThresholdPercentage 2469 // or must be greater than or equal to the ThreholdPercentage to be approved. 2470 ThresholdComparator *string `type:"string" enum:"ThresholdComparator"` 2471 2472 // The percentage of votes among all members that must be YES for a proposal 2473 // to be approved. For example, a ThresholdPercentage value of 50 indicates 2474 // 50%. The ThresholdComparator determines the precise comparison. If a ThresholdPercentage 2475 // value of 50 is specified on a network with 10 members, along with a ThresholdComparator 2476 // value of GREATER_THAN, this indicates that 6 YES votes are required for the 2477 // proposal to be approved. 2478 ThresholdPercentage *int64 `type:"integer"` 2479} 2480 2481// String returns the string representation 2482func (s ApprovalThresholdPolicy) String() string { 2483 return awsutil.Prettify(s) 2484} 2485 2486// GoString returns the string representation 2487func (s ApprovalThresholdPolicy) GoString() string { 2488 return s.String() 2489} 2490 2491// Validate inspects the fields of the type to determine if they are valid. 2492func (s *ApprovalThresholdPolicy) Validate() error { 2493 invalidParams := request.ErrInvalidParams{Context: "ApprovalThresholdPolicy"} 2494 if s.ProposalDurationInHours != nil && *s.ProposalDurationInHours < 1 { 2495 invalidParams.Add(request.NewErrParamMinValue("ProposalDurationInHours", 1)) 2496 } 2497 2498 if invalidParams.Len() > 0 { 2499 return invalidParams 2500 } 2501 return nil 2502} 2503 2504// SetProposalDurationInHours sets the ProposalDurationInHours field's value. 2505func (s *ApprovalThresholdPolicy) SetProposalDurationInHours(v int64) *ApprovalThresholdPolicy { 2506 s.ProposalDurationInHours = &v 2507 return s 2508} 2509 2510// SetThresholdComparator sets the ThresholdComparator field's value. 2511func (s *ApprovalThresholdPolicy) SetThresholdComparator(v string) *ApprovalThresholdPolicy { 2512 s.ThresholdComparator = &v 2513 return s 2514} 2515 2516// SetThresholdPercentage sets the ThresholdPercentage field's value. 2517func (s *ApprovalThresholdPolicy) SetThresholdPercentage(v int64) *ApprovalThresholdPolicy { 2518 s.ThresholdPercentage = &v 2519 return s 2520} 2521 2522type CreateMemberInput struct { 2523 _ struct{} `type:"structure"` 2524 2525 // A unique, case-sensitive identifier that you provide to ensure the idempotency 2526 // of the operation. An idempotent operation completes no more than one time. 2527 // This identifier is required only if you make a service request directly using 2528 // an HTTP client. It is generated automatically if you use an AWS SDK or the 2529 // AWS CLI. 2530 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 2531 2532 // The unique identifier of the invitation that is sent to the member to join 2533 // the network. 2534 // 2535 // InvitationId is a required field 2536 InvitationId *string `min:"1" type:"string" required:"true"` 2537 2538 // Member configuration parameters. 2539 // 2540 // MemberConfiguration is a required field 2541 MemberConfiguration *MemberConfiguration `type:"structure" required:"true"` 2542 2543 // The unique identifier of the network in which the member is created. 2544 // 2545 // NetworkId is a required field 2546 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 2547} 2548 2549// String returns the string representation 2550func (s CreateMemberInput) String() string { 2551 return awsutil.Prettify(s) 2552} 2553 2554// GoString returns the string representation 2555func (s CreateMemberInput) GoString() string { 2556 return s.String() 2557} 2558 2559// Validate inspects the fields of the type to determine if they are valid. 2560func (s *CreateMemberInput) Validate() error { 2561 invalidParams := request.ErrInvalidParams{Context: "CreateMemberInput"} 2562 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 2563 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 2564 } 2565 if s.InvitationId == nil { 2566 invalidParams.Add(request.NewErrParamRequired("InvitationId")) 2567 } 2568 if s.InvitationId != nil && len(*s.InvitationId) < 1 { 2569 invalidParams.Add(request.NewErrParamMinLen("InvitationId", 1)) 2570 } 2571 if s.MemberConfiguration == nil { 2572 invalidParams.Add(request.NewErrParamRequired("MemberConfiguration")) 2573 } 2574 if s.NetworkId == nil { 2575 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 2576 } 2577 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 2578 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 2579 } 2580 if s.MemberConfiguration != nil { 2581 if err := s.MemberConfiguration.Validate(); err != nil { 2582 invalidParams.AddNested("MemberConfiguration", err.(request.ErrInvalidParams)) 2583 } 2584 } 2585 2586 if invalidParams.Len() > 0 { 2587 return invalidParams 2588 } 2589 return nil 2590} 2591 2592// SetClientRequestToken sets the ClientRequestToken field's value. 2593func (s *CreateMemberInput) SetClientRequestToken(v string) *CreateMemberInput { 2594 s.ClientRequestToken = &v 2595 return s 2596} 2597 2598// SetInvitationId sets the InvitationId field's value. 2599func (s *CreateMemberInput) SetInvitationId(v string) *CreateMemberInput { 2600 s.InvitationId = &v 2601 return s 2602} 2603 2604// SetMemberConfiguration sets the MemberConfiguration field's value. 2605func (s *CreateMemberInput) SetMemberConfiguration(v *MemberConfiguration) *CreateMemberInput { 2606 s.MemberConfiguration = v 2607 return s 2608} 2609 2610// SetNetworkId sets the NetworkId field's value. 2611func (s *CreateMemberInput) SetNetworkId(v string) *CreateMemberInput { 2612 s.NetworkId = &v 2613 return s 2614} 2615 2616type CreateMemberOutput struct { 2617 _ struct{} `type:"structure"` 2618 2619 // The unique identifier of the member. 2620 MemberId *string `min:"1" type:"string"` 2621} 2622 2623// String returns the string representation 2624func (s CreateMemberOutput) String() string { 2625 return awsutil.Prettify(s) 2626} 2627 2628// GoString returns the string representation 2629func (s CreateMemberOutput) GoString() string { 2630 return s.String() 2631} 2632 2633// SetMemberId sets the MemberId field's value. 2634func (s *CreateMemberOutput) SetMemberId(v string) *CreateMemberOutput { 2635 s.MemberId = &v 2636 return s 2637} 2638 2639type CreateNetworkInput struct { 2640 _ struct{} `type:"structure"` 2641 2642 // A unique, case-sensitive identifier that you provide to ensure the idempotency 2643 // of the operation. An idempotent operation completes no more than one time. 2644 // This identifier is required only if you make a service request directly using 2645 // an HTTP client. It is generated automatically if you use an AWS SDK or the 2646 // AWS CLI. 2647 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 2648 2649 // An optional description for the network. 2650 Description *string `type:"string"` 2651 2652 // The blockchain framework that the network uses. 2653 // 2654 // Framework is a required field 2655 Framework *string `type:"string" required:"true" enum:"Framework"` 2656 2657 // Configuration properties of the blockchain framework relevant to the network 2658 // configuration. 2659 FrameworkConfiguration *NetworkFrameworkConfiguration `type:"structure"` 2660 2661 // The version of the blockchain framework that the network uses. 2662 // 2663 // FrameworkVersion is a required field 2664 FrameworkVersion *string `min:"1" type:"string" required:"true"` 2665 2666 // Configuration properties for the first member within the network. 2667 // 2668 // MemberConfiguration is a required field 2669 MemberConfiguration *MemberConfiguration `type:"structure" required:"true"` 2670 2671 // The name of the network. 2672 // 2673 // Name is a required field 2674 Name *string `min:"1" type:"string" required:"true"` 2675 2676 // The voting rules used by the network to determine if a proposal is approved. 2677 // 2678 // VotingPolicy is a required field 2679 VotingPolicy *VotingPolicy `type:"structure" required:"true"` 2680} 2681 2682// String returns the string representation 2683func (s CreateNetworkInput) String() string { 2684 return awsutil.Prettify(s) 2685} 2686 2687// GoString returns the string representation 2688func (s CreateNetworkInput) GoString() string { 2689 return s.String() 2690} 2691 2692// Validate inspects the fields of the type to determine if they are valid. 2693func (s *CreateNetworkInput) Validate() error { 2694 invalidParams := request.ErrInvalidParams{Context: "CreateNetworkInput"} 2695 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 2696 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 2697 } 2698 if s.Framework == nil { 2699 invalidParams.Add(request.NewErrParamRequired("Framework")) 2700 } 2701 if s.FrameworkVersion == nil { 2702 invalidParams.Add(request.NewErrParamRequired("FrameworkVersion")) 2703 } 2704 if s.FrameworkVersion != nil && len(*s.FrameworkVersion) < 1 { 2705 invalidParams.Add(request.NewErrParamMinLen("FrameworkVersion", 1)) 2706 } 2707 if s.MemberConfiguration == nil { 2708 invalidParams.Add(request.NewErrParamRequired("MemberConfiguration")) 2709 } 2710 if s.Name == nil { 2711 invalidParams.Add(request.NewErrParamRequired("Name")) 2712 } 2713 if s.Name != nil && len(*s.Name) < 1 { 2714 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2715 } 2716 if s.VotingPolicy == nil { 2717 invalidParams.Add(request.NewErrParamRequired("VotingPolicy")) 2718 } 2719 if s.FrameworkConfiguration != nil { 2720 if err := s.FrameworkConfiguration.Validate(); err != nil { 2721 invalidParams.AddNested("FrameworkConfiguration", err.(request.ErrInvalidParams)) 2722 } 2723 } 2724 if s.MemberConfiguration != nil { 2725 if err := s.MemberConfiguration.Validate(); err != nil { 2726 invalidParams.AddNested("MemberConfiguration", err.(request.ErrInvalidParams)) 2727 } 2728 } 2729 if s.VotingPolicy != nil { 2730 if err := s.VotingPolicy.Validate(); err != nil { 2731 invalidParams.AddNested("VotingPolicy", err.(request.ErrInvalidParams)) 2732 } 2733 } 2734 2735 if invalidParams.Len() > 0 { 2736 return invalidParams 2737 } 2738 return nil 2739} 2740 2741// SetClientRequestToken sets the ClientRequestToken field's value. 2742func (s *CreateNetworkInput) SetClientRequestToken(v string) *CreateNetworkInput { 2743 s.ClientRequestToken = &v 2744 return s 2745} 2746 2747// SetDescription sets the Description field's value. 2748func (s *CreateNetworkInput) SetDescription(v string) *CreateNetworkInput { 2749 s.Description = &v 2750 return s 2751} 2752 2753// SetFramework sets the Framework field's value. 2754func (s *CreateNetworkInput) SetFramework(v string) *CreateNetworkInput { 2755 s.Framework = &v 2756 return s 2757} 2758 2759// SetFrameworkConfiguration sets the FrameworkConfiguration field's value. 2760func (s *CreateNetworkInput) SetFrameworkConfiguration(v *NetworkFrameworkConfiguration) *CreateNetworkInput { 2761 s.FrameworkConfiguration = v 2762 return s 2763} 2764 2765// SetFrameworkVersion sets the FrameworkVersion field's value. 2766func (s *CreateNetworkInput) SetFrameworkVersion(v string) *CreateNetworkInput { 2767 s.FrameworkVersion = &v 2768 return s 2769} 2770 2771// SetMemberConfiguration sets the MemberConfiguration field's value. 2772func (s *CreateNetworkInput) SetMemberConfiguration(v *MemberConfiguration) *CreateNetworkInput { 2773 s.MemberConfiguration = v 2774 return s 2775} 2776 2777// SetName sets the Name field's value. 2778func (s *CreateNetworkInput) SetName(v string) *CreateNetworkInput { 2779 s.Name = &v 2780 return s 2781} 2782 2783// SetVotingPolicy sets the VotingPolicy field's value. 2784func (s *CreateNetworkInput) SetVotingPolicy(v *VotingPolicy) *CreateNetworkInput { 2785 s.VotingPolicy = v 2786 return s 2787} 2788 2789type CreateNetworkOutput struct { 2790 _ struct{} `type:"structure"` 2791 2792 // The unique identifier for the first member within the network. 2793 MemberId *string `min:"1" type:"string"` 2794 2795 // The unique identifier for the network. 2796 NetworkId *string `min:"1" type:"string"` 2797} 2798 2799// String returns the string representation 2800func (s CreateNetworkOutput) String() string { 2801 return awsutil.Prettify(s) 2802} 2803 2804// GoString returns the string representation 2805func (s CreateNetworkOutput) GoString() string { 2806 return s.String() 2807} 2808 2809// SetMemberId sets the MemberId field's value. 2810func (s *CreateNetworkOutput) SetMemberId(v string) *CreateNetworkOutput { 2811 s.MemberId = &v 2812 return s 2813} 2814 2815// SetNetworkId sets the NetworkId field's value. 2816func (s *CreateNetworkOutput) SetNetworkId(v string) *CreateNetworkOutput { 2817 s.NetworkId = &v 2818 return s 2819} 2820 2821type CreateNodeInput struct { 2822 _ struct{} `type:"structure"` 2823 2824 // A unique, case-sensitive identifier that you provide to ensure the idempotency 2825 // of the operation. An idempotent operation completes no more than one time. 2826 // This identifier is required only if you make a service request directly using 2827 // an HTTP client. It is generated automatically if you use an AWS SDK or the 2828 // AWS CLI. 2829 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 2830 2831 // The unique identifier of the member that owns this node. 2832 // 2833 // Applies only to Hyperledger Fabric. 2834 MemberId *string `min:"1" type:"string"` 2835 2836 // The unique identifier of the network for the node. 2837 // 2838 // Ethereum public networks have the following NetworkIds: 2839 // 2840 // * n-ethereum-mainnet 2841 // 2842 // * n-ethereum-rinkeby 2843 // 2844 // * n-ethereum-ropsten 2845 // 2846 // NetworkId is a required field 2847 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 2848 2849 // The properties of a node configuration. 2850 // 2851 // NodeConfiguration is a required field 2852 NodeConfiguration *NodeConfiguration `type:"structure" required:"true"` 2853} 2854 2855// String returns the string representation 2856func (s CreateNodeInput) String() string { 2857 return awsutil.Prettify(s) 2858} 2859 2860// GoString returns the string representation 2861func (s CreateNodeInput) GoString() string { 2862 return s.String() 2863} 2864 2865// Validate inspects the fields of the type to determine if they are valid. 2866func (s *CreateNodeInput) Validate() error { 2867 invalidParams := request.ErrInvalidParams{Context: "CreateNodeInput"} 2868 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 2869 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 2870 } 2871 if s.MemberId != nil && len(*s.MemberId) < 1 { 2872 invalidParams.Add(request.NewErrParamMinLen("MemberId", 1)) 2873 } 2874 if s.NetworkId == nil { 2875 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 2876 } 2877 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 2878 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 2879 } 2880 if s.NodeConfiguration == nil { 2881 invalidParams.Add(request.NewErrParamRequired("NodeConfiguration")) 2882 } 2883 if s.NodeConfiguration != nil { 2884 if err := s.NodeConfiguration.Validate(); err != nil { 2885 invalidParams.AddNested("NodeConfiguration", err.(request.ErrInvalidParams)) 2886 } 2887 } 2888 2889 if invalidParams.Len() > 0 { 2890 return invalidParams 2891 } 2892 return nil 2893} 2894 2895// SetClientRequestToken sets the ClientRequestToken field's value. 2896func (s *CreateNodeInput) SetClientRequestToken(v string) *CreateNodeInput { 2897 s.ClientRequestToken = &v 2898 return s 2899} 2900 2901// SetMemberId sets the MemberId field's value. 2902func (s *CreateNodeInput) SetMemberId(v string) *CreateNodeInput { 2903 s.MemberId = &v 2904 return s 2905} 2906 2907// SetNetworkId sets the NetworkId field's value. 2908func (s *CreateNodeInput) SetNetworkId(v string) *CreateNodeInput { 2909 s.NetworkId = &v 2910 return s 2911} 2912 2913// SetNodeConfiguration sets the NodeConfiguration field's value. 2914func (s *CreateNodeInput) SetNodeConfiguration(v *NodeConfiguration) *CreateNodeInput { 2915 s.NodeConfiguration = v 2916 return s 2917} 2918 2919type CreateNodeOutput struct { 2920 _ struct{} `type:"structure"` 2921 2922 // The unique identifier of the node. 2923 NodeId *string `min:"1" type:"string"` 2924} 2925 2926// String returns the string representation 2927func (s CreateNodeOutput) String() string { 2928 return awsutil.Prettify(s) 2929} 2930 2931// GoString returns the string representation 2932func (s CreateNodeOutput) GoString() string { 2933 return s.String() 2934} 2935 2936// SetNodeId sets the NodeId field's value. 2937func (s *CreateNodeOutput) SetNodeId(v string) *CreateNodeOutput { 2938 s.NodeId = &v 2939 return s 2940} 2941 2942type CreateProposalInput struct { 2943 _ struct{} `type:"structure"` 2944 2945 // The type of actions proposed, such as inviting a member or removing a member. 2946 // The types of Actions in a proposal are mutually exclusive. For example, a 2947 // proposal with Invitations actions cannot also contain Removals actions. 2948 // 2949 // Actions is a required field 2950 Actions *ProposalActions `type:"structure" required:"true"` 2951 2952 // A unique, case-sensitive identifier that you provide to ensure the idempotency 2953 // of the operation. An idempotent operation completes no more than one time. 2954 // This identifier is required only if you make a service request directly using 2955 // an HTTP client. It is generated automatically if you use an AWS SDK or the 2956 // AWS CLI. 2957 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 2958 2959 // A description for the proposal that is visible to voting members, for example, 2960 // "Proposal to add Example Corp. as member." 2961 Description *string `type:"string"` 2962 2963 // The unique identifier of the member that is creating the proposal. This identifier 2964 // is especially useful for identifying the member making the proposal when 2965 // multiple members exist in a single AWS account. 2966 // 2967 // MemberId is a required field 2968 MemberId *string `min:"1" type:"string" required:"true"` 2969 2970 // The unique identifier of the network for which the proposal is made. 2971 // 2972 // NetworkId is a required field 2973 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 2974} 2975 2976// String returns the string representation 2977func (s CreateProposalInput) String() string { 2978 return awsutil.Prettify(s) 2979} 2980 2981// GoString returns the string representation 2982func (s CreateProposalInput) GoString() string { 2983 return s.String() 2984} 2985 2986// Validate inspects the fields of the type to determine if they are valid. 2987func (s *CreateProposalInput) Validate() error { 2988 invalidParams := request.ErrInvalidParams{Context: "CreateProposalInput"} 2989 if s.Actions == nil { 2990 invalidParams.Add(request.NewErrParamRequired("Actions")) 2991 } 2992 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 2993 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 2994 } 2995 if s.MemberId == nil { 2996 invalidParams.Add(request.NewErrParamRequired("MemberId")) 2997 } 2998 if s.MemberId != nil && len(*s.MemberId) < 1 { 2999 invalidParams.Add(request.NewErrParamMinLen("MemberId", 1)) 3000 } 3001 if s.NetworkId == nil { 3002 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 3003 } 3004 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 3005 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 3006 } 3007 if s.Actions != nil { 3008 if err := s.Actions.Validate(); err != nil { 3009 invalidParams.AddNested("Actions", err.(request.ErrInvalidParams)) 3010 } 3011 } 3012 3013 if invalidParams.Len() > 0 { 3014 return invalidParams 3015 } 3016 return nil 3017} 3018 3019// SetActions sets the Actions field's value. 3020func (s *CreateProposalInput) SetActions(v *ProposalActions) *CreateProposalInput { 3021 s.Actions = v 3022 return s 3023} 3024 3025// SetClientRequestToken sets the ClientRequestToken field's value. 3026func (s *CreateProposalInput) SetClientRequestToken(v string) *CreateProposalInput { 3027 s.ClientRequestToken = &v 3028 return s 3029} 3030 3031// SetDescription sets the Description field's value. 3032func (s *CreateProposalInput) SetDescription(v string) *CreateProposalInput { 3033 s.Description = &v 3034 return s 3035} 3036 3037// SetMemberId sets the MemberId field's value. 3038func (s *CreateProposalInput) SetMemberId(v string) *CreateProposalInput { 3039 s.MemberId = &v 3040 return s 3041} 3042 3043// SetNetworkId sets the NetworkId field's value. 3044func (s *CreateProposalInput) SetNetworkId(v string) *CreateProposalInput { 3045 s.NetworkId = &v 3046 return s 3047} 3048 3049type CreateProposalOutput struct { 3050 _ struct{} `type:"structure"` 3051 3052 // The unique identifier of the proposal. 3053 ProposalId *string `min:"1" type:"string"` 3054} 3055 3056// String returns the string representation 3057func (s CreateProposalOutput) String() string { 3058 return awsutil.Prettify(s) 3059} 3060 3061// GoString returns the string representation 3062func (s CreateProposalOutput) GoString() string { 3063 return s.String() 3064} 3065 3066// SetProposalId sets the ProposalId field's value. 3067func (s *CreateProposalOutput) SetProposalId(v string) *CreateProposalOutput { 3068 s.ProposalId = &v 3069 return s 3070} 3071 3072type DeleteMemberInput struct { 3073 _ struct{} `type:"structure"` 3074 3075 // The unique identifier of the member to remove. 3076 // 3077 // MemberId is a required field 3078 MemberId *string `location:"uri" locationName:"memberId" min:"1" type:"string" required:"true"` 3079 3080 // The unique identifier of the network from which the member is removed. 3081 // 3082 // NetworkId is a required field 3083 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 3084} 3085 3086// String returns the string representation 3087func (s DeleteMemberInput) String() string { 3088 return awsutil.Prettify(s) 3089} 3090 3091// GoString returns the string representation 3092func (s DeleteMemberInput) GoString() string { 3093 return s.String() 3094} 3095 3096// Validate inspects the fields of the type to determine if they are valid. 3097func (s *DeleteMemberInput) Validate() error { 3098 invalidParams := request.ErrInvalidParams{Context: "DeleteMemberInput"} 3099 if s.MemberId == nil { 3100 invalidParams.Add(request.NewErrParamRequired("MemberId")) 3101 } 3102 if s.MemberId != nil && len(*s.MemberId) < 1 { 3103 invalidParams.Add(request.NewErrParamMinLen("MemberId", 1)) 3104 } 3105 if s.NetworkId == nil { 3106 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 3107 } 3108 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 3109 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 3110 } 3111 3112 if invalidParams.Len() > 0 { 3113 return invalidParams 3114 } 3115 return nil 3116} 3117 3118// SetMemberId sets the MemberId field's value. 3119func (s *DeleteMemberInput) SetMemberId(v string) *DeleteMemberInput { 3120 s.MemberId = &v 3121 return s 3122} 3123 3124// SetNetworkId sets the NetworkId field's value. 3125func (s *DeleteMemberInput) SetNetworkId(v string) *DeleteMemberInput { 3126 s.NetworkId = &v 3127 return s 3128} 3129 3130type DeleteMemberOutput struct { 3131 _ struct{} `type:"structure"` 3132} 3133 3134// String returns the string representation 3135func (s DeleteMemberOutput) String() string { 3136 return awsutil.Prettify(s) 3137} 3138 3139// GoString returns the string representation 3140func (s DeleteMemberOutput) GoString() string { 3141 return s.String() 3142} 3143 3144type DeleteNodeInput struct { 3145 _ struct{} `type:"structure"` 3146 3147 // The unique identifier of the member that owns this node. 3148 // 3149 // Applies only to Hyperledger Fabric and is required for Hyperledger Fabric. 3150 MemberId *string `location:"querystring" locationName:"memberId" min:"1" type:"string"` 3151 3152 // The unique identifier of the network that the node is on. 3153 // 3154 // Ethereum public networks have the following NetworkIds: 3155 // 3156 // * n-ethereum-mainnet 3157 // 3158 // * n-ethereum-rinkeby 3159 // 3160 // * n-ethereum-ropsten 3161 // 3162 // NetworkId is a required field 3163 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 3164 3165 // The unique identifier of the node. 3166 // 3167 // NodeId is a required field 3168 NodeId *string `location:"uri" locationName:"nodeId" min:"1" type:"string" required:"true"` 3169} 3170 3171// String returns the string representation 3172func (s DeleteNodeInput) String() string { 3173 return awsutil.Prettify(s) 3174} 3175 3176// GoString returns the string representation 3177func (s DeleteNodeInput) GoString() string { 3178 return s.String() 3179} 3180 3181// Validate inspects the fields of the type to determine if they are valid. 3182func (s *DeleteNodeInput) Validate() error { 3183 invalidParams := request.ErrInvalidParams{Context: "DeleteNodeInput"} 3184 if s.MemberId != nil && len(*s.MemberId) < 1 { 3185 invalidParams.Add(request.NewErrParamMinLen("MemberId", 1)) 3186 } 3187 if s.NetworkId == nil { 3188 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 3189 } 3190 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 3191 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 3192 } 3193 if s.NodeId == nil { 3194 invalidParams.Add(request.NewErrParamRequired("NodeId")) 3195 } 3196 if s.NodeId != nil && len(*s.NodeId) < 1 { 3197 invalidParams.Add(request.NewErrParamMinLen("NodeId", 1)) 3198 } 3199 3200 if invalidParams.Len() > 0 { 3201 return invalidParams 3202 } 3203 return nil 3204} 3205 3206// SetMemberId sets the MemberId field's value. 3207func (s *DeleteNodeInput) SetMemberId(v string) *DeleteNodeInput { 3208 s.MemberId = &v 3209 return s 3210} 3211 3212// SetNetworkId sets the NetworkId field's value. 3213func (s *DeleteNodeInput) SetNetworkId(v string) *DeleteNodeInput { 3214 s.NetworkId = &v 3215 return s 3216} 3217 3218// SetNodeId sets the NodeId field's value. 3219func (s *DeleteNodeInput) SetNodeId(v string) *DeleteNodeInput { 3220 s.NodeId = &v 3221 return s 3222} 3223 3224type DeleteNodeOutput struct { 3225 _ struct{} `type:"structure"` 3226} 3227 3228// String returns the string representation 3229func (s DeleteNodeOutput) String() string { 3230 return awsutil.Prettify(s) 3231} 3232 3233// GoString returns the string representation 3234func (s DeleteNodeOutput) GoString() string { 3235 return s.String() 3236} 3237 3238type GetMemberInput struct { 3239 _ struct{} `type:"structure"` 3240 3241 // The unique identifier of the member. 3242 // 3243 // MemberId is a required field 3244 MemberId *string `location:"uri" locationName:"memberId" min:"1" type:"string" required:"true"` 3245 3246 // The unique identifier of the network to which the member belongs. 3247 // 3248 // NetworkId is a required field 3249 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 3250} 3251 3252// String returns the string representation 3253func (s GetMemberInput) String() string { 3254 return awsutil.Prettify(s) 3255} 3256 3257// GoString returns the string representation 3258func (s GetMemberInput) GoString() string { 3259 return s.String() 3260} 3261 3262// Validate inspects the fields of the type to determine if they are valid. 3263func (s *GetMemberInput) Validate() error { 3264 invalidParams := request.ErrInvalidParams{Context: "GetMemberInput"} 3265 if s.MemberId == nil { 3266 invalidParams.Add(request.NewErrParamRequired("MemberId")) 3267 } 3268 if s.MemberId != nil && len(*s.MemberId) < 1 { 3269 invalidParams.Add(request.NewErrParamMinLen("MemberId", 1)) 3270 } 3271 if s.NetworkId == nil { 3272 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 3273 } 3274 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 3275 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 3276 } 3277 3278 if invalidParams.Len() > 0 { 3279 return invalidParams 3280 } 3281 return nil 3282} 3283 3284// SetMemberId sets the MemberId field's value. 3285func (s *GetMemberInput) SetMemberId(v string) *GetMemberInput { 3286 s.MemberId = &v 3287 return s 3288} 3289 3290// SetNetworkId sets the NetworkId field's value. 3291func (s *GetMemberInput) SetNetworkId(v string) *GetMemberInput { 3292 s.NetworkId = &v 3293 return s 3294} 3295 3296type GetMemberOutput struct { 3297 _ struct{} `type:"structure"` 3298 3299 // The properties of a member. 3300 Member *Member `type:"structure"` 3301} 3302 3303// String returns the string representation 3304func (s GetMemberOutput) String() string { 3305 return awsutil.Prettify(s) 3306} 3307 3308// GoString returns the string representation 3309func (s GetMemberOutput) GoString() string { 3310 return s.String() 3311} 3312 3313// SetMember sets the Member field's value. 3314func (s *GetMemberOutput) SetMember(v *Member) *GetMemberOutput { 3315 s.Member = v 3316 return s 3317} 3318 3319type GetNetworkInput struct { 3320 _ struct{} `type:"structure"` 3321 3322 // The unique identifier of the network to get information about. 3323 // 3324 // NetworkId is a required field 3325 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 3326} 3327 3328// String returns the string representation 3329func (s GetNetworkInput) String() string { 3330 return awsutil.Prettify(s) 3331} 3332 3333// GoString returns the string representation 3334func (s GetNetworkInput) GoString() string { 3335 return s.String() 3336} 3337 3338// Validate inspects the fields of the type to determine if they are valid. 3339func (s *GetNetworkInput) Validate() error { 3340 invalidParams := request.ErrInvalidParams{Context: "GetNetworkInput"} 3341 if s.NetworkId == nil { 3342 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 3343 } 3344 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 3345 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 3346 } 3347 3348 if invalidParams.Len() > 0 { 3349 return invalidParams 3350 } 3351 return nil 3352} 3353 3354// SetNetworkId sets the NetworkId field's value. 3355func (s *GetNetworkInput) SetNetworkId(v string) *GetNetworkInput { 3356 s.NetworkId = &v 3357 return s 3358} 3359 3360type GetNetworkOutput struct { 3361 _ struct{} `type:"structure"` 3362 3363 // An object containing network configuration parameters. 3364 Network *Network `type:"structure"` 3365} 3366 3367// String returns the string representation 3368func (s GetNetworkOutput) String() string { 3369 return awsutil.Prettify(s) 3370} 3371 3372// GoString returns the string representation 3373func (s GetNetworkOutput) GoString() string { 3374 return s.String() 3375} 3376 3377// SetNetwork sets the Network field's value. 3378func (s *GetNetworkOutput) SetNetwork(v *Network) *GetNetworkOutput { 3379 s.Network = v 3380 return s 3381} 3382 3383type GetNodeInput struct { 3384 _ struct{} `type:"structure"` 3385 3386 // The unique identifier of the member that owns the node. 3387 // 3388 // Applies only to Hyperledger Fabric and is required for Hyperledger Fabric. 3389 MemberId *string `location:"querystring" locationName:"memberId" min:"1" type:"string"` 3390 3391 // The unique identifier of the network that the node is on. 3392 // 3393 // NetworkId is a required field 3394 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 3395 3396 // The unique identifier of the node. 3397 // 3398 // NodeId is a required field 3399 NodeId *string `location:"uri" locationName:"nodeId" min:"1" type:"string" required:"true"` 3400} 3401 3402// String returns the string representation 3403func (s GetNodeInput) String() string { 3404 return awsutil.Prettify(s) 3405} 3406 3407// GoString returns the string representation 3408func (s GetNodeInput) GoString() string { 3409 return s.String() 3410} 3411 3412// Validate inspects the fields of the type to determine if they are valid. 3413func (s *GetNodeInput) Validate() error { 3414 invalidParams := request.ErrInvalidParams{Context: "GetNodeInput"} 3415 if s.MemberId != nil && len(*s.MemberId) < 1 { 3416 invalidParams.Add(request.NewErrParamMinLen("MemberId", 1)) 3417 } 3418 if s.NetworkId == nil { 3419 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 3420 } 3421 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 3422 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 3423 } 3424 if s.NodeId == nil { 3425 invalidParams.Add(request.NewErrParamRequired("NodeId")) 3426 } 3427 if s.NodeId != nil && len(*s.NodeId) < 1 { 3428 invalidParams.Add(request.NewErrParamMinLen("NodeId", 1)) 3429 } 3430 3431 if invalidParams.Len() > 0 { 3432 return invalidParams 3433 } 3434 return nil 3435} 3436 3437// SetMemberId sets the MemberId field's value. 3438func (s *GetNodeInput) SetMemberId(v string) *GetNodeInput { 3439 s.MemberId = &v 3440 return s 3441} 3442 3443// SetNetworkId sets the NetworkId field's value. 3444func (s *GetNodeInput) SetNetworkId(v string) *GetNodeInput { 3445 s.NetworkId = &v 3446 return s 3447} 3448 3449// SetNodeId sets the NodeId field's value. 3450func (s *GetNodeInput) SetNodeId(v string) *GetNodeInput { 3451 s.NodeId = &v 3452 return s 3453} 3454 3455type GetNodeOutput struct { 3456 _ struct{} `type:"structure"` 3457 3458 // Properties of the node configuration. 3459 Node *Node `type:"structure"` 3460} 3461 3462// String returns the string representation 3463func (s GetNodeOutput) String() string { 3464 return awsutil.Prettify(s) 3465} 3466 3467// GoString returns the string representation 3468func (s GetNodeOutput) GoString() string { 3469 return s.String() 3470} 3471 3472// SetNode sets the Node field's value. 3473func (s *GetNodeOutput) SetNode(v *Node) *GetNodeOutput { 3474 s.Node = v 3475 return s 3476} 3477 3478type GetProposalInput struct { 3479 _ struct{} `type:"structure"` 3480 3481 // The unique identifier of the network for which the proposal is made. 3482 // 3483 // NetworkId is a required field 3484 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 3485 3486 // The unique identifier of the proposal. 3487 // 3488 // ProposalId is a required field 3489 ProposalId *string `location:"uri" locationName:"proposalId" min:"1" type:"string" required:"true"` 3490} 3491 3492// String returns the string representation 3493func (s GetProposalInput) String() string { 3494 return awsutil.Prettify(s) 3495} 3496 3497// GoString returns the string representation 3498func (s GetProposalInput) GoString() string { 3499 return s.String() 3500} 3501 3502// Validate inspects the fields of the type to determine if they are valid. 3503func (s *GetProposalInput) Validate() error { 3504 invalidParams := request.ErrInvalidParams{Context: "GetProposalInput"} 3505 if s.NetworkId == nil { 3506 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 3507 } 3508 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 3509 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 3510 } 3511 if s.ProposalId == nil { 3512 invalidParams.Add(request.NewErrParamRequired("ProposalId")) 3513 } 3514 if s.ProposalId != nil && len(*s.ProposalId) < 1 { 3515 invalidParams.Add(request.NewErrParamMinLen("ProposalId", 1)) 3516 } 3517 3518 if invalidParams.Len() > 0 { 3519 return invalidParams 3520 } 3521 return nil 3522} 3523 3524// SetNetworkId sets the NetworkId field's value. 3525func (s *GetProposalInput) SetNetworkId(v string) *GetProposalInput { 3526 s.NetworkId = &v 3527 return s 3528} 3529 3530// SetProposalId sets the ProposalId field's value. 3531func (s *GetProposalInput) SetProposalId(v string) *GetProposalInput { 3532 s.ProposalId = &v 3533 return s 3534} 3535 3536type GetProposalOutput struct { 3537 _ struct{} `type:"structure"` 3538 3539 // Information about a proposal. 3540 Proposal *Proposal `type:"structure"` 3541} 3542 3543// String returns the string representation 3544func (s GetProposalOutput) String() string { 3545 return awsutil.Prettify(s) 3546} 3547 3548// GoString returns the string representation 3549func (s GetProposalOutput) GoString() string { 3550 return s.String() 3551} 3552 3553// SetProposal sets the Proposal field's value. 3554func (s *GetProposalOutput) SetProposal(v *Proposal) *GetProposalOutput { 3555 s.Proposal = v 3556 return s 3557} 3558 3559type IllegalActionException struct { 3560 _ struct{} `type:"structure"` 3561 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3562 3563 Message_ *string `locationName:"Message" type:"string"` 3564} 3565 3566// String returns the string representation 3567func (s IllegalActionException) String() string { 3568 return awsutil.Prettify(s) 3569} 3570 3571// GoString returns the string representation 3572func (s IllegalActionException) GoString() string { 3573 return s.String() 3574} 3575 3576func newErrorIllegalActionException(v protocol.ResponseMetadata) error { 3577 return &IllegalActionException{ 3578 RespMetadata: v, 3579 } 3580} 3581 3582// Code returns the exception type name. 3583func (s *IllegalActionException) Code() string { 3584 return "IllegalActionException" 3585} 3586 3587// Message returns the exception's message. 3588func (s *IllegalActionException) Message() string { 3589 if s.Message_ != nil { 3590 return *s.Message_ 3591 } 3592 return "" 3593} 3594 3595// OrigErr always returns nil, satisfies awserr.Error interface. 3596func (s *IllegalActionException) OrigErr() error { 3597 return nil 3598} 3599 3600func (s *IllegalActionException) Error() string { 3601 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3602} 3603 3604// Status code returns the HTTP status code for the request's response error. 3605func (s *IllegalActionException) StatusCode() int { 3606 return s.RespMetadata.StatusCode 3607} 3608 3609// RequestID returns the service's response RequestID for request. 3610func (s *IllegalActionException) RequestID() string { 3611 return s.RespMetadata.RequestID 3612} 3613 3614// The request processing has failed because of an unknown error, exception 3615// or failure. 3616type InternalServiceErrorException struct { 3617 _ struct{} `type:"structure"` 3618 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3619 3620 Message_ *string `locationName:"message" type:"string"` 3621} 3622 3623// String returns the string representation 3624func (s InternalServiceErrorException) String() string { 3625 return awsutil.Prettify(s) 3626} 3627 3628// GoString returns the string representation 3629func (s InternalServiceErrorException) GoString() string { 3630 return s.String() 3631} 3632 3633func newErrorInternalServiceErrorException(v protocol.ResponseMetadata) error { 3634 return &InternalServiceErrorException{ 3635 RespMetadata: v, 3636 } 3637} 3638 3639// Code returns the exception type name. 3640func (s *InternalServiceErrorException) Code() string { 3641 return "InternalServiceErrorException" 3642} 3643 3644// Message returns the exception's message. 3645func (s *InternalServiceErrorException) Message() string { 3646 if s.Message_ != nil { 3647 return *s.Message_ 3648 } 3649 return "" 3650} 3651 3652// OrigErr always returns nil, satisfies awserr.Error interface. 3653func (s *InternalServiceErrorException) OrigErr() error { 3654 return nil 3655} 3656 3657func (s *InternalServiceErrorException) Error() string { 3658 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3659} 3660 3661// Status code returns the HTTP status code for the request's response error. 3662func (s *InternalServiceErrorException) StatusCode() int { 3663 return s.RespMetadata.StatusCode 3664} 3665 3666// RequestID returns the service's response RequestID for request. 3667func (s *InternalServiceErrorException) RequestID() string { 3668 return s.RespMetadata.RequestID 3669} 3670 3671// The action or operation requested is invalid. Verify that the action is typed 3672// correctly. 3673type InvalidRequestException struct { 3674 _ struct{} `type:"structure"` 3675 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3676 3677 Message_ *string `locationName:"Message" type:"string"` 3678} 3679 3680// String returns the string representation 3681func (s InvalidRequestException) String() string { 3682 return awsutil.Prettify(s) 3683} 3684 3685// GoString returns the string representation 3686func (s InvalidRequestException) GoString() string { 3687 return s.String() 3688} 3689 3690func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { 3691 return &InvalidRequestException{ 3692 RespMetadata: v, 3693 } 3694} 3695 3696// Code returns the exception type name. 3697func (s *InvalidRequestException) Code() string { 3698 return "InvalidRequestException" 3699} 3700 3701// Message returns the exception's message. 3702func (s *InvalidRequestException) Message() string { 3703 if s.Message_ != nil { 3704 return *s.Message_ 3705 } 3706 return "" 3707} 3708 3709// OrigErr always returns nil, satisfies awserr.Error interface. 3710func (s *InvalidRequestException) OrigErr() error { 3711 return nil 3712} 3713 3714func (s *InvalidRequestException) Error() string { 3715 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3716} 3717 3718// Status code returns the HTTP status code for the request's response error. 3719func (s *InvalidRequestException) StatusCode() int { 3720 return s.RespMetadata.StatusCode 3721} 3722 3723// RequestID returns the service's response RequestID for request. 3724func (s *InvalidRequestException) RequestID() string { 3725 return s.RespMetadata.RequestID 3726} 3727 3728// An invitation to an AWS account to create a member and join the network. 3729// 3730// Applies only to Hyperledger Fabric. 3731type Invitation struct { 3732 _ struct{} `type:"structure"` 3733 3734 // The date and time that the invitation was created. 3735 CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` 3736 3737 // The date and time that the invitation expires. This is the CreationDate plus 3738 // the ProposalDurationInHours that is specified in the ProposalThresholdPolicy. 3739 // After this date and time, the invitee can no longer create a member and join 3740 // the network using this InvitationId. 3741 ExpirationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` 3742 3743 // The unique identifier for the invitation. 3744 InvitationId *string `min:"1" type:"string"` 3745 3746 // A summary of network configuration properties. 3747 NetworkSummary *NetworkSummary `type:"structure"` 3748 3749 // The status of the invitation: 3750 // 3751 // * PENDING - The invitee has not created a member to join the network, 3752 // and the invitation has not yet expired. 3753 // 3754 // * ACCEPTING - The invitee has begun creating a member, and creation has 3755 // not yet completed. 3756 // 3757 // * ACCEPTED - The invitee created a member and joined the network using 3758 // the InvitationID. 3759 // 3760 // * REJECTED - The invitee rejected the invitation. 3761 // 3762 // * EXPIRED - The invitee neither created a member nor rejected the invitation 3763 // before the ExpirationDate. 3764 Status *string `type:"string" enum:"InvitationStatus"` 3765} 3766 3767// String returns the string representation 3768func (s Invitation) String() string { 3769 return awsutil.Prettify(s) 3770} 3771 3772// GoString returns the string representation 3773func (s Invitation) GoString() string { 3774 return s.String() 3775} 3776 3777// SetCreationDate sets the CreationDate field's value. 3778func (s *Invitation) SetCreationDate(v time.Time) *Invitation { 3779 s.CreationDate = &v 3780 return s 3781} 3782 3783// SetExpirationDate sets the ExpirationDate field's value. 3784func (s *Invitation) SetExpirationDate(v time.Time) *Invitation { 3785 s.ExpirationDate = &v 3786 return s 3787} 3788 3789// SetInvitationId sets the InvitationId field's value. 3790func (s *Invitation) SetInvitationId(v string) *Invitation { 3791 s.InvitationId = &v 3792 return s 3793} 3794 3795// SetNetworkSummary sets the NetworkSummary field's value. 3796func (s *Invitation) SetNetworkSummary(v *NetworkSummary) *Invitation { 3797 s.NetworkSummary = v 3798 return s 3799} 3800 3801// SetStatus sets the Status field's value. 3802func (s *Invitation) SetStatus(v string) *Invitation { 3803 s.Status = &v 3804 return s 3805} 3806 3807// An action to invite a specific AWS account to create a member and join the 3808// network. The InviteAction is carried out when a Proposal is APPROVED. 3809// 3810// Applies only to Hyperledger Fabric. 3811type InviteAction struct { 3812 _ struct{} `type:"structure"` 3813 3814 // The AWS account ID to invite. 3815 // 3816 // Principal is a required field 3817 Principal *string `type:"string" required:"true"` 3818} 3819 3820// String returns the string representation 3821func (s InviteAction) String() string { 3822 return awsutil.Prettify(s) 3823} 3824 3825// GoString returns the string representation 3826func (s InviteAction) GoString() string { 3827 return s.String() 3828} 3829 3830// Validate inspects the fields of the type to determine if they are valid. 3831func (s *InviteAction) Validate() error { 3832 invalidParams := request.ErrInvalidParams{Context: "InviteAction"} 3833 if s.Principal == nil { 3834 invalidParams.Add(request.NewErrParamRequired("Principal")) 3835 } 3836 3837 if invalidParams.Len() > 0 { 3838 return invalidParams 3839 } 3840 return nil 3841} 3842 3843// SetPrincipal sets the Principal field's value. 3844func (s *InviteAction) SetPrincipal(v string) *InviteAction { 3845 s.Principal = &v 3846 return s 3847} 3848 3849type ListInvitationsInput struct { 3850 _ struct{} `type:"structure"` 3851 3852 // The maximum number of invitations to return. 3853 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 3854 3855 // The pagination token that indicates the next set of results to retrieve. 3856 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 3857} 3858 3859// String returns the string representation 3860func (s ListInvitationsInput) String() string { 3861 return awsutil.Prettify(s) 3862} 3863 3864// GoString returns the string representation 3865func (s ListInvitationsInput) GoString() string { 3866 return s.String() 3867} 3868 3869// Validate inspects the fields of the type to determine if they are valid. 3870func (s *ListInvitationsInput) Validate() error { 3871 invalidParams := request.ErrInvalidParams{Context: "ListInvitationsInput"} 3872 if s.MaxResults != nil && *s.MaxResults < 1 { 3873 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3874 } 3875 3876 if invalidParams.Len() > 0 { 3877 return invalidParams 3878 } 3879 return nil 3880} 3881 3882// SetMaxResults sets the MaxResults field's value. 3883func (s *ListInvitationsInput) SetMaxResults(v int64) *ListInvitationsInput { 3884 s.MaxResults = &v 3885 return s 3886} 3887 3888// SetNextToken sets the NextToken field's value. 3889func (s *ListInvitationsInput) SetNextToken(v string) *ListInvitationsInput { 3890 s.NextToken = &v 3891 return s 3892} 3893 3894type ListInvitationsOutput struct { 3895 _ struct{} `type:"structure"` 3896 3897 // The invitations for the network. 3898 Invitations []*Invitation `type:"list"` 3899 3900 // The pagination token that indicates the next set of results to retrieve. 3901 NextToken *string `type:"string"` 3902} 3903 3904// String returns the string representation 3905func (s ListInvitationsOutput) String() string { 3906 return awsutil.Prettify(s) 3907} 3908 3909// GoString returns the string representation 3910func (s ListInvitationsOutput) GoString() string { 3911 return s.String() 3912} 3913 3914// SetInvitations sets the Invitations field's value. 3915func (s *ListInvitationsOutput) SetInvitations(v []*Invitation) *ListInvitationsOutput { 3916 s.Invitations = v 3917 return s 3918} 3919 3920// SetNextToken sets the NextToken field's value. 3921func (s *ListInvitationsOutput) SetNextToken(v string) *ListInvitationsOutput { 3922 s.NextToken = &v 3923 return s 3924} 3925 3926type ListMembersInput struct { 3927 _ struct{} `type:"structure"` 3928 3929 // An optional Boolean value. If provided, the request is limited either to 3930 // members that the current AWS account owns (true) or that other AWS accounts 3931 // own (false). If omitted, all members are listed. 3932 IsOwned *bool `location:"querystring" locationName:"isOwned" type:"boolean"` 3933 3934 // The maximum number of members to return in the request. 3935 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 3936 3937 // The optional name of the member to list. 3938 Name *string `location:"querystring" locationName:"name" type:"string"` 3939 3940 // The unique identifier of the network for which to list members. 3941 // 3942 // NetworkId is a required field 3943 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 3944 3945 // The pagination token that indicates the next set of results to retrieve. 3946 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 3947 3948 // An optional status specifier. If provided, only members currently in this 3949 // status are listed. 3950 Status *string `location:"querystring" locationName:"status" type:"string" enum:"MemberStatus"` 3951} 3952 3953// String returns the string representation 3954func (s ListMembersInput) String() string { 3955 return awsutil.Prettify(s) 3956} 3957 3958// GoString returns the string representation 3959func (s ListMembersInput) GoString() string { 3960 return s.String() 3961} 3962 3963// Validate inspects the fields of the type to determine if they are valid. 3964func (s *ListMembersInput) Validate() error { 3965 invalidParams := request.ErrInvalidParams{Context: "ListMembersInput"} 3966 if s.MaxResults != nil && *s.MaxResults < 1 { 3967 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3968 } 3969 if s.NetworkId == nil { 3970 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 3971 } 3972 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 3973 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 3974 } 3975 3976 if invalidParams.Len() > 0 { 3977 return invalidParams 3978 } 3979 return nil 3980} 3981 3982// SetIsOwned sets the IsOwned field's value. 3983func (s *ListMembersInput) SetIsOwned(v bool) *ListMembersInput { 3984 s.IsOwned = &v 3985 return s 3986} 3987 3988// SetMaxResults sets the MaxResults field's value. 3989func (s *ListMembersInput) SetMaxResults(v int64) *ListMembersInput { 3990 s.MaxResults = &v 3991 return s 3992} 3993 3994// SetName sets the Name field's value. 3995func (s *ListMembersInput) SetName(v string) *ListMembersInput { 3996 s.Name = &v 3997 return s 3998} 3999 4000// SetNetworkId sets the NetworkId field's value. 4001func (s *ListMembersInput) SetNetworkId(v string) *ListMembersInput { 4002 s.NetworkId = &v 4003 return s 4004} 4005 4006// SetNextToken sets the NextToken field's value. 4007func (s *ListMembersInput) SetNextToken(v string) *ListMembersInput { 4008 s.NextToken = &v 4009 return s 4010} 4011 4012// SetStatus sets the Status field's value. 4013func (s *ListMembersInput) SetStatus(v string) *ListMembersInput { 4014 s.Status = &v 4015 return s 4016} 4017 4018type ListMembersOutput struct { 4019 _ struct{} `type:"structure"` 4020 4021 // An array of MemberSummary objects. Each object contains details about a network 4022 // member. 4023 Members []*MemberSummary `type:"list"` 4024 4025 // The pagination token that indicates the next set of results to retrieve. 4026 NextToken *string `type:"string"` 4027} 4028 4029// String returns the string representation 4030func (s ListMembersOutput) String() string { 4031 return awsutil.Prettify(s) 4032} 4033 4034// GoString returns the string representation 4035func (s ListMembersOutput) GoString() string { 4036 return s.String() 4037} 4038 4039// SetMembers sets the Members field's value. 4040func (s *ListMembersOutput) SetMembers(v []*MemberSummary) *ListMembersOutput { 4041 s.Members = v 4042 return s 4043} 4044 4045// SetNextToken sets the NextToken field's value. 4046func (s *ListMembersOutput) SetNextToken(v string) *ListMembersOutput { 4047 s.NextToken = &v 4048 return s 4049} 4050 4051type ListNetworksInput struct { 4052 _ struct{} `type:"structure"` 4053 4054 // An optional framework specifier. If provided, only networks of this framework 4055 // type are listed. 4056 Framework *string `location:"querystring" locationName:"framework" type:"string" enum:"Framework"` 4057 4058 // The maximum number of networks to list. 4059 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 4060 4061 // The name of the network. 4062 Name *string `location:"querystring" locationName:"name" type:"string"` 4063 4064 // The pagination token that indicates the next set of results to retrieve. 4065 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 4066 4067 // An optional status specifier. If provided, only networks currently in this 4068 // status are listed. 4069 // 4070 // Applies only to Hyperledger Fabric. 4071 Status *string `location:"querystring" locationName:"status" type:"string" enum:"NetworkStatus"` 4072} 4073 4074// String returns the string representation 4075func (s ListNetworksInput) String() string { 4076 return awsutil.Prettify(s) 4077} 4078 4079// GoString returns the string representation 4080func (s ListNetworksInput) GoString() string { 4081 return s.String() 4082} 4083 4084// Validate inspects the fields of the type to determine if they are valid. 4085func (s *ListNetworksInput) Validate() error { 4086 invalidParams := request.ErrInvalidParams{Context: "ListNetworksInput"} 4087 if s.MaxResults != nil && *s.MaxResults < 1 { 4088 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4089 } 4090 4091 if invalidParams.Len() > 0 { 4092 return invalidParams 4093 } 4094 return nil 4095} 4096 4097// SetFramework sets the Framework field's value. 4098func (s *ListNetworksInput) SetFramework(v string) *ListNetworksInput { 4099 s.Framework = &v 4100 return s 4101} 4102 4103// SetMaxResults sets the MaxResults field's value. 4104func (s *ListNetworksInput) SetMaxResults(v int64) *ListNetworksInput { 4105 s.MaxResults = &v 4106 return s 4107} 4108 4109// SetName sets the Name field's value. 4110func (s *ListNetworksInput) SetName(v string) *ListNetworksInput { 4111 s.Name = &v 4112 return s 4113} 4114 4115// SetNextToken sets the NextToken field's value. 4116func (s *ListNetworksInput) SetNextToken(v string) *ListNetworksInput { 4117 s.NextToken = &v 4118 return s 4119} 4120 4121// SetStatus sets the Status field's value. 4122func (s *ListNetworksInput) SetStatus(v string) *ListNetworksInput { 4123 s.Status = &v 4124 return s 4125} 4126 4127type ListNetworksOutput struct { 4128 _ struct{} `type:"structure"` 4129 4130 // An array of NetworkSummary objects that contain configuration properties 4131 // for each network. 4132 Networks []*NetworkSummary `type:"list"` 4133 4134 // The pagination token that indicates the next set of results to retrieve. 4135 NextToken *string `type:"string"` 4136} 4137 4138// String returns the string representation 4139func (s ListNetworksOutput) String() string { 4140 return awsutil.Prettify(s) 4141} 4142 4143// GoString returns the string representation 4144func (s ListNetworksOutput) GoString() string { 4145 return s.String() 4146} 4147 4148// SetNetworks sets the Networks field's value. 4149func (s *ListNetworksOutput) SetNetworks(v []*NetworkSummary) *ListNetworksOutput { 4150 s.Networks = v 4151 return s 4152} 4153 4154// SetNextToken sets the NextToken field's value. 4155func (s *ListNetworksOutput) SetNextToken(v string) *ListNetworksOutput { 4156 s.NextToken = &v 4157 return s 4158} 4159 4160type ListNodesInput struct { 4161 _ struct{} `type:"structure"` 4162 4163 // The maximum number of nodes to list. 4164 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 4165 4166 // The unique identifier of the member who owns the nodes to list. 4167 // 4168 // Applies only to Hyperledger Fabric and is required for Hyperledger Fabric. 4169 MemberId *string `location:"querystring" locationName:"memberId" min:"1" type:"string"` 4170 4171 // The unique identifier of the network for which to list nodes. 4172 // 4173 // NetworkId is a required field 4174 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 4175 4176 // The pagination token that indicates the next set of results to retrieve. 4177 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 4178 4179 // An optional status specifier. If provided, only nodes currently in this status 4180 // are listed. 4181 Status *string `location:"querystring" locationName:"status" type:"string" enum:"NodeStatus"` 4182} 4183 4184// String returns the string representation 4185func (s ListNodesInput) String() string { 4186 return awsutil.Prettify(s) 4187} 4188 4189// GoString returns the string representation 4190func (s ListNodesInput) GoString() string { 4191 return s.String() 4192} 4193 4194// Validate inspects the fields of the type to determine if they are valid. 4195func (s *ListNodesInput) Validate() error { 4196 invalidParams := request.ErrInvalidParams{Context: "ListNodesInput"} 4197 if s.MaxResults != nil && *s.MaxResults < 1 { 4198 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4199 } 4200 if s.MemberId != nil && len(*s.MemberId) < 1 { 4201 invalidParams.Add(request.NewErrParamMinLen("MemberId", 1)) 4202 } 4203 if s.NetworkId == nil { 4204 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 4205 } 4206 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 4207 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 4208 } 4209 4210 if invalidParams.Len() > 0 { 4211 return invalidParams 4212 } 4213 return nil 4214} 4215 4216// SetMaxResults sets the MaxResults field's value. 4217func (s *ListNodesInput) SetMaxResults(v int64) *ListNodesInput { 4218 s.MaxResults = &v 4219 return s 4220} 4221 4222// SetMemberId sets the MemberId field's value. 4223func (s *ListNodesInput) SetMemberId(v string) *ListNodesInput { 4224 s.MemberId = &v 4225 return s 4226} 4227 4228// SetNetworkId sets the NetworkId field's value. 4229func (s *ListNodesInput) SetNetworkId(v string) *ListNodesInput { 4230 s.NetworkId = &v 4231 return s 4232} 4233 4234// SetNextToken sets the NextToken field's value. 4235func (s *ListNodesInput) SetNextToken(v string) *ListNodesInput { 4236 s.NextToken = &v 4237 return s 4238} 4239 4240// SetStatus sets the Status field's value. 4241func (s *ListNodesInput) SetStatus(v string) *ListNodesInput { 4242 s.Status = &v 4243 return s 4244} 4245 4246type ListNodesOutput struct { 4247 _ struct{} `type:"structure"` 4248 4249 // The pagination token that indicates the next set of results to retrieve. 4250 NextToken *string `type:"string"` 4251 4252 // An array of NodeSummary objects that contain configuration properties for 4253 // each node. 4254 Nodes []*NodeSummary `type:"list"` 4255} 4256 4257// String returns the string representation 4258func (s ListNodesOutput) String() string { 4259 return awsutil.Prettify(s) 4260} 4261 4262// GoString returns the string representation 4263func (s ListNodesOutput) GoString() string { 4264 return s.String() 4265} 4266 4267// SetNextToken sets the NextToken field's value. 4268func (s *ListNodesOutput) SetNextToken(v string) *ListNodesOutput { 4269 s.NextToken = &v 4270 return s 4271} 4272 4273// SetNodes sets the Nodes field's value. 4274func (s *ListNodesOutput) SetNodes(v []*NodeSummary) *ListNodesOutput { 4275 s.Nodes = v 4276 return s 4277} 4278 4279type ListProposalVotesInput struct { 4280 _ struct{} `type:"structure"` 4281 4282 // The maximum number of votes to return. 4283 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 4284 4285 // The unique identifier of the network. 4286 // 4287 // NetworkId is a required field 4288 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 4289 4290 // The pagination token that indicates the next set of results to retrieve. 4291 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 4292 4293 // The unique identifier of the proposal. 4294 // 4295 // ProposalId is a required field 4296 ProposalId *string `location:"uri" locationName:"proposalId" min:"1" type:"string" required:"true"` 4297} 4298 4299// String returns the string representation 4300func (s ListProposalVotesInput) String() string { 4301 return awsutil.Prettify(s) 4302} 4303 4304// GoString returns the string representation 4305func (s ListProposalVotesInput) GoString() string { 4306 return s.String() 4307} 4308 4309// Validate inspects the fields of the type to determine if they are valid. 4310func (s *ListProposalVotesInput) Validate() error { 4311 invalidParams := request.ErrInvalidParams{Context: "ListProposalVotesInput"} 4312 if s.MaxResults != nil && *s.MaxResults < 1 { 4313 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4314 } 4315 if s.NetworkId == nil { 4316 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 4317 } 4318 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 4319 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 4320 } 4321 if s.ProposalId == nil { 4322 invalidParams.Add(request.NewErrParamRequired("ProposalId")) 4323 } 4324 if s.ProposalId != nil && len(*s.ProposalId) < 1 { 4325 invalidParams.Add(request.NewErrParamMinLen("ProposalId", 1)) 4326 } 4327 4328 if invalidParams.Len() > 0 { 4329 return invalidParams 4330 } 4331 return nil 4332} 4333 4334// SetMaxResults sets the MaxResults field's value. 4335func (s *ListProposalVotesInput) SetMaxResults(v int64) *ListProposalVotesInput { 4336 s.MaxResults = &v 4337 return s 4338} 4339 4340// SetNetworkId sets the NetworkId field's value. 4341func (s *ListProposalVotesInput) SetNetworkId(v string) *ListProposalVotesInput { 4342 s.NetworkId = &v 4343 return s 4344} 4345 4346// SetNextToken sets the NextToken field's value. 4347func (s *ListProposalVotesInput) SetNextToken(v string) *ListProposalVotesInput { 4348 s.NextToken = &v 4349 return s 4350} 4351 4352// SetProposalId sets the ProposalId field's value. 4353func (s *ListProposalVotesInput) SetProposalId(v string) *ListProposalVotesInput { 4354 s.ProposalId = &v 4355 return s 4356} 4357 4358type ListProposalVotesOutput struct { 4359 _ struct{} `type:"structure"` 4360 4361 // The pagination token that indicates the next set of results to retrieve. 4362 NextToken *string `type:"string"` 4363 4364 // The list of votes. 4365 ProposalVotes []*VoteSummary `type:"list"` 4366} 4367 4368// String returns the string representation 4369func (s ListProposalVotesOutput) String() string { 4370 return awsutil.Prettify(s) 4371} 4372 4373// GoString returns the string representation 4374func (s ListProposalVotesOutput) GoString() string { 4375 return s.String() 4376} 4377 4378// SetNextToken sets the NextToken field's value. 4379func (s *ListProposalVotesOutput) SetNextToken(v string) *ListProposalVotesOutput { 4380 s.NextToken = &v 4381 return s 4382} 4383 4384// SetProposalVotes sets the ProposalVotes field's value. 4385func (s *ListProposalVotesOutput) SetProposalVotes(v []*VoteSummary) *ListProposalVotesOutput { 4386 s.ProposalVotes = v 4387 return s 4388} 4389 4390type ListProposalsInput struct { 4391 _ struct{} `type:"structure"` 4392 4393 // The maximum number of proposals to return. 4394 MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` 4395 4396 // The unique identifier of the network. 4397 // 4398 // NetworkId is a required field 4399 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 4400 4401 // The pagination token that indicates the next set of results to retrieve. 4402 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 4403} 4404 4405// String returns the string representation 4406func (s ListProposalsInput) String() string { 4407 return awsutil.Prettify(s) 4408} 4409 4410// GoString returns the string representation 4411func (s ListProposalsInput) GoString() string { 4412 return s.String() 4413} 4414 4415// Validate inspects the fields of the type to determine if they are valid. 4416func (s *ListProposalsInput) Validate() error { 4417 invalidParams := request.ErrInvalidParams{Context: "ListProposalsInput"} 4418 if s.MaxResults != nil && *s.MaxResults < 1 { 4419 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4420 } 4421 if s.NetworkId == nil { 4422 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 4423 } 4424 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 4425 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 4426 } 4427 4428 if invalidParams.Len() > 0 { 4429 return invalidParams 4430 } 4431 return nil 4432} 4433 4434// SetMaxResults sets the MaxResults field's value. 4435func (s *ListProposalsInput) SetMaxResults(v int64) *ListProposalsInput { 4436 s.MaxResults = &v 4437 return s 4438} 4439 4440// SetNetworkId sets the NetworkId field's value. 4441func (s *ListProposalsInput) SetNetworkId(v string) *ListProposalsInput { 4442 s.NetworkId = &v 4443 return s 4444} 4445 4446// SetNextToken sets the NextToken field's value. 4447func (s *ListProposalsInput) SetNextToken(v string) *ListProposalsInput { 4448 s.NextToken = &v 4449 return s 4450} 4451 4452type ListProposalsOutput struct { 4453 _ struct{} `type:"structure"` 4454 4455 // The pagination token that indicates the next set of results to retrieve. 4456 NextToken *string `type:"string"` 4457 4458 // The summary of each proposal made on the network. 4459 Proposals []*ProposalSummary `type:"list"` 4460} 4461 4462// String returns the string representation 4463func (s ListProposalsOutput) String() string { 4464 return awsutil.Prettify(s) 4465} 4466 4467// GoString returns the string representation 4468func (s ListProposalsOutput) GoString() string { 4469 return s.String() 4470} 4471 4472// SetNextToken sets the NextToken field's value. 4473func (s *ListProposalsOutput) SetNextToken(v string) *ListProposalsOutput { 4474 s.NextToken = &v 4475 return s 4476} 4477 4478// SetProposals sets the Proposals field's value. 4479func (s *ListProposalsOutput) SetProposals(v []*ProposalSummary) *ListProposalsOutput { 4480 s.Proposals = v 4481 return s 4482} 4483 4484// A configuration for logging events. 4485type LogConfiguration struct { 4486 _ struct{} `type:"structure"` 4487 4488 // Indicates whether logging is enabled. 4489 Enabled *bool `type:"boolean"` 4490} 4491 4492// String returns the string representation 4493func (s LogConfiguration) String() string { 4494 return awsutil.Prettify(s) 4495} 4496 4497// GoString returns the string representation 4498func (s LogConfiguration) GoString() string { 4499 return s.String() 4500} 4501 4502// SetEnabled sets the Enabled field's value. 4503func (s *LogConfiguration) SetEnabled(v bool) *LogConfiguration { 4504 s.Enabled = &v 4505 return s 4506} 4507 4508// A collection of log configurations. 4509type LogConfigurations struct { 4510 _ struct{} `type:"structure"` 4511 4512 // Parameters for publishing logs to Amazon CloudWatch Logs. 4513 Cloudwatch *LogConfiguration `type:"structure"` 4514} 4515 4516// String returns the string representation 4517func (s LogConfigurations) String() string { 4518 return awsutil.Prettify(s) 4519} 4520 4521// GoString returns the string representation 4522func (s LogConfigurations) GoString() string { 4523 return s.String() 4524} 4525 4526// SetCloudwatch sets the Cloudwatch field's value. 4527func (s *LogConfigurations) SetCloudwatch(v *LogConfiguration) *LogConfigurations { 4528 s.Cloudwatch = v 4529 return s 4530} 4531 4532// Member configuration properties. 4533// 4534// Applies only to Hyperledger Fabric. 4535type Member struct { 4536 _ struct{} `type:"structure"` 4537 4538 // The date and time that the member was created. 4539 CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` 4540 4541 // An optional description for the member. 4542 Description *string `type:"string"` 4543 4544 // Attributes relevant to a member for the blockchain framework that the Managed 4545 // Blockchain network uses. 4546 FrameworkAttributes *MemberFrameworkAttributes `type:"structure"` 4547 4548 // The unique identifier of the member. 4549 Id *string `min:"1" type:"string"` 4550 4551 // Configuration properties for logging events associated with a member. 4552 LogPublishingConfiguration *MemberLogPublishingConfiguration `type:"structure"` 4553 4554 // The name of the member. 4555 Name *string `min:"1" type:"string"` 4556 4557 // The unique identifier of the network to which the member belongs. 4558 NetworkId *string `min:"1" type:"string"` 4559 4560 // The status of a member. 4561 // 4562 // * CREATING - The AWS account is in the process of creating a member. 4563 // 4564 // * AVAILABLE - The member has been created and can participate in the network. 4565 // 4566 // * CREATE_FAILED - The AWS account attempted to create a member and creation 4567 // failed. 4568 // 4569 // * DELETING - The member and all associated resources are in the process 4570 // of being deleted. Either the AWS account that owns the member deleted 4571 // it, or the member is being deleted as the result of an APPROVED PROPOSAL 4572 // to remove the member. 4573 // 4574 // * DELETED - The member can no longer participate on the network and all 4575 // associated resources are deleted. Either the AWS account that owns the 4576 // member deleted it, or the member is being deleted as the result of an 4577 // APPROVED PROPOSAL to remove the member. 4578 Status *string `type:"string" enum:"MemberStatus"` 4579} 4580 4581// String returns the string representation 4582func (s Member) String() string { 4583 return awsutil.Prettify(s) 4584} 4585 4586// GoString returns the string representation 4587func (s Member) GoString() string { 4588 return s.String() 4589} 4590 4591// SetCreationDate sets the CreationDate field's value. 4592func (s *Member) SetCreationDate(v time.Time) *Member { 4593 s.CreationDate = &v 4594 return s 4595} 4596 4597// SetDescription sets the Description field's value. 4598func (s *Member) SetDescription(v string) *Member { 4599 s.Description = &v 4600 return s 4601} 4602 4603// SetFrameworkAttributes sets the FrameworkAttributes field's value. 4604func (s *Member) SetFrameworkAttributes(v *MemberFrameworkAttributes) *Member { 4605 s.FrameworkAttributes = v 4606 return s 4607} 4608 4609// SetId sets the Id field's value. 4610func (s *Member) SetId(v string) *Member { 4611 s.Id = &v 4612 return s 4613} 4614 4615// SetLogPublishingConfiguration sets the LogPublishingConfiguration field's value. 4616func (s *Member) SetLogPublishingConfiguration(v *MemberLogPublishingConfiguration) *Member { 4617 s.LogPublishingConfiguration = v 4618 return s 4619} 4620 4621// SetName sets the Name field's value. 4622func (s *Member) SetName(v string) *Member { 4623 s.Name = &v 4624 return s 4625} 4626 4627// SetNetworkId sets the NetworkId field's value. 4628func (s *Member) SetNetworkId(v string) *Member { 4629 s.NetworkId = &v 4630 return s 4631} 4632 4633// SetStatus sets the Status field's value. 4634func (s *Member) SetStatus(v string) *Member { 4635 s.Status = &v 4636 return s 4637} 4638 4639// Configuration properties of the member. 4640// 4641// Applies only to Hyperledger Fabric. 4642type MemberConfiguration struct { 4643 _ struct{} `type:"structure"` 4644 4645 // An optional description of the member. 4646 Description *string `type:"string"` 4647 4648 // Configuration properties of the blockchain framework relevant to the member. 4649 // 4650 // FrameworkConfiguration is a required field 4651 FrameworkConfiguration *MemberFrameworkConfiguration `type:"structure" required:"true"` 4652 4653 // Configuration properties for logging events associated with a member of a 4654 // Managed Blockchain network. 4655 LogPublishingConfiguration *MemberLogPublishingConfiguration `type:"structure"` 4656 4657 // The name of the member. 4658 // 4659 // Name is a required field 4660 Name *string `min:"1" type:"string" required:"true"` 4661} 4662 4663// String returns the string representation 4664func (s MemberConfiguration) String() string { 4665 return awsutil.Prettify(s) 4666} 4667 4668// GoString returns the string representation 4669func (s MemberConfiguration) GoString() string { 4670 return s.String() 4671} 4672 4673// Validate inspects the fields of the type to determine if they are valid. 4674func (s *MemberConfiguration) Validate() error { 4675 invalidParams := request.ErrInvalidParams{Context: "MemberConfiguration"} 4676 if s.FrameworkConfiguration == nil { 4677 invalidParams.Add(request.NewErrParamRequired("FrameworkConfiguration")) 4678 } 4679 if s.Name == nil { 4680 invalidParams.Add(request.NewErrParamRequired("Name")) 4681 } 4682 if s.Name != nil && len(*s.Name) < 1 { 4683 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 4684 } 4685 if s.FrameworkConfiguration != nil { 4686 if err := s.FrameworkConfiguration.Validate(); err != nil { 4687 invalidParams.AddNested("FrameworkConfiguration", err.(request.ErrInvalidParams)) 4688 } 4689 } 4690 4691 if invalidParams.Len() > 0 { 4692 return invalidParams 4693 } 4694 return nil 4695} 4696 4697// SetDescription sets the Description field's value. 4698func (s *MemberConfiguration) SetDescription(v string) *MemberConfiguration { 4699 s.Description = &v 4700 return s 4701} 4702 4703// SetFrameworkConfiguration sets the FrameworkConfiguration field's value. 4704func (s *MemberConfiguration) SetFrameworkConfiguration(v *MemberFrameworkConfiguration) *MemberConfiguration { 4705 s.FrameworkConfiguration = v 4706 return s 4707} 4708 4709// SetLogPublishingConfiguration sets the LogPublishingConfiguration field's value. 4710func (s *MemberConfiguration) SetLogPublishingConfiguration(v *MemberLogPublishingConfiguration) *MemberConfiguration { 4711 s.LogPublishingConfiguration = v 4712 return s 4713} 4714 4715// SetName sets the Name field's value. 4716func (s *MemberConfiguration) SetName(v string) *MemberConfiguration { 4717 s.Name = &v 4718 return s 4719} 4720 4721// Attributes of Hyperledger Fabric for a member in a Managed Blockchain network 4722// using the Hyperledger Fabric framework. 4723type MemberFabricAttributes struct { 4724 _ struct{} `type:"structure"` 4725 4726 // The user name for the initial administrator user for the member. 4727 AdminUsername *string `min:"1" type:"string"` 4728 4729 // The endpoint used to access the member's certificate authority. 4730 CaEndpoint *string `type:"string"` 4731} 4732 4733// String returns the string representation 4734func (s MemberFabricAttributes) String() string { 4735 return awsutil.Prettify(s) 4736} 4737 4738// GoString returns the string representation 4739func (s MemberFabricAttributes) GoString() string { 4740 return s.String() 4741} 4742 4743// SetAdminUsername sets the AdminUsername field's value. 4744func (s *MemberFabricAttributes) SetAdminUsername(v string) *MemberFabricAttributes { 4745 s.AdminUsername = &v 4746 return s 4747} 4748 4749// SetCaEndpoint sets the CaEndpoint field's value. 4750func (s *MemberFabricAttributes) SetCaEndpoint(v string) *MemberFabricAttributes { 4751 s.CaEndpoint = &v 4752 return s 4753} 4754 4755// Configuration properties for Hyperledger Fabric for a member in a Managed 4756// Blockchain network using the Hyperledger Fabric framework. 4757type MemberFabricConfiguration struct { 4758 _ struct{} `type:"structure"` 4759 4760 // The password for the member's initial administrative user. The AdminPassword 4761 // must be at least eight characters long and no more than 32 characters. It 4762 // must contain at least one uppercase letter, one lowercase letter, and one 4763 // digit. It cannot have a single quotation mark (‘), a double quotation marks 4764 // (“), a forward slash(/), a backward slash(\), @, or a space. 4765 // 4766 // AdminPassword is a required field 4767 AdminPassword *string `min:"8" type:"string" required:"true" sensitive:"true"` 4768 4769 // The user name for the member's initial administrative user. 4770 // 4771 // AdminUsername is a required field 4772 AdminUsername *string `min:"1" type:"string" required:"true"` 4773} 4774 4775// String returns the string representation 4776func (s MemberFabricConfiguration) String() string { 4777 return awsutil.Prettify(s) 4778} 4779 4780// GoString returns the string representation 4781func (s MemberFabricConfiguration) GoString() string { 4782 return s.String() 4783} 4784 4785// Validate inspects the fields of the type to determine if they are valid. 4786func (s *MemberFabricConfiguration) Validate() error { 4787 invalidParams := request.ErrInvalidParams{Context: "MemberFabricConfiguration"} 4788 if s.AdminPassword == nil { 4789 invalidParams.Add(request.NewErrParamRequired("AdminPassword")) 4790 } 4791 if s.AdminPassword != nil && len(*s.AdminPassword) < 8 { 4792 invalidParams.Add(request.NewErrParamMinLen("AdminPassword", 8)) 4793 } 4794 if s.AdminUsername == nil { 4795 invalidParams.Add(request.NewErrParamRequired("AdminUsername")) 4796 } 4797 if s.AdminUsername != nil && len(*s.AdminUsername) < 1 { 4798 invalidParams.Add(request.NewErrParamMinLen("AdminUsername", 1)) 4799 } 4800 4801 if invalidParams.Len() > 0 { 4802 return invalidParams 4803 } 4804 return nil 4805} 4806 4807// SetAdminPassword sets the AdminPassword field's value. 4808func (s *MemberFabricConfiguration) SetAdminPassword(v string) *MemberFabricConfiguration { 4809 s.AdminPassword = &v 4810 return s 4811} 4812 4813// SetAdminUsername sets the AdminUsername field's value. 4814func (s *MemberFabricConfiguration) SetAdminUsername(v string) *MemberFabricConfiguration { 4815 s.AdminUsername = &v 4816 return s 4817} 4818 4819// Configuration properties for logging events associated with a member of a 4820// Managed Blockchain network using the Hyperledger Fabric framework. 4821type MemberFabricLogPublishingConfiguration struct { 4822 _ struct{} `type:"structure"` 4823 4824 // Configuration properties for logging events associated with a member's Certificate 4825 // Authority (CA). CA logs help you determine when a member in your account 4826 // joins the network, or when new peers register with a member CA. 4827 CaLogs *LogConfigurations `type:"structure"` 4828} 4829 4830// String returns the string representation 4831func (s MemberFabricLogPublishingConfiguration) String() string { 4832 return awsutil.Prettify(s) 4833} 4834 4835// GoString returns the string representation 4836func (s MemberFabricLogPublishingConfiguration) GoString() string { 4837 return s.String() 4838} 4839 4840// SetCaLogs sets the CaLogs field's value. 4841func (s *MemberFabricLogPublishingConfiguration) SetCaLogs(v *LogConfigurations) *MemberFabricLogPublishingConfiguration { 4842 s.CaLogs = v 4843 return s 4844} 4845 4846// Attributes relevant to a member for the blockchain framework that the Managed 4847// Blockchain network uses. 4848type MemberFrameworkAttributes struct { 4849 _ struct{} `type:"structure"` 4850 4851 // Attributes of Hyperledger Fabric relevant to a member on a Managed Blockchain 4852 // network that uses Hyperledger Fabric. 4853 Fabric *MemberFabricAttributes `type:"structure"` 4854} 4855 4856// String returns the string representation 4857func (s MemberFrameworkAttributes) String() string { 4858 return awsutil.Prettify(s) 4859} 4860 4861// GoString returns the string representation 4862func (s MemberFrameworkAttributes) GoString() string { 4863 return s.String() 4864} 4865 4866// SetFabric sets the Fabric field's value. 4867func (s *MemberFrameworkAttributes) SetFabric(v *MemberFabricAttributes) *MemberFrameworkAttributes { 4868 s.Fabric = v 4869 return s 4870} 4871 4872// Configuration properties relevant to a member for the blockchain framework 4873// that the Managed Blockchain network uses. 4874type MemberFrameworkConfiguration struct { 4875 _ struct{} `type:"structure"` 4876 4877 // Attributes of Hyperledger Fabric for a member on a Managed Blockchain network 4878 // that uses Hyperledger Fabric. 4879 Fabric *MemberFabricConfiguration `type:"structure"` 4880} 4881 4882// String returns the string representation 4883func (s MemberFrameworkConfiguration) String() string { 4884 return awsutil.Prettify(s) 4885} 4886 4887// GoString returns the string representation 4888func (s MemberFrameworkConfiguration) GoString() string { 4889 return s.String() 4890} 4891 4892// Validate inspects the fields of the type to determine if they are valid. 4893func (s *MemberFrameworkConfiguration) Validate() error { 4894 invalidParams := request.ErrInvalidParams{Context: "MemberFrameworkConfiguration"} 4895 if s.Fabric != nil { 4896 if err := s.Fabric.Validate(); err != nil { 4897 invalidParams.AddNested("Fabric", err.(request.ErrInvalidParams)) 4898 } 4899 } 4900 4901 if invalidParams.Len() > 0 { 4902 return invalidParams 4903 } 4904 return nil 4905} 4906 4907// SetFabric sets the Fabric field's value. 4908func (s *MemberFrameworkConfiguration) SetFabric(v *MemberFabricConfiguration) *MemberFrameworkConfiguration { 4909 s.Fabric = v 4910 return s 4911} 4912 4913// Configuration properties for logging events associated with a member of a 4914// Managed Blockchain network. 4915type MemberLogPublishingConfiguration struct { 4916 _ struct{} `type:"structure"` 4917 4918 // Configuration properties for logging events associated with a member of a 4919 // Managed Blockchain network using the Hyperledger Fabric framework. 4920 Fabric *MemberFabricLogPublishingConfiguration `type:"structure"` 4921} 4922 4923// String returns the string representation 4924func (s MemberLogPublishingConfiguration) String() string { 4925 return awsutil.Prettify(s) 4926} 4927 4928// GoString returns the string representation 4929func (s MemberLogPublishingConfiguration) GoString() string { 4930 return s.String() 4931} 4932 4933// SetFabric sets the Fabric field's value. 4934func (s *MemberLogPublishingConfiguration) SetFabric(v *MemberFabricLogPublishingConfiguration) *MemberLogPublishingConfiguration { 4935 s.Fabric = v 4936 return s 4937} 4938 4939// A summary of configuration properties for a member. 4940// 4941// Applies only to Hyperledger Fabric. 4942type MemberSummary struct { 4943 _ struct{} `type:"structure"` 4944 4945 // The date and time that the member was created. 4946 CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` 4947 4948 // An optional description of the member. 4949 Description *string `type:"string"` 4950 4951 // The unique identifier of the member. 4952 Id *string `min:"1" type:"string"` 4953 4954 // An indicator of whether the member is owned by your AWS account or a different 4955 // AWS account. 4956 IsOwned *bool `type:"boolean"` 4957 4958 // The name of the member. 4959 Name *string `min:"1" type:"string"` 4960 4961 // The status of the member. 4962 // 4963 // * CREATING - The AWS account is in the process of creating a member. 4964 // 4965 // * AVAILABLE - The member has been created and can participate in the network. 4966 // 4967 // * CREATE_FAILED - The AWS account attempted to create a member and creation 4968 // failed. 4969 // 4970 // * DELETING - The member and all associated resources are in the process 4971 // of being deleted. Either the AWS account that owns the member deleted 4972 // it, or the member is being deleted as the result of an APPROVED PROPOSAL 4973 // to remove the member. 4974 // 4975 // * DELETED - The member can no longer participate on the network and all 4976 // associated resources are deleted. Either the AWS account that owns the 4977 // member deleted it, or the member is being deleted as the result of an 4978 // APPROVED PROPOSAL to remove the member. 4979 Status *string `type:"string" enum:"MemberStatus"` 4980} 4981 4982// String returns the string representation 4983func (s MemberSummary) String() string { 4984 return awsutil.Prettify(s) 4985} 4986 4987// GoString returns the string representation 4988func (s MemberSummary) GoString() string { 4989 return s.String() 4990} 4991 4992// SetCreationDate sets the CreationDate field's value. 4993func (s *MemberSummary) SetCreationDate(v time.Time) *MemberSummary { 4994 s.CreationDate = &v 4995 return s 4996} 4997 4998// SetDescription sets the Description field's value. 4999func (s *MemberSummary) SetDescription(v string) *MemberSummary { 5000 s.Description = &v 5001 return s 5002} 5003 5004// SetId sets the Id field's value. 5005func (s *MemberSummary) SetId(v string) *MemberSummary { 5006 s.Id = &v 5007 return s 5008} 5009 5010// SetIsOwned sets the IsOwned field's value. 5011func (s *MemberSummary) SetIsOwned(v bool) *MemberSummary { 5012 s.IsOwned = &v 5013 return s 5014} 5015 5016// SetName sets the Name field's value. 5017func (s *MemberSummary) SetName(v string) *MemberSummary { 5018 s.Name = &v 5019 return s 5020} 5021 5022// SetStatus sets the Status field's value. 5023func (s *MemberSummary) SetStatus(v string) *MemberSummary { 5024 s.Status = &v 5025 return s 5026} 5027 5028// Network configuration properties. 5029type Network struct { 5030 _ struct{} `type:"structure"` 5031 5032 // The date and time that the network was created. 5033 CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` 5034 5035 // Attributes of the blockchain framework for the network. 5036 Description *string `type:"string"` 5037 5038 // The blockchain framework that the network uses. 5039 Framework *string `type:"string" enum:"Framework"` 5040 5041 // Attributes of the blockchain framework that the network uses. 5042 FrameworkAttributes *NetworkFrameworkAttributes `type:"structure"` 5043 5044 // The version of the blockchain framework that the network uses. 5045 FrameworkVersion *string `min:"1" type:"string"` 5046 5047 // The unique identifier of the network. 5048 Id *string `min:"1" type:"string"` 5049 5050 // The name of the network. 5051 Name *string `min:"1" type:"string"` 5052 5053 // The current status of the network. 5054 Status *string `type:"string" enum:"NetworkStatus"` 5055 5056 // The voting rules for the network to decide if a proposal is accepted. 5057 VotingPolicy *VotingPolicy `type:"structure"` 5058 5059 // The VPC endpoint service name of the VPC endpoint service of the network. 5060 // Members use the VPC endpoint service name to create a VPC endpoint to access 5061 // network resources. 5062 VpcEndpointServiceName *string `type:"string"` 5063} 5064 5065// String returns the string representation 5066func (s Network) String() string { 5067 return awsutil.Prettify(s) 5068} 5069 5070// GoString returns the string representation 5071func (s Network) GoString() string { 5072 return s.String() 5073} 5074 5075// SetCreationDate sets the CreationDate field's value. 5076func (s *Network) SetCreationDate(v time.Time) *Network { 5077 s.CreationDate = &v 5078 return s 5079} 5080 5081// SetDescription sets the Description field's value. 5082func (s *Network) SetDescription(v string) *Network { 5083 s.Description = &v 5084 return s 5085} 5086 5087// SetFramework sets the Framework field's value. 5088func (s *Network) SetFramework(v string) *Network { 5089 s.Framework = &v 5090 return s 5091} 5092 5093// SetFrameworkAttributes sets the FrameworkAttributes field's value. 5094func (s *Network) SetFrameworkAttributes(v *NetworkFrameworkAttributes) *Network { 5095 s.FrameworkAttributes = v 5096 return s 5097} 5098 5099// SetFrameworkVersion sets the FrameworkVersion field's value. 5100func (s *Network) SetFrameworkVersion(v string) *Network { 5101 s.FrameworkVersion = &v 5102 return s 5103} 5104 5105// SetId sets the Id field's value. 5106func (s *Network) SetId(v string) *Network { 5107 s.Id = &v 5108 return s 5109} 5110 5111// SetName sets the Name field's value. 5112func (s *Network) SetName(v string) *Network { 5113 s.Name = &v 5114 return s 5115} 5116 5117// SetStatus sets the Status field's value. 5118func (s *Network) SetStatus(v string) *Network { 5119 s.Status = &v 5120 return s 5121} 5122 5123// SetVotingPolicy sets the VotingPolicy field's value. 5124func (s *Network) SetVotingPolicy(v *VotingPolicy) *Network { 5125 s.VotingPolicy = v 5126 return s 5127} 5128 5129// SetVpcEndpointServiceName sets the VpcEndpointServiceName field's value. 5130func (s *Network) SetVpcEndpointServiceName(v string) *Network { 5131 s.VpcEndpointServiceName = &v 5132 return s 5133} 5134 5135// Attributes of Ethereum for a network. 5136type NetworkEthereumAttributes struct { 5137 _ struct{} `type:"structure"` 5138 5139 // The Ethereum CHAIN_ID associated with the Ethereum network. Chain IDs are 5140 // as follows: 5141 // 5142 // * mainnet = 1 5143 // 5144 // * rinkeby = 4 5145 // 5146 // * ropsten = 3 5147 ChainId *string `type:"string"` 5148} 5149 5150// String returns the string representation 5151func (s NetworkEthereumAttributes) String() string { 5152 return awsutil.Prettify(s) 5153} 5154 5155// GoString returns the string representation 5156func (s NetworkEthereumAttributes) GoString() string { 5157 return s.String() 5158} 5159 5160// SetChainId sets the ChainId field's value. 5161func (s *NetworkEthereumAttributes) SetChainId(v string) *NetworkEthereumAttributes { 5162 s.ChainId = &v 5163 return s 5164} 5165 5166// Attributes of Hyperledger Fabric for a network. 5167type NetworkFabricAttributes struct { 5168 _ struct{} `type:"structure"` 5169 5170 // The edition of Amazon Managed Blockchain that Hyperledger Fabric uses. For 5171 // more information, see Amazon Managed Blockchain Pricing (http://aws.amazon.com/managed-blockchain/pricing/). 5172 Edition *string `type:"string" enum:"Edition"` 5173 5174 // The endpoint of the ordering service for the network. 5175 OrderingServiceEndpoint *string `type:"string"` 5176} 5177 5178// String returns the string representation 5179func (s NetworkFabricAttributes) String() string { 5180 return awsutil.Prettify(s) 5181} 5182 5183// GoString returns the string representation 5184func (s NetworkFabricAttributes) GoString() string { 5185 return s.String() 5186} 5187 5188// SetEdition sets the Edition field's value. 5189func (s *NetworkFabricAttributes) SetEdition(v string) *NetworkFabricAttributes { 5190 s.Edition = &v 5191 return s 5192} 5193 5194// SetOrderingServiceEndpoint sets the OrderingServiceEndpoint field's value. 5195func (s *NetworkFabricAttributes) SetOrderingServiceEndpoint(v string) *NetworkFabricAttributes { 5196 s.OrderingServiceEndpoint = &v 5197 return s 5198} 5199 5200// Hyperledger Fabric configuration properties for the network. 5201type NetworkFabricConfiguration struct { 5202 _ struct{} `type:"structure"` 5203 5204 // The edition of Amazon Managed Blockchain that the network uses. For more 5205 // information, see Amazon Managed Blockchain Pricing (http://aws.amazon.com/managed-blockchain/pricing/). 5206 // 5207 // Edition is a required field 5208 Edition *string `type:"string" required:"true" enum:"Edition"` 5209} 5210 5211// String returns the string representation 5212func (s NetworkFabricConfiguration) String() string { 5213 return awsutil.Prettify(s) 5214} 5215 5216// GoString returns the string representation 5217func (s NetworkFabricConfiguration) GoString() string { 5218 return s.String() 5219} 5220 5221// Validate inspects the fields of the type to determine if they are valid. 5222func (s *NetworkFabricConfiguration) Validate() error { 5223 invalidParams := request.ErrInvalidParams{Context: "NetworkFabricConfiguration"} 5224 if s.Edition == nil { 5225 invalidParams.Add(request.NewErrParamRequired("Edition")) 5226 } 5227 5228 if invalidParams.Len() > 0 { 5229 return invalidParams 5230 } 5231 return nil 5232} 5233 5234// SetEdition sets the Edition field's value. 5235func (s *NetworkFabricConfiguration) SetEdition(v string) *NetworkFabricConfiguration { 5236 s.Edition = &v 5237 return s 5238} 5239 5240// Attributes relevant to the network for the blockchain framework that the 5241// network uses. 5242type NetworkFrameworkAttributes struct { 5243 _ struct{} `type:"structure"` 5244 5245 // Attributes of an Ethereum network for Managed Blockchain resources participating 5246 // in an Ethereum network. 5247 Ethereum *NetworkEthereumAttributes `type:"structure"` 5248 5249 // Attributes of Hyperledger Fabric for a Managed Blockchain network that uses 5250 // Hyperledger Fabric. 5251 Fabric *NetworkFabricAttributes `type:"structure"` 5252} 5253 5254// String returns the string representation 5255func (s NetworkFrameworkAttributes) String() string { 5256 return awsutil.Prettify(s) 5257} 5258 5259// GoString returns the string representation 5260func (s NetworkFrameworkAttributes) GoString() string { 5261 return s.String() 5262} 5263 5264// SetEthereum sets the Ethereum field's value. 5265func (s *NetworkFrameworkAttributes) SetEthereum(v *NetworkEthereumAttributes) *NetworkFrameworkAttributes { 5266 s.Ethereum = v 5267 return s 5268} 5269 5270// SetFabric sets the Fabric field's value. 5271func (s *NetworkFrameworkAttributes) SetFabric(v *NetworkFabricAttributes) *NetworkFrameworkAttributes { 5272 s.Fabric = v 5273 return s 5274} 5275 5276// Configuration properties relevant to the network for the blockchain framework 5277// that the network uses. 5278type NetworkFrameworkConfiguration struct { 5279 _ struct{} `type:"structure"` 5280 5281 // Hyperledger Fabric configuration properties for a Managed Blockchain network 5282 // that uses Hyperledger Fabric. 5283 Fabric *NetworkFabricConfiguration `type:"structure"` 5284} 5285 5286// String returns the string representation 5287func (s NetworkFrameworkConfiguration) String() string { 5288 return awsutil.Prettify(s) 5289} 5290 5291// GoString returns the string representation 5292func (s NetworkFrameworkConfiguration) GoString() string { 5293 return s.String() 5294} 5295 5296// Validate inspects the fields of the type to determine if they are valid. 5297func (s *NetworkFrameworkConfiguration) Validate() error { 5298 invalidParams := request.ErrInvalidParams{Context: "NetworkFrameworkConfiguration"} 5299 if s.Fabric != nil { 5300 if err := s.Fabric.Validate(); err != nil { 5301 invalidParams.AddNested("Fabric", err.(request.ErrInvalidParams)) 5302 } 5303 } 5304 5305 if invalidParams.Len() > 0 { 5306 return invalidParams 5307 } 5308 return nil 5309} 5310 5311// SetFabric sets the Fabric field's value. 5312func (s *NetworkFrameworkConfiguration) SetFabric(v *NetworkFabricConfiguration) *NetworkFrameworkConfiguration { 5313 s.Fabric = v 5314 return s 5315} 5316 5317// A summary of network configuration properties. 5318type NetworkSummary struct { 5319 _ struct{} `type:"structure"` 5320 5321 // The date and time that the network was created. 5322 CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` 5323 5324 // An optional description of the network. 5325 Description *string `type:"string"` 5326 5327 // The blockchain framework that the network uses. 5328 Framework *string `type:"string" enum:"Framework"` 5329 5330 // The version of the blockchain framework that the network uses. 5331 FrameworkVersion *string `min:"1" type:"string"` 5332 5333 // The unique identifier of the network. 5334 Id *string `min:"1" type:"string"` 5335 5336 // The name of the network. 5337 Name *string `min:"1" type:"string"` 5338 5339 // The current status of the network. 5340 Status *string `type:"string" enum:"NetworkStatus"` 5341} 5342 5343// String returns the string representation 5344func (s NetworkSummary) String() string { 5345 return awsutil.Prettify(s) 5346} 5347 5348// GoString returns the string representation 5349func (s NetworkSummary) GoString() string { 5350 return s.String() 5351} 5352 5353// SetCreationDate sets the CreationDate field's value. 5354func (s *NetworkSummary) SetCreationDate(v time.Time) *NetworkSummary { 5355 s.CreationDate = &v 5356 return s 5357} 5358 5359// SetDescription sets the Description field's value. 5360func (s *NetworkSummary) SetDescription(v string) *NetworkSummary { 5361 s.Description = &v 5362 return s 5363} 5364 5365// SetFramework sets the Framework field's value. 5366func (s *NetworkSummary) SetFramework(v string) *NetworkSummary { 5367 s.Framework = &v 5368 return s 5369} 5370 5371// SetFrameworkVersion sets the FrameworkVersion field's value. 5372func (s *NetworkSummary) SetFrameworkVersion(v string) *NetworkSummary { 5373 s.FrameworkVersion = &v 5374 return s 5375} 5376 5377// SetId sets the Id field's value. 5378func (s *NetworkSummary) SetId(v string) *NetworkSummary { 5379 s.Id = &v 5380 return s 5381} 5382 5383// SetName sets the Name field's value. 5384func (s *NetworkSummary) SetName(v string) *NetworkSummary { 5385 s.Name = &v 5386 return s 5387} 5388 5389// SetStatus sets the Status field's value. 5390func (s *NetworkSummary) SetStatus(v string) *NetworkSummary { 5391 s.Status = &v 5392 return s 5393} 5394 5395// Configuration properties of a node. 5396type Node struct { 5397 _ struct{} `type:"structure"` 5398 5399 // The Availability Zone in which the node exists. 5400 AvailabilityZone *string `type:"string"` 5401 5402 // The date and time that the node was created. 5403 CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` 5404 5405 // Attributes of the blockchain framework being used. 5406 FrameworkAttributes *NodeFrameworkAttributes `type:"structure"` 5407 5408 // The unique identifier of the node. 5409 Id *string `min:"1" type:"string"` 5410 5411 // The instance type of the node. 5412 InstanceType *string `type:"string"` 5413 5414 // Configuration properties for logging events associated with a peer node on 5415 // a Hyperledger Fabric network on Managed Blockchain. 5416 LogPublishingConfiguration *NodeLogPublishingConfiguration `type:"structure"` 5417 5418 // The unique identifier of the member to which the node belongs. 5419 // 5420 // Applies only to Hyperledger Fabric. 5421 MemberId *string `min:"1" type:"string"` 5422 5423 // The unique identifier of the network that the node is on. 5424 NetworkId *string `min:"1" type:"string"` 5425 5426 // The state database that the node uses. Values are LevelDB or CouchDB. 5427 // 5428 // Applies only to Hyperledger Fabric. 5429 StateDB *string `type:"string" enum:"StateDBType"` 5430 5431 // The status of the node. 5432 Status *string `type:"string" enum:"NodeStatus"` 5433} 5434 5435// String returns the string representation 5436func (s Node) String() string { 5437 return awsutil.Prettify(s) 5438} 5439 5440// GoString returns the string representation 5441func (s Node) GoString() string { 5442 return s.String() 5443} 5444 5445// SetAvailabilityZone sets the AvailabilityZone field's value. 5446func (s *Node) SetAvailabilityZone(v string) *Node { 5447 s.AvailabilityZone = &v 5448 return s 5449} 5450 5451// SetCreationDate sets the CreationDate field's value. 5452func (s *Node) SetCreationDate(v time.Time) *Node { 5453 s.CreationDate = &v 5454 return s 5455} 5456 5457// SetFrameworkAttributes sets the FrameworkAttributes field's value. 5458func (s *Node) SetFrameworkAttributes(v *NodeFrameworkAttributes) *Node { 5459 s.FrameworkAttributes = v 5460 return s 5461} 5462 5463// SetId sets the Id field's value. 5464func (s *Node) SetId(v string) *Node { 5465 s.Id = &v 5466 return s 5467} 5468 5469// SetInstanceType sets the InstanceType field's value. 5470func (s *Node) SetInstanceType(v string) *Node { 5471 s.InstanceType = &v 5472 return s 5473} 5474 5475// SetLogPublishingConfiguration sets the LogPublishingConfiguration field's value. 5476func (s *Node) SetLogPublishingConfiguration(v *NodeLogPublishingConfiguration) *Node { 5477 s.LogPublishingConfiguration = v 5478 return s 5479} 5480 5481// SetMemberId sets the MemberId field's value. 5482func (s *Node) SetMemberId(v string) *Node { 5483 s.MemberId = &v 5484 return s 5485} 5486 5487// SetNetworkId sets the NetworkId field's value. 5488func (s *Node) SetNetworkId(v string) *Node { 5489 s.NetworkId = &v 5490 return s 5491} 5492 5493// SetStateDB sets the StateDB field's value. 5494func (s *Node) SetStateDB(v string) *Node { 5495 s.StateDB = &v 5496 return s 5497} 5498 5499// SetStatus sets the Status field's value. 5500func (s *Node) SetStatus(v string) *Node { 5501 s.Status = &v 5502 return s 5503} 5504 5505// Configuration properties of a node. 5506type NodeConfiguration struct { 5507 _ struct{} `type:"structure"` 5508 5509 // The Availability Zone in which the node exists. 5510 AvailabilityZone *string `type:"string"` 5511 5512 // The Amazon Managed Blockchain instance type for the node. 5513 // 5514 // InstanceType is a required field 5515 InstanceType *string `type:"string" required:"true"` 5516 5517 // Configuration properties for logging events associated with a peer node on 5518 // a Hyperledger Fabric network on Managed Blockchain. 5519 LogPublishingConfiguration *NodeLogPublishingConfiguration `type:"structure"` 5520 5521 // The state database that the node uses. Values are LevelDB or CouchDB. When 5522 // using an Amazon Managed Blockchain network with Hyperledger Fabric version 5523 // 1.4 or later, the default is CouchDB. 5524 // 5525 // Applies only to Hyperledger Fabric. 5526 StateDB *string `type:"string" enum:"StateDBType"` 5527} 5528 5529// String returns the string representation 5530func (s NodeConfiguration) String() string { 5531 return awsutil.Prettify(s) 5532} 5533 5534// GoString returns the string representation 5535func (s NodeConfiguration) GoString() string { 5536 return s.String() 5537} 5538 5539// Validate inspects the fields of the type to determine if they are valid. 5540func (s *NodeConfiguration) Validate() error { 5541 invalidParams := request.ErrInvalidParams{Context: "NodeConfiguration"} 5542 if s.InstanceType == nil { 5543 invalidParams.Add(request.NewErrParamRequired("InstanceType")) 5544 } 5545 5546 if invalidParams.Len() > 0 { 5547 return invalidParams 5548 } 5549 return nil 5550} 5551 5552// SetAvailabilityZone sets the AvailabilityZone field's value. 5553func (s *NodeConfiguration) SetAvailabilityZone(v string) *NodeConfiguration { 5554 s.AvailabilityZone = &v 5555 return s 5556} 5557 5558// SetInstanceType sets the InstanceType field's value. 5559func (s *NodeConfiguration) SetInstanceType(v string) *NodeConfiguration { 5560 s.InstanceType = &v 5561 return s 5562} 5563 5564// SetLogPublishingConfiguration sets the LogPublishingConfiguration field's value. 5565func (s *NodeConfiguration) SetLogPublishingConfiguration(v *NodeLogPublishingConfiguration) *NodeConfiguration { 5566 s.LogPublishingConfiguration = v 5567 return s 5568} 5569 5570// SetStateDB sets the StateDB field's value. 5571func (s *NodeConfiguration) SetStateDB(v string) *NodeConfiguration { 5572 s.StateDB = &v 5573 return s 5574} 5575 5576// Attributes of an Ethereum node. 5577type NodeEthereumAttributes struct { 5578 _ struct{} `type:"structure"` 5579 5580 // The endpoint on which the Ethereum node listens to run Ethereum JSON-RPC 5581 // methods over HTTP connections from a client. Use this endpoint in client 5582 // code for smart contracts when using an HTTP connection. Connections to this 5583 // endpoint are authenticated using Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). 5584 HttpEndpoint *string `type:"string"` 5585 5586 // The endpoint on which the Ethereum node listens to run Ethereum JSON-RPC 5587 // methods over WebSockets connections from a client. Use this endpoint in client 5588 // code for smart contracts when using a WebSockets connection. Connections 5589 // to this endpoint are authenticated using Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). 5590 WebSocketEndpoint *string `type:"string"` 5591} 5592 5593// String returns the string representation 5594func (s NodeEthereumAttributes) String() string { 5595 return awsutil.Prettify(s) 5596} 5597 5598// GoString returns the string representation 5599func (s NodeEthereumAttributes) GoString() string { 5600 return s.String() 5601} 5602 5603// SetHttpEndpoint sets the HttpEndpoint field's value. 5604func (s *NodeEthereumAttributes) SetHttpEndpoint(v string) *NodeEthereumAttributes { 5605 s.HttpEndpoint = &v 5606 return s 5607} 5608 5609// SetWebSocketEndpoint sets the WebSocketEndpoint field's value. 5610func (s *NodeEthereumAttributes) SetWebSocketEndpoint(v string) *NodeEthereumAttributes { 5611 s.WebSocketEndpoint = &v 5612 return s 5613} 5614 5615// Attributes of Hyperledger Fabric for a peer node on a Hyperledger Fabric 5616// network on Managed Blockchain. 5617type NodeFabricAttributes struct { 5618 _ struct{} `type:"structure"` 5619 5620 // The endpoint that identifies the peer node for all services except peer channel-based 5621 // event services. 5622 PeerEndpoint *string `type:"string"` 5623 5624 // The endpoint that identifies the peer node for peer channel-based event services. 5625 PeerEventEndpoint *string `type:"string"` 5626} 5627 5628// String returns the string representation 5629func (s NodeFabricAttributes) String() string { 5630 return awsutil.Prettify(s) 5631} 5632 5633// GoString returns the string representation 5634func (s NodeFabricAttributes) GoString() string { 5635 return s.String() 5636} 5637 5638// SetPeerEndpoint sets the PeerEndpoint field's value. 5639func (s *NodeFabricAttributes) SetPeerEndpoint(v string) *NodeFabricAttributes { 5640 s.PeerEndpoint = &v 5641 return s 5642} 5643 5644// SetPeerEventEndpoint sets the PeerEventEndpoint field's value. 5645func (s *NodeFabricAttributes) SetPeerEventEndpoint(v string) *NodeFabricAttributes { 5646 s.PeerEventEndpoint = &v 5647 return s 5648} 5649 5650// Configuration properties for logging events associated with a peer node owned 5651// by a member in a Managed Blockchain network. 5652type NodeFabricLogPublishingConfiguration struct { 5653 _ struct{} `type:"structure"` 5654 5655 // Configuration properties for logging events associated with chaincode execution 5656 // on a peer node. Chaincode logs contain the results of instantiating, invoking, 5657 // and querying the chaincode. A peer can run multiple instances of chaincode. 5658 // When enabled, a log stream is created for all chaincodes, with an individual 5659 // log stream for each chaincode. 5660 ChaincodeLogs *LogConfigurations `type:"structure"` 5661 5662 // Configuration properties for a peer node log. Peer node logs contain messages 5663 // generated when your client submits transaction proposals to peer nodes, requests 5664 // to join channels, enrolls an admin peer, and lists the chaincode instances 5665 // on a peer node. 5666 PeerLogs *LogConfigurations `type:"structure"` 5667} 5668 5669// String returns the string representation 5670func (s NodeFabricLogPublishingConfiguration) String() string { 5671 return awsutil.Prettify(s) 5672} 5673 5674// GoString returns the string representation 5675func (s NodeFabricLogPublishingConfiguration) GoString() string { 5676 return s.String() 5677} 5678 5679// SetChaincodeLogs sets the ChaincodeLogs field's value. 5680func (s *NodeFabricLogPublishingConfiguration) SetChaincodeLogs(v *LogConfigurations) *NodeFabricLogPublishingConfiguration { 5681 s.ChaincodeLogs = v 5682 return s 5683} 5684 5685// SetPeerLogs sets the PeerLogs field's value. 5686func (s *NodeFabricLogPublishingConfiguration) SetPeerLogs(v *LogConfigurations) *NodeFabricLogPublishingConfiguration { 5687 s.PeerLogs = v 5688 return s 5689} 5690 5691// Attributes relevant to a node on a Managed Blockchain network for the blockchain 5692// framework that the network uses. 5693type NodeFrameworkAttributes struct { 5694 _ struct{} `type:"structure"` 5695 5696 // Attributes of Ethereum for a node on a Managed Blockchain network that uses 5697 // Ethereum. 5698 Ethereum *NodeEthereumAttributes `type:"structure"` 5699 5700 // Attributes of Hyperledger Fabric for a peer node on a Managed Blockchain 5701 // network that uses Hyperledger Fabric. 5702 Fabric *NodeFabricAttributes `type:"structure"` 5703} 5704 5705// String returns the string representation 5706func (s NodeFrameworkAttributes) String() string { 5707 return awsutil.Prettify(s) 5708} 5709 5710// GoString returns the string representation 5711func (s NodeFrameworkAttributes) GoString() string { 5712 return s.String() 5713} 5714 5715// SetEthereum sets the Ethereum field's value. 5716func (s *NodeFrameworkAttributes) SetEthereum(v *NodeEthereumAttributes) *NodeFrameworkAttributes { 5717 s.Ethereum = v 5718 return s 5719} 5720 5721// SetFabric sets the Fabric field's value. 5722func (s *NodeFrameworkAttributes) SetFabric(v *NodeFabricAttributes) *NodeFrameworkAttributes { 5723 s.Fabric = v 5724 return s 5725} 5726 5727// Configuration properties for logging events associated with a peer node on 5728// a Hyperledger Fabric network on Managed Blockchain. 5729type NodeLogPublishingConfiguration struct { 5730 _ struct{} `type:"structure"` 5731 5732 // Configuration properties for logging events associated with a node that is 5733 // owned by a member of a Managed Blockchain network using the Hyperledger Fabric 5734 // framework. 5735 Fabric *NodeFabricLogPublishingConfiguration `type:"structure"` 5736} 5737 5738// String returns the string representation 5739func (s NodeLogPublishingConfiguration) String() string { 5740 return awsutil.Prettify(s) 5741} 5742 5743// GoString returns the string representation 5744func (s NodeLogPublishingConfiguration) GoString() string { 5745 return s.String() 5746} 5747 5748// SetFabric sets the Fabric field's value. 5749func (s *NodeLogPublishingConfiguration) SetFabric(v *NodeFabricLogPublishingConfiguration) *NodeLogPublishingConfiguration { 5750 s.Fabric = v 5751 return s 5752} 5753 5754// A summary of configuration properties for a node. 5755type NodeSummary struct { 5756 _ struct{} `type:"structure"` 5757 5758 // The Availability Zone in which the node exists. 5759 AvailabilityZone *string `type:"string"` 5760 5761 // The date and time that the node was created. 5762 CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` 5763 5764 // The unique identifier of the node. 5765 Id *string `min:"1" type:"string"` 5766 5767 // The EC2 instance type for the node. 5768 InstanceType *string `type:"string"` 5769 5770 // The status of the node. 5771 Status *string `type:"string" enum:"NodeStatus"` 5772} 5773 5774// String returns the string representation 5775func (s NodeSummary) String() string { 5776 return awsutil.Prettify(s) 5777} 5778 5779// GoString returns the string representation 5780func (s NodeSummary) GoString() string { 5781 return s.String() 5782} 5783 5784// SetAvailabilityZone sets the AvailabilityZone field's value. 5785func (s *NodeSummary) SetAvailabilityZone(v string) *NodeSummary { 5786 s.AvailabilityZone = &v 5787 return s 5788} 5789 5790// SetCreationDate sets the CreationDate field's value. 5791func (s *NodeSummary) SetCreationDate(v time.Time) *NodeSummary { 5792 s.CreationDate = &v 5793 return s 5794} 5795 5796// SetId sets the Id field's value. 5797func (s *NodeSummary) SetId(v string) *NodeSummary { 5798 s.Id = &v 5799 return s 5800} 5801 5802// SetInstanceType sets the InstanceType field's value. 5803func (s *NodeSummary) SetInstanceType(v string) *NodeSummary { 5804 s.InstanceType = &v 5805 return s 5806} 5807 5808// SetStatus sets the Status field's value. 5809func (s *NodeSummary) SetStatus(v string) *NodeSummary { 5810 s.Status = &v 5811 return s 5812} 5813 5814// Properties of a proposal on a Managed Blockchain network. 5815// 5816// Applies only to Hyperledger Fabric. 5817type Proposal struct { 5818 _ struct{} `type:"structure"` 5819 5820 // The actions to perform on the network if the proposal is APPROVED. 5821 Actions *ProposalActions `type:"structure"` 5822 5823 // The date and time that the proposal was created. 5824 CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` 5825 5826 // The description of the proposal. 5827 Description *string `type:"string"` 5828 5829 // The date and time that the proposal expires. This is the CreationDate plus 5830 // the ProposalDurationInHours that is specified in the ProposalThresholdPolicy. 5831 // After this date and time, if members have not cast enough votes to determine 5832 // the outcome according to the voting policy, the proposal is EXPIRED and Actions 5833 // are not carried out. 5834 ExpirationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` 5835 5836 // The unique identifier of the network for which the proposal is made. 5837 NetworkId *string `min:"1" type:"string"` 5838 5839 // The current total of NO votes cast on the proposal by members. 5840 NoVoteCount *int64 `type:"integer"` 5841 5842 // The number of votes remaining to be cast on the proposal by members. In other 5843 // words, the number of members minus the sum of YES votes and NO votes. 5844 OutstandingVoteCount *int64 `type:"integer"` 5845 5846 // The unique identifier of the proposal. 5847 ProposalId *string `min:"1" type:"string"` 5848 5849 // The unique identifier of the member that created the proposal. 5850 ProposedByMemberId *string `min:"1" type:"string"` 5851 5852 // The name of the member that created the proposal. 5853 ProposedByMemberName *string `min:"1" type:"string"` 5854 5855 // The status of the proposal. Values are as follows: 5856 // 5857 // * IN_PROGRESS - The proposal is active and open for member voting. 5858 // 5859 // * APPROVED - The proposal was approved with sufficient YES votes among 5860 // members according to the VotingPolicy specified for the Network. The specified 5861 // proposal actions are carried out. 5862 // 5863 // * REJECTED - The proposal was rejected with insufficient YES votes among 5864 // members according to the VotingPolicy specified for the Network. The specified 5865 // ProposalActions are not carried out. 5866 // 5867 // * EXPIRED - Members did not cast the number of votes required to determine 5868 // the proposal outcome before the proposal expired. The specified ProposalActions 5869 // are not carried out. 5870 // 5871 // * ACTION_FAILED - One or more of the specified ProposalActions in a proposal 5872 // that was approved could not be completed because of an error. The ACTION_FAILED 5873 // status occurs even if only one ProposalAction fails and other actions 5874 // are successful. 5875 Status *string `type:"string" enum:"ProposalStatus"` 5876 5877 // The current total of YES votes cast on the proposal by members. 5878 YesVoteCount *int64 `type:"integer"` 5879} 5880 5881// String returns the string representation 5882func (s Proposal) String() string { 5883 return awsutil.Prettify(s) 5884} 5885 5886// GoString returns the string representation 5887func (s Proposal) GoString() string { 5888 return s.String() 5889} 5890 5891// SetActions sets the Actions field's value. 5892func (s *Proposal) SetActions(v *ProposalActions) *Proposal { 5893 s.Actions = v 5894 return s 5895} 5896 5897// SetCreationDate sets the CreationDate field's value. 5898func (s *Proposal) SetCreationDate(v time.Time) *Proposal { 5899 s.CreationDate = &v 5900 return s 5901} 5902 5903// SetDescription sets the Description field's value. 5904func (s *Proposal) SetDescription(v string) *Proposal { 5905 s.Description = &v 5906 return s 5907} 5908 5909// SetExpirationDate sets the ExpirationDate field's value. 5910func (s *Proposal) SetExpirationDate(v time.Time) *Proposal { 5911 s.ExpirationDate = &v 5912 return s 5913} 5914 5915// SetNetworkId sets the NetworkId field's value. 5916func (s *Proposal) SetNetworkId(v string) *Proposal { 5917 s.NetworkId = &v 5918 return s 5919} 5920 5921// SetNoVoteCount sets the NoVoteCount field's value. 5922func (s *Proposal) SetNoVoteCount(v int64) *Proposal { 5923 s.NoVoteCount = &v 5924 return s 5925} 5926 5927// SetOutstandingVoteCount sets the OutstandingVoteCount field's value. 5928func (s *Proposal) SetOutstandingVoteCount(v int64) *Proposal { 5929 s.OutstandingVoteCount = &v 5930 return s 5931} 5932 5933// SetProposalId sets the ProposalId field's value. 5934func (s *Proposal) SetProposalId(v string) *Proposal { 5935 s.ProposalId = &v 5936 return s 5937} 5938 5939// SetProposedByMemberId sets the ProposedByMemberId field's value. 5940func (s *Proposal) SetProposedByMemberId(v string) *Proposal { 5941 s.ProposedByMemberId = &v 5942 return s 5943} 5944 5945// SetProposedByMemberName sets the ProposedByMemberName field's value. 5946func (s *Proposal) SetProposedByMemberName(v string) *Proposal { 5947 s.ProposedByMemberName = &v 5948 return s 5949} 5950 5951// SetStatus sets the Status field's value. 5952func (s *Proposal) SetStatus(v string) *Proposal { 5953 s.Status = &v 5954 return s 5955} 5956 5957// SetYesVoteCount sets the YesVoteCount field's value. 5958func (s *Proposal) SetYesVoteCount(v int64) *Proposal { 5959 s.YesVoteCount = &v 5960 return s 5961} 5962 5963// The actions to carry out if a proposal is APPROVED. 5964// 5965// Applies only to Hyperledger Fabric. 5966type ProposalActions struct { 5967 _ struct{} `type:"structure"` 5968 5969 // The actions to perform for an APPROVED proposal to invite an AWS account 5970 // to create a member and join the network. 5971 Invitations []*InviteAction `type:"list"` 5972 5973 // The actions to perform for an APPROVED proposal to remove a member from the 5974 // network, which deletes the member and all associated member resources from 5975 // the network. 5976 Removals []*RemoveAction `type:"list"` 5977} 5978 5979// String returns the string representation 5980func (s ProposalActions) String() string { 5981 return awsutil.Prettify(s) 5982} 5983 5984// GoString returns the string representation 5985func (s ProposalActions) GoString() string { 5986 return s.String() 5987} 5988 5989// Validate inspects the fields of the type to determine if they are valid. 5990func (s *ProposalActions) Validate() error { 5991 invalidParams := request.ErrInvalidParams{Context: "ProposalActions"} 5992 if s.Invitations != nil { 5993 for i, v := range s.Invitations { 5994 if v == nil { 5995 continue 5996 } 5997 if err := v.Validate(); err != nil { 5998 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Invitations", i), err.(request.ErrInvalidParams)) 5999 } 6000 } 6001 } 6002 if s.Removals != nil { 6003 for i, v := range s.Removals { 6004 if v == nil { 6005 continue 6006 } 6007 if err := v.Validate(); err != nil { 6008 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Removals", i), err.(request.ErrInvalidParams)) 6009 } 6010 } 6011 } 6012 6013 if invalidParams.Len() > 0 { 6014 return invalidParams 6015 } 6016 return nil 6017} 6018 6019// SetInvitations sets the Invitations field's value. 6020func (s *ProposalActions) SetInvitations(v []*InviteAction) *ProposalActions { 6021 s.Invitations = v 6022 return s 6023} 6024 6025// SetRemovals sets the Removals field's value. 6026func (s *ProposalActions) SetRemovals(v []*RemoveAction) *ProposalActions { 6027 s.Removals = v 6028 return s 6029} 6030 6031// Properties of a proposal. 6032// 6033// Applies only to Hyperledger Fabric. 6034type ProposalSummary struct { 6035 _ struct{} `type:"structure"` 6036 6037 // The date and time that the proposal was created. 6038 CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` 6039 6040 // The description of the proposal. 6041 Description *string `type:"string"` 6042 6043 // The date and time that the proposal expires. This is the CreationDate plus 6044 // the ProposalDurationInHours that is specified in the ProposalThresholdPolicy. 6045 // After this date and time, if members have not cast enough votes to determine 6046 // the outcome according to the voting policy, the proposal is EXPIRED and Actions 6047 // are not carried out. 6048 ExpirationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` 6049 6050 // The unique identifier of the proposal. 6051 ProposalId *string `min:"1" type:"string"` 6052 6053 // The unique identifier of the member that created the proposal. 6054 ProposedByMemberId *string `min:"1" type:"string"` 6055 6056 // The name of the member that created the proposal. 6057 ProposedByMemberName *string `min:"1" type:"string"` 6058 6059 // The status of the proposal. Values are as follows: 6060 // 6061 // * IN_PROGRESS - The proposal is active and open for member voting. 6062 // 6063 // * APPROVED - The proposal was approved with sufficient YES votes among 6064 // members according to the VotingPolicy specified for the Network. The specified 6065 // proposal actions are carried out. 6066 // 6067 // * REJECTED - The proposal was rejected with insufficient YES votes among 6068 // members according to the VotingPolicy specified for the Network. The specified 6069 // ProposalActions are not carried out. 6070 // 6071 // * EXPIRED - Members did not cast the number of votes required to determine 6072 // the proposal outcome before the proposal expired. The specified ProposalActions 6073 // are not carried out. 6074 // 6075 // * ACTION_FAILED - One or more of the specified ProposalActions in a proposal 6076 // that was approved could not be completed because of an error. 6077 Status *string `type:"string" enum:"ProposalStatus"` 6078} 6079 6080// String returns the string representation 6081func (s ProposalSummary) String() string { 6082 return awsutil.Prettify(s) 6083} 6084 6085// GoString returns the string representation 6086func (s ProposalSummary) GoString() string { 6087 return s.String() 6088} 6089 6090// SetCreationDate sets the CreationDate field's value. 6091func (s *ProposalSummary) SetCreationDate(v time.Time) *ProposalSummary { 6092 s.CreationDate = &v 6093 return s 6094} 6095 6096// SetDescription sets the Description field's value. 6097func (s *ProposalSummary) SetDescription(v string) *ProposalSummary { 6098 s.Description = &v 6099 return s 6100} 6101 6102// SetExpirationDate sets the ExpirationDate field's value. 6103func (s *ProposalSummary) SetExpirationDate(v time.Time) *ProposalSummary { 6104 s.ExpirationDate = &v 6105 return s 6106} 6107 6108// SetProposalId sets the ProposalId field's value. 6109func (s *ProposalSummary) SetProposalId(v string) *ProposalSummary { 6110 s.ProposalId = &v 6111 return s 6112} 6113 6114// SetProposedByMemberId sets the ProposedByMemberId field's value. 6115func (s *ProposalSummary) SetProposedByMemberId(v string) *ProposalSummary { 6116 s.ProposedByMemberId = &v 6117 return s 6118} 6119 6120// SetProposedByMemberName sets the ProposedByMemberName field's value. 6121func (s *ProposalSummary) SetProposedByMemberName(v string) *ProposalSummary { 6122 s.ProposedByMemberName = &v 6123 return s 6124} 6125 6126// SetStatus sets the Status field's value. 6127func (s *ProposalSummary) SetStatus(v string) *ProposalSummary { 6128 s.Status = &v 6129 return s 6130} 6131 6132type RejectInvitationInput struct { 6133 _ struct{} `type:"structure"` 6134 6135 // The unique identifier of the invitation to reject. 6136 // 6137 // InvitationId is a required field 6138 InvitationId *string `location:"uri" locationName:"invitationId" min:"1" type:"string" required:"true"` 6139} 6140 6141// String returns the string representation 6142func (s RejectInvitationInput) String() string { 6143 return awsutil.Prettify(s) 6144} 6145 6146// GoString returns the string representation 6147func (s RejectInvitationInput) GoString() string { 6148 return s.String() 6149} 6150 6151// Validate inspects the fields of the type to determine if they are valid. 6152func (s *RejectInvitationInput) Validate() error { 6153 invalidParams := request.ErrInvalidParams{Context: "RejectInvitationInput"} 6154 if s.InvitationId == nil { 6155 invalidParams.Add(request.NewErrParamRequired("InvitationId")) 6156 } 6157 if s.InvitationId != nil && len(*s.InvitationId) < 1 { 6158 invalidParams.Add(request.NewErrParamMinLen("InvitationId", 1)) 6159 } 6160 6161 if invalidParams.Len() > 0 { 6162 return invalidParams 6163 } 6164 return nil 6165} 6166 6167// SetInvitationId sets the InvitationId field's value. 6168func (s *RejectInvitationInput) SetInvitationId(v string) *RejectInvitationInput { 6169 s.InvitationId = &v 6170 return s 6171} 6172 6173type RejectInvitationOutput struct { 6174 _ struct{} `type:"structure"` 6175} 6176 6177// String returns the string representation 6178func (s RejectInvitationOutput) String() string { 6179 return awsutil.Prettify(s) 6180} 6181 6182// GoString returns the string representation 6183func (s RejectInvitationOutput) GoString() string { 6184 return s.String() 6185} 6186 6187// An action to remove a member from a Managed Blockchain network as the result 6188// of a removal proposal that is APPROVED. The member and all associated resources 6189// are deleted from the network. 6190// 6191// Applies only to Hyperledger Fabric. 6192type RemoveAction struct { 6193 _ struct{} `type:"structure"` 6194 6195 // The unique identifier of the member to remove. 6196 // 6197 // MemberId is a required field 6198 MemberId *string `min:"1" type:"string" required:"true"` 6199} 6200 6201// String returns the string representation 6202func (s RemoveAction) String() string { 6203 return awsutil.Prettify(s) 6204} 6205 6206// GoString returns the string representation 6207func (s RemoveAction) GoString() string { 6208 return s.String() 6209} 6210 6211// Validate inspects the fields of the type to determine if they are valid. 6212func (s *RemoveAction) Validate() error { 6213 invalidParams := request.ErrInvalidParams{Context: "RemoveAction"} 6214 if s.MemberId == nil { 6215 invalidParams.Add(request.NewErrParamRequired("MemberId")) 6216 } 6217 if s.MemberId != nil && len(*s.MemberId) < 1 { 6218 invalidParams.Add(request.NewErrParamMinLen("MemberId", 1)) 6219 } 6220 6221 if invalidParams.Len() > 0 { 6222 return invalidParams 6223 } 6224 return nil 6225} 6226 6227// SetMemberId sets the MemberId field's value. 6228func (s *RemoveAction) SetMemberId(v string) *RemoveAction { 6229 s.MemberId = &v 6230 return s 6231} 6232 6233// A resource request is issued for a resource that already exists. 6234type ResourceAlreadyExistsException struct { 6235 _ struct{} `type:"structure"` 6236 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6237 6238 Message_ *string `locationName:"Message" type:"string"` 6239} 6240 6241// String returns the string representation 6242func (s ResourceAlreadyExistsException) String() string { 6243 return awsutil.Prettify(s) 6244} 6245 6246// GoString returns the string representation 6247func (s ResourceAlreadyExistsException) GoString() string { 6248 return s.String() 6249} 6250 6251func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { 6252 return &ResourceAlreadyExistsException{ 6253 RespMetadata: v, 6254 } 6255} 6256 6257// Code returns the exception type name. 6258func (s *ResourceAlreadyExistsException) Code() string { 6259 return "ResourceAlreadyExistsException" 6260} 6261 6262// Message returns the exception's message. 6263func (s *ResourceAlreadyExistsException) Message() string { 6264 if s.Message_ != nil { 6265 return *s.Message_ 6266 } 6267 return "" 6268} 6269 6270// OrigErr always returns nil, satisfies awserr.Error interface. 6271func (s *ResourceAlreadyExistsException) OrigErr() error { 6272 return nil 6273} 6274 6275func (s *ResourceAlreadyExistsException) Error() string { 6276 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6277} 6278 6279// Status code returns the HTTP status code for the request's response error. 6280func (s *ResourceAlreadyExistsException) StatusCode() int { 6281 return s.RespMetadata.StatusCode 6282} 6283 6284// RequestID returns the service's response RequestID for request. 6285func (s *ResourceAlreadyExistsException) RequestID() string { 6286 return s.RespMetadata.RequestID 6287} 6288 6289// The maximum number of resources of that type already exist. Ensure the resources 6290// requested are within the boundaries of the service edition and your account 6291// limits. 6292type ResourceLimitExceededException struct { 6293 _ struct{} `type:"structure"` 6294 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6295 6296 Message_ *string `locationName:"Message" type:"string"` 6297} 6298 6299// String returns the string representation 6300func (s ResourceLimitExceededException) String() string { 6301 return awsutil.Prettify(s) 6302} 6303 6304// GoString returns the string representation 6305func (s ResourceLimitExceededException) GoString() string { 6306 return s.String() 6307} 6308 6309func newErrorResourceLimitExceededException(v protocol.ResponseMetadata) error { 6310 return &ResourceLimitExceededException{ 6311 RespMetadata: v, 6312 } 6313} 6314 6315// Code returns the exception type name. 6316func (s *ResourceLimitExceededException) Code() string { 6317 return "ResourceLimitExceededException" 6318} 6319 6320// Message returns the exception's message. 6321func (s *ResourceLimitExceededException) Message() string { 6322 if s.Message_ != nil { 6323 return *s.Message_ 6324 } 6325 return "" 6326} 6327 6328// OrigErr always returns nil, satisfies awserr.Error interface. 6329func (s *ResourceLimitExceededException) OrigErr() error { 6330 return nil 6331} 6332 6333func (s *ResourceLimitExceededException) Error() string { 6334 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6335} 6336 6337// Status code returns the HTTP status code for the request's response error. 6338func (s *ResourceLimitExceededException) StatusCode() int { 6339 return s.RespMetadata.StatusCode 6340} 6341 6342// RequestID returns the service's response RequestID for request. 6343func (s *ResourceLimitExceededException) RequestID() string { 6344 return s.RespMetadata.RequestID 6345} 6346 6347// A requested resource does not exist on the network. It may have been deleted 6348// or referenced inaccurately. 6349type ResourceNotFoundException struct { 6350 _ struct{} `type:"structure"` 6351 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6352 6353 Message_ *string `locationName:"Message" type:"string"` 6354} 6355 6356// String returns the string representation 6357func (s ResourceNotFoundException) String() string { 6358 return awsutil.Prettify(s) 6359} 6360 6361// GoString returns the string representation 6362func (s ResourceNotFoundException) GoString() string { 6363 return s.String() 6364} 6365 6366func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 6367 return &ResourceNotFoundException{ 6368 RespMetadata: v, 6369 } 6370} 6371 6372// Code returns the exception type name. 6373func (s *ResourceNotFoundException) Code() string { 6374 return "ResourceNotFoundException" 6375} 6376 6377// Message returns the exception's message. 6378func (s *ResourceNotFoundException) Message() string { 6379 if s.Message_ != nil { 6380 return *s.Message_ 6381 } 6382 return "" 6383} 6384 6385// OrigErr always returns nil, satisfies awserr.Error interface. 6386func (s *ResourceNotFoundException) OrigErr() error { 6387 return nil 6388} 6389 6390func (s *ResourceNotFoundException) Error() string { 6391 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6392} 6393 6394// Status code returns the HTTP status code for the request's response error. 6395func (s *ResourceNotFoundException) StatusCode() int { 6396 return s.RespMetadata.StatusCode 6397} 6398 6399// RequestID returns the service's response RequestID for request. 6400func (s *ResourceNotFoundException) RequestID() string { 6401 return s.RespMetadata.RequestID 6402} 6403 6404// The requested resource exists but is not in a status that can complete the 6405// operation. 6406type ResourceNotReadyException struct { 6407 _ struct{} `type:"structure"` 6408 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6409 6410 Message_ *string `locationName:"Message" type:"string"` 6411} 6412 6413// String returns the string representation 6414func (s ResourceNotReadyException) String() string { 6415 return awsutil.Prettify(s) 6416} 6417 6418// GoString returns the string representation 6419func (s ResourceNotReadyException) GoString() string { 6420 return s.String() 6421} 6422 6423func newErrorResourceNotReadyException(v protocol.ResponseMetadata) error { 6424 return &ResourceNotReadyException{ 6425 RespMetadata: v, 6426 } 6427} 6428 6429// Code returns the exception type name. 6430func (s *ResourceNotReadyException) Code() string { 6431 return "ResourceNotReadyException" 6432} 6433 6434// Message returns the exception's message. 6435func (s *ResourceNotReadyException) Message() string { 6436 if s.Message_ != nil { 6437 return *s.Message_ 6438 } 6439 return "" 6440} 6441 6442// OrigErr always returns nil, satisfies awserr.Error interface. 6443func (s *ResourceNotReadyException) OrigErr() error { 6444 return nil 6445} 6446 6447func (s *ResourceNotReadyException) Error() string { 6448 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6449} 6450 6451// Status code returns the HTTP status code for the request's response error. 6452func (s *ResourceNotReadyException) StatusCode() int { 6453 return s.RespMetadata.StatusCode 6454} 6455 6456// RequestID returns the service's response RequestID for request. 6457func (s *ResourceNotReadyException) RequestID() string { 6458 return s.RespMetadata.RequestID 6459} 6460 6461// The request or operation could not be performed because a service is throttling 6462// requests. The most common source of throttling errors is launching EC2 instances 6463// such that your service limit for EC2 instances is exceeded. Request a limit 6464// increase or delete unused resources if possible. 6465type ThrottlingException struct { 6466 _ struct{} `type:"structure"` 6467 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 6468 6469 Message_ *string `locationName:"message" type:"string"` 6470} 6471 6472// String returns the string representation 6473func (s ThrottlingException) String() string { 6474 return awsutil.Prettify(s) 6475} 6476 6477// GoString returns the string representation 6478func (s ThrottlingException) GoString() string { 6479 return s.String() 6480} 6481 6482func newErrorThrottlingException(v protocol.ResponseMetadata) error { 6483 return &ThrottlingException{ 6484 RespMetadata: v, 6485 } 6486} 6487 6488// Code returns the exception type name. 6489func (s *ThrottlingException) Code() string { 6490 return "ThrottlingException" 6491} 6492 6493// Message returns the exception's message. 6494func (s *ThrottlingException) Message() string { 6495 if s.Message_ != nil { 6496 return *s.Message_ 6497 } 6498 return "" 6499} 6500 6501// OrigErr always returns nil, satisfies awserr.Error interface. 6502func (s *ThrottlingException) OrigErr() error { 6503 return nil 6504} 6505 6506func (s *ThrottlingException) Error() string { 6507 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 6508} 6509 6510// Status code returns the HTTP status code for the request's response error. 6511func (s *ThrottlingException) StatusCode() int { 6512 return s.RespMetadata.StatusCode 6513} 6514 6515// RequestID returns the service's response RequestID for request. 6516func (s *ThrottlingException) RequestID() string { 6517 return s.RespMetadata.RequestID 6518} 6519 6520type UpdateMemberInput struct { 6521 _ struct{} `type:"structure"` 6522 6523 // Configuration properties for publishing to Amazon CloudWatch Logs. 6524 LogPublishingConfiguration *MemberLogPublishingConfiguration `type:"structure"` 6525 6526 // The unique identifier of the member. 6527 // 6528 // MemberId is a required field 6529 MemberId *string `location:"uri" locationName:"memberId" min:"1" type:"string" required:"true"` 6530 6531 // The unique identifier of the Managed Blockchain network to which the member 6532 // belongs. 6533 // 6534 // NetworkId is a required field 6535 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 6536} 6537 6538// String returns the string representation 6539func (s UpdateMemberInput) String() string { 6540 return awsutil.Prettify(s) 6541} 6542 6543// GoString returns the string representation 6544func (s UpdateMemberInput) GoString() string { 6545 return s.String() 6546} 6547 6548// Validate inspects the fields of the type to determine if they are valid. 6549func (s *UpdateMemberInput) Validate() error { 6550 invalidParams := request.ErrInvalidParams{Context: "UpdateMemberInput"} 6551 if s.MemberId == nil { 6552 invalidParams.Add(request.NewErrParamRequired("MemberId")) 6553 } 6554 if s.MemberId != nil && len(*s.MemberId) < 1 { 6555 invalidParams.Add(request.NewErrParamMinLen("MemberId", 1)) 6556 } 6557 if s.NetworkId == nil { 6558 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 6559 } 6560 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 6561 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 6562 } 6563 6564 if invalidParams.Len() > 0 { 6565 return invalidParams 6566 } 6567 return nil 6568} 6569 6570// SetLogPublishingConfiguration sets the LogPublishingConfiguration field's value. 6571func (s *UpdateMemberInput) SetLogPublishingConfiguration(v *MemberLogPublishingConfiguration) *UpdateMemberInput { 6572 s.LogPublishingConfiguration = v 6573 return s 6574} 6575 6576// SetMemberId sets the MemberId field's value. 6577func (s *UpdateMemberInput) SetMemberId(v string) *UpdateMemberInput { 6578 s.MemberId = &v 6579 return s 6580} 6581 6582// SetNetworkId sets the NetworkId field's value. 6583func (s *UpdateMemberInput) SetNetworkId(v string) *UpdateMemberInput { 6584 s.NetworkId = &v 6585 return s 6586} 6587 6588type UpdateMemberOutput struct { 6589 _ struct{} `type:"structure"` 6590} 6591 6592// String returns the string representation 6593func (s UpdateMemberOutput) String() string { 6594 return awsutil.Prettify(s) 6595} 6596 6597// GoString returns the string representation 6598func (s UpdateMemberOutput) GoString() string { 6599 return s.String() 6600} 6601 6602type UpdateNodeInput struct { 6603 _ struct{} `type:"structure"` 6604 6605 // Configuration properties for publishing to Amazon CloudWatch Logs. 6606 LogPublishingConfiguration *NodeLogPublishingConfiguration `type:"structure"` 6607 6608 // The unique identifier of the member that owns the node. 6609 // 6610 // Applies only to Hyperledger Fabric. 6611 MemberId *string `min:"1" type:"string"` 6612 6613 // The unique identifier of the network that the node is on. 6614 // 6615 // NetworkId is a required field 6616 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 6617 6618 // The unique identifier of the node. 6619 // 6620 // NodeId is a required field 6621 NodeId *string `location:"uri" locationName:"nodeId" min:"1" type:"string" required:"true"` 6622} 6623 6624// String returns the string representation 6625func (s UpdateNodeInput) String() string { 6626 return awsutil.Prettify(s) 6627} 6628 6629// GoString returns the string representation 6630func (s UpdateNodeInput) GoString() string { 6631 return s.String() 6632} 6633 6634// Validate inspects the fields of the type to determine if they are valid. 6635func (s *UpdateNodeInput) Validate() error { 6636 invalidParams := request.ErrInvalidParams{Context: "UpdateNodeInput"} 6637 if s.MemberId != nil && len(*s.MemberId) < 1 { 6638 invalidParams.Add(request.NewErrParamMinLen("MemberId", 1)) 6639 } 6640 if s.NetworkId == nil { 6641 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 6642 } 6643 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 6644 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 6645 } 6646 if s.NodeId == nil { 6647 invalidParams.Add(request.NewErrParamRequired("NodeId")) 6648 } 6649 if s.NodeId != nil && len(*s.NodeId) < 1 { 6650 invalidParams.Add(request.NewErrParamMinLen("NodeId", 1)) 6651 } 6652 6653 if invalidParams.Len() > 0 { 6654 return invalidParams 6655 } 6656 return nil 6657} 6658 6659// SetLogPublishingConfiguration sets the LogPublishingConfiguration field's value. 6660func (s *UpdateNodeInput) SetLogPublishingConfiguration(v *NodeLogPublishingConfiguration) *UpdateNodeInput { 6661 s.LogPublishingConfiguration = v 6662 return s 6663} 6664 6665// SetMemberId sets the MemberId field's value. 6666func (s *UpdateNodeInput) SetMemberId(v string) *UpdateNodeInput { 6667 s.MemberId = &v 6668 return s 6669} 6670 6671// SetNetworkId sets the NetworkId field's value. 6672func (s *UpdateNodeInput) SetNetworkId(v string) *UpdateNodeInput { 6673 s.NetworkId = &v 6674 return s 6675} 6676 6677// SetNodeId sets the NodeId field's value. 6678func (s *UpdateNodeInput) SetNodeId(v string) *UpdateNodeInput { 6679 s.NodeId = &v 6680 return s 6681} 6682 6683type UpdateNodeOutput struct { 6684 _ struct{} `type:"structure"` 6685} 6686 6687// String returns the string representation 6688func (s UpdateNodeOutput) String() string { 6689 return awsutil.Prettify(s) 6690} 6691 6692// GoString returns the string representation 6693func (s UpdateNodeOutput) GoString() string { 6694 return s.String() 6695} 6696 6697type VoteOnProposalInput struct { 6698 _ struct{} `type:"structure"` 6699 6700 // The unique identifier of the network. 6701 // 6702 // NetworkId is a required field 6703 NetworkId *string `location:"uri" locationName:"networkId" min:"1" type:"string" required:"true"` 6704 6705 // The unique identifier of the proposal. 6706 // 6707 // ProposalId is a required field 6708 ProposalId *string `location:"uri" locationName:"proposalId" min:"1" type:"string" required:"true"` 6709 6710 // The value of the vote. 6711 // 6712 // Vote is a required field 6713 Vote *string `type:"string" required:"true" enum:"VoteValue"` 6714 6715 // The unique identifier of the member casting the vote. 6716 // 6717 // VoterMemberId is a required field 6718 VoterMemberId *string `min:"1" type:"string" required:"true"` 6719} 6720 6721// String returns the string representation 6722func (s VoteOnProposalInput) String() string { 6723 return awsutil.Prettify(s) 6724} 6725 6726// GoString returns the string representation 6727func (s VoteOnProposalInput) GoString() string { 6728 return s.String() 6729} 6730 6731// Validate inspects the fields of the type to determine if they are valid. 6732func (s *VoteOnProposalInput) Validate() error { 6733 invalidParams := request.ErrInvalidParams{Context: "VoteOnProposalInput"} 6734 if s.NetworkId == nil { 6735 invalidParams.Add(request.NewErrParamRequired("NetworkId")) 6736 } 6737 if s.NetworkId != nil && len(*s.NetworkId) < 1 { 6738 invalidParams.Add(request.NewErrParamMinLen("NetworkId", 1)) 6739 } 6740 if s.ProposalId == nil { 6741 invalidParams.Add(request.NewErrParamRequired("ProposalId")) 6742 } 6743 if s.ProposalId != nil && len(*s.ProposalId) < 1 { 6744 invalidParams.Add(request.NewErrParamMinLen("ProposalId", 1)) 6745 } 6746 if s.Vote == nil { 6747 invalidParams.Add(request.NewErrParamRequired("Vote")) 6748 } 6749 if s.VoterMemberId == nil { 6750 invalidParams.Add(request.NewErrParamRequired("VoterMemberId")) 6751 } 6752 if s.VoterMemberId != nil && len(*s.VoterMemberId) < 1 { 6753 invalidParams.Add(request.NewErrParamMinLen("VoterMemberId", 1)) 6754 } 6755 6756 if invalidParams.Len() > 0 { 6757 return invalidParams 6758 } 6759 return nil 6760} 6761 6762// SetNetworkId sets the NetworkId field's value. 6763func (s *VoteOnProposalInput) SetNetworkId(v string) *VoteOnProposalInput { 6764 s.NetworkId = &v 6765 return s 6766} 6767 6768// SetProposalId sets the ProposalId field's value. 6769func (s *VoteOnProposalInput) SetProposalId(v string) *VoteOnProposalInput { 6770 s.ProposalId = &v 6771 return s 6772} 6773 6774// SetVote sets the Vote field's value. 6775func (s *VoteOnProposalInput) SetVote(v string) *VoteOnProposalInput { 6776 s.Vote = &v 6777 return s 6778} 6779 6780// SetVoterMemberId sets the VoterMemberId field's value. 6781func (s *VoteOnProposalInput) SetVoterMemberId(v string) *VoteOnProposalInput { 6782 s.VoterMemberId = &v 6783 return s 6784} 6785 6786type VoteOnProposalOutput struct { 6787 _ struct{} `type:"structure"` 6788} 6789 6790// String returns the string representation 6791func (s VoteOnProposalOutput) String() string { 6792 return awsutil.Prettify(s) 6793} 6794 6795// GoString returns the string representation 6796func (s VoteOnProposalOutput) GoString() string { 6797 return s.String() 6798} 6799 6800// Properties of an individual vote that a member cast for a proposal. 6801// 6802// Applies only to Hyperledger Fabric. 6803type VoteSummary struct { 6804 _ struct{} `type:"structure"` 6805 6806 // The unique identifier of the member that cast the vote. 6807 MemberId *string `min:"1" type:"string"` 6808 6809 // The name of the member that cast the vote. 6810 MemberName *string `min:"1" type:"string"` 6811 6812 // The vote value, either YES or NO. 6813 Vote *string `type:"string" enum:"VoteValue"` 6814} 6815 6816// String returns the string representation 6817func (s VoteSummary) String() string { 6818 return awsutil.Prettify(s) 6819} 6820 6821// GoString returns the string representation 6822func (s VoteSummary) GoString() string { 6823 return s.String() 6824} 6825 6826// SetMemberId sets the MemberId field's value. 6827func (s *VoteSummary) SetMemberId(v string) *VoteSummary { 6828 s.MemberId = &v 6829 return s 6830} 6831 6832// SetMemberName sets the MemberName field's value. 6833func (s *VoteSummary) SetMemberName(v string) *VoteSummary { 6834 s.MemberName = &v 6835 return s 6836} 6837 6838// SetVote sets the Vote field's value. 6839func (s *VoteSummary) SetVote(v string) *VoteSummary { 6840 s.Vote = &v 6841 return s 6842} 6843 6844// The voting rules for the network to decide if a proposal is accepted 6845// 6846// Applies only to Hyperledger Fabric. 6847type VotingPolicy struct { 6848 _ struct{} `type:"structure"` 6849 6850 // Defines the rules for the network for voting on proposals, such as the percentage 6851 // of YES votes required for the proposal to be approved and the duration of 6852 // the proposal. The policy applies to all proposals and is specified when the 6853 // network is created. 6854 ApprovalThresholdPolicy *ApprovalThresholdPolicy `type:"structure"` 6855} 6856 6857// String returns the string representation 6858func (s VotingPolicy) String() string { 6859 return awsutil.Prettify(s) 6860} 6861 6862// GoString returns the string representation 6863func (s VotingPolicy) GoString() string { 6864 return s.String() 6865} 6866 6867// Validate inspects the fields of the type to determine if they are valid. 6868func (s *VotingPolicy) Validate() error { 6869 invalidParams := request.ErrInvalidParams{Context: "VotingPolicy"} 6870 if s.ApprovalThresholdPolicy != nil { 6871 if err := s.ApprovalThresholdPolicy.Validate(); err != nil { 6872 invalidParams.AddNested("ApprovalThresholdPolicy", err.(request.ErrInvalidParams)) 6873 } 6874 } 6875 6876 if invalidParams.Len() > 0 { 6877 return invalidParams 6878 } 6879 return nil 6880} 6881 6882// SetApprovalThresholdPolicy sets the ApprovalThresholdPolicy field's value. 6883func (s *VotingPolicy) SetApprovalThresholdPolicy(v *ApprovalThresholdPolicy) *VotingPolicy { 6884 s.ApprovalThresholdPolicy = v 6885 return s 6886} 6887 6888const ( 6889 // EditionStarter is a Edition enum value 6890 EditionStarter = "STARTER" 6891 6892 // EditionStandard is a Edition enum value 6893 EditionStandard = "STANDARD" 6894) 6895 6896// Edition_Values returns all elements of the Edition enum 6897func Edition_Values() []string { 6898 return []string{ 6899 EditionStarter, 6900 EditionStandard, 6901 } 6902} 6903 6904const ( 6905 // FrameworkHyperledgerFabric is a Framework enum value 6906 FrameworkHyperledgerFabric = "HYPERLEDGER_FABRIC" 6907 6908 // FrameworkEthereum is a Framework enum value 6909 FrameworkEthereum = "ETHEREUM" 6910) 6911 6912// Framework_Values returns all elements of the Framework enum 6913func Framework_Values() []string { 6914 return []string{ 6915 FrameworkHyperledgerFabric, 6916 FrameworkEthereum, 6917 } 6918} 6919 6920const ( 6921 // InvitationStatusPending is a InvitationStatus enum value 6922 InvitationStatusPending = "PENDING" 6923 6924 // InvitationStatusAccepted is a InvitationStatus enum value 6925 InvitationStatusAccepted = "ACCEPTED" 6926 6927 // InvitationStatusAccepting is a InvitationStatus enum value 6928 InvitationStatusAccepting = "ACCEPTING" 6929 6930 // InvitationStatusRejected is a InvitationStatus enum value 6931 InvitationStatusRejected = "REJECTED" 6932 6933 // InvitationStatusExpired is a InvitationStatus enum value 6934 InvitationStatusExpired = "EXPIRED" 6935) 6936 6937// InvitationStatus_Values returns all elements of the InvitationStatus enum 6938func InvitationStatus_Values() []string { 6939 return []string{ 6940 InvitationStatusPending, 6941 InvitationStatusAccepted, 6942 InvitationStatusAccepting, 6943 InvitationStatusRejected, 6944 InvitationStatusExpired, 6945 } 6946} 6947 6948const ( 6949 // MemberStatusCreating is a MemberStatus enum value 6950 MemberStatusCreating = "CREATING" 6951 6952 // MemberStatusAvailable is a MemberStatus enum value 6953 MemberStatusAvailable = "AVAILABLE" 6954 6955 // MemberStatusCreateFailed is a MemberStatus enum value 6956 MemberStatusCreateFailed = "CREATE_FAILED" 6957 6958 // MemberStatusUpdating is a MemberStatus enum value 6959 MemberStatusUpdating = "UPDATING" 6960 6961 // MemberStatusDeleting is a MemberStatus enum value 6962 MemberStatusDeleting = "DELETING" 6963 6964 // MemberStatusDeleted is a MemberStatus enum value 6965 MemberStatusDeleted = "DELETED" 6966) 6967 6968// MemberStatus_Values returns all elements of the MemberStatus enum 6969func MemberStatus_Values() []string { 6970 return []string{ 6971 MemberStatusCreating, 6972 MemberStatusAvailable, 6973 MemberStatusCreateFailed, 6974 MemberStatusUpdating, 6975 MemberStatusDeleting, 6976 MemberStatusDeleted, 6977 } 6978} 6979 6980const ( 6981 // NetworkStatusCreating is a NetworkStatus enum value 6982 NetworkStatusCreating = "CREATING" 6983 6984 // NetworkStatusAvailable is a NetworkStatus enum value 6985 NetworkStatusAvailable = "AVAILABLE" 6986 6987 // NetworkStatusCreateFailed is a NetworkStatus enum value 6988 NetworkStatusCreateFailed = "CREATE_FAILED" 6989 6990 // NetworkStatusDeleting is a NetworkStatus enum value 6991 NetworkStatusDeleting = "DELETING" 6992 6993 // NetworkStatusDeleted is a NetworkStatus enum value 6994 NetworkStatusDeleted = "DELETED" 6995) 6996 6997// NetworkStatus_Values returns all elements of the NetworkStatus enum 6998func NetworkStatus_Values() []string { 6999 return []string{ 7000 NetworkStatusCreating, 7001 NetworkStatusAvailable, 7002 NetworkStatusCreateFailed, 7003 NetworkStatusDeleting, 7004 NetworkStatusDeleted, 7005 } 7006} 7007 7008const ( 7009 // NodeStatusCreating is a NodeStatus enum value 7010 NodeStatusCreating = "CREATING" 7011 7012 // NodeStatusAvailable is a NodeStatus enum value 7013 NodeStatusAvailable = "AVAILABLE" 7014 7015 // NodeStatusUnhealthy is a NodeStatus enum value 7016 NodeStatusUnhealthy = "UNHEALTHY" 7017 7018 // NodeStatusCreateFailed is a NodeStatus enum value 7019 NodeStatusCreateFailed = "CREATE_FAILED" 7020 7021 // NodeStatusUpdating is a NodeStatus enum value 7022 NodeStatusUpdating = "UPDATING" 7023 7024 // NodeStatusDeleting is a NodeStatus enum value 7025 NodeStatusDeleting = "DELETING" 7026 7027 // NodeStatusDeleted is a NodeStatus enum value 7028 NodeStatusDeleted = "DELETED" 7029 7030 // NodeStatusFailed is a NodeStatus enum value 7031 NodeStatusFailed = "FAILED" 7032) 7033 7034// NodeStatus_Values returns all elements of the NodeStatus enum 7035func NodeStatus_Values() []string { 7036 return []string{ 7037 NodeStatusCreating, 7038 NodeStatusAvailable, 7039 NodeStatusUnhealthy, 7040 NodeStatusCreateFailed, 7041 NodeStatusUpdating, 7042 NodeStatusDeleting, 7043 NodeStatusDeleted, 7044 NodeStatusFailed, 7045 } 7046} 7047 7048const ( 7049 // ProposalStatusInProgress is a ProposalStatus enum value 7050 ProposalStatusInProgress = "IN_PROGRESS" 7051 7052 // ProposalStatusApproved is a ProposalStatus enum value 7053 ProposalStatusApproved = "APPROVED" 7054 7055 // ProposalStatusRejected is a ProposalStatus enum value 7056 ProposalStatusRejected = "REJECTED" 7057 7058 // ProposalStatusExpired is a ProposalStatus enum value 7059 ProposalStatusExpired = "EXPIRED" 7060 7061 // ProposalStatusActionFailed is a ProposalStatus enum value 7062 ProposalStatusActionFailed = "ACTION_FAILED" 7063) 7064 7065// ProposalStatus_Values returns all elements of the ProposalStatus enum 7066func ProposalStatus_Values() []string { 7067 return []string{ 7068 ProposalStatusInProgress, 7069 ProposalStatusApproved, 7070 ProposalStatusRejected, 7071 ProposalStatusExpired, 7072 ProposalStatusActionFailed, 7073 } 7074} 7075 7076const ( 7077 // StateDBTypeLevelDb is a StateDBType enum value 7078 StateDBTypeLevelDb = "LevelDB" 7079 7080 // StateDBTypeCouchDb is a StateDBType enum value 7081 StateDBTypeCouchDb = "CouchDB" 7082) 7083 7084// StateDBType_Values returns all elements of the StateDBType enum 7085func StateDBType_Values() []string { 7086 return []string{ 7087 StateDBTypeLevelDb, 7088 StateDBTypeCouchDb, 7089 } 7090} 7091 7092const ( 7093 // ThresholdComparatorGreaterThan is a ThresholdComparator enum value 7094 ThresholdComparatorGreaterThan = "GREATER_THAN" 7095 7096 // ThresholdComparatorGreaterThanOrEqualTo is a ThresholdComparator enum value 7097 ThresholdComparatorGreaterThanOrEqualTo = "GREATER_THAN_OR_EQUAL_TO" 7098) 7099 7100// ThresholdComparator_Values returns all elements of the ThresholdComparator enum 7101func ThresholdComparator_Values() []string { 7102 return []string{ 7103 ThresholdComparatorGreaterThan, 7104 ThresholdComparatorGreaterThanOrEqualTo, 7105 } 7106} 7107 7108const ( 7109 // VoteValueYes is a VoteValue enum value 7110 VoteValueYes = "YES" 7111 7112 // VoteValueNo is a VoteValue enum value 7113 VoteValueNo = "NO" 7114) 7115 7116// VoteValue_Values returns all elements of the VoteValue enum 7117func VoteValue_Values() []string { 7118 return []string{ 7119 VoteValueYes, 7120 VoteValueNo, 7121 } 7122} 7123