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”.



11990
11991
11992
// File 'service/s3/api.go', line 11990

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

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

SetAdditionalRetentionPeriod sets the AdditionalRetentionPeriod field’s value.



12017
12018
12019
12020
// File 'service/s3/api.go', line 12017

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.



12023
12024
12025
12026
// File 'service/s3/api.go', line 12023

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.



12036
12037
12038
12039
// File 'service/s3/api.go', line 12036

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.



12042
12043
12044
12045
// File 'service/s3/api.go', line 12042

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.



12048
12049
12050
12051
// File 'service/s3/api.go', line 12048

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.



12054
12055
12056
12057
// File 'service/s3/api.go', line 12054

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”.



11981
11982
11983
// File 'service/s3/api.go', line 11981

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.



11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
// File 'service/s3/api.go', line 11995

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 }