@@ -20,6 +20,8 @@ type LogsArchiveDestinationS3 struct {
2020 Integration LogsArchiveIntegrationS3 `json:"integration"`
2121 // The archive path.
2222 Path * string `json:"path,omitempty"`
23+ // The storage class where the archive will be stored.
24+ StorageClass * LogsArchiveStorageClassS3Type `json:"storage_class,omitempty"`
2325 // Type of the S3 archive destination.
2426 Type LogsArchiveDestinationS3Type `json:"type"`
2527 // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
@@ -35,6 +37,8 @@ func NewLogsArchiveDestinationS3(bucket string, integration LogsArchiveIntegrati
3537 this := LogsArchiveDestinationS3 {}
3638 this .Bucket = bucket
3739 this .Integration = integration
40+ var storageClass LogsArchiveStorageClassS3Type = LOGSARCHIVESTORAGECLASSS3TYPE_STANDARD
41+ this .StorageClass = & storageClass
3842 this .Type = typeVar
3943 return & this
4044}
@@ -44,6 +48,8 @@ func NewLogsArchiveDestinationS3(bucket string, integration LogsArchiveIntegrati
4448// but it doesn't guarantee that properties required by API are set.
4549func NewLogsArchiveDestinationS3WithDefaults () * LogsArchiveDestinationS3 {
4650 this := LogsArchiveDestinationS3 {}
51+ var storageClass LogsArchiveStorageClassS3Type = LOGSARCHIVESTORAGECLASSS3TYPE_STANDARD
52+ this .StorageClass = & storageClass
4753 var typeVar LogsArchiveDestinationS3Type = LOGSARCHIVEDESTINATIONS3TYPE_S3
4854 this .Type = typeVar
4955 return & this
@@ -151,6 +157,34 @@ func (o *LogsArchiveDestinationS3) SetPath(v string) {
151157 o .Path = & v
152158}
153159
160+ // GetStorageClass returns the StorageClass field value if set, zero value otherwise.
161+ func (o * LogsArchiveDestinationS3 ) GetStorageClass () LogsArchiveStorageClassS3Type {
162+ if o == nil || o .StorageClass == nil {
163+ var ret LogsArchiveStorageClassS3Type
164+ return ret
165+ }
166+ return * o .StorageClass
167+ }
168+
169+ // GetStorageClassOk returns a tuple with the StorageClass field value if set, nil otherwise
170+ // and a boolean to check if the value has been set.
171+ func (o * LogsArchiveDestinationS3 ) GetStorageClassOk () (* LogsArchiveStorageClassS3Type , bool ) {
172+ if o == nil || o .StorageClass == nil {
173+ return nil , false
174+ }
175+ return o .StorageClass , true
176+ }
177+
178+ // HasStorageClass returns a boolean if a field has been set.
179+ func (o * LogsArchiveDestinationS3 ) HasStorageClass () bool {
180+ return o != nil && o .StorageClass != nil
181+ }
182+
183+ // SetStorageClass gets a reference to the given LogsArchiveStorageClassS3Type and assigns it to the StorageClass field.
184+ func (o * LogsArchiveDestinationS3 ) SetStorageClass (v LogsArchiveStorageClassS3Type ) {
185+ o .StorageClass = & v
186+ }
187+
154188// GetType returns the Type field value.
155189func (o * LogsArchiveDestinationS3 ) GetType () LogsArchiveDestinationS3Type {
156190 if o == nil {
@@ -188,6 +222,9 @@ func (o LogsArchiveDestinationS3) MarshalJSON() ([]byte, error) {
188222 if o .Path != nil {
189223 toSerialize ["path" ] = o .Path
190224 }
225+ if o .StorageClass != nil {
226+ toSerialize ["storage_class" ] = o .StorageClass
227+ }
191228 toSerialize ["type" ] = o .Type
192229
193230 for key , value := range o .AdditionalProperties {
@@ -199,11 +236,12 @@ func (o LogsArchiveDestinationS3) MarshalJSON() ([]byte, error) {
199236// UnmarshalJSON deserializes the given payload.
200237func (o * LogsArchiveDestinationS3 ) UnmarshalJSON (bytes []byte ) (err error ) {
201238 all := struct {
202- Bucket * string `json:"bucket"`
203- Encryption * LogsArchiveEncryptionS3 `json:"encryption,omitempty"`
204- Integration * LogsArchiveIntegrationS3 `json:"integration"`
205- Path * string `json:"path,omitempty"`
206- Type * LogsArchiveDestinationS3Type `json:"type"`
239+ Bucket * string `json:"bucket"`
240+ Encryption * LogsArchiveEncryptionS3 `json:"encryption,omitempty"`
241+ Integration * LogsArchiveIntegrationS3 `json:"integration"`
242+ Path * string `json:"path,omitempty"`
243+ StorageClass * LogsArchiveStorageClassS3Type `json:"storage_class,omitempty"`
244+ Type * LogsArchiveDestinationS3Type `json:"type"`
207245 }{}
208246 if err = datadog .Unmarshal (bytes , & all ); err != nil {
209247 return datadog .Unmarshal (bytes , & o .UnparsedObject )
@@ -219,7 +257,7 @@ func (o *LogsArchiveDestinationS3) UnmarshalJSON(bytes []byte) (err error) {
219257 }
220258 additionalProperties := make (map [string ]interface {})
221259 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
222- datadog .DeleteKeys (additionalProperties , & []string {"bucket" , "encryption" , "integration" , "path" , "type" })
260+ datadog .DeleteKeys (additionalProperties , & []string {"bucket" , "encryption" , "integration" , "path" , "storage_class" , " type" })
223261 } else {
224262 return err
225263 }
@@ -235,6 +273,11 @@ func (o *LogsArchiveDestinationS3) UnmarshalJSON(bytes []byte) (err error) {
235273 }
236274 o .Integration = * all .Integration
237275 o .Path = all .Path
276+ if all .StorageClass != nil && ! all .StorageClass .IsValid () {
277+ hasInvalidField = true
278+ } else {
279+ o .StorageClass = all .StorageClass
280+ }
238281 if ! all .Type .IsValid () {
239282 hasInvalidField = true
240283 } else {
0 commit comments