Struct: s3.Object

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

Overview

An object consists of data and its descriptive metadata.

Implemented Interfaces

s3crypto.Cipher, s3manager.ReadSeekerWriteTo, s3manager.WriterReadFrom

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

ETag *string `type:"string"`

The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. The ETag may or may not be an MD5 digest of the object data. Whether or not it is depends on how the object was created and how it is encrypted as described below:

  • Objects created by the PUT Object, POST Object, or Copy operation, or through the AWS Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object data.

  • Objects created by the PUT Object, POST Object, or Copy operation, or through the AWS Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object data.

  • If an object is created by either the Multipart Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the method of encryption.

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

The name that you assign to an object. You use the object key to retrieve the object.

LastModified *time.Time `type:"timestamp"`

Creation date of the object.

Owner *Owner `type:"structure"`

The owner of the object

Size *int64 `type:"integer"`

Size in bytes of the object

StorageClass *string `type:"string" enum:"ObjectStorageClass"`

The class of storage used to store the object.

_ struct{} `type:"structure"`

Method Details

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



18562
18563
18564
// File 'service/s3/api.go', line 18562

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

func (s *Object) SetETag(v string) *Object

SetETag sets the ETag field’s value.



18567
18568
18569
18570
// File 'service/s3/api.go', line 18567

func (s *Object) SetETag(v string) *Object { s.ETag = &v return s }

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

SetKey sets the Key field’s value.



18573
18574
18575
18576
// File 'service/s3/api.go', line 18573

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

func (s *Object) SetLastModified(v time.Time) *Object

SetLastModified sets the LastModified field’s value.



18579
18580
18581
18582
// File 'service/s3/api.go', line 18579

func (s *Object) SetLastModified(v time.Time) *Object { s.LastModified = &v return s }

func (s *Object) SetOwner(v *Owner) *Object

SetOwner sets the Owner field’s value.



18585
18586
18587
18588
// File 'service/s3/api.go', line 18585

func (s *Object) SetOwner(v *Owner) *Object { s.Owner = v return s }

func (s *Object) SetSize(v int64) *Object

SetSize sets the Size field’s value.



18591
18592
18593
18594
// File 'service/s3/api.go', line 18591

func (s *Object) SetSize(v int64) *Object { s.Size = &v return s }

func (s *Object) SetStorageClass(v string) *Object

SetStorageClass sets the StorageClass field’s value.



18597
18598
18599
18600
// File 'service/s3/api.go', line 18597

func (s *Object) SetStorageClass(v string) *Object { s.StorageClass = &v return s }

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



18553
18554
18555
// File 'service/s3/api.go', line 18553

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