github.com/aavshr/aws-sdk-go@v1.41.3/service/sagemakerfeaturestoreruntime/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package sagemakerfeaturestoreruntime 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 "github.com/aavshr/aws-sdk-go/private/protocol/restjson" 13 ) 14 15 const opBatchGetRecord = "BatchGetRecord" 16 17 // BatchGetRecordRequest generates a "aws/request.Request" representing the 18 // client's request for the BatchGetRecord operation. The "output" return 19 // value will be populated with the request's response once the request completes 20 // successfully. 21 // 22 // Use "Send" method on the returned Request to send the API call to the service. 23 // the "output" return value is not valid until after Send returns without error. 24 // 25 // See BatchGetRecord for more information on using the BatchGetRecord 26 // API call, and error handling. 27 // 28 // This method is useful when you want to inject custom logic or configuration 29 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 30 // 31 // 32 // // Example sending a request using the BatchGetRecordRequest method. 33 // req, resp := client.BatchGetRecordRequest(params) 34 // 35 // err := req.Send() 36 // if err == nil { // resp is now filled 37 // fmt.Println(resp) 38 // } 39 // 40 // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-featurestore-runtime-2020-07-01/BatchGetRecord 41 func (c *SageMakerFeatureStoreRuntime) BatchGetRecordRequest(input *BatchGetRecordInput) (req *request.Request, output *BatchGetRecordOutput) { 42 op := &request.Operation{ 43 Name: opBatchGetRecord, 44 HTTPMethod: "POST", 45 HTTPPath: "/BatchGetRecord", 46 } 47 48 if input == nil { 49 input = &BatchGetRecordInput{} 50 } 51 52 output = &BatchGetRecordOutput{} 53 req = c.newRequest(op, input, output) 54 return 55 } 56 57 // BatchGetRecord API operation for Amazon SageMaker Feature Store Runtime. 58 // 59 // Retrieves a batch of Records from a FeatureGroup. 60 // 61 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 62 // with awserr.Error's Code and Message methods to get detailed information about 63 // the error. 64 // 65 // See the AWS API reference guide for Amazon SageMaker Feature Store Runtime's 66 // API operation BatchGetRecord for usage and error information. 67 // 68 // Returned Error Types: 69 // * ValidationError 70 // There was an error validating your request. 71 // 72 // * InternalFailure 73 // An internal failure occurred. Try your request again. If the problem persists, 74 // contact AWS customer support. 75 // 76 // * ServiceUnavailable 77 // The service is currently unavailable. 78 // 79 // * AccessForbidden 80 // You do not have permission to perform an action. 81 // 82 // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-featurestore-runtime-2020-07-01/BatchGetRecord 83 func (c *SageMakerFeatureStoreRuntime) BatchGetRecord(input *BatchGetRecordInput) (*BatchGetRecordOutput, error) { 84 req, out := c.BatchGetRecordRequest(input) 85 return out, req.Send() 86 } 87 88 // BatchGetRecordWithContext is the same as BatchGetRecord with the addition of 89 // the ability to pass a context and additional request options. 90 // 91 // See BatchGetRecord for details on how to use this API operation. 92 // 93 // The context must be non-nil and will be used for request cancellation. If 94 // the context is nil a panic will occur. In the future the SDK may create 95 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 96 // for more information on using Contexts. 97 func (c *SageMakerFeatureStoreRuntime) BatchGetRecordWithContext(ctx aws.Context, input *BatchGetRecordInput, opts ...request.Option) (*BatchGetRecordOutput, error) { 98 req, out := c.BatchGetRecordRequest(input) 99 req.SetContext(ctx) 100 req.ApplyOptions(opts...) 101 return out, req.Send() 102 } 103 104 const opDeleteRecord = "DeleteRecord" 105 106 // DeleteRecordRequest generates a "aws/request.Request" representing the 107 // client's request for the DeleteRecord operation. The "output" return 108 // value will be populated with the request's response once the request completes 109 // successfully. 110 // 111 // Use "Send" method on the returned Request to send the API call to the service. 112 // the "output" return value is not valid until after Send returns without error. 113 // 114 // See DeleteRecord for more information on using the DeleteRecord 115 // API call, and error handling. 116 // 117 // This method is useful when you want to inject custom logic or configuration 118 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 119 // 120 // 121 // // Example sending a request using the DeleteRecordRequest method. 122 // req, resp := client.DeleteRecordRequest(params) 123 // 124 // err := req.Send() 125 // if err == nil { // resp is now filled 126 // fmt.Println(resp) 127 // } 128 // 129 // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-featurestore-runtime-2020-07-01/DeleteRecord 130 func (c *SageMakerFeatureStoreRuntime) DeleteRecordRequest(input *DeleteRecordInput) (req *request.Request, output *DeleteRecordOutput) { 131 op := &request.Operation{ 132 Name: opDeleteRecord, 133 HTTPMethod: "DELETE", 134 HTTPPath: "/FeatureGroup/{FeatureGroupName}", 135 } 136 137 if input == nil { 138 input = &DeleteRecordInput{} 139 } 140 141 output = &DeleteRecordOutput{} 142 req = c.newRequest(op, input, output) 143 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 144 return 145 } 146 147 // DeleteRecord API operation for Amazon SageMaker Feature Store Runtime. 148 // 149 // Deletes a Record from a FeatureGroup. A new record will show up in the OfflineStore 150 // when the DeleteRecord API is called. This record will have a value of True 151 // in the is_deleted column. 152 // 153 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 154 // with awserr.Error's Code and Message methods to get detailed information about 155 // the error. 156 // 157 // See the AWS API reference guide for Amazon SageMaker Feature Store Runtime's 158 // API operation DeleteRecord for usage and error information. 159 // 160 // Returned Error Types: 161 // * ValidationError 162 // There was an error validating your request. 163 // 164 // * InternalFailure 165 // An internal failure occurred. Try your request again. If the problem persists, 166 // contact AWS customer support. 167 // 168 // * ServiceUnavailable 169 // The service is currently unavailable. 170 // 171 // * AccessForbidden 172 // You do not have permission to perform an action. 173 // 174 // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-featurestore-runtime-2020-07-01/DeleteRecord 175 func (c *SageMakerFeatureStoreRuntime) DeleteRecord(input *DeleteRecordInput) (*DeleteRecordOutput, error) { 176 req, out := c.DeleteRecordRequest(input) 177 return out, req.Send() 178 } 179 180 // DeleteRecordWithContext is the same as DeleteRecord with the addition of 181 // the ability to pass a context and additional request options. 182 // 183 // See DeleteRecord for details on how to use this API operation. 184 // 185 // The context must be non-nil and will be used for request cancellation. If 186 // the context is nil a panic will occur. In the future the SDK may create 187 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 188 // for more information on using Contexts. 189 func (c *SageMakerFeatureStoreRuntime) DeleteRecordWithContext(ctx aws.Context, input *DeleteRecordInput, opts ...request.Option) (*DeleteRecordOutput, error) { 190 req, out := c.DeleteRecordRequest(input) 191 req.SetContext(ctx) 192 req.ApplyOptions(opts...) 193 return out, req.Send() 194 } 195 196 const opGetRecord = "GetRecord" 197 198 // GetRecordRequest generates a "aws/request.Request" representing the 199 // client's request for the GetRecord operation. The "output" return 200 // value will be populated with the request's response once the request completes 201 // successfully. 202 // 203 // Use "Send" method on the returned Request to send the API call to the service. 204 // the "output" return value is not valid until after Send returns without error. 205 // 206 // See GetRecord for more information on using the GetRecord 207 // API call, and error handling. 208 // 209 // This method is useful when you want to inject custom logic or configuration 210 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 211 // 212 // 213 // // Example sending a request using the GetRecordRequest method. 214 // req, resp := client.GetRecordRequest(params) 215 // 216 // err := req.Send() 217 // if err == nil { // resp is now filled 218 // fmt.Println(resp) 219 // } 220 // 221 // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-featurestore-runtime-2020-07-01/GetRecord 222 func (c *SageMakerFeatureStoreRuntime) GetRecordRequest(input *GetRecordInput) (req *request.Request, output *GetRecordOutput) { 223 op := &request.Operation{ 224 Name: opGetRecord, 225 HTTPMethod: "GET", 226 HTTPPath: "/FeatureGroup/{FeatureGroupName}", 227 } 228 229 if input == nil { 230 input = &GetRecordInput{} 231 } 232 233 output = &GetRecordOutput{} 234 req = c.newRequest(op, input, output) 235 return 236 } 237 238 // GetRecord API operation for Amazon SageMaker Feature Store Runtime. 239 // 240 // Use for OnlineStore serving from a FeatureStore. Only the latest records 241 // stored in the OnlineStore can be retrieved. If no Record with RecordIdentifierValue 242 // is found, then an empty result is returned. 243 // 244 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 245 // with awserr.Error's Code and Message methods to get detailed information about 246 // the error. 247 // 248 // See the AWS API reference guide for Amazon SageMaker Feature Store Runtime's 249 // API operation GetRecord for usage and error information. 250 // 251 // Returned Error Types: 252 // * ValidationError 253 // There was an error validating your request. 254 // 255 // * ResourceNotFound 256 // A resource that is required to perform an action was not found. 257 // 258 // * InternalFailure 259 // An internal failure occurred. Try your request again. If the problem persists, 260 // contact AWS customer support. 261 // 262 // * ServiceUnavailable 263 // The service is currently unavailable. 264 // 265 // * AccessForbidden 266 // You do not have permission to perform an action. 267 // 268 // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-featurestore-runtime-2020-07-01/GetRecord 269 func (c *SageMakerFeatureStoreRuntime) GetRecord(input *GetRecordInput) (*GetRecordOutput, error) { 270 req, out := c.GetRecordRequest(input) 271 return out, req.Send() 272 } 273 274 // GetRecordWithContext is the same as GetRecord with the addition of 275 // the ability to pass a context and additional request options. 276 // 277 // See GetRecord for details on how to use this API operation. 278 // 279 // The context must be non-nil and will be used for request cancellation. If 280 // the context is nil a panic will occur. In the future the SDK may create 281 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 282 // for more information on using Contexts. 283 func (c *SageMakerFeatureStoreRuntime) GetRecordWithContext(ctx aws.Context, input *GetRecordInput, opts ...request.Option) (*GetRecordOutput, error) { 284 req, out := c.GetRecordRequest(input) 285 req.SetContext(ctx) 286 req.ApplyOptions(opts...) 287 return out, req.Send() 288 } 289 290 const opPutRecord = "PutRecord" 291 292 // PutRecordRequest generates a "aws/request.Request" representing the 293 // client's request for the PutRecord operation. The "output" return 294 // value will be populated with the request's response once the request completes 295 // successfully. 296 // 297 // Use "Send" method on the returned Request to send the API call to the service. 298 // the "output" return value is not valid until after Send returns without error. 299 // 300 // See PutRecord for more information on using the PutRecord 301 // API call, and error handling. 302 // 303 // This method is useful when you want to inject custom logic or configuration 304 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 305 // 306 // 307 // // Example sending a request using the PutRecordRequest method. 308 // req, resp := client.PutRecordRequest(params) 309 // 310 // err := req.Send() 311 // if err == nil { // resp is now filled 312 // fmt.Println(resp) 313 // } 314 // 315 // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-featurestore-runtime-2020-07-01/PutRecord 316 func (c *SageMakerFeatureStoreRuntime) PutRecordRequest(input *PutRecordInput) (req *request.Request, output *PutRecordOutput) { 317 op := &request.Operation{ 318 Name: opPutRecord, 319 HTTPMethod: "PUT", 320 HTTPPath: "/FeatureGroup/{FeatureGroupName}", 321 } 322 323 if input == nil { 324 input = &PutRecordInput{} 325 } 326 327 output = &PutRecordOutput{} 328 req = c.newRequest(op, input, output) 329 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 330 return 331 } 332 333 // PutRecord API operation for Amazon SageMaker Feature Store Runtime. 334 // 335 // Used for data ingestion into the FeatureStore. The PutRecord API writes to 336 // both the OnlineStore and OfflineStore. If the record is the latest record 337 // for the recordIdentifier, the record is written to both the OnlineStore and 338 // OfflineStore. If the record is a historic record, it is written only to the 339 // OfflineStore. 340 // 341 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 342 // with awserr.Error's Code and Message methods to get detailed information about 343 // the error. 344 // 345 // See the AWS API reference guide for Amazon SageMaker Feature Store Runtime's 346 // API operation PutRecord for usage and error information. 347 // 348 // Returned Error Types: 349 // * ValidationError 350 // There was an error validating your request. 351 // 352 // * InternalFailure 353 // An internal failure occurred. Try your request again. If the problem persists, 354 // contact AWS customer support. 355 // 356 // * ServiceUnavailable 357 // The service is currently unavailable. 358 // 359 // * AccessForbidden 360 // You do not have permission to perform an action. 361 // 362 // See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-featurestore-runtime-2020-07-01/PutRecord 363 func (c *SageMakerFeatureStoreRuntime) PutRecord(input *PutRecordInput) (*PutRecordOutput, error) { 364 req, out := c.PutRecordRequest(input) 365 return out, req.Send() 366 } 367 368 // PutRecordWithContext is the same as PutRecord with the addition of 369 // the ability to pass a context and additional request options. 370 // 371 // See PutRecord for details on how to use this API operation. 372 // 373 // The context must be non-nil and will be used for request cancellation. If 374 // the context is nil a panic will occur. In the future the SDK may create 375 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 376 // for more information on using Contexts. 377 func (c *SageMakerFeatureStoreRuntime) PutRecordWithContext(ctx aws.Context, input *PutRecordInput, opts ...request.Option) (*PutRecordOutput, error) { 378 req, out := c.PutRecordRequest(input) 379 req.SetContext(ctx) 380 req.ApplyOptions(opts...) 381 return out, req.Send() 382 } 383 384 // You do not have permission to perform an action. 385 type AccessForbidden struct { 386 _ struct{} `type:"structure"` 387 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 388 389 Message_ *string `locationName:"Message" type:"string"` 390 } 391 392 // String returns the string representation. 393 // 394 // API parameter values that are decorated as "sensitive" in the API will not 395 // be included in the string output. The member name will be present, but the 396 // value will be replaced with "sensitive". 397 func (s AccessForbidden) String() string { 398 return awsutil.Prettify(s) 399 } 400 401 // GoString returns the string representation. 402 // 403 // API parameter values that are decorated as "sensitive" in the API will not 404 // be included in the string output. The member name will be present, but the 405 // value will be replaced with "sensitive". 406 func (s AccessForbidden) GoString() string { 407 return s.String() 408 } 409 410 func newErrorAccessForbidden(v protocol.ResponseMetadata) error { 411 return &AccessForbidden{ 412 RespMetadata: v, 413 } 414 } 415 416 // Code returns the exception type name. 417 func (s *AccessForbidden) Code() string { 418 return "AccessForbidden" 419 } 420 421 // Message returns the exception's message. 422 func (s *AccessForbidden) Message() string { 423 if s.Message_ != nil { 424 return *s.Message_ 425 } 426 return "" 427 } 428 429 // OrigErr always returns nil, satisfies awserr.Error interface. 430 func (s *AccessForbidden) OrigErr() error { 431 return nil 432 } 433 434 func (s *AccessForbidden) Error() string { 435 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 436 } 437 438 // Status code returns the HTTP status code for the request's response error. 439 func (s *AccessForbidden) StatusCode() int { 440 return s.RespMetadata.StatusCode 441 } 442 443 // RequestID returns the service's response RequestID for request. 444 func (s *AccessForbidden) RequestID() string { 445 return s.RespMetadata.RequestID 446 } 447 448 // The error that has occurred when attempting to retrieve a batch of Records. 449 type BatchGetRecordError struct { 450 _ struct{} `type:"structure"` 451 452 // The error code of an error that has occured when attempting to retrieve a 453 // batch of Records. For more information on errors, see Errors (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_feature_store_GetRecord.html#API_feature_store_GetRecord_Errors). 454 // 455 // ErrorCode is a required field 456 ErrorCode *string `type:"string" required:"true"` 457 458 // The error message of an error that has occured when attempting to retrieve 459 // a record in the batch. 460 // 461 // ErrorMessage is a required field 462 ErrorMessage *string `type:"string" required:"true"` 463 464 // The name of the feature group that the record belongs to. 465 // 466 // FeatureGroupName is a required field 467 FeatureGroupName *string `type:"string" required:"true"` 468 469 // The value for the RecordIdentifier in string format of a Record from a FeatureGroup 470 // that is causing an error when attempting to be retrieved. 471 // 472 // RecordIdentifierValueAsString is a required field 473 RecordIdentifierValueAsString *string `type:"string" required:"true"` 474 } 475 476 // String returns the string representation. 477 // 478 // API parameter values that are decorated as "sensitive" in the API will not 479 // be included in the string output. The member name will be present, but the 480 // value will be replaced with "sensitive". 481 func (s BatchGetRecordError) String() string { 482 return awsutil.Prettify(s) 483 } 484 485 // GoString returns the string representation. 486 // 487 // API parameter values that are decorated as "sensitive" in the API will not 488 // be included in the string output. The member name will be present, but the 489 // value will be replaced with "sensitive". 490 func (s BatchGetRecordError) GoString() string { 491 return s.String() 492 } 493 494 // SetErrorCode sets the ErrorCode field's value. 495 func (s *BatchGetRecordError) SetErrorCode(v string) *BatchGetRecordError { 496 s.ErrorCode = &v 497 return s 498 } 499 500 // SetErrorMessage sets the ErrorMessage field's value. 501 func (s *BatchGetRecordError) SetErrorMessage(v string) *BatchGetRecordError { 502 s.ErrorMessage = &v 503 return s 504 } 505 506 // SetFeatureGroupName sets the FeatureGroupName field's value. 507 func (s *BatchGetRecordError) SetFeatureGroupName(v string) *BatchGetRecordError { 508 s.FeatureGroupName = &v 509 return s 510 } 511 512 // SetRecordIdentifierValueAsString sets the RecordIdentifierValueAsString field's value. 513 func (s *BatchGetRecordError) SetRecordIdentifierValueAsString(v string) *BatchGetRecordError { 514 s.RecordIdentifierValueAsString = &v 515 return s 516 } 517 518 // The identifier that identifies the batch of Records you are retrieving in 519 // a batch. 520 type BatchGetRecordIdentifier struct { 521 _ struct{} `type:"structure"` 522 523 // A FeatureGroupName containing Records you are retrieving in a batch. 524 // 525 // FeatureGroupName is a required field 526 FeatureGroupName *string `min:"1" type:"string" required:"true"` 527 528 // List of names of Features to be retrieved. If not specified, the latest value 529 // for all the Features are returned. 530 FeatureNames []*string `min:"1" type:"list"` 531 532 // The value for a list of record identifiers in string format. 533 // 534 // RecordIdentifiersValueAsString is a required field 535 RecordIdentifiersValueAsString []*string `min:"1" type:"list" required:"true"` 536 } 537 538 // String returns the string representation. 539 // 540 // API parameter values that are decorated as "sensitive" in the API will not 541 // be included in the string output. The member name will be present, but the 542 // value will be replaced with "sensitive". 543 func (s BatchGetRecordIdentifier) String() string { 544 return awsutil.Prettify(s) 545 } 546 547 // GoString returns the string representation. 548 // 549 // API parameter values that are decorated as "sensitive" in the API will not 550 // be included in the string output. The member name will be present, but the 551 // value will be replaced with "sensitive". 552 func (s BatchGetRecordIdentifier) GoString() string { 553 return s.String() 554 } 555 556 // Validate inspects the fields of the type to determine if they are valid. 557 func (s *BatchGetRecordIdentifier) Validate() error { 558 invalidParams := request.ErrInvalidParams{Context: "BatchGetRecordIdentifier"} 559 if s.FeatureGroupName == nil { 560 invalidParams.Add(request.NewErrParamRequired("FeatureGroupName")) 561 } 562 if s.FeatureGroupName != nil && len(*s.FeatureGroupName) < 1 { 563 invalidParams.Add(request.NewErrParamMinLen("FeatureGroupName", 1)) 564 } 565 if s.FeatureNames != nil && len(s.FeatureNames) < 1 { 566 invalidParams.Add(request.NewErrParamMinLen("FeatureNames", 1)) 567 } 568 if s.RecordIdentifiersValueAsString == nil { 569 invalidParams.Add(request.NewErrParamRequired("RecordIdentifiersValueAsString")) 570 } 571 if s.RecordIdentifiersValueAsString != nil && len(s.RecordIdentifiersValueAsString) < 1 { 572 invalidParams.Add(request.NewErrParamMinLen("RecordIdentifiersValueAsString", 1)) 573 } 574 575 if invalidParams.Len() > 0 { 576 return invalidParams 577 } 578 return nil 579 } 580 581 // SetFeatureGroupName sets the FeatureGroupName field's value. 582 func (s *BatchGetRecordIdentifier) SetFeatureGroupName(v string) *BatchGetRecordIdentifier { 583 s.FeatureGroupName = &v 584 return s 585 } 586 587 // SetFeatureNames sets the FeatureNames field's value. 588 func (s *BatchGetRecordIdentifier) SetFeatureNames(v []*string) *BatchGetRecordIdentifier { 589 s.FeatureNames = v 590 return s 591 } 592 593 // SetRecordIdentifiersValueAsString sets the RecordIdentifiersValueAsString field's value. 594 func (s *BatchGetRecordIdentifier) SetRecordIdentifiersValueAsString(v []*string) *BatchGetRecordIdentifier { 595 s.RecordIdentifiersValueAsString = v 596 return s 597 } 598 599 type BatchGetRecordInput struct { 600 _ struct{} `type:"structure"` 601 602 // A list of FeatureGroup names, with their corresponding RecordIdentifier value, 603 // and Feature name that have been requested to be retrieved in batch. 604 // 605 // Identifiers is a required field 606 Identifiers []*BatchGetRecordIdentifier `min:"1" type:"list" required:"true"` 607 } 608 609 // String returns the string representation. 610 // 611 // API parameter values that are decorated as "sensitive" in the API will not 612 // be included in the string output. The member name will be present, but the 613 // value will be replaced with "sensitive". 614 func (s BatchGetRecordInput) String() string { 615 return awsutil.Prettify(s) 616 } 617 618 // GoString returns the string representation. 619 // 620 // API parameter values that are decorated as "sensitive" in the API will not 621 // be included in the string output. The member name will be present, but the 622 // value will be replaced with "sensitive". 623 func (s BatchGetRecordInput) GoString() string { 624 return s.String() 625 } 626 627 // Validate inspects the fields of the type to determine if they are valid. 628 func (s *BatchGetRecordInput) Validate() error { 629 invalidParams := request.ErrInvalidParams{Context: "BatchGetRecordInput"} 630 if s.Identifiers == nil { 631 invalidParams.Add(request.NewErrParamRequired("Identifiers")) 632 } 633 if s.Identifiers != nil && len(s.Identifiers) < 1 { 634 invalidParams.Add(request.NewErrParamMinLen("Identifiers", 1)) 635 } 636 if s.Identifiers != nil { 637 for i, v := range s.Identifiers { 638 if v == nil { 639 continue 640 } 641 if err := v.Validate(); err != nil { 642 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Identifiers", i), err.(request.ErrInvalidParams)) 643 } 644 } 645 } 646 647 if invalidParams.Len() > 0 { 648 return invalidParams 649 } 650 return nil 651 } 652 653 // SetIdentifiers sets the Identifiers field's value. 654 func (s *BatchGetRecordInput) SetIdentifiers(v []*BatchGetRecordIdentifier) *BatchGetRecordInput { 655 s.Identifiers = v 656 return s 657 } 658 659 type BatchGetRecordOutput struct { 660 _ struct{} `type:"structure"` 661 662 // A list of errors that have occured when retrieving a batch of Records. 663 // 664 // Errors is a required field 665 Errors []*BatchGetRecordError `type:"list" required:"true"` 666 667 // A list of Records you requested to be retrieved in batch. 668 // 669 // Records is a required field 670 Records []*BatchGetRecordResultDetail `type:"list" required:"true"` 671 672 // A unprocessed list of FeatureGroup names, with their corresponding RecordIdentifier 673 // value, and Feature name. 674 // 675 // UnprocessedIdentifiers is a required field 676 UnprocessedIdentifiers []*BatchGetRecordIdentifier `type:"list" required:"true"` 677 } 678 679 // String returns the string representation. 680 // 681 // API parameter values that are decorated as "sensitive" in the API will not 682 // be included in the string output. The member name will be present, but the 683 // value will be replaced with "sensitive". 684 func (s BatchGetRecordOutput) String() string { 685 return awsutil.Prettify(s) 686 } 687 688 // GoString returns the string representation. 689 // 690 // API parameter values that are decorated as "sensitive" in the API will not 691 // be included in the string output. The member name will be present, but the 692 // value will be replaced with "sensitive". 693 func (s BatchGetRecordOutput) GoString() string { 694 return s.String() 695 } 696 697 // SetErrors sets the Errors field's value. 698 func (s *BatchGetRecordOutput) SetErrors(v []*BatchGetRecordError) *BatchGetRecordOutput { 699 s.Errors = v 700 return s 701 } 702 703 // SetRecords sets the Records field's value. 704 func (s *BatchGetRecordOutput) SetRecords(v []*BatchGetRecordResultDetail) *BatchGetRecordOutput { 705 s.Records = v 706 return s 707 } 708 709 // SetUnprocessedIdentifiers sets the UnprocessedIdentifiers field's value. 710 func (s *BatchGetRecordOutput) SetUnprocessedIdentifiers(v []*BatchGetRecordIdentifier) *BatchGetRecordOutput { 711 s.UnprocessedIdentifiers = v 712 return s 713 } 714 715 // The output of Records that have been retrieved in a batch. 716 type BatchGetRecordResultDetail struct { 717 _ struct{} `type:"structure"` 718 719 // The FeatureGroupName containing Records you retrieved in a batch. 720 // 721 // FeatureGroupName is a required field 722 FeatureGroupName *string `type:"string" required:"true"` 723 724 // The Record retrieved. 725 // 726 // Record is a required field 727 Record []*FeatureValue `min:"1" type:"list" required:"true"` 728 729 // The value of the record identifer in string format. 730 // 731 // RecordIdentifierValueAsString is a required field 732 RecordIdentifierValueAsString *string `type:"string" required:"true"` 733 } 734 735 // String returns the string representation. 736 // 737 // API parameter values that are decorated as "sensitive" in the API will not 738 // be included in the string output. The member name will be present, but the 739 // value will be replaced with "sensitive". 740 func (s BatchGetRecordResultDetail) String() string { 741 return awsutil.Prettify(s) 742 } 743 744 // GoString returns the string representation. 745 // 746 // API parameter values that are decorated as "sensitive" in the API will not 747 // be included in the string output. The member name will be present, but the 748 // value will be replaced with "sensitive". 749 func (s BatchGetRecordResultDetail) GoString() string { 750 return s.String() 751 } 752 753 // SetFeatureGroupName sets the FeatureGroupName field's value. 754 func (s *BatchGetRecordResultDetail) SetFeatureGroupName(v string) *BatchGetRecordResultDetail { 755 s.FeatureGroupName = &v 756 return s 757 } 758 759 // SetRecord sets the Record field's value. 760 func (s *BatchGetRecordResultDetail) SetRecord(v []*FeatureValue) *BatchGetRecordResultDetail { 761 s.Record = v 762 return s 763 } 764 765 // SetRecordIdentifierValueAsString sets the RecordIdentifierValueAsString field's value. 766 func (s *BatchGetRecordResultDetail) SetRecordIdentifierValueAsString(v string) *BatchGetRecordResultDetail { 767 s.RecordIdentifierValueAsString = &v 768 return s 769 } 770 771 type DeleteRecordInput struct { 772 _ struct{} `type:"structure" nopayload:"true"` 773 774 // Timestamp indicating when the deletion event occurred. EventTime can be used 775 // to query data at a certain point in time. 776 // 777 // EventTime is a required field 778 EventTime *string `location:"querystring" locationName:"EventTime" type:"string" required:"true"` 779 780 // The name of the feature group to delete the record from. 781 // 782 // FeatureGroupName is a required field 783 FeatureGroupName *string `location:"uri" locationName:"FeatureGroupName" min:"1" type:"string" required:"true"` 784 785 // The value for the RecordIdentifier that uniquely identifies the record, in 786 // string format. 787 // 788 // RecordIdentifierValueAsString is a required field 789 RecordIdentifierValueAsString *string `location:"querystring" locationName:"RecordIdentifierValueAsString" type:"string" required:"true"` 790 } 791 792 // String returns the string representation. 793 // 794 // API parameter values that are decorated as "sensitive" in the API will not 795 // be included in the string output. The member name will be present, but the 796 // value will be replaced with "sensitive". 797 func (s DeleteRecordInput) String() string { 798 return awsutil.Prettify(s) 799 } 800 801 // GoString returns the string representation. 802 // 803 // API parameter values that are decorated as "sensitive" in the API will not 804 // be included in the string output. The member name will be present, but the 805 // value will be replaced with "sensitive". 806 func (s DeleteRecordInput) GoString() string { 807 return s.String() 808 } 809 810 // Validate inspects the fields of the type to determine if they are valid. 811 func (s *DeleteRecordInput) Validate() error { 812 invalidParams := request.ErrInvalidParams{Context: "DeleteRecordInput"} 813 if s.EventTime == nil { 814 invalidParams.Add(request.NewErrParamRequired("EventTime")) 815 } 816 if s.FeatureGroupName == nil { 817 invalidParams.Add(request.NewErrParamRequired("FeatureGroupName")) 818 } 819 if s.FeatureGroupName != nil && len(*s.FeatureGroupName) < 1 { 820 invalidParams.Add(request.NewErrParamMinLen("FeatureGroupName", 1)) 821 } 822 if s.RecordIdentifierValueAsString == nil { 823 invalidParams.Add(request.NewErrParamRequired("RecordIdentifierValueAsString")) 824 } 825 826 if invalidParams.Len() > 0 { 827 return invalidParams 828 } 829 return nil 830 } 831 832 // SetEventTime sets the EventTime field's value. 833 func (s *DeleteRecordInput) SetEventTime(v string) *DeleteRecordInput { 834 s.EventTime = &v 835 return s 836 } 837 838 // SetFeatureGroupName sets the FeatureGroupName field's value. 839 func (s *DeleteRecordInput) SetFeatureGroupName(v string) *DeleteRecordInput { 840 s.FeatureGroupName = &v 841 return s 842 } 843 844 // SetRecordIdentifierValueAsString sets the RecordIdentifierValueAsString field's value. 845 func (s *DeleteRecordInput) SetRecordIdentifierValueAsString(v string) *DeleteRecordInput { 846 s.RecordIdentifierValueAsString = &v 847 return s 848 } 849 850 type DeleteRecordOutput struct { 851 _ struct{} `type:"structure" nopayload:"true"` 852 } 853 854 // String returns the string representation. 855 // 856 // API parameter values that are decorated as "sensitive" in the API will not 857 // be included in the string output. The member name will be present, but the 858 // value will be replaced with "sensitive". 859 func (s DeleteRecordOutput) String() string { 860 return awsutil.Prettify(s) 861 } 862 863 // GoString returns the string representation. 864 // 865 // API parameter values that are decorated as "sensitive" in the API will not 866 // be included in the string output. The member name will be present, but the 867 // value will be replaced with "sensitive". 868 func (s DeleteRecordOutput) GoString() string { 869 return s.String() 870 } 871 872 // The value associated with a feature. 873 type FeatureValue struct { 874 _ struct{} `type:"structure"` 875 876 // The name of a feature that a feature value corresponds to. 877 // 878 // FeatureName is a required field 879 FeatureName *string `min:"1" type:"string" required:"true"` 880 881 // The value associated with a feature, in string format. Note that features 882 // types can be String, Integral, or Fractional. This value represents all three 883 // types as a string. 884 // 885 // ValueAsString is a required field 886 ValueAsString *string `type:"string" required:"true"` 887 } 888 889 // String returns the string representation. 890 // 891 // API parameter values that are decorated as "sensitive" in the API will not 892 // be included in the string output. The member name will be present, but the 893 // value will be replaced with "sensitive". 894 func (s FeatureValue) String() string { 895 return awsutil.Prettify(s) 896 } 897 898 // GoString returns the string representation. 899 // 900 // API parameter values that are decorated as "sensitive" in the API will not 901 // be included in the string output. The member name will be present, but the 902 // value will be replaced with "sensitive". 903 func (s FeatureValue) GoString() string { 904 return s.String() 905 } 906 907 // Validate inspects the fields of the type to determine if they are valid. 908 func (s *FeatureValue) Validate() error { 909 invalidParams := request.ErrInvalidParams{Context: "FeatureValue"} 910 if s.FeatureName == nil { 911 invalidParams.Add(request.NewErrParamRequired("FeatureName")) 912 } 913 if s.FeatureName != nil && len(*s.FeatureName) < 1 { 914 invalidParams.Add(request.NewErrParamMinLen("FeatureName", 1)) 915 } 916 if s.ValueAsString == nil { 917 invalidParams.Add(request.NewErrParamRequired("ValueAsString")) 918 } 919 920 if invalidParams.Len() > 0 { 921 return invalidParams 922 } 923 return nil 924 } 925 926 // SetFeatureName sets the FeatureName field's value. 927 func (s *FeatureValue) SetFeatureName(v string) *FeatureValue { 928 s.FeatureName = &v 929 return s 930 } 931 932 // SetValueAsString sets the ValueAsString field's value. 933 func (s *FeatureValue) SetValueAsString(v string) *FeatureValue { 934 s.ValueAsString = &v 935 return s 936 } 937 938 type GetRecordInput struct { 939 _ struct{} `type:"structure" nopayload:"true"` 940 941 // The name of the feature group in which you want to put the records. 942 // 943 // FeatureGroupName is a required field 944 FeatureGroupName *string `location:"uri" locationName:"FeatureGroupName" min:"1" type:"string" required:"true"` 945 946 // List of names of Features to be retrieved. If not specified, the latest value 947 // for all the Features are returned. 948 FeatureNames []*string `location:"querystring" locationName:"FeatureName" min:"1" type:"list"` 949 950 // The value that corresponds to RecordIdentifier type and uniquely identifies 951 // the record in the FeatureGroup. 952 // 953 // RecordIdentifierValueAsString is a required field 954 RecordIdentifierValueAsString *string `location:"querystring" locationName:"RecordIdentifierValueAsString" type:"string" required:"true"` 955 } 956 957 // String returns the string representation. 958 // 959 // API parameter values that are decorated as "sensitive" in the API will not 960 // be included in the string output. The member name will be present, but the 961 // value will be replaced with "sensitive". 962 func (s GetRecordInput) String() string { 963 return awsutil.Prettify(s) 964 } 965 966 // GoString returns the string representation. 967 // 968 // API parameter values that are decorated as "sensitive" in the API will not 969 // be included in the string output. The member name will be present, but the 970 // value will be replaced with "sensitive". 971 func (s GetRecordInput) GoString() string { 972 return s.String() 973 } 974 975 // Validate inspects the fields of the type to determine if they are valid. 976 func (s *GetRecordInput) Validate() error { 977 invalidParams := request.ErrInvalidParams{Context: "GetRecordInput"} 978 if s.FeatureGroupName == nil { 979 invalidParams.Add(request.NewErrParamRequired("FeatureGroupName")) 980 } 981 if s.FeatureGroupName != nil && len(*s.FeatureGroupName) < 1 { 982 invalidParams.Add(request.NewErrParamMinLen("FeatureGroupName", 1)) 983 } 984 if s.FeatureNames != nil && len(s.FeatureNames) < 1 { 985 invalidParams.Add(request.NewErrParamMinLen("FeatureNames", 1)) 986 } 987 if s.RecordIdentifierValueAsString == nil { 988 invalidParams.Add(request.NewErrParamRequired("RecordIdentifierValueAsString")) 989 } 990 991 if invalidParams.Len() > 0 { 992 return invalidParams 993 } 994 return nil 995 } 996 997 // SetFeatureGroupName sets the FeatureGroupName field's value. 998 func (s *GetRecordInput) SetFeatureGroupName(v string) *GetRecordInput { 999 s.FeatureGroupName = &v 1000 return s 1001 } 1002 1003 // SetFeatureNames sets the FeatureNames field's value. 1004 func (s *GetRecordInput) SetFeatureNames(v []*string) *GetRecordInput { 1005 s.FeatureNames = v 1006 return s 1007 } 1008 1009 // SetRecordIdentifierValueAsString sets the RecordIdentifierValueAsString field's value. 1010 func (s *GetRecordInput) SetRecordIdentifierValueAsString(v string) *GetRecordInput { 1011 s.RecordIdentifierValueAsString = &v 1012 return s 1013 } 1014 1015 type GetRecordOutput struct { 1016 _ struct{} `type:"structure"` 1017 1018 // The record you requested. A list of FeatureValues. 1019 Record []*FeatureValue `min:"1" type:"list"` 1020 } 1021 1022 // String returns the string representation. 1023 // 1024 // API parameter values that are decorated as "sensitive" in the API will not 1025 // be included in the string output. The member name will be present, but the 1026 // value will be replaced with "sensitive". 1027 func (s GetRecordOutput) String() string { 1028 return awsutil.Prettify(s) 1029 } 1030 1031 // GoString returns the string representation. 1032 // 1033 // API parameter values that are decorated as "sensitive" in the API will not 1034 // be included in the string output. The member name will be present, but the 1035 // value will be replaced with "sensitive". 1036 func (s GetRecordOutput) GoString() string { 1037 return s.String() 1038 } 1039 1040 // SetRecord sets the Record field's value. 1041 func (s *GetRecordOutput) SetRecord(v []*FeatureValue) *GetRecordOutput { 1042 s.Record = v 1043 return s 1044 } 1045 1046 // An internal failure occurred. Try your request again. If the problem persists, 1047 // contact AWS customer support. 1048 type InternalFailure struct { 1049 _ struct{} `type:"structure"` 1050 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1051 1052 Message_ *string `locationName:"Message" type:"string"` 1053 } 1054 1055 // String returns the string representation. 1056 // 1057 // API parameter values that are decorated as "sensitive" in the API will not 1058 // be included in the string output. The member name will be present, but the 1059 // value will be replaced with "sensitive". 1060 func (s InternalFailure) String() string { 1061 return awsutil.Prettify(s) 1062 } 1063 1064 // GoString returns the string representation. 1065 // 1066 // API parameter values that are decorated as "sensitive" in the API will not 1067 // be included in the string output. The member name will be present, but the 1068 // value will be replaced with "sensitive". 1069 func (s InternalFailure) GoString() string { 1070 return s.String() 1071 } 1072 1073 func newErrorInternalFailure(v protocol.ResponseMetadata) error { 1074 return &InternalFailure{ 1075 RespMetadata: v, 1076 } 1077 } 1078 1079 // Code returns the exception type name. 1080 func (s *InternalFailure) Code() string { 1081 return "InternalFailure" 1082 } 1083 1084 // Message returns the exception's message. 1085 func (s *InternalFailure) Message() string { 1086 if s.Message_ != nil { 1087 return *s.Message_ 1088 } 1089 return "" 1090 } 1091 1092 // OrigErr always returns nil, satisfies awserr.Error interface. 1093 func (s *InternalFailure) OrigErr() error { 1094 return nil 1095 } 1096 1097 func (s *InternalFailure) Error() string { 1098 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1099 } 1100 1101 // Status code returns the HTTP status code for the request's response error. 1102 func (s *InternalFailure) StatusCode() int { 1103 return s.RespMetadata.StatusCode 1104 } 1105 1106 // RequestID returns the service's response RequestID for request. 1107 func (s *InternalFailure) RequestID() string { 1108 return s.RespMetadata.RequestID 1109 } 1110 1111 type PutRecordInput struct { 1112 _ struct{} `type:"structure"` 1113 1114 // The name of the feature group that you want to insert the record into. 1115 // 1116 // FeatureGroupName is a required field 1117 FeatureGroupName *string `location:"uri" locationName:"FeatureGroupName" min:"1" type:"string" required:"true"` 1118 1119 // List of FeatureValues to be inserted. This will be a full over-write. If 1120 // you only want to update few of the feature values, do the following: 1121 // 1122 // * Use GetRecord to retrieve the latest record. 1123 // 1124 // * Update the record returned from GetRecord. 1125 // 1126 // * Use PutRecord to update feature values. 1127 // 1128 // Record is a required field 1129 Record []*FeatureValue `min:"1" type:"list" required:"true"` 1130 } 1131 1132 // String returns the string representation. 1133 // 1134 // API parameter values that are decorated as "sensitive" in the API will not 1135 // be included in the string output. The member name will be present, but the 1136 // value will be replaced with "sensitive". 1137 func (s PutRecordInput) String() string { 1138 return awsutil.Prettify(s) 1139 } 1140 1141 // GoString returns the string representation. 1142 // 1143 // API parameter values that are decorated as "sensitive" in the API will not 1144 // be included in the string output. The member name will be present, but the 1145 // value will be replaced with "sensitive". 1146 func (s PutRecordInput) GoString() string { 1147 return s.String() 1148 } 1149 1150 // Validate inspects the fields of the type to determine if they are valid. 1151 func (s *PutRecordInput) Validate() error { 1152 invalidParams := request.ErrInvalidParams{Context: "PutRecordInput"} 1153 if s.FeatureGroupName == nil { 1154 invalidParams.Add(request.NewErrParamRequired("FeatureGroupName")) 1155 } 1156 if s.FeatureGroupName != nil && len(*s.FeatureGroupName) < 1 { 1157 invalidParams.Add(request.NewErrParamMinLen("FeatureGroupName", 1)) 1158 } 1159 if s.Record == nil { 1160 invalidParams.Add(request.NewErrParamRequired("Record")) 1161 } 1162 if s.Record != nil && len(s.Record) < 1 { 1163 invalidParams.Add(request.NewErrParamMinLen("Record", 1)) 1164 } 1165 if s.Record != nil { 1166 for i, v := range s.Record { 1167 if v == nil { 1168 continue 1169 } 1170 if err := v.Validate(); err != nil { 1171 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Record", i), err.(request.ErrInvalidParams)) 1172 } 1173 } 1174 } 1175 1176 if invalidParams.Len() > 0 { 1177 return invalidParams 1178 } 1179 return nil 1180 } 1181 1182 // SetFeatureGroupName sets the FeatureGroupName field's value. 1183 func (s *PutRecordInput) SetFeatureGroupName(v string) *PutRecordInput { 1184 s.FeatureGroupName = &v 1185 return s 1186 } 1187 1188 // SetRecord sets the Record field's value. 1189 func (s *PutRecordInput) SetRecord(v []*FeatureValue) *PutRecordInput { 1190 s.Record = v 1191 return s 1192 } 1193 1194 type PutRecordOutput struct { 1195 _ struct{} `type:"structure" nopayload:"true"` 1196 } 1197 1198 // String returns the string representation. 1199 // 1200 // API parameter values that are decorated as "sensitive" in the API will not 1201 // be included in the string output. The member name will be present, but the 1202 // value will be replaced with "sensitive". 1203 func (s PutRecordOutput) String() string { 1204 return awsutil.Prettify(s) 1205 } 1206 1207 // GoString returns the string representation. 1208 // 1209 // API parameter values that are decorated as "sensitive" in the API will not 1210 // be included in the string output. The member name will be present, but the 1211 // value will be replaced with "sensitive". 1212 func (s PutRecordOutput) GoString() string { 1213 return s.String() 1214 } 1215 1216 // A resource that is required to perform an action was not found. 1217 type ResourceNotFound struct { 1218 _ struct{} `type:"structure"` 1219 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1220 1221 Message_ *string `locationName:"Message" type:"string"` 1222 } 1223 1224 // String returns the string representation. 1225 // 1226 // API parameter values that are decorated as "sensitive" in the API will not 1227 // be included in the string output. The member name will be present, but the 1228 // value will be replaced with "sensitive". 1229 func (s ResourceNotFound) String() string { 1230 return awsutil.Prettify(s) 1231 } 1232 1233 // GoString returns the string representation. 1234 // 1235 // API parameter values that are decorated as "sensitive" in the API will not 1236 // be included in the string output. The member name will be present, but the 1237 // value will be replaced with "sensitive". 1238 func (s ResourceNotFound) GoString() string { 1239 return s.String() 1240 } 1241 1242 func newErrorResourceNotFound(v protocol.ResponseMetadata) error { 1243 return &ResourceNotFound{ 1244 RespMetadata: v, 1245 } 1246 } 1247 1248 // Code returns the exception type name. 1249 func (s *ResourceNotFound) Code() string { 1250 return "ResourceNotFound" 1251 } 1252 1253 // Message returns the exception's message. 1254 func (s *ResourceNotFound) Message() string { 1255 if s.Message_ != nil { 1256 return *s.Message_ 1257 } 1258 return "" 1259 } 1260 1261 // OrigErr always returns nil, satisfies awserr.Error interface. 1262 func (s *ResourceNotFound) OrigErr() error { 1263 return nil 1264 } 1265 1266 func (s *ResourceNotFound) Error() string { 1267 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1268 } 1269 1270 // Status code returns the HTTP status code for the request's response error. 1271 func (s *ResourceNotFound) StatusCode() int { 1272 return s.RespMetadata.StatusCode 1273 } 1274 1275 // RequestID returns the service's response RequestID for request. 1276 func (s *ResourceNotFound) RequestID() string { 1277 return s.RespMetadata.RequestID 1278 } 1279 1280 // The service is currently unavailable. 1281 type ServiceUnavailable struct { 1282 _ struct{} `type:"structure"` 1283 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1284 1285 Message_ *string `locationName:"Message" type:"string"` 1286 } 1287 1288 // String returns the string representation. 1289 // 1290 // API parameter values that are decorated as "sensitive" in the API will not 1291 // be included in the string output. The member name will be present, but the 1292 // value will be replaced with "sensitive". 1293 func (s ServiceUnavailable) String() string { 1294 return awsutil.Prettify(s) 1295 } 1296 1297 // GoString returns the string representation. 1298 // 1299 // API parameter values that are decorated as "sensitive" in the API will not 1300 // be included in the string output. The member name will be present, but the 1301 // value will be replaced with "sensitive". 1302 func (s ServiceUnavailable) GoString() string { 1303 return s.String() 1304 } 1305 1306 func newErrorServiceUnavailable(v protocol.ResponseMetadata) error { 1307 return &ServiceUnavailable{ 1308 RespMetadata: v, 1309 } 1310 } 1311 1312 // Code returns the exception type name. 1313 func (s *ServiceUnavailable) Code() string { 1314 return "ServiceUnavailable" 1315 } 1316 1317 // Message returns the exception's message. 1318 func (s *ServiceUnavailable) Message() string { 1319 if s.Message_ != nil { 1320 return *s.Message_ 1321 } 1322 return "" 1323 } 1324 1325 // OrigErr always returns nil, satisfies awserr.Error interface. 1326 func (s *ServiceUnavailable) OrigErr() error { 1327 return nil 1328 } 1329 1330 func (s *ServiceUnavailable) Error() string { 1331 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1332 } 1333 1334 // Status code returns the HTTP status code for the request's response error. 1335 func (s *ServiceUnavailable) StatusCode() int { 1336 return s.RespMetadata.StatusCode 1337 } 1338 1339 // RequestID returns the service's response RequestID for request. 1340 func (s *ServiceUnavailable) RequestID() string { 1341 return s.RespMetadata.RequestID 1342 } 1343 1344 // There was an error validating your request. 1345 type ValidationError struct { 1346 _ struct{} `type:"structure"` 1347 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1348 1349 Message_ *string `locationName:"Message" type:"string"` 1350 } 1351 1352 // String returns the string representation. 1353 // 1354 // API parameter values that are decorated as "sensitive" in the API will not 1355 // be included in the string output. The member name will be present, but the 1356 // value will be replaced with "sensitive". 1357 func (s ValidationError) String() string { 1358 return awsutil.Prettify(s) 1359 } 1360 1361 // GoString returns the string representation. 1362 // 1363 // API parameter values that are decorated as "sensitive" in the API will not 1364 // be included in the string output. The member name will be present, but the 1365 // value will be replaced with "sensitive". 1366 func (s ValidationError) GoString() string { 1367 return s.String() 1368 } 1369 1370 func newErrorValidationError(v protocol.ResponseMetadata) error { 1371 return &ValidationError{ 1372 RespMetadata: v, 1373 } 1374 } 1375 1376 // Code returns the exception type name. 1377 func (s *ValidationError) Code() string { 1378 return "ValidationError" 1379 } 1380 1381 // Message returns the exception's message. 1382 func (s *ValidationError) Message() string { 1383 if s.Message_ != nil { 1384 return *s.Message_ 1385 } 1386 return "" 1387 } 1388 1389 // OrigErr always returns nil, satisfies awserr.Error interface. 1390 func (s *ValidationError) OrigErr() error { 1391 return nil 1392 } 1393 1394 func (s *ValidationError) Error() string { 1395 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1396 } 1397 1398 // Status code returns the HTTP status code for the request's response error. 1399 func (s *ValidationError) StatusCode() int { 1400 return s.RespMetadata.StatusCode 1401 } 1402 1403 // RequestID returns the service's response RequestID for request. 1404 func (s *ValidationError) RequestID() string { 1405 return s.RespMetadata.RequestID 1406 }