Struct: s3.PutObjectLockConfigurationInput

import "../ibm-cos-sdk-go/service/s3"

Implemented Interfaces

s3crypto.Cipher, s3manager.ReadSeekerWriteTo, request.Validator, s3manager.WriterReadFrom

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`

The bucket whose Object Lock configuration you want to create or replace.

Bucket is a required field

ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`

Ignored by COS.

ObjectLockConfiguration *ObjectLockConfiguration `locationName:"ObjectLockConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`

The Object Lock configuration that you want to apply to the specified bucket.

RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`

Ignored by COS.

Token *string `location:"header" locationName:"x-amz-bucket-object-lock-token" type:"string"`

Ignored by COS.

_ struct{} `locationName:"PutObjectLockConfigurationRequest" type:"structure" payload:"ObjectLockConfiguration"`

Method Details

func (s PutObjectLockConfigurationInput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as “sensitive” in the API will not be included in the string output. The member name will be present, but the value will be replaced with “sensitive”.



20584
20585
20586
// File 'service/s3/api.go', line 20584

func (s PutObjectLockConfigurationInput) GoString() string { return s.String() }

func (s *PutObjectLockConfigurationInput) SetBucket(v string) *PutObjectLockConfigurationInput

SetBucket sets the Bucket field's value.



20605
20606
20607
20608
// File 'service/s3/api.go', line 20605

func (s *PutObjectLockConfigurationInput) SetBucket(v string) *PutObjectLockConfigurationInput { s.Bucket = &v return s }

func (s *PutObjectLockConfigurationInput) SetExpectedBucketOwner(v string) *PutObjectLockConfigurationInput

SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.



20618
20619
20620
20621
// File 'service/s3/api.go', line 20618

func (s *PutObjectLockConfigurationInput) SetExpectedBucketOwner(v string) *PutObjectLockConfigurationInput { s.ExpectedBucketOwner = &v return s }

func (s *PutObjectLockConfigurationInput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *PutObjectLockConfigurationInput

SetObjectLockConfiguration sets the ObjectLockConfiguration field's value.



20624
20625
20626
20627
// File 'service/s3/api.go', line 20624

func (s *PutObjectLockConfigurationInput) SetRequestPayer(v string) *PutObjectLockConfigurationInput

SetRequestPayer sets the RequestPayer field's value.



20630
20631
20632
20633
// File 'service/s3/api.go', line 20630

func (s *PutObjectLockConfigurationInput) SetRequestPayer(v string) *PutObjectLockConfigurationInput { s.RequestPayer = &v return s }

func (s *PutObjectLockConfigurationInput) SetToken(v string) *PutObjectLockConfigurationInput

SetToken sets the Token field's value.



20636
20637
20638
20639
// File 'service/s3/api.go', line 20636

func (s *PutObjectLockConfigurationInput) SetToken(v string) *PutObjectLockConfigurationInput { s.Token = &v return s }

func (s PutObjectLockConfigurationInput) String() string

String returns the string representation.

API parameter values that are decorated as “sensitive” in the API will not be included in the string output. The member name will be present, but the value will be replaced with “sensitive”.



20575
20576
20577
// File 'service/s3/api.go', line 20575

func (s PutObjectLockConfigurationInput) String() string { return awsutil.Prettify(s) }

func (s *PutObjectLockConfigurationInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.



20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
// File 'service/s3/api.go', line 20589

func (s *PutObjectLockConfigurationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PutObjectLockConfigurationInput"} if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } if s.Bucket != nil && len(*s.Bucket) < 1 { invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil }