diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index f0e8d45c0f9..5f2825cd497 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -146152,6 +146152,12 @@ components: TenancyConfigDataAttributes: description: Attributes of an OCI tenancy integration configuration, including authentication details, region settings, and collection options. properties: + account_tags: + description: List of Datadog tags applied to data collected from the tenancy. + items: + description: A Datadog tag in key:value format (for example, env:prod). + type: string + type: array billing_plan_id: description: The identifier of the billing plan associated with the OCI tenancy. format: int32 @@ -146167,9 +146173,23 @@ components: dd_compartment_id: description: The OCID of the OCI compartment used by the Datadog integration stack. type: string + dd_iac_version: + description: The version of the Datadog infrastructure-as-code stack applied to the tenancy (for example, 1.2.0). + type: string dd_stack_id: description: The OCID of the OCI Resource Manager stack used by the Datadog integration. type: string + defined_tags: + description: List of OCI defined tags applied to the Datadog-managed connector hubs. + items: + description: An OCI defined tag in `Namespace.key:value` format (for example, `Operations.CostCenter:42`). + type: string + type: array + events_collection_enabled: + description: Whether resource change events collection from OCI is enabled for the tenancy. + type: boolean + grace_resource: + $ref: "#/components/schemas/TenancyConfigDataAttributesGraceResource" home_region: description: The home region of the OCI tenancy (for example, us-ashburn-1). type: string @@ -146185,6 +146205,9 @@ components: resource_collection_enabled: description: Whether resource collection from OCI is enabled for the tenancy. type: boolean + service_quota_collection_enabled: + description: Whether service quota collection from OCI is enabled for the tenancy. + type: boolean tenancy_name: description: The human-readable name of the OCI tenancy. type: string @@ -146192,6 +146215,16 @@ components: description: The OCID of the OCI user used by the Datadog integration for authentication. type: string type: object + TenancyConfigDataAttributesGraceResource: + description: Access control details for the tenancy configuration, used to determine whether the requesting user can edit it. + properties: + resource_id: + description: The identifier of the access control resource for the tenancy configuration. + type: string + user_can_edit: + description: Whether the requesting user has permission to edit the tenancy configuration. + type: boolean + type: object TenancyConfigDataAttributesLogsConfig: description: Log collection configuration for an OCI tenancy, indicating which compartments and services have log collection enabled. properties: @@ -146210,6 +146243,15 @@ components: description: An OCI service name for which log collection is enabled (for example, compute). type: string type: array + resource_tag_filters: + additionalProperties: + description: List of resource tag filters for the OCI service. + items: + description: A resource tag filter in key:value format (for example, env:prod). + type: string + type: array + description: Map of OCI service names to the resource tag filters that scope log collection for that service. + type: object type: object TenancyConfigDataAttributesMetricsConfig: description: Metrics collection configuration for an OCI tenancy, indicating which compartments and services are included or excluded. @@ -146229,27 +146271,39 @@ components: description: An OCI service name excluded from metrics collection (for example, compute). type: string type: array + resource_tag_filters: + additionalProperties: + description: List of resource tag filters for the OCI service. + items: + description: A resource tag filter in key:value format (for example, env:prod). + type: string + type: array + description: Map of OCI service names to the resource tag filters that scope metrics collection for that service. + type: object type: object TenancyConfigDataAttributesRegionsConfig: description: Region configuration for an OCI tenancy, indicating which regions are available, enabled, or disabled for data collection. properties: available: - description: List of OCI regions available for data collection in the tenancy. + description: List of OCI regions available for data collection in the tenancy. Returns `null` when no regions are set. items: description: An OCI region identifier (for example, us-ashburn-1). type: string + nullable: true type: array disabled: - description: List of OCI regions explicitly disabled for data collection. + description: List of OCI regions explicitly disabled for data collection. Returns `null` when no regions are set. items: description: An OCI region identifier (for example, us-phoenix-1). type: string + nullable: true type: array enabled: - description: List of OCI regions enabled for data collection. + description: List of OCI regions enabled for data collection. Returns `null` when no regions are set. items: description: An OCI region identifier (for example, us-ashburn-1). type: string + nullable: true type: array type: object TenancyConfigList: @@ -146257,10 +146311,20 @@ components: example: data: - attributes: + account_tags: + - env:prod + billing_plan_id: 2 config_version: 2 cost_collection_enabled: true dd_compartment_id: ocid.compartment.test + dd_iac_version: "1.2.0" dd_stack_id: ocid.stack.test + defined_tags: + - Operations.CostCenter:42 + events_collection_enabled: false + grace_resource: + resource_id: oci-integration-configuration:ocid.tenancy.test + user_can_edit: true home_region: us-ashburn-1 logs_config: compartment_tag_filters: @@ -146268,12 +146332,19 @@ components: enabled: true enabled_services: - compute + resource_tag_filters: + compute: + - env:prod metrics_config: compartment_tag_filters: - compartment.test enabled: true excluded_services: - compute + resource_tag_filters: + compute: + - env:prod + parent_tenancy_name: parent-tenancy regions_config: available: - us-ashburn-1 @@ -146283,6 +146354,8 @@ components: enabled: - us-ashburn-1 resource_collection_enabled: true + service_quota_collection_enabled: false + tenancy_name: test-tenancy user_ocid: ocid.user.test id: ocid.tenancy.test type: oci_tenancy diff --git a/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributes.java index a9cf4e7cc9b..25f440ddb19 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributes.java @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; @@ -21,17 +23,23 @@ * settings, and collection options. */ @JsonPropertyOrder({ + TenancyConfigDataAttributes.JSON_PROPERTY_ACCOUNT_TAGS, TenancyConfigDataAttributes.JSON_PROPERTY_BILLING_PLAN_ID, TenancyConfigDataAttributes.JSON_PROPERTY_CONFIG_VERSION, TenancyConfigDataAttributes.JSON_PROPERTY_COST_COLLECTION_ENABLED, TenancyConfigDataAttributes.JSON_PROPERTY_DD_COMPARTMENT_ID, + TenancyConfigDataAttributes.JSON_PROPERTY_DD_IAC_VERSION, TenancyConfigDataAttributes.JSON_PROPERTY_DD_STACK_ID, + TenancyConfigDataAttributes.JSON_PROPERTY_DEFINED_TAGS, + TenancyConfigDataAttributes.JSON_PROPERTY_EVENTS_COLLECTION_ENABLED, + TenancyConfigDataAttributes.JSON_PROPERTY_GRACE_RESOURCE, TenancyConfigDataAttributes.JSON_PROPERTY_HOME_REGION, TenancyConfigDataAttributes.JSON_PROPERTY_LOGS_CONFIG, TenancyConfigDataAttributes.JSON_PROPERTY_METRICS_CONFIG, TenancyConfigDataAttributes.JSON_PROPERTY_PARENT_TENANCY_NAME, TenancyConfigDataAttributes.JSON_PROPERTY_REGIONS_CONFIG, TenancyConfigDataAttributes.JSON_PROPERTY_RESOURCE_COLLECTION_ENABLED, + TenancyConfigDataAttributes.JSON_PROPERTY_SERVICE_QUOTA_COLLECTION_ENABLED, TenancyConfigDataAttributes.JSON_PROPERTY_TENANCY_NAME, TenancyConfigDataAttributes.JSON_PROPERTY_USER_OCID }) @@ -39,6 +47,9 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class TenancyConfigDataAttributes { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_TAGS = "account_tags"; + private List accountTags = null; + public static final String JSON_PROPERTY_BILLING_PLAN_ID = "billing_plan_id"; private Integer billingPlanId; @@ -51,9 +62,21 @@ public class TenancyConfigDataAttributes { public static final String JSON_PROPERTY_DD_COMPARTMENT_ID = "dd_compartment_id"; private String ddCompartmentId; + public static final String JSON_PROPERTY_DD_IAC_VERSION = "dd_iac_version"; + private String ddIacVersion; + public static final String JSON_PROPERTY_DD_STACK_ID = "dd_stack_id"; private String ddStackId; + public static final String JSON_PROPERTY_DEFINED_TAGS = "defined_tags"; + private List definedTags = null; + + public static final String JSON_PROPERTY_EVENTS_COLLECTION_ENABLED = "events_collection_enabled"; + private Boolean eventsCollectionEnabled; + + public static final String JSON_PROPERTY_GRACE_RESOURCE = "grace_resource"; + private TenancyConfigDataAttributesGraceResource graceResource; + public static final String JSON_PROPERTY_HOME_REGION = "home_region"; private String homeRegion; @@ -73,12 +96,45 @@ public class TenancyConfigDataAttributes { "resource_collection_enabled"; private Boolean resourceCollectionEnabled; + public static final String JSON_PROPERTY_SERVICE_QUOTA_COLLECTION_ENABLED = + "service_quota_collection_enabled"; + private Boolean serviceQuotaCollectionEnabled; + public static final String JSON_PROPERTY_TENANCY_NAME = "tenancy_name"; private String tenancyName; public static final String JSON_PROPERTY_USER_OCID = "user_ocid"; private String userOcid; + public TenancyConfigDataAttributes accountTags(List accountTags) { + this.accountTags = accountTags; + return this; + } + + public TenancyConfigDataAttributes addAccountTagsItem(String accountTagsItem) { + if (this.accountTags == null) { + this.accountTags = new ArrayList<>(); + } + this.accountTags.add(accountTagsItem); + return this; + } + + /** + * List of Datadog tags applied to data collected from the tenancy. + * + * @return accountTags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAccountTags() { + return accountTags; + } + + public void setAccountTags(List accountTags) { + this.accountTags = accountTags; + } + public TenancyConfigDataAttributes billingPlanId(Integer billingPlanId) { this.billingPlanId = billingPlanId; return this; @@ -163,6 +219,28 @@ public void setDdCompartmentId(String ddCompartmentId) { this.ddCompartmentId = ddCompartmentId; } + public TenancyConfigDataAttributes ddIacVersion(String ddIacVersion) { + this.ddIacVersion = ddIacVersion; + return this; + } + + /** + * The version of the Datadog infrastructure-as-code stack applied to the tenancy (for example, + * 1.2.0). + * + * @return ddIacVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DD_IAC_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDdIacVersion() { + return ddIacVersion; + } + + public void setDdIacVersion(String ddIacVersion) { + this.ddIacVersion = ddIacVersion; + } + public TenancyConfigDataAttributes ddStackId(String ddStackId) { this.ddStackId = ddStackId; return this; @@ -184,6 +262,83 @@ public void setDdStackId(String ddStackId) { this.ddStackId = ddStackId; } + public TenancyConfigDataAttributes definedTags(List definedTags) { + this.definedTags = definedTags; + return this; + } + + public TenancyConfigDataAttributes addDefinedTagsItem(String definedTagsItem) { + if (this.definedTags == null) { + this.definedTags = new ArrayList<>(); + } + this.definedTags.add(definedTagsItem); + return this; + } + + /** + * List of OCI defined tags applied to the Datadog-managed connector hubs. + * + * @return definedTags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFINED_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDefinedTags() { + return definedTags; + } + + public void setDefinedTags(List definedTags) { + this.definedTags = definedTags; + } + + public TenancyConfigDataAttributes eventsCollectionEnabled(Boolean eventsCollectionEnabled) { + this.eventsCollectionEnabled = eventsCollectionEnabled; + return this; + } + + /** + * Whether resource change events collection from OCI is enabled for the tenancy. + * + * @return eventsCollectionEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENTS_COLLECTION_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEventsCollectionEnabled() { + return eventsCollectionEnabled; + } + + public void setEventsCollectionEnabled(Boolean eventsCollectionEnabled) { + this.eventsCollectionEnabled = eventsCollectionEnabled; + } + + public TenancyConfigDataAttributes graceResource( + TenancyConfigDataAttributesGraceResource graceResource) { + this.graceResource = graceResource; + this.unparsed |= graceResource.unparsed; + return this; + } + + /** + * Access control details for the tenancy configuration, used to determine whether the requesting + * user can edit it. + * + * @return graceResource + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GRACE_RESOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TenancyConfigDataAttributesGraceResource getGraceResource() { + return graceResource; + } + + public void setGraceResource(TenancyConfigDataAttributesGraceResource graceResource) { + this.graceResource = graceResource; + if (graceResource != null) { + this.unparsed |= graceResource.unparsed; + } + } + public TenancyConfigDataAttributes homeRegion(String homeRegion) { this.homeRegion = homeRegion; return this; @@ -327,6 +482,28 @@ public void setResourceCollectionEnabled(Boolean resourceCollectionEnabled) { this.resourceCollectionEnabled = resourceCollectionEnabled; } + public TenancyConfigDataAttributes serviceQuotaCollectionEnabled( + Boolean serviceQuotaCollectionEnabled) { + this.serviceQuotaCollectionEnabled = serviceQuotaCollectionEnabled; + return this; + } + + /** + * Whether service quota collection from OCI is enabled for the tenancy. + * + * @return serviceQuotaCollectionEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE_QUOTA_COLLECTION_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getServiceQuotaCollectionEnabled() { + return serviceQuotaCollectionEnabled; + } + + public void setServiceQuotaCollectionEnabled(Boolean serviceQuotaCollectionEnabled) { + this.serviceQuotaCollectionEnabled = serviceQuotaCollectionEnabled; + } + public TenancyConfigDataAttributes tenancyName(String tenancyName) { this.tenancyName = tenancyName; return this; @@ -425,12 +602,18 @@ public boolean equals(Object o) { return false; } TenancyConfigDataAttributes tenancyConfigDataAttributes = (TenancyConfigDataAttributes) o; - return Objects.equals(this.billingPlanId, tenancyConfigDataAttributes.billingPlanId) + return Objects.equals(this.accountTags, tenancyConfigDataAttributes.accountTags) + && Objects.equals(this.billingPlanId, tenancyConfigDataAttributes.billingPlanId) && Objects.equals(this.configVersion, tenancyConfigDataAttributes.configVersion) && Objects.equals( this.costCollectionEnabled, tenancyConfigDataAttributes.costCollectionEnabled) && Objects.equals(this.ddCompartmentId, tenancyConfigDataAttributes.ddCompartmentId) + && Objects.equals(this.ddIacVersion, tenancyConfigDataAttributes.ddIacVersion) && Objects.equals(this.ddStackId, tenancyConfigDataAttributes.ddStackId) + && Objects.equals(this.definedTags, tenancyConfigDataAttributes.definedTags) + && Objects.equals( + this.eventsCollectionEnabled, tenancyConfigDataAttributes.eventsCollectionEnabled) + && Objects.equals(this.graceResource, tenancyConfigDataAttributes.graceResource) && Objects.equals(this.homeRegion, tenancyConfigDataAttributes.homeRegion) && Objects.equals(this.logsConfig, tenancyConfigDataAttributes.logsConfig) && Objects.equals(this.metricsConfig, tenancyConfigDataAttributes.metricsConfig) @@ -438,6 +621,9 @@ public boolean equals(Object o) { && Objects.equals(this.regionsConfig, tenancyConfigDataAttributes.regionsConfig) && Objects.equals( this.resourceCollectionEnabled, tenancyConfigDataAttributes.resourceCollectionEnabled) + && Objects.equals( + this.serviceQuotaCollectionEnabled, + tenancyConfigDataAttributes.serviceQuotaCollectionEnabled) && Objects.equals(this.tenancyName, tenancyConfigDataAttributes.tenancyName) && Objects.equals(this.userOcid, tenancyConfigDataAttributes.userOcid) && Objects.equals( @@ -447,17 +633,23 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + accountTags, billingPlanId, configVersion, costCollectionEnabled, ddCompartmentId, + ddIacVersion, ddStackId, + definedTags, + eventsCollectionEnabled, + graceResource, homeRegion, logsConfig, metricsConfig, parentTenancyName, regionsConfig, resourceCollectionEnabled, + serviceQuotaCollectionEnabled, tenancyName, userOcid, additionalProperties); @@ -467,13 +659,20 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TenancyConfigDataAttributes {\n"); + sb.append(" accountTags: ").append(toIndentedString(accountTags)).append("\n"); sb.append(" billingPlanId: ").append(toIndentedString(billingPlanId)).append("\n"); sb.append(" configVersion: ").append(toIndentedString(configVersion)).append("\n"); sb.append(" costCollectionEnabled: ") .append(toIndentedString(costCollectionEnabled)) .append("\n"); sb.append(" ddCompartmentId: ").append(toIndentedString(ddCompartmentId)).append("\n"); + sb.append(" ddIacVersion: ").append(toIndentedString(ddIacVersion)).append("\n"); sb.append(" ddStackId: ").append(toIndentedString(ddStackId)).append("\n"); + sb.append(" definedTags: ").append(toIndentedString(definedTags)).append("\n"); + sb.append(" eventsCollectionEnabled: ") + .append(toIndentedString(eventsCollectionEnabled)) + .append("\n"); + sb.append(" graceResource: ").append(toIndentedString(graceResource)).append("\n"); sb.append(" homeRegion: ").append(toIndentedString(homeRegion)).append("\n"); sb.append(" logsConfig: ").append(toIndentedString(logsConfig)).append("\n"); sb.append(" metricsConfig: ").append(toIndentedString(metricsConfig)).append("\n"); @@ -482,6 +681,9 @@ public String toString() { sb.append(" resourceCollectionEnabled: ") .append(toIndentedString(resourceCollectionEnabled)) .append("\n"); + sb.append(" serviceQuotaCollectionEnabled: ") + .append(toIndentedString(serviceQuotaCollectionEnabled)) + .append("\n"); sb.append(" tenancyName: ").append(toIndentedString(tenancyName)).append("\n"); sb.append(" userOcid: ").append(toIndentedString(userOcid)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributesGraceResource.java b/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributesGraceResource.java new file mode 100644 index 00000000000..16458d27e03 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributesGraceResource.java @@ -0,0 +1,170 @@ +/* + * 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.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Access control details for the tenancy configuration, used to determine whether the requesting + * user can edit it. + */ +@JsonPropertyOrder({ + TenancyConfigDataAttributesGraceResource.JSON_PROPERTY_RESOURCE_ID, + TenancyConfigDataAttributesGraceResource.JSON_PROPERTY_USER_CAN_EDIT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TenancyConfigDataAttributesGraceResource { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RESOURCE_ID = "resource_id"; + private String resourceId; + + public static final String JSON_PROPERTY_USER_CAN_EDIT = "user_can_edit"; + private Boolean userCanEdit; + + public TenancyConfigDataAttributesGraceResource resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * The identifier of the access control resource for the tenancy configuration. + * + * @return resourceId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public TenancyConfigDataAttributesGraceResource userCanEdit(Boolean userCanEdit) { + this.userCanEdit = userCanEdit; + return this; + } + + /** + * Whether the requesting user has permission to edit the tenancy configuration. + * + * @return userCanEdit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_CAN_EDIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUserCanEdit() { + return userCanEdit; + } + + public void setUserCanEdit(Boolean userCanEdit) { + this.userCanEdit = userCanEdit; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TenancyConfigDataAttributesGraceResource + */ + @JsonAnySetter + public TenancyConfigDataAttributesGraceResource putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TenancyConfigDataAttributesGraceResource object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TenancyConfigDataAttributesGraceResource tenancyConfigDataAttributesGraceResource = + (TenancyConfigDataAttributesGraceResource) o; + return Objects.equals(this.resourceId, tenancyConfigDataAttributesGraceResource.resourceId) + && Objects.equals(this.userCanEdit, tenancyConfigDataAttributesGraceResource.userCanEdit) + && Objects.equals( + this.additionalProperties, + tenancyConfigDataAttributesGraceResource.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(resourceId, userCanEdit, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TenancyConfigDataAttributesGraceResource {\n"); + sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); + sb.append(" userCanEdit: ").append(toIndentedString(userCanEdit)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributesLogsConfig.java b/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributesLogsConfig.java index 61a22a96620..bc52cbd3b3f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributesLogsConfig.java +++ b/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributesLogsConfig.java @@ -25,7 +25,8 @@ @JsonPropertyOrder({ TenancyConfigDataAttributesLogsConfig.JSON_PROPERTY_COMPARTMENT_TAG_FILTERS, TenancyConfigDataAttributesLogsConfig.JSON_PROPERTY_ENABLED, - TenancyConfigDataAttributesLogsConfig.JSON_PROPERTY_ENABLED_SERVICES + TenancyConfigDataAttributesLogsConfig.JSON_PROPERTY_ENABLED_SERVICES, + TenancyConfigDataAttributesLogsConfig.JSON_PROPERTY_RESOURCE_TAG_FILTERS }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -40,6 +41,9 @@ public class TenancyConfigDataAttributesLogsConfig { public static final String JSON_PROPERTY_ENABLED_SERVICES = "enabled_services"; private List enabledServices = null; + public static final String JSON_PROPERTY_RESOURCE_TAG_FILTERS = "resource_tag_filters"; + private Map> resourceTagFilters = null; + public TenancyConfigDataAttributesLogsConfig compartmentTagFilters( List compartmentTagFilters) { this.compartmentTagFilters = compartmentTagFilters; @@ -121,6 +125,38 @@ public void setEnabledServices(List enabledServices) { this.enabledServices = enabledServices; } + public TenancyConfigDataAttributesLogsConfig resourceTagFilters( + Map> resourceTagFilters) { + this.resourceTagFilters = resourceTagFilters; + return this; + } + + public TenancyConfigDataAttributesLogsConfig putResourceTagFiltersItem( + String key, List resourceTagFiltersItem) { + if (this.resourceTagFilters == null) { + this.resourceTagFilters = new HashMap<>(); + } + this.resourceTagFilters.put(key, resourceTagFiltersItem); + return this; + } + + /** + * Map of OCI service names to the resource tag filters that scope log collection for that + * service. + * + * @return resourceTagFilters + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE_TAG_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getResourceTagFilters() { + return resourceTagFilters; + } + + public void setResourceTagFilters(Map> resourceTagFilters) { + this.resourceTagFilters = resourceTagFilters; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -183,13 +219,16 @@ public boolean equals(Object o) { && Objects.equals(this.enabled, tenancyConfigDataAttributesLogsConfig.enabled) && Objects.equals( this.enabledServices, tenancyConfigDataAttributesLogsConfig.enabledServices) + && Objects.equals( + this.resourceTagFilters, tenancyConfigDataAttributesLogsConfig.resourceTagFilters) && Objects.equals( this.additionalProperties, tenancyConfigDataAttributesLogsConfig.additionalProperties); } @Override public int hashCode() { - return Objects.hash(compartmentTagFilters, enabled, enabledServices, additionalProperties); + return Objects.hash( + compartmentTagFilters, enabled, enabledServices, resourceTagFilters, additionalProperties); } @Override @@ -201,6 +240,7 @@ public String toString() { .append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); sb.append(" enabledServices: ").append(toIndentedString(enabledServices)).append("\n"); + sb.append(" resourceTagFilters: ").append(toIndentedString(resourceTagFilters)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributesMetricsConfig.java b/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributesMetricsConfig.java index d34c8a1173e..84e57af961a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributesMetricsConfig.java +++ b/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributesMetricsConfig.java @@ -25,7 +25,8 @@ @JsonPropertyOrder({ TenancyConfigDataAttributesMetricsConfig.JSON_PROPERTY_COMPARTMENT_TAG_FILTERS, TenancyConfigDataAttributesMetricsConfig.JSON_PROPERTY_ENABLED, - TenancyConfigDataAttributesMetricsConfig.JSON_PROPERTY_EXCLUDED_SERVICES + TenancyConfigDataAttributesMetricsConfig.JSON_PROPERTY_EXCLUDED_SERVICES, + TenancyConfigDataAttributesMetricsConfig.JSON_PROPERTY_RESOURCE_TAG_FILTERS }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -40,6 +41,9 @@ public class TenancyConfigDataAttributesMetricsConfig { public static final String JSON_PROPERTY_EXCLUDED_SERVICES = "excluded_services"; private List excludedServices = null; + public static final String JSON_PROPERTY_RESOURCE_TAG_FILTERS = "resource_tag_filters"; + private Map> resourceTagFilters = null; + public TenancyConfigDataAttributesMetricsConfig compartmentTagFilters( List compartmentTagFilters) { this.compartmentTagFilters = compartmentTagFilters; @@ -122,6 +126,38 @@ public void setExcludedServices(List excludedServices) { this.excludedServices = excludedServices; } + public TenancyConfigDataAttributesMetricsConfig resourceTagFilters( + Map> resourceTagFilters) { + this.resourceTagFilters = resourceTagFilters; + return this; + } + + public TenancyConfigDataAttributesMetricsConfig putResourceTagFiltersItem( + String key, List resourceTagFiltersItem) { + if (this.resourceTagFilters == null) { + this.resourceTagFilters = new HashMap<>(); + } + this.resourceTagFilters.put(key, resourceTagFiltersItem); + return this; + } + + /** + * Map of OCI service names to the resource tag filters that scope metrics collection for that + * service. + * + * @return resourceTagFilters + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE_TAG_FILTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map> getResourceTagFilters() { + return resourceTagFilters; + } + + public void setResourceTagFilters(Map> resourceTagFilters) { + this.resourceTagFilters = resourceTagFilters; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -185,6 +221,8 @@ public boolean equals(Object o) { && Objects.equals(this.enabled, tenancyConfigDataAttributesMetricsConfig.enabled) && Objects.equals( this.excludedServices, tenancyConfigDataAttributesMetricsConfig.excludedServices) + && Objects.equals( + this.resourceTagFilters, tenancyConfigDataAttributesMetricsConfig.resourceTagFilters) && Objects.equals( this.additionalProperties, tenancyConfigDataAttributesMetricsConfig.additionalProperties); @@ -192,7 +230,8 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(compartmentTagFilters, enabled, excludedServices, additionalProperties); + return Objects.hash( + compartmentTagFilters, enabled, excludedServices, resourceTagFilters, additionalProperties); } @Override @@ -204,6 +243,7 @@ public String toString() { .append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); sb.append(" excludedServices: ").append(toIndentedString(excludedServices)).append("\n"); + sb.append(" resourceTagFilters: ").append(toIndentedString(resourceTagFilters)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributesRegionsConfig.java b/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributesRegionsConfig.java index d0bcc137e53..09af01bad97 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributesRegionsConfig.java +++ b/src/main/java/com/datadog/api/client/v2/model/TenancyConfigDataAttributesRegionsConfig.java @@ -17,6 +17,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; /** * Region configuration for an OCI tenancy, indicating which regions are available, enabled, or @@ -32,101 +33,146 @@ public class TenancyConfigDataAttributesRegionsConfig { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_AVAILABLE = "available"; - private List available = null; + private JsonNullable> available = JsonNullable.>undefined(); public static final String JSON_PROPERTY_DISABLED = "disabled"; - private List disabled = null; + private JsonNullable> disabled = JsonNullable.>undefined(); public static final String JSON_PROPERTY_ENABLED = "enabled"; - private List enabled = null; + private JsonNullable> enabled = JsonNullable.>undefined(); public TenancyConfigDataAttributesRegionsConfig available(List available) { - this.available = available; + this.available = JsonNullable.>of(available); return this; } public TenancyConfigDataAttributesRegionsConfig addAvailableItem(String availableItem) { - if (this.available == null) { - this.available = new ArrayList<>(); + if (this.available == null || !this.available.isPresent()) { + this.available = JsonNullable.>of(new ArrayList<>()); + } + try { + this.available.get().add(availableItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present } - this.available.add(availableItem); return this; } /** - * List of OCI regions available for data collection in the tenancy. + * List of OCI regions available for data collection in the tenancy. Returns null + * when no regions are set. * * @return available */ @jakarta.annotation.Nullable + @JsonIgnore + public List getAvailable() { + return available.orElse(null); + } + @JsonProperty(JSON_PROPERTY_AVAILABLE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAvailable() { + public JsonNullable> getAvailable_JsonNullable() { return available; } - public void setAvailable(List available) { + @JsonProperty(JSON_PROPERTY_AVAILABLE) + public void setAvailable_JsonNullable(JsonNullable> available) { this.available = available; } + public void setAvailable(List available) { + this.available = JsonNullable.>of(available); + } + public TenancyConfigDataAttributesRegionsConfig disabled(List disabled) { - this.disabled = disabled; + this.disabled = JsonNullable.>of(disabled); return this; } public TenancyConfigDataAttributesRegionsConfig addDisabledItem(String disabledItem) { - if (this.disabled == null) { - this.disabled = new ArrayList<>(); + if (this.disabled == null || !this.disabled.isPresent()) { + this.disabled = JsonNullable.>of(new ArrayList<>()); + } + try { + this.disabled.get().add(disabledItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present } - this.disabled.add(disabledItem); return this; } /** - * List of OCI regions explicitly disabled for data collection. + * List of OCI regions explicitly disabled for data collection. Returns null when no + * regions are set. * * @return disabled */ @jakarta.annotation.Nullable + @JsonIgnore + public List getDisabled() { + return disabled.orElse(null); + } + @JsonProperty(JSON_PROPERTY_DISABLED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDisabled() { + public JsonNullable> getDisabled_JsonNullable() { return disabled; } - public void setDisabled(List disabled) { + @JsonProperty(JSON_PROPERTY_DISABLED) + public void setDisabled_JsonNullable(JsonNullable> disabled) { this.disabled = disabled; } + public void setDisabled(List disabled) { + this.disabled = JsonNullable.>of(disabled); + } + public TenancyConfigDataAttributesRegionsConfig enabled(List enabled) { - this.enabled = enabled; + this.enabled = JsonNullable.>of(enabled); return this; } public TenancyConfigDataAttributesRegionsConfig addEnabledItem(String enabledItem) { - if (this.enabled == null) { - this.enabled = new ArrayList<>(); + if (this.enabled == null || !this.enabled.isPresent()) { + this.enabled = JsonNullable.>of(new ArrayList<>()); + } + try { + this.enabled.get().add(enabledItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present } - this.enabled.add(enabledItem); return this; } /** - * List of OCI regions enabled for data collection. + * List of OCI regions enabled for data collection. Returns null when no regions are + * set. * * @return enabled */ @jakarta.annotation.Nullable + @JsonIgnore + public List getEnabled() { + return enabled.orElse(null); + } + @JsonProperty(JSON_PROPERTY_ENABLED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEnabled() { + public JsonNullable> getEnabled_JsonNullable() { return enabled; } - public void setEnabled(List enabled) { + @JsonProperty(JSON_PROPERTY_ENABLED) + public void setEnabled_JsonNullable(JsonNullable> enabled) { this.enabled = enabled; } + public void setEnabled(List enabled) { + this.enabled = JsonNullable.>of(enabled); + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document.