github.com/aavshr/aws-sdk-go@v1.41.3/service/mediastoredata/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package mediastoredata 4 5 import ( 6 "fmt" 7 "io" 8 "time" 9 10 "github.com/aavshr/aws-sdk-go/aws" 11 "github.com/aavshr/aws-sdk-go/aws/awsutil" 12 "github.com/aavshr/aws-sdk-go/aws/request" 13 "github.com/aavshr/aws-sdk-go/aws/signer/v4" 14 "github.com/aavshr/aws-sdk-go/private/protocol" 15 "github.com/aavshr/aws-sdk-go/private/protocol/restjson" 16 ) 17 18 const opDeleteObject = "DeleteObject" 19 20 // DeleteObjectRequest generates a "aws/request.Request" representing the 21 // client's request for the DeleteObject operation. The "output" return 22 // value will be populated with the request's response once the request completes 23 // successfully. 24 // 25 // Use "Send" method on the returned Request to send the API call to the service. 26 // the "output" return value is not valid until after Send returns without error. 27 // 28 // See DeleteObject for more information on using the DeleteObject 29 // API call, and error handling. 30 // 31 // This method is useful when you want to inject custom logic or configuration 32 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 33 // 34 // 35 // // Example sending a request using the DeleteObjectRequest method. 36 // req, resp := client.DeleteObjectRequest(params) 37 // 38 // err := req.Send() 39 // if err == nil { // resp is now filled 40 // fmt.Println(resp) 41 // } 42 // 43 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DeleteObject 44 func (c *MediaStoreData) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) { 45 op := &request.Operation{ 46 Name: opDeleteObject, 47 HTTPMethod: "DELETE", 48 HTTPPath: "/{Path+}", 49 } 50 51 if input == nil { 52 input = &DeleteObjectInput{} 53 } 54 55 output = &DeleteObjectOutput{} 56 req = c.newRequest(op, input, output) 57 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 58 return 59 } 60 61 // DeleteObject API operation for AWS Elemental MediaStore Data Plane. 62 // 63 // Deletes an object at the specified path. 64 // 65 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 66 // with awserr.Error's Code and Message methods to get detailed information about 67 // the error. 68 // 69 // See the AWS API reference guide for AWS Elemental MediaStore Data Plane's 70 // API operation DeleteObject for usage and error information. 71 // 72 // Returned Error Types: 73 // * ContainerNotFoundException 74 // The specified container was not found for the specified account. 75 // 76 // * ObjectNotFoundException 77 // Could not perform an operation on an object that does not exist. 78 // 79 // * InternalServerError 80 // The service is temporarily unavailable. 81 // 82 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DeleteObject 83 func (c *MediaStoreData) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) { 84 req, out := c.DeleteObjectRequest(input) 85 return out, req.Send() 86 } 87 88 // DeleteObjectWithContext is the same as DeleteObject with the addition of 89 // the ability to pass a context and additional request options. 90 // 91 // See DeleteObject 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 *MediaStoreData) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) { 98 req, out := c.DeleteObjectRequest(input) 99 req.SetContext(ctx) 100 req.ApplyOptions(opts...) 101 return out, req.Send() 102 } 103 104 const opDescribeObject = "DescribeObject" 105 106 // DescribeObjectRequest generates a "aws/request.Request" representing the 107 // client's request for the DescribeObject 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 DescribeObject for more information on using the DescribeObject 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 DescribeObjectRequest method. 122 // req, resp := client.DescribeObjectRequest(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/mediastore-data-2017-09-01/DescribeObject 130 func (c *MediaStoreData) DescribeObjectRequest(input *DescribeObjectInput) (req *request.Request, output *DescribeObjectOutput) { 131 op := &request.Operation{ 132 Name: opDescribeObject, 133 HTTPMethod: "HEAD", 134 HTTPPath: "/{Path+}", 135 } 136 137 if input == nil { 138 input = &DescribeObjectInput{} 139 } 140 141 output = &DescribeObjectOutput{} 142 req = c.newRequest(op, input, output) 143 return 144 } 145 146 // DescribeObject API operation for AWS Elemental MediaStore Data Plane. 147 // 148 // Gets the headers for an object at the specified path. 149 // 150 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 151 // with awserr.Error's Code and Message methods to get detailed information about 152 // the error. 153 // 154 // See the AWS API reference guide for AWS Elemental MediaStore Data Plane's 155 // API operation DescribeObject for usage and error information. 156 // 157 // Returned Error Types: 158 // * ContainerNotFoundException 159 // The specified container was not found for the specified account. 160 // 161 // * ObjectNotFoundException 162 // Could not perform an operation on an object that does not exist. 163 // 164 // * InternalServerError 165 // The service is temporarily unavailable. 166 // 167 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/DescribeObject 168 func (c *MediaStoreData) DescribeObject(input *DescribeObjectInput) (*DescribeObjectOutput, error) { 169 req, out := c.DescribeObjectRequest(input) 170 return out, req.Send() 171 } 172 173 // DescribeObjectWithContext is the same as DescribeObject with the addition of 174 // the ability to pass a context and additional request options. 175 // 176 // See DescribeObject for details on how to use this API operation. 177 // 178 // The context must be non-nil and will be used for request cancellation. If 179 // the context is nil a panic will occur. In the future the SDK may create 180 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 181 // for more information on using Contexts. 182 func (c *MediaStoreData) DescribeObjectWithContext(ctx aws.Context, input *DescribeObjectInput, opts ...request.Option) (*DescribeObjectOutput, error) { 183 req, out := c.DescribeObjectRequest(input) 184 req.SetContext(ctx) 185 req.ApplyOptions(opts...) 186 return out, req.Send() 187 } 188 189 const opGetObject = "GetObject" 190 191 // GetObjectRequest generates a "aws/request.Request" representing the 192 // client's request for the GetObject operation. The "output" return 193 // value will be populated with the request's response once the request completes 194 // successfully. 195 // 196 // Use "Send" method on the returned Request to send the API call to the service. 197 // the "output" return value is not valid until after Send returns without error. 198 // 199 // See GetObject for more information on using the GetObject 200 // API call, and error handling. 201 // 202 // This method is useful when you want to inject custom logic or configuration 203 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 204 // 205 // 206 // // Example sending a request using the GetObjectRequest method. 207 // req, resp := client.GetObjectRequest(params) 208 // 209 // err := req.Send() 210 // if err == nil { // resp is now filled 211 // fmt.Println(resp) 212 // } 213 // 214 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/GetObject 215 func (c *MediaStoreData) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) { 216 op := &request.Operation{ 217 Name: opGetObject, 218 HTTPMethod: "GET", 219 HTTPPath: "/{Path+}", 220 } 221 222 if input == nil { 223 input = &GetObjectInput{} 224 } 225 226 output = &GetObjectOutput{} 227 req = c.newRequest(op, input, output) 228 return 229 } 230 231 // GetObject API operation for AWS Elemental MediaStore Data Plane. 232 // 233 // Downloads the object at the specified path. If the object’s upload availability 234 // is set to streaming, AWS Elemental MediaStore downloads the object even if 235 // it’s still uploading the object. 236 // 237 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 238 // with awserr.Error's Code and Message methods to get detailed information about 239 // the error. 240 // 241 // See the AWS API reference guide for AWS Elemental MediaStore Data Plane's 242 // API operation GetObject for usage and error information. 243 // 244 // Returned Error Types: 245 // * ContainerNotFoundException 246 // The specified container was not found for the specified account. 247 // 248 // * ObjectNotFoundException 249 // Could not perform an operation on an object that does not exist. 250 // 251 // * RequestedRangeNotSatisfiableException 252 // The requested content range is not valid. 253 // 254 // * InternalServerError 255 // The service is temporarily unavailable. 256 // 257 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/GetObject 258 func (c *MediaStoreData) GetObject(input *GetObjectInput) (*GetObjectOutput, error) { 259 req, out := c.GetObjectRequest(input) 260 return out, req.Send() 261 } 262 263 // GetObjectWithContext is the same as GetObject with the addition of 264 // the ability to pass a context and additional request options. 265 // 266 // See GetObject for details on how to use this API operation. 267 // 268 // The context must be non-nil and will be used for request cancellation. If 269 // the context is nil a panic will occur. In the future the SDK may create 270 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 271 // for more information on using Contexts. 272 func (c *MediaStoreData) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) { 273 req, out := c.GetObjectRequest(input) 274 req.SetContext(ctx) 275 req.ApplyOptions(opts...) 276 return out, req.Send() 277 } 278 279 const opListItems = "ListItems" 280 281 // ListItemsRequest generates a "aws/request.Request" representing the 282 // client's request for the ListItems operation. The "output" return 283 // value will be populated with the request's response once the request completes 284 // successfully. 285 // 286 // Use "Send" method on the returned Request to send the API call to the service. 287 // the "output" return value is not valid until after Send returns without error. 288 // 289 // See ListItems for more information on using the ListItems 290 // API call, and error handling. 291 // 292 // This method is useful when you want to inject custom logic or configuration 293 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 294 // 295 // 296 // // Example sending a request using the ListItemsRequest method. 297 // req, resp := client.ListItemsRequest(params) 298 // 299 // err := req.Send() 300 // if err == nil { // resp is now filled 301 // fmt.Println(resp) 302 // } 303 // 304 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/ListItems 305 func (c *MediaStoreData) ListItemsRequest(input *ListItemsInput) (req *request.Request, output *ListItemsOutput) { 306 op := &request.Operation{ 307 Name: opListItems, 308 HTTPMethod: "GET", 309 HTTPPath: "/", 310 Paginator: &request.Paginator{ 311 InputTokens: []string{"NextToken"}, 312 OutputTokens: []string{"NextToken"}, 313 LimitToken: "MaxResults", 314 TruncationToken: "", 315 }, 316 } 317 318 if input == nil { 319 input = &ListItemsInput{} 320 } 321 322 output = &ListItemsOutput{} 323 req = c.newRequest(op, input, output) 324 return 325 } 326 327 // ListItems API operation for AWS Elemental MediaStore Data Plane. 328 // 329 // Provides a list of metadata entries about folders and objects in the specified 330 // folder. 331 // 332 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 333 // with awserr.Error's Code and Message methods to get detailed information about 334 // the error. 335 // 336 // See the AWS API reference guide for AWS Elemental MediaStore Data Plane's 337 // API operation ListItems for usage and error information. 338 // 339 // Returned Error Types: 340 // * ContainerNotFoundException 341 // The specified container was not found for the specified account. 342 // 343 // * InternalServerError 344 // The service is temporarily unavailable. 345 // 346 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/ListItems 347 func (c *MediaStoreData) ListItems(input *ListItemsInput) (*ListItemsOutput, error) { 348 req, out := c.ListItemsRequest(input) 349 return out, req.Send() 350 } 351 352 // ListItemsWithContext is the same as ListItems with the addition of 353 // the ability to pass a context and additional request options. 354 // 355 // See ListItems for details on how to use this API operation. 356 // 357 // The context must be non-nil and will be used for request cancellation. If 358 // the context is nil a panic will occur. In the future the SDK may create 359 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 360 // for more information on using Contexts. 361 func (c *MediaStoreData) ListItemsWithContext(ctx aws.Context, input *ListItemsInput, opts ...request.Option) (*ListItemsOutput, error) { 362 req, out := c.ListItemsRequest(input) 363 req.SetContext(ctx) 364 req.ApplyOptions(opts...) 365 return out, req.Send() 366 } 367 368 // ListItemsPages iterates over the pages of a ListItems operation, 369 // calling the "fn" function with the response data for each page. To stop 370 // iterating, return false from the fn function. 371 // 372 // See ListItems method for more information on how to use this operation. 373 // 374 // Note: This operation can generate multiple requests to a service. 375 // 376 // // Example iterating over at most 3 pages of a ListItems operation. 377 // pageNum := 0 378 // err := client.ListItemsPages(params, 379 // func(page *mediastoredata.ListItemsOutput, lastPage bool) bool { 380 // pageNum++ 381 // fmt.Println(page) 382 // return pageNum <= 3 383 // }) 384 // 385 func (c *MediaStoreData) ListItemsPages(input *ListItemsInput, fn func(*ListItemsOutput, bool) bool) error { 386 return c.ListItemsPagesWithContext(aws.BackgroundContext(), input, fn) 387 } 388 389 // ListItemsPagesWithContext same as ListItemsPages except 390 // it takes a Context and allows setting request options on the pages. 391 // 392 // The context must be non-nil and will be used for request cancellation. If 393 // the context is nil a panic will occur. In the future the SDK may create 394 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 395 // for more information on using Contexts. 396 func (c *MediaStoreData) ListItemsPagesWithContext(ctx aws.Context, input *ListItemsInput, fn func(*ListItemsOutput, bool) bool, opts ...request.Option) error { 397 p := request.Pagination{ 398 NewRequest: func() (*request.Request, error) { 399 var inCpy *ListItemsInput 400 if input != nil { 401 tmp := *input 402 inCpy = &tmp 403 } 404 req, _ := c.ListItemsRequest(inCpy) 405 req.SetContext(ctx) 406 req.ApplyOptions(opts...) 407 return req, nil 408 }, 409 } 410 411 for p.Next() { 412 if !fn(p.Page().(*ListItemsOutput), !p.HasNextPage()) { 413 break 414 } 415 } 416 417 return p.Err() 418 } 419 420 const opPutObject = "PutObject" 421 422 // PutObjectRequest generates a "aws/request.Request" representing the 423 // client's request for the PutObject operation. The "output" return 424 // value will be populated with the request's response once the request completes 425 // successfully. 426 // 427 // Use "Send" method on the returned Request to send the API call to the service. 428 // the "output" return value is not valid until after Send returns without error. 429 // 430 // See PutObject for more information on using the PutObject 431 // API call, and error handling. 432 // 433 // This method is useful when you want to inject custom logic or configuration 434 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 435 // 436 // 437 // // Example sending a request using the PutObjectRequest method. 438 // req, resp := client.PutObjectRequest(params) 439 // 440 // err := req.Send() 441 // if err == nil { // resp is now filled 442 // fmt.Println(resp) 443 // } 444 // 445 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/PutObject 446 func (c *MediaStoreData) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) { 447 op := &request.Operation{ 448 Name: opPutObject, 449 HTTPMethod: "PUT", 450 HTTPPath: "/{Path+}", 451 } 452 453 if input == nil { 454 input = &PutObjectInput{} 455 } 456 457 output = &PutObjectOutput{} 458 req = c.newRequest(op, input, output) 459 req.Handlers.Sign.Remove(v4.SignRequestHandler) 460 handler := v4.BuildNamedHandler("v4.CustomSignerHandler", v4.WithUnsignedPayload) 461 req.Handlers.Sign.PushFrontNamed(handler) 462 return 463 } 464 465 // PutObject API operation for AWS Elemental MediaStore Data Plane. 466 // 467 // Uploads an object to the specified path. Object sizes are limited to 25 MB 468 // for standard upload availability and 10 MB for streaming upload availability. 469 // 470 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 471 // with awserr.Error's Code and Message methods to get detailed information about 472 // the error. 473 // 474 // See the AWS API reference guide for AWS Elemental MediaStore Data Plane's 475 // API operation PutObject for usage and error information. 476 // 477 // Returned Error Types: 478 // * ContainerNotFoundException 479 // The specified container was not found for the specified account. 480 // 481 // * InternalServerError 482 // The service is temporarily unavailable. 483 // 484 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-data-2017-09-01/PutObject 485 func (c *MediaStoreData) PutObject(input *PutObjectInput) (*PutObjectOutput, error) { 486 req, out := c.PutObjectRequest(input) 487 return out, req.Send() 488 } 489 490 // PutObjectWithContext is the same as PutObject with the addition of 491 // the ability to pass a context and additional request options. 492 // 493 // See PutObject for details on how to use this API operation. 494 // 495 // The context must be non-nil and will be used for request cancellation. If 496 // the context is nil a panic will occur. In the future the SDK may create 497 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 498 // for more information on using Contexts. 499 func (c *MediaStoreData) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) { 500 req, out := c.PutObjectRequest(input) 501 req.SetContext(ctx) 502 req.ApplyOptions(opts...) 503 return out, req.Send() 504 } 505 506 // The specified container was not found for the specified account. 507 type ContainerNotFoundException struct { 508 _ struct{} `type:"structure"` 509 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 510 511 Message_ *string `locationName:"Message" min:"1" type:"string"` 512 } 513 514 // String returns the string representation. 515 // 516 // API parameter values that are decorated as "sensitive" in the API will not 517 // be included in the string output. The member name will be present, but the 518 // value will be replaced with "sensitive". 519 func (s ContainerNotFoundException) String() string { 520 return awsutil.Prettify(s) 521 } 522 523 // GoString returns the string representation. 524 // 525 // API parameter values that are decorated as "sensitive" in the API will not 526 // be included in the string output. The member name will be present, but the 527 // value will be replaced with "sensitive". 528 func (s ContainerNotFoundException) GoString() string { 529 return s.String() 530 } 531 532 func newErrorContainerNotFoundException(v protocol.ResponseMetadata) error { 533 return &ContainerNotFoundException{ 534 RespMetadata: v, 535 } 536 } 537 538 // Code returns the exception type name. 539 func (s *ContainerNotFoundException) Code() string { 540 return "ContainerNotFoundException" 541 } 542 543 // Message returns the exception's message. 544 func (s *ContainerNotFoundException) Message() string { 545 if s.Message_ != nil { 546 return *s.Message_ 547 } 548 return "" 549 } 550 551 // OrigErr always returns nil, satisfies awserr.Error interface. 552 func (s *ContainerNotFoundException) OrigErr() error { 553 return nil 554 } 555 556 func (s *ContainerNotFoundException) Error() string { 557 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 558 } 559 560 // Status code returns the HTTP status code for the request's response error. 561 func (s *ContainerNotFoundException) StatusCode() int { 562 return s.RespMetadata.StatusCode 563 } 564 565 // RequestID returns the service's response RequestID for request. 566 func (s *ContainerNotFoundException) RequestID() string { 567 return s.RespMetadata.RequestID 568 } 569 570 type DeleteObjectInput struct { 571 _ struct{} `type:"structure" nopayload:"true"` 572 573 // The path (including the file name) where the object is stored in the container. 574 // Format: <folder name>/<folder name>/<file name> 575 // 576 // Path is a required field 577 Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"` 578 } 579 580 // String returns the string representation. 581 // 582 // API parameter values that are decorated as "sensitive" in the API will not 583 // be included in the string output. The member name will be present, but the 584 // value will be replaced with "sensitive". 585 func (s DeleteObjectInput) String() string { 586 return awsutil.Prettify(s) 587 } 588 589 // GoString returns the string representation. 590 // 591 // API parameter values that are decorated as "sensitive" in the API will not 592 // be included in the string output. The member name will be present, but the 593 // value will be replaced with "sensitive". 594 func (s DeleteObjectInput) GoString() string { 595 return s.String() 596 } 597 598 // Validate inspects the fields of the type to determine if they are valid. 599 func (s *DeleteObjectInput) Validate() error { 600 invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"} 601 if s.Path == nil { 602 invalidParams.Add(request.NewErrParamRequired("Path")) 603 } 604 if s.Path != nil && len(*s.Path) < 1 { 605 invalidParams.Add(request.NewErrParamMinLen("Path", 1)) 606 } 607 608 if invalidParams.Len() > 0 { 609 return invalidParams 610 } 611 return nil 612 } 613 614 // SetPath sets the Path field's value. 615 func (s *DeleteObjectInput) SetPath(v string) *DeleteObjectInput { 616 s.Path = &v 617 return s 618 } 619 620 type DeleteObjectOutput struct { 621 _ struct{} `type:"structure" nopayload:"true"` 622 } 623 624 // String returns the string representation. 625 // 626 // API parameter values that are decorated as "sensitive" in the API will not 627 // be included in the string output. The member name will be present, but the 628 // value will be replaced with "sensitive". 629 func (s DeleteObjectOutput) String() string { 630 return awsutil.Prettify(s) 631 } 632 633 // GoString returns the string representation. 634 // 635 // API parameter values that are decorated as "sensitive" in the API will not 636 // be included in the string output. The member name will be present, but the 637 // value will be replaced with "sensitive". 638 func (s DeleteObjectOutput) GoString() string { 639 return s.String() 640 } 641 642 type DescribeObjectInput struct { 643 _ struct{} `type:"structure" nopayload:"true"` 644 645 // The path (including the file name) where the object is stored in the container. 646 // Format: <folder name>/<folder name>/<file name> 647 // 648 // Path is a required field 649 Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"` 650 } 651 652 // String returns the string representation. 653 // 654 // API parameter values that are decorated as "sensitive" in the API will not 655 // be included in the string output. The member name will be present, but the 656 // value will be replaced with "sensitive". 657 func (s DescribeObjectInput) String() string { 658 return awsutil.Prettify(s) 659 } 660 661 // GoString returns the string representation. 662 // 663 // API parameter values that are decorated as "sensitive" in the API will not 664 // be included in the string output. The member name will be present, but the 665 // value will be replaced with "sensitive". 666 func (s DescribeObjectInput) GoString() string { 667 return s.String() 668 } 669 670 // Validate inspects the fields of the type to determine if they are valid. 671 func (s *DescribeObjectInput) Validate() error { 672 invalidParams := request.ErrInvalidParams{Context: "DescribeObjectInput"} 673 if s.Path == nil { 674 invalidParams.Add(request.NewErrParamRequired("Path")) 675 } 676 if s.Path != nil && len(*s.Path) < 1 { 677 invalidParams.Add(request.NewErrParamMinLen("Path", 1)) 678 } 679 680 if invalidParams.Len() > 0 { 681 return invalidParams 682 } 683 return nil 684 } 685 686 // SetPath sets the Path field's value. 687 func (s *DescribeObjectInput) SetPath(v string) *DescribeObjectInput { 688 s.Path = &v 689 return s 690 } 691 692 type DescribeObjectOutput struct { 693 _ struct{} `type:"structure" nopayload:"true"` 694 695 // An optional CacheControl header that allows the caller to control the object's 696 // cache behavior. Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 697 // (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9). 698 // 699 // Headers with a custom user-defined value are also accepted. 700 CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` 701 702 // The length of the object in bytes. 703 ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` 704 705 // The content type of the object. 706 ContentType *string `location:"header" locationName:"Content-Type" type:"string"` 707 708 // The ETag that represents a unique instance of the object. 709 ETag *string `location:"header" locationName:"ETag" min:"1" type:"string"` 710 711 // The date and time that the object was last modified. 712 LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` 713 } 714 715 // String returns the string representation. 716 // 717 // API parameter values that are decorated as "sensitive" in the API will not 718 // be included in the string output. The member name will be present, but the 719 // value will be replaced with "sensitive". 720 func (s DescribeObjectOutput) String() string { 721 return awsutil.Prettify(s) 722 } 723 724 // GoString returns the string representation. 725 // 726 // API parameter values that are decorated as "sensitive" in the API will not 727 // be included in the string output. The member name will be present, but the 728 // value will be replaced with "sensitive". 729 func (s DescribeObjectOutput) GoString() string { 730 return s.String() 731 } 732 733 // SetCacheControl sets the CacheControl field's value. 734 func (s *DescribeObjectOutput) SetCacheControl(v string) *DescribeObjectOutput { 735 s.CacheControl = &v 736 return s 737 } 738 739 // SetContentLength sets the ContentLength field's value. 740 func (s *DescribeObjectOutput) SetContentLength(v int64) *DescribeObjectOutput { 741 s.ContentLength = &v 742 return s 743 } 744 745 // SetContentType sets the ContentType field's value. 746 func (s *DescribeObjectOutput) SetContentType(v string) *DescribeObjectOutput { 747 s.ContentType = &v 748 return s 749 } 750 751 // SetETag sets the ETag field's value. 752 func (s *DescribeObjectOutput) SetETag(v string) *DescribeObjectOutput { 753 s.ETag = &v 754 return s 755 } 756 757 // SetLastModified sets the LastModified field's value. 758 func (s *DescribeObjectOutput) SetLastModified(v time.Time) *DescribeObjectOutput { 759 s.LastModified = &v 760 return s 761 } 762 763 type GetObjectInput struct { 764 _ struct{} `type:"structure" nopayload:"true"` 765 766 // The path (including the file name) where the object is stored in the container. 767 // Format: <folder name>/<folder name>/<file name> 768 // 769 // For example, to upload the file mlaw.avi to the folder path premium\canada 770 // in the container movies, enter the path premium/canada/mlaw.avi. 771 // 772 // Do not include the container name in this path. 773 // 774 // If the path includes any folders that don't exist yet, the service creates 775 // them. For example, suppose you have an existing premium/usa subfolder. If 776 // you specify premium/canada, the service creates a canada subfolder in the 777 // premium folder. You then have two subfolders, usa and canada, in the premium 778 // folder. 779 // 780 // There is no correlation between the path to the source and the path (folders) 781 // in the container in AWS Elemental MediaStore. 782 // 783 // For more information about folders and how they exist in a container, see 784 // the AWS Elemental MediaStore User Guide (http://docs.aws.amazon.com/mediastore/latest/ug/). 785 // 786 // The file name is the name that is assigned to the file that you upload. The 787 // file can have the same name inside and outside of AWS Elemental MediaStore, 788 // or it can have the same name. The file name can include or omit an extension. 789 // 790 // Path is a required field 791 Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"` 792 793 // The range bytes of an object to retrieve. For more information about the 794 // Range header, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35 795 // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35). AWS Elemental 796 // MediaStore ignores this header for partially uploaded objects that have streaming 797 // upload availability. 798 Range *string `location:"header" locationName:"Range" type:"string"` 799 } 800 801 // String 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 GetObjectInput) String() string { 807 return awsutil.Prettify(s) 808 } 809 810 // GoString returns the string representation. 811 // 812 // API parameter values that are decorated as "sensitive" in the API will not 813 // be included in the string output. The member name will be present, but the 814 // value will be replaced with "sensitive". 815 func (s GetObjectInput) GoString() string { 816 return s.String() 817 } 818 819 // Validate inspects the fields of the type to determine if they are valid. 820 func (s *GetObjectInput) Validate() error { 821 invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"} 822 if s.Path == nil { 823 invalidParams.Add(request.NewErrParamRequired("Path")) 824 } 825 if s.Path != nil && len(*s.Path) < 1 { 826 invalidParams.Add(request.NewErrParamMinLen("Path", 1)) 827 } 828 829 if invalidParams.Len() > 0 { 830 return invalidParams 831 } 832 return nil 833 } 834 835 // SetPath sets the Path field's value. 836 func (s *GetObjectInput) SetPath(v string) *GetObjectInput { 837 s.Path = &v 838 return s 839 } 840 841 // SetRange sets the Range field's value. 842 func (s *GetObjectInput) SetRange(v string) *GetObjectInput { 843 s.Range = &v 844 return s 845 } 846 847 type GetObjectOutput struct { 848 _ struct{} `type:"structure" payload:"Body"` 849 850 // The bytes of the object. 851 Body io.ReadCloser `type:"blob"` 852 853 // An optional CacheControl header that allows the caller to control the object's 854 // cache behavior. Headers can be passed in as specified in the HTTP spec at 855 // https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9). 856 // 857 // Headers with a custom user-defined value are also accepted. 858 CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` 859 860 // The length of the object in bytes. 861 ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"` 862 863 // The range of bytes to retrieve. 864 ContentRange *string `location:"header" locationName:"Content-Range" type:"string"` 865 866 // The content type of the object. 867 ContentType *string `location:"header" locationName:"Content-Type" type:"string"` 868 869 // The ETag that represents a unique instance of the object. 870 ETag *string `location:"header" locationName:"ETag" min:"1" type:"string"` 871 872 // The date and time that the object was last modified. 873 LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` 874 875 // The HTML status code of the request. Status codes ranging from 200 to 299 876 // indicate success. All other status codes indicate the type of error that 877 // occurred. 878 // 879 // StatusCode is a required field 880 StatusCode *int64 `location:"statusCode" type:"integer" required:"true"` 881 } 882 883 // String returns the string representation. 884 // 885 // API parameter values that are decorated as "sensitive" in the API will not 886 // be included in the string output. The member name will be present, but the 887 // value will be replaced with "sensitive". 888 func (s GetObjectOutput) String() string { 889 return awsutil.Prettify(s) 890 } 891 892 // GoString returns the string representation. 893 // 894 // API parameter values that are decorated as "sensitive" in the API will not 895 // be included in the string output. The member name will be present, but the 896 // value will be replaced with "sensitive". 897 func (s GetObjectOutput) GoString() string { 898 return s.String() 899 } 900 901 // SetBody sets the Body field's value. 902 func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput { 903 s.Body = v 904 return s 905 } 906 907 // SetCacheControl sets the CacheControl field's value. 908 func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput { 909 s.CacheControl = &v 910 return s 911 } 912 913 // SetContentLength sets the ContentLength field's value. 914 func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput { 915 s.ContentLength = &v 916 return s 917 } 918 919 // SetContentRange sets the ContentRange field's value. 920 func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput { 921 s.ContentRange = &v 922 return s 923 } 924 925 // SetContentType sets the ContentType field's value. 926 func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput { 927 s.ContentType = &v 928 return s 929 } 930 931 // SetETag sets the ETag field's value. 932 func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput { 933 s.ETag = &v 934 return s 935 } 936 937 // SetLastModified sets the LastModified field's value. 938 func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput { 939 s.LastModified = &v 940 return s 941 } 942 943 // SetStatusCode sets the StatusCode field's value. 944 func (s *GetObjectOutput) SetStatusCode(v int64) *GetObjectOutput { 945 s.StatusCode = &v 946 return s 947 } 948 949 // The service is temporarily unavailable. 950 type InternalServerError struct { 951 _ struct{} `type:"structure"` 952 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 953 954 Message_ *string `locationName:"Message" min:"1" type:"string"` 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 InternalServerError) 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 InternalServerError) GoString() string { 972 return s.String() 973 } 974 975 func newErrorInternalServerError(v protocol.ResponseMetadata) error { 976 return &InternalServerError{ 977 RespMetadata: v, 978 } 979 } 980 981 // Code returns the exception type name. 982 func (s *InternalServerError) Code() string { 983 return "InternalServerError" 984 } 985 986 // Message returns the exception's message. 987 func (s *InternalServerError) Message() string { 988 if s.Message_ != nil { 989 return *s.Message_ 990 } 991 return "" 992 } 993 994 // OrigErr always returns nil, satisfies awserr.Error interface. 995 func (s *InternalServerError) OrigErr() error { 996 return nil 997 } 998 999 func (s *InternalServerError) Error() string { 1000 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1001 } 1002 1003 // Status code returns the HTTP status code for the request's response error. 1004 func (s *InternalServerError) StatusCode() int { 1005 return s.RespMetadata.StatusCode 1006 } 1007 1008 // RequestID returns the service's response RequestID for request. 1009 func (s *InternalServerError) RequestID() string { 1010 return s.RespMetadata.RequestID 1011 } 1012 1013 // A metadata entry for a folder or object. 1014 type Item struct { 1015 _ struct{} `type:"structure"` 1016 1017 // The length of the item in bytes. 1018 ContentLength *int64 `type:"long"` 1019 1020 // The content type of the item. 1021 ContentType *string `type:"string"` 1022 1023 // The ETag that represents a unique instance of the item. 1024 ETag *string `min:"1" type:"string"` 1025 1026 // The date and time that the item was last modified. 1027 LastModified *time.Time `type:"timestamp"` 1028 1029 // The name of the item. 1030 Name *string `type:"string"` 1031 1032 // The item type (folder or object). 1033 Type *string `type:"string" enum:"ItemType"` 1034 } 1035 1036 // String returns the string representation. 1037 // 1038 // API parameter values that are decorated as "sensitive" in the API will not 1039 // be included in the string output. The member name will be present, but the 1040 // value will be replaced with "sensitive". 1041 func (s Item) String() string { 1042 return awsutil.Prettify(s) 1043 } 1044 1045 // GoString returns the string representation. 1046 // 1047 // API parameter values that are decorated as "sensitive" in the API will not 1048 // be included in the string output. The member name will be present, but the 1049 // value will be replaced with "sensitive". 1050 func (s Item) GoString() string { 1051 return s.String() 1052 } 1053 1054 // SetContentLength sets the ContentLength field's value. 1055 func (s *Item) SetContentLength(v int64) *Item { 1056 s.ContentLength = &v 1057 return s 1058 } 1059 1060 // SetContentType sets the ContentType field's value. 1061 func (s *Item) SetContentType(v string) *Item { 1062 s.ContentType = &v 1063 return s 1064 } 1065 1066 // SetETag sets the ETag field's value. 1067 func (s *Item) SetETag(v string) *Item { 1068 s.ETag = &v 1069 return s 1070 } 1071 1072 // SetLastModified sets the LastModified field's value. 1073 func (s *Item) SetLastModified(v time.Time) *Item { 1074 s.LastModified = &v 1075 return s 1076 } 1077 1078 // SetName sets the Name field's value. 1079 func (s *Item) SetName(v string) *Item { 1080 s.Name = &v 1081 return s 1082 } 1083 1084 // SetType sets the Type field's value. 1085 func (s *Item) SetType(v string) *Item { 1086 s.Type = &v 1087 return s 1088 } 1089 1090 type ListItemsInput struct { 1091 _ struct{} `type:"structure" nopayload:"true"` 1092 1093 // The maximum number of results to return per API request. For example, you 1094 // submit a ListItems request with MaxResults set at 500. Although 2,000 items 1095 // match your request, the service returns no more than the first 500 items. 1096 // (The service also returns a NextToken value that you can use to fetch the 1097 // next batch of results.) The service might return fewer results than the MaxResults 1098 // value. 1099 // 1100 // If MaxResults is not included in the request, the service defaults to pagination 1101 // with a maximum of 1,000 results per page. 1102 MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` 1103 1104 // The token that identifies which batch of results that you want to see. For 1105 // example, you submit a ListItems request with MaxResults set at 500. The service 1106 // returns the first batch of results (up to 500) and a NextToken value. To 1107 // see the next batch of results, you can submit the ListItems request a second 1108 // time and specify the NextToken value. 1109 // 1110 // Tokens expire after 15 minutes. 1111 NextToken *string `location:"querystring" locationName:"NextToken" type:"string"` 1112 1113 // The path in the container from which to retrieve items. Format: <folder name>/<folder 1114 // name>/<file name> 1115 Path *string `location:"querystring" locationName:"Path" type:"string"` 1116 } 1117 1118 // String returns the string representation. 1119 // 1120 // API parameter values that are decorated as "sensitive" in the API will not 1121 // be included in the string output. The member name will be present, but the 1122 // value will be replaced with "sensitive". 1123 func (s ListItemsInput) String() string { 1124 return awsutil.Prettify(s) 1125 } 1126 1127 // GoString 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 ListItemsInput) GoString() string { 1133 return s.String() 1134 } 1135 1136 // Validate inspects the fields of the type to determine if they are valid. 1137 func (s *ListItemsInput) Validate() error { 1138 invalidParams := request.ErrInvalidParams{Context: "ListItemsInput"} 1139 if s.MaxResults != nil && *s.MaxResults < 1 { 1140 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 1141 } 1142 1143 if invalidParams.Len() > 0 { 1144 return invalidParams 1145 } 1146 return nil 1147 } 1148 1149 // SetMaxResults sets the MaxResults field's value. 1150 func (s *ListItemsInput) SetMaxResults(v int64) *ListItemsInput { 1151 s.MaxResults = &v 1152 return s 1153 } 1154 1155 // SetNextToken sets the NextToken field's value. 1156 func (s *ListItemsInput) SetNextToken(v string) *ListItemsInput { 1157 s.NextToken = &v 1158 return s 1159 } 1160 1161 // SetPath sets the Path field's value. 1162 func (s *ListItemsInput) SetPath(v string) *ListItemsInput { 1163 s.Path = &v 1164 return s 1165 } 1166 1167 type ListItemsOutput struct { 1168 _ struct{} `type:"structure"` 1169 1170 // The metadata entries for the folders and objects at the requested path. 1171 Items []*Item `type:"list"` 1172 1173 // The token that can be used in a request to view the next set of results. 1174 // For example, you submit a ListItems request that matches 2,000 items with 1175 // MaxResults set at 500. The service returns the first batch of results (up 1176 // to 500) and a NextToken value that can be used to fetch the next batch of 1177 // results. 1178 NextToken *string `type:"string"` 1179 } 1180 1181 // String returns the string representation. 1182 // 1183 // API parameter values that are decorated as "sensitive" in the API will not 1184 // be included in the string output. The member name will be present, but the 1185 // value will be replaced with "sensitive". 1186 func (s ListItemsOutput) String() string { 1187 return awsutil.Prettify(s) 1188 } 1189 1190 // GoString returns the string representation. 1191 // 1192 // API parameter values that are decorated as "sensitive" in the API will not 1193 // be included in the string output. The member name will be present, but the 1194 // value will be replaced with "sensitive". 1195 func (s ListItemsOutput) GoString() string { 1196 return s.String() 1197 } 1198 1199 // SetItems sets the Items field's value. 1200 func (s *ListItemsOutput) SetItems(v []*Item) *ListItemsOutput { 1201 s.Items = v 1202 return s 1203 } 1204 1205 // SetNextToken sets the NextToken field's value. 1206 func (s *ListItemsOutput) SetNextToken(v string) *ListItemsOutput { 1207 s.NextToken = &v 1208 return s 1209 } 1210 1211 // Could not perform an operation on an object that does not exist. 1212 type ObjectNotFoundException struct { 1213 _ struct{} `type:"structure"` 1214 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1215 1216 Message_ *string `locationName:"Message" min:"1" type:"string"` 1217 } 1218 1219 // String returns the string representation. 1220 // 1221 // API parameter values that are decorated as "sensitive" in the API will not 1222 // be included in the string output. The member name will be present, but the 1223 // value will be replaced with "sensitive". 1224 func (s ObjectNotFoundException) String() string { 1225 return awsutil.Prettify(s) 1226 } 1227 1228 // GoString returns the string representation. 1229 // 1230 // API parameter values that are decorated as "sensitive" in the API will not 1231 // be included in the string output. The member name will be present, but the 1232 // value will be replaced with "sensitive". 1233 func (s ObjectNotFoundException) GoString() string { 1234 return s.String() 1235 } 1236 1237 func newErrorObjectNotFoundException(v protocol.ResponseMetadata) error { 1238 return &ObjectNotFoundException{ 1239 RespMetadata: v, 1240 } 1241 } 1242 1243 // Code returns the exception type name. 1244 func (s *ObjectNotFoundException) Code() string { 1245 return "ObjectNotFoundException" 1246 } 1247 1248 // Message returns the exception's message. 1249 func (s *ObjectNotFoundException) Message() string { 1250 if s.Message_ != nil { 1251 return *s.Message_ 1252 } 1253 return "" 1254 } 1255 1256 // OrigErr always returns nil, satisfies awserr.Error interface. 1257 func (s *ObjectNotFoundException) OrigErr() error { 1258 return nil 1259 } 1260 1261 func (s *ObjectNotFoundException) Error() string { 1262 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1263 } 1264 1265 // Status code returns the HTTP status code for the request's response error. 1266 func (s *ObjectNotFoundException) StatusCode() int { 1267 return s.RespMetadata.StatusCode 1268 } 1269 1270 // RequestID returns the service's response RequestID for request. 1271 func (s *ObjectNotFoundException) RequestID() string { 1272 return s.RespMetadata.RequestID 1273 } 1274 1275 type PutObjectInput struct { 1276 _ struct{} `type:"structure" payload:"Body"` 1277 1278 // The bytes to be stored. 1279 // 1280 // To use an non-seekable io.Reader for this request wrap the io.Reader with 1281 // "aws.ReadSeekCloser". The SDK will not retry request errors for non-seekable 1282 // readers. This will allow the SDK to send the reader's payload as chunked 1283 // transfer encoding. 1284 // 1285 // Body is a required field 1286 Body io.ReadSeeker `type:"blob" required:"true"` 1287 1288 // An optional CacheControl header that allows the caller to control the object's 1289 // cache behavior. Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 1290 // (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9). 1291 // 1292 // Headers with a custom user-defined value are also accepted. 1293 CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"` 1294 1295 // The content type of the object. 1296 ContentType *string `location:"header" locationName:"Content-Type" type:"string"` 1297 1298 // The path (including the file name) where the object is stored in the container. 1299 // Format: <folder name>/<folder name>/<file name> 1300 // 1301 // For example, to upload the file mlaw.avi to the folder path premium\canada 1302 // in the container movies, enter the path premium/canada/mlaw.avi. 1303 // 1304 // Do not include the container name in this path. 1305 // 1306 // If the path includes any folders that don't exist yet, the service creates 1307 // them. For example, suppose you have an existing premium/usa subfolder. If 1308 // you specify premium/canada, the service creates a canada subfolder in the 1309 // premium folder. You then have two subfolders, usa and canada, in the premium 1310 // folder. 1311 // 1312 // There is no correlation between the path to the source and the path (folders) 1313 // in the container in AWS Elemental MediaStore. 1314 // 1315 // For more information about folders and how they exist in a container, see 1316 // the AWS Elemental MediaStore User Guide (http://docs.aws.amazon.com/mediastore/latest/ug/). 1317 // 1318 // The file name is the name that is assigned to the file that you upload. The 1319 // file can have the same name inside and outside of AWS Elemental MediaStore, 1320 // or it can have the same name. The file name can include or omit an extension. 1321 // 1322 // Path is a required field 1323 Path *string `location:"uri" locationName:"Path" min:"1" type:"string" required:"true"` 1324 1325 // Indicates the storage class of a Put request. Defaults to high-performance 1326 // temporal storage class, and objects are persisted into durable storage shortly 1327 // after being received. 1328 StorageClass *string `location:"header" locationName:"x-amz-storage-class" min:"1" type:"string" enum:"StorageClass"` 1329 1330 // Indicates the availability of an object while it is still uploading. If the 1331 // value is set to streaming, the object is available for downloading after 1332 // some initial buffering but before the object is uploaded completely. If the 1333 // value is set to standard, the object is available for downloading only when 1334 // it is uploaded completely. The default value for this header is standard. 1335 // 1336 // To use this header, you must also set the HTTP Transfer-Encoding header to 1337 // chunked. 1338 UploadAvailability *string `location:"header" locationName:"x-amz-upload-availability" min:"1" type:"string" enum:"UploadAvailability"` 1339 } 1340 1341 // String returns the string representation. 1342 // 1343 // API parameter values that are decorated as "sensitive" in the API will not 1344 // be included in the string output. The member name will be present, but the 1345 // value will be replaced with "sensitive". 1346 func (s PutObjectInput) String() string { 1347 return awsutil.Prettify(s) 1348 } 1349 1350 // GoString returns the string representation. 1351 // 1352 // API parameter values that are decorated as "sensitive" in the API will not 1353 // be included in the string output. The member name will be present, but the 1354 // value will be replaced with "sensitive". 1355 func (s PutObjectInput) GoString() string { 1356 return s.String() 1357 } 1358 1359 // Validate inspects the fields of the type to determine if they are valid. 1360 func (s *PutObjectInput) Validate() error { 1361 invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"} 1362 if s.Body == nil { 1363 invalidParams.Add(request.NewErrParamRequired("Body")) 1364 } 1365 if s.Path == nil { 1366 invalidParams.Add(request.NewErrParamRequired("Path")) 1367 } 1368 if s.Path != nil && len(*s.Path) < 1 { 1369 invalidParams.Add(request.NewErrParamMinLen("Path", 1)) 1370 } 1371 if s.StorageClass != nil && len(*s.StorageClass) < 1 { 1372 invalidParams.Add(request.NewErrParamMinLen("StorageClass", 1)) 1373 } 1374 if s.UploadAvailability != nil && len(*s.UploadAvailability) < 1 { 1375 invalidParams.Add(request.NewErrParamMinLen("UploadAvailability", 1)) 1376 } 1377 1378 if invalidParams.Len() > 0 { 1379 return invalidParams 1380 } 1381 return nil 1382 } 1383 1384 // SetBody sets the Body field's value. 1385 func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput { 1386 s.Body = v 1387 return s 1388 } 1389 1390 // SetCacheControl sets the CacheControl field's value. 1391 func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput { 1392 s.CacheControl = &v 1393 return s 1394 } 1395 1396 // SetContentType sets the ContentType field's value. 1397 func (s *PutObjectInput) SetContentType(v string) *PutObjectInput { 1398 s.ContentType = &v 1399 return s 1400 } 1401 1402 // SetPath sets the Path field's value. 1403 func (s *PutObjectInput) SetPath(v string) *PutObjectInput { 1404 s.Path = &v 1405 return s 1406 } 1407 1408 // SetStorageClass sets the StorageClass field's value. 1409 func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput { 1410 s.StorageClass = &v 1411 return s 1412 } 1413 1414 // SetUploadAvailability sets the UploadAvailability field's value. 1415 func (s *PutObjectInput) SetUploadAvailability(v string) *PutObjectInput { 1416 s.UploadAvailability = &v 1417 return s 1418 } 1419 1420 type PutObjectOutput struct { 1421 _ struct{} `type:"structure"` 1422 1423 // The SHA256 digest of the object that is persisted. 1424 ContentSHA256 *string `min:"64" type:"string"` 1425 1426 // Unique identifier of the object in the container. 1427 ETag *string `min:"1" type:"string"` 1428 1429 // The storage class where the object was persisted. The class should be “Temporal”. 1430 StorageClass *string `min:"1" type:"string" enum:"StorageClass"` 1431 } 1432 1433 // String returns the string representation. 1434 // 1435 // API parameter values that are decorated as "sensitive" in the API will not 1436 // be included in the string output. The member name will be present, but the 1437 // value will be replaced with "sensitive". 1438 func (s PutObjectOutput) String() string { 1439 return awsutil.Prettify(s) 1440 } 1441 1442 // GoString returns the string representation. 1443 // 1444 // API parameter values that are decorated as "sensitive" in the API will not 1445 // be included in the string output. The member name will be present, but the 1446 // value will be replaced with "sensitive". 1447 func (s PutObjectOutput) GoString() string { 1448 return s.String() 1449 } 1450 1451 // SetContentSHA256 sets the ContentSHA256 field's value. 1452 func (s *PutObjectOutput) SetContentSHA256(v string) *PutObjectOutput { 1453 s.ContentSHA256 = &v 1454 return s 1455 } 1456 1457 // SetETag sets the ETag field's value. 1458 func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput { 1459 s.ETag = &v 1460 return s 1461 } 1462 1463 // SetStorageClass sets the StorageClass field's value. 1464 func (s *PutObjectOutput) SetStorageClass(v string) *PutObjectOutput { 1465 s.StorageClass = &v 1466 return s 1467 } 1468 1469 // The requested content range is not valid. 1470 type RequestedRangeNotSatisfiableException struct { 1471 _ struct{} `type:"structure"` 1472 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1473 1474 Message_ *string `locationName:"Message" min:"1" type:"string"` 1475 } 1476 1477 // String returns the string representation. 1478 // 1479 // API parameter values that are decorated as "sensitive" in the API will not 1480 // be included in the string output. The member name will be present, but the 1481 // value will be replaced with "sensitive". 1482 func (s RequestedRangeNotSatisfiableException) String() string { 1483 return awsutil.Prettify(s) 1484 } 1485 1486 // GoString returns the string representation. 1487 // 1488 // API parameter values that are decorated as "sensitive" in the API will not 1489 // be included in the string output. The member name will be present, but the 1490 // value will be replaced with "sensitive". 1491 func (s RequestedRangeNotSatisfiableException) GoString() string { 1492 return s.String() 1493 } 1494 1495 func newErrorRequestedRangeNotSatisfiableException(v protocol.ResponseMetadata) error { 1496 return &RequestedRangeNotSatisfiableException{ 1497 RespMetadata: v, 1498 } 1499 } 1500 1501 // Code returns the exception type name. 1502 func (s *RequestedRangeNotSatisfiableException) Code() string { 1503 return "RequestedRangeNotSatisfiableException" 1504 } 1505 1506 // Message returns the exception's message. 1507 func (s *RequestedRangeNotSatisfiableException) Message() string { 1508 if s.Message_ != nil { 1509 return *s.Message_ 1510 } 1511 return "" 1512 } 1513 1514 // OrigErr always returns nil, satisfies awserr.Error interface. 1515 func (s *RequestedRangeNotSatisfiableException) OrigErr() error { 1516 return nil 1517 } 1518 1519 func (s *RequestedRangeNotSatisfiableException) Error() string { 1520 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1521 } 1522 1523 // Status code returns the HTTP status code for the request's response error. 1524 func (s *RequestedRangeNotSatisfiableException) StatusCode() int { 1525 return s.RespMetadata.StatusCode 1526 } 1527 1528 // RequestID returns the service's response RequestID for request. 1529 func (s *RequestedRangeNotSatisfiableException) RequestID() string { 1530 return s.RespMetadata.RequestID 1531 } 1532 1533 const ( 1534 // ItemTypeObject is a ItemType enum value 1535 ItemTypeObject = "OBJECT" 1536 1537 // ItemTypeFolder is a ItemType enum value 1538 ItemTypeFolder = "FOLDER" 1539 ) 1540 1541 // ItemType_Values returns all elements of the ItemType enum 1542 func ItemType_Values() []string { 1543 return []string{ 1544 ItemTypeObject, 1545 ItemTypeFolder, 1546 } 1547 } 1548 1549 const ( 1550 // StorageClassTemporal is a StorageClass enum value 1551 StorageClassTemporal = "TEMPORAL" 1552 ) 1553 1554 // StorageClass_Values returns all elements of the StorageClass enum 1555 func StorageClass_Values() []string { 1556 return []string{ 1557 StorageClassTemporal, 1558 } 1559 } 1560 1561 const ( 1562 // UploadAvailabilityStandard is a UploadAvailability enum value 1563 UploadAvailabilityStandard = "STANDARD" 1564 1565 // UploadAvailabilityStreaming is a UploadAvailability enum value 1566 UploadAvailabilityStreaming = "STREAMING" 1567 ) 1568 1569 // UploadAvailability_Values returns all elements of the UploadAvailability enum 1570 func UploadAvailability_Values() []string { 1571 return []string{ 1572 UploadAvailabilityStandard, 1573 UploadAvailabilityStreaming, 1574 } 1575 }