Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-03-06 21:28:34.346014",
"spec_repo_commit": "d6a6faf6"
"regenerated": "2025-03-10 19:35:54.501123",
"spec_repo_commit": "7d0b49f6"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-03-06 21:28:34.361861",
"spec_repo_commit": "d6a6faf6"
"regenerated": "2025-03-10 19:35:54.516849",
"spec_repo_commit": "7d0b49f6"
}
}
}
19 changes: 19 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18459,6 +18459,8 @@ components:
path:
description: The archive path.
type: string
storage_class:
$ref: '#/components/schemas/LogsArchiveStorageClassS3Type'
type:
$ref: '#/components/schemas/LogsArchiveDestinationS3Type'
required:
Expand Down Expand Up @@ -18602,6 +18604,23 @@ components:
- WORKING
- FAILING
- WORKING_AUTH_LEGACY
LogsArchiveStorageClassS3Type:
default: STANDARD
description: The storage class where the archive will be stored.
enum:
- STANDARD
- STANDARD_IA
- ONEZONE_IA
- INTELLIGENT_TIERING
- GLACIER_IR
example: STANDARD
type: string
x-enum-varnames:
- STANDARD
- STANDARD_IA
- ONEZONE_IA
- INTELLIGENT_TIERING
- GLACIER_IR
LogsArchives:
description: The available archives.
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
LogsArchiveDestinationS3.JSON_PROPERTY_ENCRYPTION,
LogsArchiveDestinationS3.JSON_PROPERTY_INTEGRATION,
LogsArchiveDestinationS3.JSON_PROPERTY_PATH,
LogsArchiveDestinationS3.JSON_PROPERTY_STORAGE_CLASS,
LogsArchiveDestinationS3.JSON_PROPERTY_TYPE
})
@jakarta.annotation.Generated(
Expand All @@ -41,6 +42,9 @@ public class LogsArchiveDestinationS3 {
public static final String JSON_PROPERTY_PATH = "path";
private String path;

public static final String JSON_PROPERTY_STORAGE_CLASS = "storage_class";
private LogsArchiveStorageClassS3Type storageClass = LogsArchiveStorageClassS3Type.STANDARD;

public static final String JSON_PROPERTY_TYPE = "type";
private LogsArchiveDestinationS3Type type = LogsArchiveDestinationS3Type.S3;

Expand Down Expand Up @@ -144,6 +148,31 @@ public void setPath(String path) {
this.path = path;
}

public LogsArchiveDestinationS3 storageClass(LogsArchiveStorageClassS3Type storageClass) {
this.storageClass = storageClass;
this.unparsed |= !storageClass.isValid();
return this;
}

/**
* The storage class where the archive will be stored.
*
* @return storageClass
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_STORAGE_CLASS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public LogsArchiveStorageClassS3Type getStorageClass() {
return storageClass;
}

public void setStorageClass(LogsArchiveStorageClassS3Type storageClass) {
if (!storageClass.isValid()) {
this.unparsed = true;
}
this.storageClass = storageClass;
}

public LogsArchiveDestinationS3 type(LogsArchiveDestinationS3Type type) {
this.type = type;
this.unparsed |= !type.isValid();
Expand Down Expand Up @@ -228,13 +257,15 @@ public boolean equals(Object o) {
&& Objects.equals(this.encryption, logsArchiveDestinationS3.encryption)
&& Objects.equals(this.integration, logsArchiveDestinationS3.integration)
&& Objects.equals(this.path, logsArchiveDestinationS3.path)
&& Objects.equals(this.storageClass, logsArchiveDestinationS3.storageClass)
&& Objects.equals(this.type, logsArchiveDestinationS3.type)
&& Objects.equals(this.additionalProperties, logsArchiveDestinationS3.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(bucket, encryption, integration, path, type, additionalProperties);
return Objects.hash(
bucket, encryption, integration, path, storageClass, type, additionalProperties);
}

@Override
Expand All @@ -245,6 +276,7 @@ public String toString() {
sb.append(" encryption: ").append(toIndentedString(encryption)).append("\n");
sb.append(" integration: ").append(toIndentedString(integration)).append("\n");
sb.append(" path: ").append(toIndentedString(path)).append("\n");
sb.append(" storageClass: ").append(toIndentedString(storageClass)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2019-Present Datadog, Inc.
*/

package com.datadog.api.client.v2.model;

import com.datadog.api.client.ModelEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/** The storage class where the archive will be stored. */
@JsonSerialize(using = LogsArchiveStorageClassS3Type.LogsArchiveStorageClassS3TypeSerializer.class)
public class LogsArchiveStorageClassS3Type extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(
Arrays.asList(
"STANDARD", "STANDARD_IA", "ONEZONE_IA", "INTELLIGENT_TIERING", "GLACIER_IR"));

public static final LogsArchiveStorageClassS3Type STANDARD =
new LogsArchiveStorageClassS3Type("STANDARD");
public static final LogsArchiveStorageClassS3Type STANDARD_IA =
new LogsArchiveStorageClassS3Type("STANDARD_IA");
public static final LogsArchiveStorageClassS3Type ONEZONE_IA =
new LogsArchiveStorageClassS3Type("ONEZONE_IA");
public static final LogsArchiveStorageClassS3Type INTELLIGENT_TIERING =
new LogsArchiveStorageClassS3Type("INTELLIGENT_TIERING");
public static final LogsArchiveStorageClassS3Type GLACIER_IR =
new LogsArchiveStorageClassS3Type("GLACIER_IR");

LogsArchiveStorageClassS3Type(String value) {
super(value, allowedValues);
}

public static class LogsArchiveStorageClassS3TypeSerializer
extends StdSerializer<LogsArchiveStorageClassS3Type> {
public LogsArchiveStorageClassS3TypeSerializer(Class<LogsArchiveStorageClassS3Type> t) {
super(t);
}

public LogsArchiveStorageClassS3TypeSerializer() {
this(null);
}

@Override
public void serialize(
LogsArchiveStorageClassS3Type value, JsonGenerator jgen, SerializerProvider provider)
throws IOException, JsonProcessingException {
jgen.writeObject(value.value);
}
}

@JsonCreator
public static LogsArchiveStorageClassS3Type fromValue(String value) {
return new LogsArchiveStorageClassS3Type(value);
}
}