Struct: s3.ExtendObjectRetentionInput

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

AdditionalRetentionPeriod *int64 `location:"header" locationName:"Additional-Retention-Period" type:"integer"`

Additional time, in seconds, to add to the existing retention period for the object. If this field and New-Retention-Time and/or New-Retention-Expiration-Date are specified, a 400 error will be returned. If none of the Request Headers are specified, a 400 error will be returned to the user. The retention period of an object may be extended up to bucket maximum retention period from the time of the request.

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

Bucket is a required field

ExtendRetentionFromCurrentTime *int64 `location:"header" locationName:"Extend-Retention-From-Current-Time" type:"integer"`

Retention Period in seconds for the object. The Retention will be enforced from the current time until current time + the value in this header. This value has to be within the ranges defined for the bucket.

Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`

Key is a required field

NewRetentionExpirationDate *time.Time `location:"header" locationName:"New-Retention-Expiration-Date" type:"timestamp" timestampFormat:"iso8601"`

NewRetentionPeriod *int64 `location:"header" locationName:"New-Retention-Period" type:"integer"`

_ struct{} `locationName:"ExtendObjectRetentionRequest" type:"structure"`

Method Details

func (s ExtendObjectRetentionInput) 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”.



11839
11840
11841
// File 'service/s3/api.go', line 11839

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

func (s *ExtendObjectRetentionInput) SetAdditionalRetentionPeriod(v int64) *ExtendObjectRetentionInput

SetAdditionalRetentionPeriod sets the AdditionalRetentionPeriod field's value.



11866
11867
11868
11869
// File 'service/s3/api.go', line 11866

func (s *ExtendObjectRetentionInput) SetAdditionalRetentionPeriod(v int64) *ExtendObjectRetentionInput { s.AdditionalRetentionPeriod = &v return s }

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

SetBucket sets the Bucket field's value.



11872
11873
11874
11875
// File 'service/s3/api.go', line 11872

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

func (s *ExtendObjectRetentionInput) SetExtendRetentionFromCurrentTime(v int64) *ExtendObjectRetentionInput

SetExtendRetentionFromCurrentTime sets the ExtendRetentionFromCurrentTime field's value.



11885
11886
11887
11888
// File 'service/s3/api.go', line 11885

func (s *ExtendObjectRetentionInput) SetExtendRetentionFromCurrentTime(v int64) *ExtendObjectRetentionInput { s.ExtendRetentionFromCurrentTime = &v return s }

func (s *ExtendObjectRetentionInput) SetKey(v string) *ExtendObjectRetentionInput

SetKey sets the Key field's value.



11891
11892
11893
11894
// File 'service/s3/api.go', line 11891

func (s *ExtendObjectRetentionInput) SetKey(v string) *ExtendObjectRetentionInput { s.Key = &v return s }

func (s *ExtendObjectRetentionInput) SetNewRetentionExpirationDate(v time.Time) *ExtendObjectRetentionInput

SetNewRetentionExpirationDate sets the NewRetentionExpirationDate field's value.



11897
11898
11899
11900
// File 'service/s3/api.go', line 11897

func (s *ExtendObjectRetentionInput) SetNewRetentionExpirationDate(v time.Time) *ExtendObjectRetentionInput { s.NewRetentionExpirationDate = &v return s }

func (s *ExtendObjectRetentionInput) SetNewRetentionPeriod(v int64) *ExtendObjectRetentionInput

SetNewRetentionPeriod sets the NewRetentionPeriod field's value.



11903
11904
11905
11906
// File 'service/s3/api.go', line 11903

func (s *ExtendObjectRetentionInput) SetNewRetentionPeriod(v int64) *ExtendObjectRetentionInput { s.NewRetentionPeriod = &v return s }

func (s ExtendObjectRetentionInput) 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”.



11830
11831
11832
// File 'service/s3/api.go', line 11830

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

func (s *ExtendObjectRetentionInput) Validate() error

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



11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
// File 'service/s3/api.go', line 11844

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