Struct: s3.Tag

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

Overview

A container of a key value name pair.

Implemented Interfaces

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

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

Key *string `min:"1" type:"string" required:"true"`

Name of the object key.

Key is a required field

Value *string `type:"string" required:"true"`

Value of the tag.

Value is a required field

_ struct{} `type:"structure"`

Method Details

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



21837
21838
21839
// File 'service/s3/api.go', line 21837

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

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

SetKey sets the Key field's value.



21861
21862
21863
21864
// File 'service/s3/api.go', line 21861

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

func (s *Tag) SetValue(v string) *Tag

SetValue sets the Value field's value.



21867
21868
21869
21870
// File 'service/s3/api.go', line 21867

func (s *Tag) SetValue(v string) *Tag { s.Value = &v return s }

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



21828
21829
21830
// File 'service/s3/api.go', line 21828

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

func (s *Tag) Validate() error

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



21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
// File 'service/s3/api.go', line 21842

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