github.com/aavshr/aws-sdk-go@v1.41.3/service/qldbsession/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package qldbsession 4 5 import ( 6 "fmt" 7 8 "github.com/aavshr/aws-sdk-go/aws" 9 "github.com/aavshr/aws-sdk-go/aws/awsutil" 10 "github.com/aavshr/aws-sdk-go/aws/request" 11 "github.com/aavshr/aws-sdk-go/private/protocol" 12 ) 13 14 const opSendCommand = "SendCommand" 15 16 // SendCommandRequest generates a "aws/request.Request" representing the 17 // client's request for the SendCommand operation. The "output" return 18 // value will be populated with the request's response once the request completes 19 // successfully. 20 // 21 // Use "Send" method on the returned Request to send the API call to the service. 22 // the "output" return value is not valid until after Send returns without error. 23 // 24 // See SendCommand for more information on using the SendCommand 25 // API call, and error handling. 26 // 27 // This method is useful when you want to inject custom logic or configuration 28 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 29 // 30 // 31 // // Example sending a request using the SendCommandRequest method. 32 // req, resp := client.SendCommandRequest(params) 33 // 34 // err := req.Send() 35 // if err == nil { // resp is now filled 36 // fmt.Println(resp) 37 // } 38 // 39 // See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/SendCommand 40 func (c *QLDBSession) SendCommandRequest(input *SendCommandInput) (req *request.Request, output *SendCommandOutput) { 41 op := &request.Operation{ 42 Name: opSendCommand, 43 HTTPMethod: "POST", 44 HTTPPath: "/", 45 } 46 47 if input == nil { 48 input = &SendCommandInput{} 49 } 50 51 output = &SendCommandOutput{} 52 req = c.newRequest(op, input, output) 53 return 54 } 55 56 // SendCommand API operation for Amazon QLDB Session. 57 // 58 // Sends a command to an Amazon QLDB ledger. 59 // 60 // Instead of interacting directly with this API, we recommend using the QLDB 61 // driver or the QLDB shell to execute data transactions on a ledger. 62 // 63 // * If you are working with an AWS SDK, use the QLDB driver. The driver 64 // provides a high-level abstraction layer above this QLDB Session data plane 65 // and manages SendCommand API calls for you. For information and a list 66 // of supported programming languages, see Getting started with the driver 67 // (https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-driver.html) 68 // in the Amazon QLDB Developer Guide. 69 // 70 // * If you are working with the AWS Command Line Interface (AWS CLI), use 71 // the QLDB shell. The shell is a command line interface that uses the QLDB 72 // driver to interact with a ledger. For information, see Accessing Amazon 73 // QLDB using the QLDB shell (https://docs.aws.amazon.com/qldb/latest/developerguide/data-shell.html). 74 // 75 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 76 // with awserr.Error's Code and Message methods to get detailed information about 77 // the error. 78 // 79 // See the AWS API reference guide for Amazon QLDB Session's 80 // API operation SendCommand for usage and error information. 81 // 82 // Returned Error Types: 83 // * BadRequestException 84 // Returned if the request is malformed or contains an error such as an invalid 85 // parameter value or a missing required parameter. 86 // 87 // * InvalidSessionException 88 // Returned if the session doesn't exist anymore because it timed out or expired. 89 // 90 // * OccConflictException 91 // Returned when a transaction cannot be written to the journal due to a failure 92 // in the verification phase of optimistic concurrency control (OCC). 93 // 94 // * RateExceededException 95 // Returned when the rate of requests exceeds the allowed throughput. 96 // 97 // * LimitExceededException 98 // Returned if a resource limit such as number of active sessions is exceeded. 99 // 100 // * CapacityExceededException 101 // Returned when the request exceeds the processing capacity of the ledger. 102 // 103 // See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-session-2019-07-11/SendCommand 104 func (c *QLDBSession) SendCommand(input *SendCommandInput) (*SendCommandOutput, error) { 105 req, out := c.SendCommandRequest(input) 106 return out, req.Send() 107 } 108 109 // SendCommandWithContext is the same as SendCommand with the addition of 110 // the ability to pass a context and additional request options. 111 // 112 // See SendCommand for details on how to use this API operation. 113 // 114 // The context must be non-nil and will be used for request cancellation. If 115 // the context is nil a panic will occur. In the future the SDK may create 116 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 117 // for more information on using Contexts. 118 func (c *QLDBSession) SendCommandWithContext(ctx aws.Context, input *SendCommandInput, opts ...request.Option) (*SendCommandOutput, error) { 119 req, out := c.SendCommandRequest(input) 120 req.SetContext(ctx) 121 req.ApplyOptions(opts...) 122 return out, req.Send() 123 } 124 125 // Contains the details of the transaction to abort. 126 type AbortTransactionRequest struct { 127 _ struct{} `type:"structure"` 128 } 129 130 // String returns the string representation. 131 // 132 // API parameter values that are decorated as "sensitive" in the API will not 133 // be included in the string output. The member name will be present, but the 134 // value will be replaced with "sensitive". 135 func (s AbortTransactionRequest) String() string { 136 return awsutil.Prettify(s) 137 } 138 139 // GoString returns the string representation. 140 // 141 // API parameter values that are decorated as "sensitive" in the API will not 142 // be included in the string output. The member name will be present, but the 143 // value will be replaced with "sensitive". 144 func (s AbortTransactionRequest) GoString() string { 145 return s.String() 146 } 147 148 // Contains the details of the aborted transaction. 149 type AbortTransactionResult struct { 150 _ struct{} `type:"structure"` 151 152 // Contains server-side performance information for the command. 153 TimingInformation *TimingInformation `type:"structure"` 154 } 155 156 // String returns the string representation. 157 // 158 // API parameter values that are decorated as "sensitive" in the API will not 159 // be included in the string output. The member name will be present, but the 160 // value will be replaced with "sensitive". 161 func (s AbortTransactionResult) String() string { 162 return awsutil.Prettify(s) 163 } 164 165 // GoString returns the string representation. 166 // 167 // API parameter values that are decorated as "sensitive" in the API will not 168 // be included in the string output. The member name will be present, but the 169 // value will be replaced with "sensitive". 170 func (s AbortTransactionResult) GoString() string { 171 return s.String() 172 } 173 174 // SetTimingInformation sets the TimingInformation field's value. 175 func (s *AbortTransactionResult) SetTimingInformation(v *TimingInformation) *AbortTransactionResult { 176 s.TimingInformation = v 177 return s 178 } 179 180 // Returned if the request is malformed or contains an error such as an invalid 181 // parameter value or a missing required parameter. 182 type BadRequestException struct { 183 _ struct{} `type:"structure"` 184 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 185 186 Code_ *string `locationName:"Code" type:"string"` 187 188 Message_ *string `locationName:"Message" type:"string"` 189 } 190 191 // String returns the string representation. 192 // 193 // API parameter values that are decorated as "sensitive" in the API will not 194 // be included in the string output. The member name will be present, but the 195 // value will be replaced with "sensitive". 196 func (s BadRequestException) String() string { 197 return awsutil.Prettify(s) 198 } 199 200 // GoString returns the string representation. 201 // 202 // API parameter values that are decorated as "sensitive" in the API will not 203 // be included in the string output. The member name will be present, but the 204 // value will be replaced with "sensitive". 205 func (s BadRequestException) GoString() string { 206 return s.String() 207 } 208 209 func newErrorBadRequestException(v protocol.ResponseMetadata) error { 210 return &BadRequestException{ 211 RespMetadata: v, 212 } 213 } 214 215 // Code returns the exception type name. 216 func (s *BadRequestException) Code() string { 217 return "BadRequestException" 218 } 219 220 // Message returns the exception's message. 221 func (s *BadRequestException) Message() string { 222 if s.Message_ != nil { 223 return *s.Message_ 224 } 225 return "" 226 } 227 228 // OrigErr always returns nil, satisfies awserr.Error interface. 229 func (s *BadRequestException) OrigErr() error { 230 return nil 231 } 232 233 func (s *BadRequestException) Error() string { 234 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 235 } 236 237 // Status code returns the HTTP status code for the request's response error. 238 func (s *BadRequestException) StatusCode() int { 239 return s.RespMetadata.StatusCode 240 } 241 242 // RequestID returns the service's response RequestID for request. 243 func (s *BadRequestException) RequestID() string { 244 return s.RespMetadata.RequestID 245 } 246 247 // Returned when the request exceeds the processing capacity of the ledger. 248 type CapacityExceededException struct { 249 _ struct{} `type:"structure"` 250 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 251 252 Message_ *string `locationName:"Message" type:"string"` 253 } 254 255 // String returns the string representation. 256 // 257 // API parameter values that are decorated as "sensitive" in the API will not 258 // be included in the string output. The member name will be present, but the 259 // value will be replaced with "sensitive". 260 func (s CapacityExceededException) String() string { 261 return awsutil.Prettify(s) 262 } 263 264 // GoString returns the string representation. 265 // 266 // API parameter values that are decorated as "sensitive" in the API will not 267 // be included in the string output. The member name will be present, but the 268 // value will be replaced with "sensitive". 269 func (s CapacityExceededException) GoString() string { 270 return s.String() 271 } 272 273 func newErrorCapacityExceededException(v protocol.ResponseMetadata) error { 274 return &CapacityExceededException{ 275 RespMetadata: v, 276 } 277 } 278 279 // Code returns the exception type name. 280 func (s *CapacityExceededException) Code() string { 281 return "CapacityExceededException" 282 } 283 284 // Message returns the exception's message. 285 func (s *CapacityExceededException) Message() string { 286 if s.Message_ != nil { 287 return *s.Message_ 288 } 289 return "" 290 } 291 292 // OrigErr always returns nil, satisfies awserr.Error interface. 293 func (s *CapacityExceededException) OrigErr() error { 294 return nil 295 } 296 297 func (s *CapacityExceededException) Error() string { 298 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 299 } 300 301 // Status code returns the HTTP status code for the request's response error. 302 func (s *CapacityExceededException) StatusCode() int { 303 return s.RespMetadata.StatusCode 304 } 305 306 // RequestID returns the service's response RequestID for request. 307 func (s *CapacityExceededException) RequestID() string { 308 return s.RespMetadata.RequestID 309 } 310 311 // Contains the details of the transaction to commit. 312 type CommitTransactionRequest struct { 313 _ struct{} `type:"structure"` 314 315 // Specifies the commit digest for the transaction to commit. For every active 316 // transaction, the commit digest must be passed. QLDB validates CommitDigest 317 // and rejects the commit with an error if the digest computed on the client 318 // does not match the digest computed by QLDB. 319 // 320 // The purpose of the CommitDigest parameter is to ensure that QLDB commits 321 // a transaction if and only if the server has processed the exact set of statements 322 // sent by the client, in the same order that client sent them, and with no 323 // duplicates. 324 // CommitDigest is automatically base64 encoded/decoded by the SDK. 325 // 326 // CommitDigest is a required field 327 CommitDigest []byte `type:"blob" required:"true"` 328 329 // Specifies the transaction ID of the transaction to commit. 330 // 331 // TransactionId is a required field 332 TransactionId *string `min:"22" type:"string" required:"true"` 333 } 334 335 // String returns the string representation. 336 // 337 // API parameter values that are decorated as "sensitive" in the API will not 338 // be included in the string output. The member name will be present, but the 339 // value will be replaced with "sensitive". 340 func (s CommitTransactionRequest) String() string { 341 return awsutil.Prettify(s) 342 } 343 344 // GoString returns the string representation. 345 // 346 // API parameter values that are decorated as "sensitive" in the API will not 347 // be included in the string output. The member name will be present, but the 348 // value will be replaced with "sensitive". 349 func (s CommitTransactionRequest) GoString() string { 350 return s.String() 351 } 352 353 // Validate inspects the fields of the type to determine if they are valid. 354 func (s *CommitTransactionRequest) Validate() error { 355 invalidParams := request.ErrInvalidParams{Context: "CommitTransactionRequest"} 356 if s.CommitDigest == nil { 357 invalidParams.Add(request.NewErrParamRequired("CommitDigest")) 358 } 359 if s.TransactionId == nil { 360 invalidParams.Add(request.NewErrParamRequired("TransactionId")) 361 } 362 if s.TransactionId != nil && len(*s.TransactionId) < 22 { 363 invalidParams.Add(request.NewErrParamMinLen("TransactionId", 22)) 364 } 365 366 if invalidParams.Len() > 0 { 367 return invalidParams 368 } 369 return nil 370 } 371 372 // SetCommitDigest sets the CommitDigest field's value. 373 func (s *CommitTransactionRequest) SetCommitDigest(v []byte) *CommitTransactionRequest { 374 s.CommitDigest = v 375 return s 376 } 377 378 // SetTransactionId sets the TransactionId field's value. 379 func (s *CommitTransactionRequest) SetTransactionId(v string) *CommitTransactionRequest { 380 s.TransactionId = &v 381 return s 382 } 383 384 // Contains the details of the committed transaction. 385 type CommitTransactionResult struct { 386 _ struct{} `type:"structure"` 387 388 // The commit digest of the committed transaction. 389 // CommitDigest is automatically base64 encoded/decoded by the SDK. 390 CommitDigest []byte `type:"blob"` 391 392 // Contains metrics about the number of I/O requests that were consumed. 393 ConsumedIOs *IOUsage `type:"structure"` 394 395 // Contains server-side performance information for the command. 396 TimingInformation *TimingInformation `type:"structure"` 397 398 // The transaction ID of the committed transaction. 399 TransactionId *string `min:"22" type:"string"` 400 } 401 402 // String returns the string representation. 403 // 404 // API parameter values that are decorated as "sensitive" in the API will not 405 // be included in the string output. The member name will be present, but the 406 // value will be replaced with "sensitive". 407 func (s CommitTransactionResult) String() string { 408 return awsutil.Prettify(s) 409 } 410 411 // GoString returns the string representation. 412 // 413 // API parameter values that are decorated as "sensitive" in the API will not 414 // be included in the string output. The member name will be present, but the 415 // value will be replaced with "sensitive". 416 func (s CommitTransactionResult) GoString() string { 417 return s.String() 418 } 419 420 // SetCommitDigest sets the CommitDigest field's value. 421 func (s *CommitTransactionResult) SetCommitDigest(v []byte) *CommitTransactionResult { 422 s.CommitDigest = v 423 return s 424 } 425 426 // SetConsumedIOs sets the ConsumedIOs field's value. 427 func (s *CommitTransactionResult) SetConsumedIOs(v *IOUsage) *CommitTransactionResult { 428 s.ConsumedIOs = v 429 return s 430 } 431 432 // SetTimingInformation sets the TimingInformation field's value. 433 func (s *CommitTransactionResult) SetTimingInformation(v *TimingInformation) *CommitTransactionResult { 434 s.TimingInformation = v 435 return s 436 } 437 438 // SetTransactionId sets the TransactionId field's value. 439 func (s *CommitTransactionResult) SetTransactionId(v string) *CommitTransactionResult { 440 s.TransactionId = &v 441 return s 442 } 443 444 // Specifies a request to end the session. 445 type EndSessionRequest struct { 446 _ struct{} `type:"structure"` 447 } 448 449 // String returns the string representation. 450 // 451 // API parameter values that are decorated as "sensitive" in the API will not 452 // be included in the string output. The member name will be present, but the 453 // value will be replaced with "sensitive". 454 func (s EndSessionRequest) String() string { 455 return awsutil.Prettify(s) 456 } 457 458 // GoString returns the string representation. 459 // 460 // API parameter values that are decorated as "sensitive" in the API will not 461 // be included in the string output. The member name will be present, but the 462 // value will be replaced with "sensitive". 463 func (s EndSessionRequest) GoString() string { 464 return s.String() 465 } 466 467 // Contains the details of the ended session. 468 type EndSessionResult struct { 469 _ struct{} `type:"structure"` 470 471 // Contains server-side performance information for the command. 472 TimingInformation *TimingInformation `type:"structure"` 473 } 474 475 // String returns the string representation. 476 // 477 // API parameter values that are decorated as "sensitive" in the API will not 478 // be included in the string output. The member name will be present, but the 479 // value will be replaced with "sensitive". 480 func (s EndSessionResult) String() string { 481 return awsutil.Prettify(s) 482 } 483 484 // GoString returns the string representation. 485 // 486 // API parameter values that are decorated as "sensitive" in the API will not 487 // be included in the string output. The member name will be present, but the 488 // value will be replaced with "sensitive". 489 func (s EndSessionResult) GoString() string { 490 return s.String() 491 } 492 493 // SetTimingInformation sets the TimingInformation field's value. 494 func (s *EndSessionResult) SetTimingInformation(v *TimingInformation) *EndSessionResult { 495 s.TimingInformation = v 496 return s 497 } 498 499 // Specifies a request to execute a statement. 500 type ExecuteStatementRequest struct { 501 _ struct{} `type:"structure"` 502 503 // Specifies the parameters for the parameterized statement in the request. 504 Parameters []*ValueHolder `type:"list"` 505 506 // Specifies the statement of the request. 507 // 508 // Statement is a required field 509 Statement *string `min:"1" type:"string" required:"true"` 510 511 // Specifies the transaction ID of the request. 512 // 513 // TransactionId is a required field 514 TransactionId *string `min:"22" type:"string" required:"true"` 515 } 516 517 // String returns the string representation. 518 // 519 // API parameter values that are decorated as "sensitive" in the API will not 520 // be included in the string output. The member name will be present, but the 521 // value will be replaced with "sensitive". 522 func (s ExecuteStatementRequest) String() string { 523 return awsutil.Prettify(s) 524 } 525 526 // GoString returns the string representation. 527 // 528 // API parameter values that are decorated as "sensitive" in the API will not 529 // be included in the string output. The member name will be present, but the 530 // value will be replaced with "sensitive". 531 func (s ExecuteStatementRequest) GoString() string { 532 return s.String() 533 } 534 535 // Validate inspects the fields of the type to determine if they are valid. 536 func (s *ExecuteStatementRequest) Validate() error { 537 invalidParams := request.ErrInvalidParams{Context: "ExecuteStatementRequest"} 538 if s.Statement == nil { 539 invalidParams.Add(request.NewErrParamRequired("Statement")) 540 } 541 if s.Statement != nil && len(*s.Statement) < 1 { 542 invalidParams.Add(request.NewErrParamMinLen("Statement", 1)) 543 } 544 if s.TransactionId == nil { 545 invalidParams.Add(request.NewErrParamRequired("TransactionId")) 546 } 547 if s.TransactionId != nil && len(*s.TransactionId) < 22 { 548 invalidParams.Add(request.NewErrParamMinLen("TransactionId", 22)) 549 } 550 if s.Parameters != nil { 551 for i, v := range s.Parameters { 552 if v == nil { 553 continue 554 } 555 if err := v.Validate(); err != nil { 556 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Parameters", i), err.(request.ErrInvalidParams)) 557 } 558 } 559 } 560 561 if invalidParams.Len() > 0 { 562 return invalidParams 563 } 564 return nil 565 } 566 567 // SetParameters sets the Parameters field's value. 568 func (s *ExecuteStatementRequest) SetParameters(v []*ValueHolder) *ExecuteStatementRequest { 569 s.Parameters = v 570 return s 571 } 572 573 // SetStatement sets the Statement field's value. 574 func (s *ExecuteStatementRequest) SetStatement(v string) *ExecuteStatementRequest { 575 s.Statement = &v 576 return s 577 } 578 579 // SetTransactionId sets the TransactionId field's value. 580 func (s *ExecuteStatementRequest) SetTransactionId(v string) *ExecuteStatementRequest { 581 s.TransactionId = &v 582 return s 583 } 584 585 // Contains the details of the executed statement. 586 type ExecuteStatementResult struct { 587 _ struct{} `type:"structure"` 588 589 // Contains metrics about the number of I/O requests that were consumed. 590 ConsumedIOs *IOUsage `type:"structure"` 591 592 // Contains the details of the first fetched page. 593 FirstPage *Page `type:"structure"` 594 595 // Contains server-side performance information for the command. 596 TimingInformation *TimingInformation `type:"structure"` 597 } 598 599 // String returns the string representation. 600 // 601 // API parameter values that are decorated as "sensitive" in the API will not 602 // be included in the string output. The member name will be present, but the 603 // value will be replaced with "sensitive". 604 func (s ExecuteStatementResult) String() string { 605 return awsutil.Prettify(s) 606 } 607 608 // GoString returns the string representation. 609 // 610 // API parameter values that are decorated as "sensitive" in the API will not 611 // be included in the string output. The member name will be present, but the 612 // value will be replaced with "sensitive". 613 func (s ExecuteStatementResult) GoString() string { 614 return s.String() 615 } 616 617 // SetConsumedIOs sets the ConsumedIOs field's value. 618 func (s *ExecuteStatementResult) SetConsumedIOs(v *IOUsage) *ExecuteStatementResult { 619 s.ConsumedIOs = v 620 return s 621 } 622 623 // SetFirstPage sets the FirstPage field's value. 624 func (s *ExecuteStatementResult) SetFirstPage(v *Page) *ExecuteStatementResult { 625 s.FirstPage = v 626 return s 627 } 628 629 // SetTimingInformation sets the TimingInformation field's value. 630 func (s *ExecuteStatementResult) SetTimingInformation(v *TimingInformation) *ExecuteStatementResult { 631 s.TimingInformation = v 632 return s 633 } 634 635 // Specifies the details of the page to be fetched. 636 type FetchPageRequest struct { 637 _ struct{} `type:"structure"` 638 639 // Specifies the next page token of the page to be fetched. 640 // 641 // NextPageToken is a required field 642 NextPageToken *string `min:"4" type:"string" required:"true"` 643 644 // Specifies the transaction ID of the page to be fetched. 645 // 646 // TransactionId is a required field 647 TransactionId *string `min:"22" type:"string" required:"true"` 648 } 649 650 // String returns the string representation. 651 // 652 // API parameter values that are decorated as "sensitive" in the API will not 653 // be included in the string output. The member name will be present, but the 654 // value will be replaced with "sensitive". 655 func (s FetchPageRequest) String() string { 656 return awsutil.Prettify(s) 657 } 658 659 // GoString returns the string representation. 660 // 661 // API parameter values that are decorated as "sensitive" in the API will not 662 // be included in the string output. The member name will be present, but the 663 // value will be replaced with "sensitive". 664 func (s FetchPageRequest) GoString() string { 665 return s.String() 666 } 667 668 // Validate inspects the fields of the type to determine if they are valid. 669 func (s *FetchPageRequest) Validate() error { 670 invalidParams := request.ErrInvalidParams{Context: "FetchPageRequest"} 671 if s.NextPageToken == nil { 672 invalidParams.Add(request.NewErrParamRequired("NextPageToken")) 673 } 674 if s.NextPageToken != nil && len(*s.NextPageToken) < 4 { 675 invalidParams.Add(request.NewErrParamMinLen("NextPageToken", 4)) 676 } 677 if s.TransactionId == nil { 678 invalidParams.Add(request.NewErrParamRequired("TransactionId")) 679 } 680 if s.TransactionId != nil && len(*s.TransactionId) < 22 { 681 invalidParams.Add(request.NewErrParamMinLen("TransactionId", 22)) 682 } 683 684 if invalidParams.Len() > 0 { 685 return invalidParams 686 } 687 return nil 688 } 689 690 // SetNextPageToken sets the NextPageToken field's value. 691 func (s *FetchPageRequest) SetNextPageToken(v string) *FetchPageRequest { 692 s.NextPageToken = &v 693 return s 694 } 695 696 // SetTransactionId sets the TransactionId field's value. 697 func (s *FetchPageRequest) SetTransactionId(v string) *FetchPageRequest { 698 s.TransactionId = &v 699 return s 700 } 701 702 // Contains the page that was fetched. 703 type FetchPageResult struct { 704 _ struct{} `type:"structure"` 705 706 // Contains metrics about the number of I/O requests that were consumed. 707 ConsumedIOs *IOUsage `type:"structure"` 708 709 // Contains details of the fetched page. 710 Page *Page `type:"structure"` 711 712 // Contains server-side performance information for the command. 713 TimingInformation *TimingInformation `type:"structure"` 714 } 715 716 // String returns the string representation. 717 // 718 // API parameter values that are decorated as "sensitive" in the API will not 719 // be included in the string output. The member name will be present, but the 720 // value will be replaced with "sensitive". 721 func (s FetchPageResult) String() string { 722 return awsutil.Prettify(s) 723 } 724 725 // GoString returns the string representation. 726 // 727 // API parameter values that are decorated as "sensitive" in the API will not 728 // be included in the string output. The member name will be present, but the 729 // value will be replaced with "sensitive". 730 func (s FetchPageResult) GoString() string { 731 return s.String() 732 } 733 734 // SetConsumedIOs sets the ConsumedIOs field's value. 735 func (s *FetchPageResult) SetConsumedIOs(v *IOUsage) *FetchPageResult { 736 s.ConsumedIOs = v 737 return s 738 } 739 740 // SetPage sets the Page field's value. 741 func (s *FetchPageResult) SetPage(v *Page) *FetchPageResult { 742 s.Page = v 743 return s 744 } 745 746 // SetTimingInformation sets the TimingInformation field's value. 747 func (s *FetchPageResult) SetTimingInformation(v *TimingInformation) *FetchPageResult { 748 s.TimingInformation = v 749 return s 750 } 751 752 // Contains I/O usage metrics for a command that was invoked. 753 type IOUsage struct { 754 _ struct{} `type:"structure"` 755 756 // The number of read I/O requests that the command made. 757 ReadIOs *int64 `type:"long"` 758 759 // The number of write I/O requests that the command made. 760 WriteIOs *int64 `type:"long"` 761 } 762 763 // String returns the string representation. 764 // 765 // API parameter values that are decorated as "sensitive" in the API will not 766 // be included in the string output. The member name will be present, but the 767 // value will be replaced with "sensitive". 768 func (s IOUsage) String() string { 769 return awsutil.Prettify(s) 770 } 771 772 // GoString returns the string representation. 773 // 774 // API parameter values that are decorated as "sensitive" in the API will not 775 // be included in the string output. The member name will be present, but the 776 // value will be replaced with "sensitive". 777 func (s IOUsage) GoString() string { 778 return s.String() 779 } 780 781 // SetReadIOs sets the ReadIOs field's value. 782 func (s *IOUsage) SetReadIOs(v int64) *IOUsage { 783 s.ReadIOs = &v 784 return s 785 } 786 787 // SetWriteIOs sets the WriteIOs field's value. 788 func (s *IOUsage) SetWriteIOs(v int64) *IOUsage { 789 s.WriteIOs = &v 790 return s 791 } 792 793 // Returned if the session doesn't exist anymore because it timed out or expired. 794 type InvalidSessionException struct { 795 _ struct{} `type:"structure"` 796 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 797 798 Code_ *string `locationName:"Code" type:"string"` 799 800 Message_ *string `locationName:"Message" type:"string"` 801 } 802 803 // String returns the string representation. 804 // 805 // API parameter values that are decorated as "sensitive" in the API will not 806 // be included in the string output. The member name will be present, but the 807 // value will be replaced with "sensitive". 808 func (s InvalidSessionException) String() string { 809 return awsutil.Prettify(s) 810 } 811 812 // GoString returns the string representation. 813 // 814 // API parameter values that are decorated as "sensitive" in the API will not 815 // be included in the string output. The member name will be present, but the 816 // value will be replaced with "sensitive". 817 func (s InvalidSessionException) GoString() string { 818 return s.String() 819 } 820 821 func newErrorInvalidSessionException(v protocol.ResponseMetadata) error { 822 return &InvalidSessionException{ 823 RespMetadata: v, 824 } 825 } 826 827 // Code returns the exception type name. 828 func (s *InvalidSessionException) Code() string { 829 return "InvalidSessionException" 830 } 831 832 // Message returns the exception's message. 833 func (s *InvalidSessionException) Message() string { 834 if s.Message_ != nil { 835 return *s.Message_ 836 } 837 return "" 838 } 839 840 // OrigErr always returns nil, satisfies awserr.Error interface. 841 func (s *InvalidSessionException) OrigErr() error { 842 return nil 843 } 844 845 func (s *InvalidSessionException) Error() string { 846 return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) 847 } 848 849 // Status code returns the HTTP status code for the request's response error. 850 func (s *InvalidSessionException) StatusCode() int { 851 return s.RespMetadata.StatusCode 852 } 853 854 // RequestID returns the service's response RequestID for request. 855 func (s *InvalidSessionException) RequestID() string { 856 return s.RespMetadata.RequestID 857 } 858 859 // Returned if a resource limit such as number of active sessions is exceeded. 860 type LimitExceededException struct { 861 _ struct{} `type:"structure"` 862 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 863 864 Message_ *string `locationName:"Message" type:"string"` 865 } 866 867 // String returns the string representation. 868 // 869 // API parameter values that are decorated as "sensitive" in the API will not 870 // be included in the string output. The member name will be present, but the 871 // value will be replaced with "sensitive". 872 func (s LimitExceededException) String() string { 873 return awsutil.Prettify(s) 874 } 875 876 // GoString returns the string representation. 877 // 878 // API parameter values that are decorated as "sensitive" in the API will not 879 // be included in the string output. The member name will be present, but the 880 // value will be replaced with "sensitive". 881 func (s LimitExceededException) GoString() string { 882 return s.String() 883 } 884 885 func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 886 return &LimitExceededException{ 887 RespMetadata: v, 888 } 889 } 890 891 // Code returns the exception type name. 892 func (s *LimitExceededException) Code() string { 893 return "LimitExceededException" 894 } 895 896 // Message returns the exception's message. 897 func (s *LimitExceededException) Message() string { 898 if s.Message_ != nil { 899 return *s.Message_ 900 } 901 return "" 902 } 903 904 // OrigErr always returns nil, satisfies awserr.Error interface. 905 func (s *LimitExceededException) OrigErr() error { 906 return nil 907 } 908 909 func (s *LimitExceededException) Error() string { 910 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 911 } 912 913 // Status code returns the HTTP status code for the request's response error. 914 func (s *LimitExceededException) StatusCode() int { 915 return s.RespMetadata.StatusCode 916 } 917 918 // RequestID returns the service's response RequestID for request. 919 func (s *LimitExceededException) RequestID() string { 920 return s.RespMetadata.RequestID 921 } 922 923 // Returned when a transaction cannot be written to the journal due to a failure 924 // in the verification phase of optimistic concurrency control (OCC). 925 type OccConflictException struct { 926 _ struct{} `type:"structure"` 927 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 928 929 Message_ *string `locationName:"Message" type:"string"` 930 } 931 932 // String returns the string representation. 933 // 934 // API parameter values that are decorated as "sensitive" in the API will not 935 // be included in the string output. The member name will be present, but the 936 // value will be replaced with "sensitive". 937 func (s OccConflictException) String() string { 938 return awsutil.Prettify(s) 939 } 940 941 // GoString returns the string representation. 942 // 943 // API parameter values that are decorated as "sensitive" in the API will not 944 // be included in the string output. The member name will be present, but the 945 // value will be replaced with "sensitive". 946 func (s OccConflictException) GoString() string { 947 return s.String() 948 } 949 950 func newErrorOccConflictException(v protocol.ResponseMetadata) error { 951 return &OccConflictException{ 952 RespMetadata: v, 953 } 954 } 955 956 // Code returns the exception type name. 957 func (s *OccConflictException) Code() string { 958 return "OccConflictException" 959 } 960 961 // Message returns the exception's message. 962 func (s *OccConflictException) Message() string { 963 if s.Message_ != nil { 964 return *s.Message_ 965 } 966 return "" 967 } 968 969 // OrigErr always returns nil, satisfies awserr.Error interface. 970 func (s *OccConflictException) OrigErr() error { 971 return nil 972 } 973 974 func (s *OccConflictException) Error() string { 975 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 976 } 977 978 // Status code returns the HTTP status code for the request's response error. 979 func (s *OccConflictException) StatusCode() int { 980 return s.RespMetadata.StatusCode 981 } 982 983 // RequestID returns the service's response RequestID for request. 984 func (s *OccConflictException) RequestID() string { 985 return s.RespMetadata.RequestID 986 } 987 988 // Contains details of the fetched page. 989 type Page struct { 990 _ struct{} `type:"structure"` 991 992 // The token of the next page. 993 NextPageToken *string `min:"4" type:"string"` 994 995 // A structure that contains values in multiple encoding formats. 996 Values []*ValueHolder `type:"list"` 997 } 998 999 // String returns the string representation. 1000 // 1001 // API parameter values that are decorated as "sensitive" in the API will not 1002 // be included in the string output. The member name will be present, but the 1003 // value will be replaced with "sensitive". 1004 func (s Page) String() string { 1005 return awsutil.Prettify(s) 1006 } 1007 1008 // GoString returns the string representation. 1009 // 1010 // API parameter values that are decorated as "sensitive" in the API will not 1011 // be included in the string output. The member name will be present, but the 1012 // value will be replaced with "sensitive". 1013 func (s Page) GoString() string { 1014 return s.String() 1015 } 1016 1017 // SetNextPageToken sets the NextPageToken field's value. 1018 func (s *Page) SetNextPageToken(v string) *Page { 1019 s.NextPageToken = &v 1020 return s 1021 } 1022 1023 // SetValues sets the Values field's value. 1024 func (s *Page) SetValues(v []*ValueHolder) *Page { 1025 s.Values = v 1026 return s 1027 } 1028 1029 // Returned when the rate of requests exceeds the allowed throughput. 1030 type RateExceededException struct { 1031 _ struct{} `type:"structure"` 1032 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1033 1034 Message_ *string `locationName:"Message" type:"string"` 1035 } 1036 1037 // String returns the string representation. 1038 // 1039 // API parameter values that are decorated as "sensitive" in the API will not 1040 // be included in the string output. The member name will be present, but the 1041 // value will be replaced with "sensitive". 1042 func (s RateExceededException) String() string { 1043 return awsutil.Prettify(s) 1044 } 1045 1046 // GoString returns the string representation. 1047 // 1048 // API parameter values that are decorated as "sensitive" in the API will not 1049 // be included in the string output. The member name will be present, but the 1050 // value will be replaced with "sensitive". 1051 func (s RateExceededException) GoString() string { 1052 return s.String() 1053 } 1054 1055 func newErrorRateExceededException(v protocol.ResponseMetadata) error { 1056 return &RateExceededException{ 1057 RespMetadata: v, 1058 } 1059 } 1060 1061 // Code returns the exception type name. 1062 func (s *RateExceededException) Code() string { 1063 return "RateExceededException" 1064 } 1065 1066 // Message returns the exception's message. 1067 func (s *RateExceededException) Message() string { 1068 if s.Message_ != nil { 1069 return *s.Message_ 1070 } 1071 return "" 1072 } 1073 1074 // OrigErr always returns nil, satisfies awserr.Error interface. 1075 func (s *RateExceededException) OrigErr() error { 1076 return nil 1077 } 1078 1079 func (s *RateExceededException) Error() string { 1080 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1081 } 1082 1083 // Status code returns the HTTP status code for the request's response error. 1084 func (s *RateExceededException) StatusCode() int { 1085 return s.RespMetadata.StatusCode 1086 } 1087 1088 // RequestID returns the service's response RequestID for request. 1089 func (s *RateExceededException) RequestID() string { 1090 return s.RespMetadata.RequestID 1091 } 1092 1093 type SendCommandInput struct { 1094 _ struct{} `type:"structure"` 1095 1096 // Command to abort the current transaction. 1097 AbortTransaction *AbortTransactionRequest `type:"structure"` 1098 1099 // Command to commit the specified transaction. 1100 CommitTransaction *CommitTransactionRequest `type:"structure"` 1101 1102 // Command to end the current session. 1103 EndSession *EndSessionRequest `type:"structure"` 1104 1105 // Command to execute a statement in the specified transaction. 1106 ExecuteStatement *ExecuteStatementRequest `type:"structure"` 1107 1108 // Command to fetch a page. 1109 FetchPage *FetchPageRequest `type:"structure"` 1110 1111 // Specifies the session token for the current command. A session token is constant 1112 // throughout the life of the session. 1113 // 1114 // To obtain a session token, run the StartSession command. This SessionToken 1115 // is required for every subsequent command that is issued during the current 1116 // session. 1117 SessionToken *string `min:"4" type:"string"` 1118 1119 // Command to start a new session. A session token is obtained as part of the 1120 // response. 1121 StartSession *StartSessionRequest `type:"structure"` 1122 1123 // Command to start a new transaction. 1124 StartTransaction *StartTransactionRequest `type:"structure"` 1125 } 1126 1127 // String returns the string representation. 1128 // 1129 // API parameter values that are decorated as "sensitive" in the API will not 1130 // be included in the string output. The member name will be present, but the 1131 // value will be replaced with "sensitive". 1132 func (s SendCommandInput) String() string { 1133 return awsutil.Prettify(s) 1134 } 1135 1136 // GoString returns the string representation. 1137 // 1138 // API parameter values that are decorated as "sensitive" in the API will not 1139 // be included in the string output. The member name will be present, but the 1140 // value will be replaced with "sensitive". 1141 func (s SendCommandInput) GoString() string { 1142 return s.String() 1143 } 1144 1145 // Validate inspects the fields of the type to determine if they are valid. 1146 func (s *SendCommandInput) Validate() error { 1147 invalidParams := request.ErrInvalidParams{Context: "SendCommandInput"} 1148 if s.SessionToken != nil && len(*s.SessionToken) < 4 { 1149 invalidParams.Add(request.NewErrParamMinLen("SessionToken", 4)) 1150 } 1151 if s.CommitTransaction != nil { 1152 if err := s.CommitTransaction.Validate(); err != nil { 1153 invalidParams.AddNested("CommitTransaction", err.(request.ErrInvalidParams)) 1154 } 1155 } 1156 if s.ExecuteStatement != nil { 1157 if err := s.ExecuteStatement.Validate(); err != nil { 1158 invalidParams.AddNested("ExecuteStatement", err.(request.ErrInvalidParams)) 1159 } 1160 } 1161 if s.FetchPage != nil { 1162 if err := s.FetchPage.Validate(); err != nil { 1163 invalidParams.AddNested("FetchPage", err.(request.ErrInvalidParams)) 1164 } 1165 } 1166 if s.StartSession != nil { 1167 if err := s.StartSession.Validate(); err != nil { 1168 invalidParams.AddNested("StartSession", err.(request.ErrInvalidParams)) 1169 } 1170 } 1171 1172 if invalidParams.Len() > 0 { 1173 return invalidParams 1174 } 1175 return nil 1176 } 1177 1178 // SetAbortTransaction sets the AbortTransaction field's value. 1179 func (s *SendCommandInput) SetAbortTransaction(v *AbortTransactionRequest) *SendCommandInput { 1180 s.AbortTransaction = v 1181 return s 1182 } 1183 1184 // SetCommitTransaction sets the CommitTransaction field's value. 1185 func (s *SendCommandInput) SetCommitTransaction(v *CommitTransactionRequest) *SendCommandInput { 1186 s.CommitTransaction = v 1187 return s 1188 } 1189 1190 // SetEndSession sets the EndSession field's value. 1191 func (s *SendCommandInput) SetEndSession(v *EndSessionRequest) *SendCommandInput { 1192 s.EndSession = v 1193 return s 1194 } 1195 1196 // SetExecuteStatement sets the ExecuteStatement field's value. 1197 func (s *SendCommandInput) SetExecuteStatement(v *ExecuteStatementRequest) *SendCommandInput { 1198 s.ExecuteStatement = v 1199 return s 1200 } 1201 1202 // SetFetchPage sets the FetchPage field's value. 1203 func (s *SendCommandInput) SetFetchPage(v *FetchPageRequest) *SendCommandInput { 1204 s.FetchPage = v 1205 return s 1206 } 1207 1208 // SetSessionToken sets the SessionToken field's value. 1209 func (s *SendCommandInput) SetSessionToken(v string) *SendCommandInput { 1210 s.SessionToken = &v 1211 return s 1212 } 1213 1214 // SetStartSession sets the StartSession field's value. 1215 func (s *SendCommandInput) SetStartSession(v *StartSessionRequest) *SendCommandInput { 1216 s.StartSession = v 1217 return s 1218 } 1219 1220 // SetStartTransaction sets the StartTransaction field's value. 1221 func (s *SendCommandInput) SetStartTransaction(v *StartTransactionRequest) *SendCommandInput { 1222 s.StartTransaction = v 1223 return s 1224 } 1225 1226 type SendCommandOutput struct { 1227 _ struct{} `type:"structure"` 1228 1229 // Contains the details of the aborted transaction. 1230 AbortTransaction *AbortTransactionResult `type:"structure"` 1231 1232 // Contains the details of the committed transaction. 1233 CommitTransaction *CommitTransactionResult `type:"structure"` 1234 1235 // Contains the details of the ended session. 1236 EndSession *EndSessionResult `type:"structure"` 1237 1238 // Contains the details of the executed statement. 1239 ExecuteStatement *ExecuteStatementResult `type:"structure"` 1240 1241 // Contains the details of the fetched page. 1242 FetchPage *FetchPageResult `type:"structure"` 1243 1244 // Contains the details of the started session that includes a session token. 1245 // This SessionToken is required for every subsequent command that is issued 1246 // during the current session. 1247 StartSession *StartSessionResult `type:"structure"` 1248 1249 // Contains the details of the started transaction. 1250 StartTransaction *StartTransactionResult `type:"structure"` 1251 } 1252 1253 // String returns the string representation. 1254 // 1255 // API parameter values that are decorated as "sensitive" in the API will not 1256 // be included in the string output. The member name will be present, but the 1257 // value will be replaced with "sensitive". 1258 func (s SendCommandOutput) String() string { 1259 return awsutil.Prettify(s) 1260 } 1261 1262 // GoString returns the string representation. 1263 // 1264 // API parameter values that are decorated as "sensitive" in the API will not 1265 // be included in the string output. The member name will be present, but the 1266 // value will be replaced with "sensitive". 1267 func (s SendCommandOutput) GoString() string { 1268 return s.String() 1269 } 1270 1271 // SetAbortTransaction sets the AbortTransaction field's value. 1272 func (s *SendCommandOutput) SetAbortTransaction(v *AbortTransactionResult) *SendCommandOutput { 1273 s.AbortTransaction = v 1274 return s 1275 } 1276 1277 // SetCommitTransaction sets the CommitTransaction field's value. 1278 func (s *SendCommandOutput) SetCommitTransaction(v *CommitTransactionResult) *SendCommandOutput { 1279 s.CommitTransaction = v 1280 return s 1281 } 1282 1283 // SetEndSession sets the EndSession field's value. 1284 func (s *SendCommandOutput) SetEndSession(v *EndSessionResult) *SendCommandOutput { 1285 s.EndSession = v 1286 return s 1287 } 1288 1289 // SetExecuteStatement sets the ExecuteStatement field's value. 1290 func (s *SendCommandOutput) SetExecuteStatement(v *ExecuteStatementResult) *SendCommandOutput { 1291 s.ExecuteStatement = v 1292 return s 1293 } 1294 1295 // SetFetchPage sets the FetchPage field's value. 1296 func (s *SendCommandOutput) SetFetchPage(v *FetchPageResult) *SendCommandOutput { 1297 s.FetchPage = v 1298 return s 1299 } 1300 1301 // SetStartSession sets the StartSession field's value. 1302 func (s *SendCommandOutput) SetStartSession(v *StartSessionResult) *SendCommandOutput { 1303 s.StartSession = v 1304 return s 1305 } 1306 1307 // SetStartTransaction sets the StartTransaction field's value. 1308 func (s *SendCommandOutput) SetStartTransaction(v *StartTransactionResult) *SendCommandOutput { 1309 s.StartTransaction = v 1310 return s 1311 } 1312 1313 // Specifies a request to start a new session. 1314 type StartSessionRequest struct { 1315 _ struct{} `type:"structure"` 1316 1317 // The name of the ledger to start a new session against. 1318 // 1319 // LedgerName is a required field 1320 LedgerName *string `min:"1" type:"string" required:"true"` 1321 } 1322 1323 // String returns the string representation. 1324 // 1325 // API parameter values that are decorated as "sensitive" in the API will not 1326 // be included in the string output. The member name will be present, but the 1327 // value will be replaced with "sensitive". 1328 func (s StartSessionRequest) String() string { 1329 return awsutil.Prettify(s) 1330 } 1331 1332 // GoString returns the string representation. 1333 // 1334 // API parameter values that are decorated as "sensitive" in the API will not 1335 // be included in the string output. The member name will be present, but the 1336 // value will be replaced with "sensitive". 1337 func (s StartSessionRequest) GoString() string { 1338 return s.String() 1339 } 1340 1341 // Validate inspects the fields of the type to determine if they are valid. 1342 func (s *StartSessionRequest) Validate() error { 1343 invalidParams := request.ErrInvalidParams{Context: "StartSessionRequest"} 1344 if s.LedgerName == nil { 1345 invalidParams.Add(request.NewErrParamRequired("LedgerName")) 1346 } 1347 if s.LedgerName != nil && len(*s.LedgerName) < 1 { 1348 invalidParams.Add(request.NewErrParamMinLen("LedgerName", 1)) 1349 } 1350 1351 if invalidParams.Len() > 0 { 1352 return invalidParams 1353 } 1354 return nil 1355 } 1356 1357 // SetLedgerName sets the LedgerName field's value. 1358 func (s *StartSessionRequest) SetLedgerName(v string) *StartSessionRequest { 1359 s.LedgerName = &v 1360 return s 1361 } 1362 1363 // Contains the details of the started session. 1364 type StartSessionResult struct { 1365 _ struct{} `type:"structure"` 1366 1367 // Session token of the started session. This SessionToken is required for every 1368 // subsequent command that is issued during the current session. 1369 SessionToken *string `min:"4" type:"string"` 1370 1371 // Contains server-side performance information for the command. 1372 TimingInformation *TimingInformation `type:"structure"` 1373 } 1374 1375 // String returns the string representation. 1376 // 1377 // API parameter values that are decorated as "sensitive" in the API will not 1378 // be included in the string output. The member name will be present, but the 1379 // value will be replaced with "sensitive". 1380 func (s StartSessionResult) String() string { 1381 return awsutil.Prettify(s) 1382 } 1383 1384 // GoString returns the string representation. 1385 // 1386 // API parameter values that are decorated as "sensitive" in the API will not 1387 // be included in the string output. The member name will be present, but the 1388 // value will be replaced with "sensitive". 1389 func (s StartSessionResult) GoString() string { 1390 return s.String() 1391 } 1392 1393 // SetSessionToken sets the SessionToken field's value. 1394 func (s *StartSessionResult) SetSessionToken(v string) *StartSessionResult { 1395 s.SessionToken = &v 1396 return s 1397 } 1398 1399 // SetTimingInformation sets the TimingInformation field's value. 1400 func (s *StartSessionResult) SetTimingInformation(v *TimingInformation) *StartSessionResult { 1401 s.TimingInformation = v 1402 return s 1403 } 1404 1405 // Specifies a request to start a transaction. 1406 type StartTransactionRequest struct { 1407 _ struct{} `type:"structure"` 1408 } 1409 1410 // String returns the string representation. 1411 // 1412 // API parameter values that are decorated as "sensitive" in the API will not 1413 // be included in the string output. The member name will be present, but the 1414 // value will be replaced with "sensitive". 1415 func (s StartTransactionRequest) String() string { 1416 return awsutil.Prettify(s) 1417 } 1418 1419 // GoString returns the string representation. 1420 // 1421 // API parameter values that are decorated as "sensitive" in the API will not 1422 // be included in the string output. The member name will be present, but the 1423 // value will be replaced with "sensitive". 1424 func (s StartTransactionRequest) GoString() string { 1425 return s.String() 1426 } 1427 1428 // Contains the details of the started transaction. 1429 type StartTransactionResult struct { 1430 _ struct{} `type:"structure"` 1431 1432 // Contains server-side performance information for the command. 1433 TimingInformation *TimingInformation `type:"structure"` 1434 1435 // The transaction ID of the started transaction. 1436 TransactionId *string `min:"22" type:"string"` 1437 } 1438 1439 // String returns the string representation. 1440 // 1441 // API parameter values that are decorated as "sensitive" in the API will not 1442 // be included in the string output. The member name will be present, but the 1443 // value will be replaced with "sensitive". 1444 func (s StartTransactionResult) String() string { 1445 return awsutil.Prettify(s) 1446 } 1447 1448 // GoString returns the string representation. 1449 // 1450 // API parameter values that are decorated as "sensitive" in the API will not 1451 // be included in the string output. The member name will be present, but the 1452 // value will be replaced with "sensitive". 1453 func (s StartTransactionResult) GoString() string { 1454 return s.String() 1455 } 1456 1457 // SetTimingInformation sets the TimingInformation field's value. 1458 func (s *StartTransactionResult) SetTimingInformation(v *TimingInformation) *StartTransactionResult { 1459 s.TimingInformation = v 1460 return s 1461 } 1462 1463 // SetTransactionId sets the TransactionId field's value. 1464 func (s *StartTransactionResult) SetTransactionId(v string) *StartTransactionResult { 1465 s.TransactionId = &v 1466 return s 1467 } 1468 1469 // Contains server-side performance information for a command. Amazon QLDB captures 1470 // timing information between the times when it receives the request and when 1471 // it sends the corresponding response. 1472 type TimingInformation struct { 1473 _ struct{} `type:"structure"` 1474 1475 // The amount of time that QLDB spent on processing the command, measured in 1476 // milliseconds. 1477 ProcessingTimeMilliseconds *int64 `type:"long"` 1478 } 1479 1480 // String returns the string representation. 1481 // 1482 // API parameter values that are decorated as "sensitive" in the API will not 1483 // be included in the string output. The member name will be present, but the 1484 // value will be replaced with "sensitive". 1485 func (s TimingInformation) String() string { 1486 return awsutil.Prettify(s) 1487 } 1488 1489 // GoString returns the string representation. 1490 // 1491 // API parameter values that are decorated as "sensitive" in the API will not 1492 // be included in the string output. The member name will be present, but the 1493 // value will be replaced with "sensitive". 1494 func (s TimingInformation) GoString() string { 1495 return s.String() 1496 } 1497 1498 // SetProcessingTimeMilliseconds sets the ProcessingTimeMilliseconds field's value. 1499 func (s *TimingInformation) SetProcessingTimeMilliseconds(v int64) *TimingInformation { 1500 s.ProcessingTimeMilliseconds = &v 1501 return s 1502 } 1503 1504 // A structure that can contain a value in multiple encoding formats. 1505 type ValueHolder struct { 1506 _ struct{} `type:"structure"` 1507 1508 // An Amazon Ion binary value contained in a ValueHolder structure. 1509 // IonBinary is automatically base64 encoded/decoded by the SDK. 1510 IonBinary []byte `min:"1" type:"blob"` 1511 1512 // An Amazon Ion plaintext value contained in a ValueHolder structure. 1513 IonText *string `min:"1" type:"string"` 1514 } 1515 1516 // String returns the string representation. 1517 // 1518 // API parameter values that are decorated as "sensitive" in the API will not 1519 // be included in the string output. The member name will be present, but the 1520 // value will be replaced with "sensitive". 1521 func (s ValueHolder) String() string { 1522 return awsutil.Prettify(s) 1523 } 1524 1525 // GoString returns the string representation. 1526 // 1527 // API parameter values that are decorated as "sensitive" in the API will not 1528 // be included in the string output. The member name will be present, but the 1529 // value will be replaced with "sensitive". 1530 func (s ValueHolder) GoString() string { 1531 return s.String() 1532 } 1533 1534 // Validate inspects the fields of the type to determine if they are valid. 1535 func (s *ValueHolder) Validate() error { 1536 invalidParams := request.ErrInvalidParams{Context: "ValueHolder"} 1537 if s.IonBinary != nil && len(s.IonBinary) < 1 { 1538 invalidParams.Add(request.NewErrParamMinLen("IonBinary", 1)) 1539 } 1540 if s.IonText != nil && len(*s.IonText) < 1 { 1541 invalidParams.Add(request.NewErrParamMinLen("IonText", 1)) 1542 } 1543 1544 if invalidParams.Len() > 0 { 1545 return invalidParams 1546 } 1547 return nil 1548 } 1549 1550 // SetIonBinary sets the IonBinary field's value. 1551 func (s *ValueHolder) SetIonBinary(v []byte) *ValueHolder { 1552 s.IonBinary = v 1553 return s 1554 } 1555 1556 // SetIonText sets the IonText field's value. 1557 func (s *ValueHolder) SetIonText(v string) *ValueHolder { 1558 s.IonText = &v 1559 return s 1560 }