Struct: s3.AddLegalHoldInput

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"`

Bucket is a required field

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

Key is a required field

RetentionLegalHoldId *string `location:"querystring" locationName:"add" type:"string" required:"true"`

RetentionLegalHoldId is a required field

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

Method Details

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



7336
7337
7338
// File 'service/s3/api.go', line 7336

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

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

SetBucket sets the Bucket field's value.



7366
7367
7368
7369
// File 'service/s3/api.go', line 7366

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

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

SetKey sets the Key field's value.



7379
7380
7381
7382
// File 'service/s3/api.go', line 7379

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

func (s *AddLegalHoldInput) SetRetentionLegalHoldId(v string) *AddLegalHoldInput

SetRetentionLegalHoldId sets the RetentionLegalHoldId field's value.



7385
7386
7387
7388
// File 'service/s3/api.go', line 7385

func (s *AddLegalHoldInput) SetRetentionLegalHoldId(v string) *AddLegalHoldInput { s.RetentionLegalHoldId = &v return s }

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



7327
7328
7329
// File 'service/s3/api.go', line 7327

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

func (s *AddLegalHoldInput) Validate() error

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



7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
// File 'service/s3/api.go', line 7341

func (s *AddLegalHoldInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "AddLegalHoldInput"} 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 s.RetentionLegalHoldId == nil { invalidParams.Add(request.NewErrParamRequired("RetentionLegalHoldId")) } if invalidParams.Len() > 0 { return invalidParams } return nil }