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



7487
7488
7489
// File 'service/s3/api.go', line 7487

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

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

SetBucket sets the Bucket field’s value.



7517
7518
7519
7520
// File 'service/s3/api.go', line 7517

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.



7530
7531
7532
7533
// File 'service/s3/api.go', line 7530

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.



7536
7537
7538
7539
// File 'service/s3/api.go', line 7536

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



7478
7479
7480
// File 'service/s3/api.go', line 7478

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.



7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
// File 'service/s3/api.go', line 7492

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 }