Skip to content

Commit

Permalink
Regenerate client from commit 8cb3faac of spec repo (#2626)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <[email protected]>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Dec 18, 2024
1 parent 1b50a63 commit 0d00a9d
Show file tree
Hide file tree
Showing 13 changed files with 238 additions and 124 deletions.
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": "2024-12-18 16:21:27.746834",
"spec_repo_commit": "e12aeab9"
"regenerated": "2024-12-18 17:18:37.829361",
"spec_repo_commit": "8cb3faac"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-12-18 16:21:27.761718",
"spec_repo_commit": "e12aeab9"
"regenerated": "2024-12-18 17:18:37.843992",
"spec_repo_commit": "8cb3faac"
}
}
}
55 changes: 32 additions & 23 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -844,8 +844,15 @@ components:
Only hosts that match one of the defined tags are imported into Datadog.'
example: key:value,filter:example
type: string
metrics_config:
$ref: '#/components/schemas/AzureAccountMetricsConfig'
metrics_enabled:
description: Enable Azure metrics for your organization.
example: true
type: boolean
metrics_enabled_default:
description: Enable Azure metrics for your organization for resource providers
where no resource provider config is specified.
example: true
type: boolean
new_client_id:
description: Your New Azure web application ID.
example: new1c7f6-1234-5678-9101-3fcbf464test
Expand All @@ -860,37 +867,26 @@ components:
monitored by this app registration.
example: true
type: boolean
resource_provider_configs:
description: Configuration settings applied to resources from the specified
Azure resource providers.
items:
$ref: '#/components/schemas/ResourceProviderConfig'
type: array
tenant_name:
description: Your Azure Active Directory ID.
example: testc44-1234-5678-9101-cc00736ftest
type: string
usage_metrics_enabled:
description: Enable azure.usage metrics for your organization.
example: true
type: boolean
type: object
AzureAccountListResponse:
description: Accounts configured for your organization.
items:
$ref: '#/components/schemas/AzureAccount'
type: array
AzureAccountMetricsConfig:
description: 'Dictionary containing the key `excluded_resource_providers` which
has to be a list of Microsoft Azure Resource Provider names.

This feature is currently being beta tested.

In order to enable all resource providers for metric collection, pass:

`metrics_config: {"excluded_resource_providers": []}` (i.e., an empty list
for `excluded_resource_providers`).'
properties:
excluded_resource_providers:
description: List of Microsoft Azure Resource Providers to exclude from
metric collection.
example:
- Microsoft.Sql
- Microsoft.Cdn
items:
type: string
type: array
type: object
CancelDowntimesByScopeRequest:
description: Cancel downtimes according to scope.
properties:
Expand Down Expand Up @@ -10209,6 +10205,19 @@ components:
- lookup_enrichment_table
- type
type: object
ResourceProviderConfig:
description: Configuration settings applied to resources from the specified
Azure resource provider.
properties:
metrics_enabled:
description: Collect metrics for resources from this provider.
example: true
type: boolean
namespace:
description: The provider namespace to apply this configuration to.
example: Microsoft.Compute
type: string
type: object
ResponseMetaAttributes:
description: Object describing meta attributes of response.
properties:
Expand Down
16 changes: 10 additions & 6 deletions examples/v1/azure-integration/UpdateAzureHostFilters.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.AzureIntegrationApi;
import com.datadog.api.client.v1.model.AzureAccount;
import com.datadog.api.client.v1.model.AzureAccountMetricsConfig;
import java.util.Arrays;
import com.datadog.api.client.v1.model.ResourceProviderConfig;
import java.util.Collections;

public class Example {
Expand All @@ -24,13 +23,18 @@ public static void main(String[] args) {
.customMetricsEnabled(true)
.errors(Collections.singletonList("*"))
.hostFilters("key:value,filter:example")
.metricsConfig(
new AzureAccountMetricsConfig()
.excludedResourceProviders(Arrays.asList("Microsoft.Sql", "Microsoft.Cdn")))
.metricsEnabled(true)
.metricsEnabledDefault(true)
.newClientId("new1c7f6-1234-5678-9101-3fcbf464test")
.newTenantName("new1c44-1234-5678-9101-cc00736ftest")
.resourceCollectionEnabled(true)
.tenantName("testc44-1234-5678-9101-cc00736ftest");
.resourceProviderConfigs(
Collections.singletonList(
new ResourceProviderConfig()
.metricsEnabled(true)
.namespace("Microsoft.Compute")))
.tenantName("testc44-1234-5678-9101-cc00736ftest")
.usageMetricsEnabled(true);

try {
apiInstance.updateAzureHostFilters(body);
Expand Down
5 changes: 0 additions & 5 deletions examples/v1/azure-integration/UpdateAzureIntegration.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v1.api.AzureIntegrationApi;
import com.datadog.api.client.v1.model.AzureAccount;
import com.datadog.api.client.v1.model.AzureAccountMetricsConfig;
import java.util.Arrays;
import java.util.Collections;

public class Example {
Expand All @@ -27,9 +25,6 @@ public static void main(String[] args) {
.newClientId("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
.newTenantName("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
.resourceCollectionEnabled(true)
.metricsConfig(
new AzureAccountMetricsConfig()
.excludedResourceProviders(Arrays.asList("Microsoft.Sql", "Microsoft.Cdn")))
.tenantName("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d");

try {
Expand Down
142 changes: 121 additions & 21 deletions src/main/java/com/datadog/api/client/v1/model/AzureAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@
AzureAccount.JSON_PROPERTY_CUSTOM_METRICS_ENABLED,
AzureAccount.JSON_PROPERTY_ERRORS,
AzureAccount.JSON_PROPERTY_HOST_FILTERS,
AzureAccount.JSON_PROPERTY_METRICS_CONFIG,
AzureAccount.JSON_PROPERTY_METRICS_ENABLED,
AzureAccount.JSON_PROPERTY_METRICS_ENABLED_DEFAULT,
AzureAccount.JSON_PROPERTY_NEW_CLIENT_ID,
AzureAccount.JSON_PROPERTY_NEW_TENANT_NAME,
AzureAccount.JSON_PROPERTY_RESOURCE_COLLECTION_ENABLED,
AzureAccount.JSON_PROPERTY_TENANT_NAME
AzureAccount.JSON_PROPERTY_RESOURCE_PROVIDER_CONFIGS,
AzureAccount.JSON_PROPERTY_TENANT_NAME,
AzureAccount.JSON_PROPERTY_USAGE_METRICS_ENABLED
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand Down Expand Up @@ -66,8 +69,11 @@ public class AzureAccount {
public static final String JSON_PROPERTY_HOST_FILTERS = "host_filters";
private String hostFilters;

public static final String JSON_PROPERTY_METRICS_CONFIG = "metrics_config";
private AzureAccountMetricsConfig metricsConfig;
public static final String JSON_PROPERTY_METRICS_ENABLED = "metrics_enabled";
private Boolean metricsEnabled;

public static final String JSON_PROPERTY_METRICS_ENABLED_DEFAULT = "metrics_enabled_default";
private Boolean metricsEnabledDefault;

public static final String JSON_PROPERTY_NEW_CLIENT_ID = "new_client_id";
private String newClientId;
Expand All @@ -79,9 +85,15 @@ public class AzureAccount {
"resource_collection_enabled";
private Boolean resourceCollectionEnabled;

public static final String JSON_PROPERTY_RESOURCE_PROVIDER_CONFIGS = "resource_provider_configs";
private List<ResourceProviderConfig> resourceProviderConfigs = null;

public static final String JSON_PROPERTY_TENANT_NAME = "tenant_name";
private String tenantName;

public static final String JSON_PROPERTY_USAGE_METRICS_ENABLED = "usage_metrics_enabled";
private Boolean usageMetricsEnabled;

public AzureAccount appServicePlanFilters(String appServicePlanFilters) {
this.appServicePlanFilters = appServicePlanFilters;
return this;
Expand Down Expand Up @@ -284,30 +296,47 @@ public void setHostFilters(String hostFilters) {
this.hostFilters = hostFilters;
}

public AzureAccount metricsConfig(AzureAccountMetricsConfig metricsConfig) {
this.metricsConfig = metricsConfig;
this.unparsed |= metricsConfig.unparsed;
public AzureAccount metricsEnabled(Boolean metricsEnabled) {
this.metricsEnabled = metricsEnabled;
return this;
}

/**
* Enable Azure metrics for your organization.
*
* @return metricsEnabled
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_METRICS_ENABLED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getMetricsEnabled() {
return metricsEnabled;
}

public void setMetricsEnabled(Boolean metricsEnabled) {
this.metricsEnabled = metricsEnabled;
}

public AzureAccount metricsEnabledDefault(Boolean metricsEnabledDefault) {
this.metricsEnabledDefault = metricsEnabledDefault;
return this;
}

/**
* Dictionary containing the key <code>excluded_resource_providers</code> which has to be a list
* of Microsoft Azure Resource Provider names. This feature is currently being beta tested. In
* order to enable all resource providers for metric collection, pass: <code>
* metrics_config: {"excluded_resource_providers": []}</code> (i.e., an empty list for <code>
* excluded_resource_providers</code>).
* Enable Azure metrics for your organization for resource providers where no resource provider
* config is specified.
*
* @return metricsConfig
* @return metricsEnabledDefault
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_METRICS_CONFIG)
@JsonProperty(JSON_PROPERTY_METRICS_ENABLED_DEFAULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public AzureAccountMetricsConfig getMetricsConfig() {
return metricsConfig;
public Boolean getMetricsEnabledDefault() {
return metricsEnabledDefault;
}

public void setMetricsConfig(AzureAccountMetricsConfig metricsConfig) {
this.metricsConfig = metricsConfig;
public void setMetricsEnabledDefault(Boolean metricsEnabledDefault) {
this.metricsEnabledDefault = metricsEnabledDefault;
}

public AzureAccount newClientId(String newClientId) {
Expand Down Expand Up @@ -374,6 +403,41 @@ public void setResourceCollectionEnabled(Boolean resourceCollectionEnabled) {
this.resourceCollectionEnabled = resourceCollectionEnabled;
}

public AzureAccount resourceProviderConfigs(
List<ResourceProviderConfig> resourceProviderConfigs) {
this.resourceProviderConfigs = resourceProviderConfigs;
for (ResourceProviderConfig item : resourceProviderConfigs) {
this.unparsed |= item.unparsed;
}
return this;
}

public AzureAccount addResourceProviderConfigsItem(
ResourceProviderConfig resourceProviderConfigsItem) {
if (this.resourceProviderConfigs == null) {
this.resourceProviderConfigs = new ArrayList<>();
}
this.resourceProviderConfigs.add(resourceProviderConfigsItem);
this.unparsed |= resourceProviderConfigsItem.unparsed;
return this;
}

/**
* Configuration settings applied to resources from the specified Azure resource providers.
*
* @return resourceProviderConfigs
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_RESOURCE_PROVIDER_CONFIGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<ResourceProviderConfig> getResourceProviderConfigs() {
return resourceProviderConfigs;
}

public void setResourceProviderConfigs(List<ResourceProviderConfig> resourceProviderConfigs) {
this.resourceProviderConfigs = resourceProviderConfigs;
}

public AzureAccount tenantName(String tenantName) {
this.tenantName = tenantName;
return this;
Expand All @@ -395,6 +459,27 @@ public void setTenantName(String tenantName) {
this.tenantName = tenantName;
}

public AzureAccount usageMetricsEnabled(Boolean usageMetricsEnabled) {
this.usageMetricsEnabled = usageMetricsEnabled;
return this;
}

/**
* Enable azure.usage metrics for your organization.
*
* @return usageMetricsEnabled
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_USAGE_METRICS_ENABLED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getUsageMetricsEnabled() {
return usageMetricsEnabled;
}

public void setUsageMetricsEnabled(Boolean usageMetricsEnabled) {
this.usageMetricsEnabled = usageMetricsEnabled;
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
Expand Down Expand Up @@ -460,11 +545,14 @@ public boolean equals(Object o) {
&& Objects.equals(this.customMetricsEnabled, azureAccount.customMetricsEnabled)
&& Objects.equals(this.errors, azureAccount.errors)
&& Objects.equals(this.hostFilters, azureAccount.hostFilters)
&& Objects.equals(this.metricsConfig, azureAccount.metricsConfig)
&& Objects.equals(this.metricsEnabled, azureAccount.metricsEnabled)
&& Objects.equals(this.metricsEnabledDefault, azureAccount.metricsEnabledDefault)
&& Objects.equals(this.newClientId, azureAccount.newClientId)
&& Objects.equals(this.newTenantName, azureAccount.newTenantName)
&& Objects.equals(this.resourceCollectionEnabled, azureAccount.resourceCollectionEnabled)
&& Objects.equals(this.resourceProviderConfigs, azureAccount.resourceProviderConfigs)
&& Objects.equals(this.tenantName, azureAccount.tenantName)
&& Objects.equals(this.usageMetricsEnabled, azureAccount.usageMetricsEnabled)
&& Objects.equals(this.additionalProperties, azureAccount.additionalProperties);
}

Expand All @@ -480,11 +568,14 @@ public int hashCode() {
customMetricsEnabled,
errors,
hostFilters,
metricsConfig,
metricsEnabled,
metricsEnabledDefault,
newClientId,
newTenantName,
resourceCollectionEnabled,
resourceProviderConfigs,
tenantName,
usageMetricsEnabled,
additionalProperties);
}

Expand All @@ -507,13 +598,22 @@ public String toString() {
.append("\n");
sb.append(" errors: ").append(toIndentedString(errors)).append("\n");
sb.append(" hostFilters: ").append(toIndentedString(hostFilters)).append("\n");
sb.append(" metricsConfig: ").append(toIndentedString(metricsConfig)).append("\n");
sb.append(" metricsEnabled: ").append(toIndentedString(metricsEnabled)).append("\n");
sb.append(" metricsEnabledDefault: ")
.append(toIndentedString(metricsEnabledDefault))
.append("\n");
sb.append(" newClientId: ").append(toIndentedString(newClientId)).append("\n");
sb.append(" newTenantName: ").append(toIndentedString(newTenantName)).append("\n");
sb.append(" resourceCollectionEnabled: ")
.append(toIndentedString(resourceCollectionEnabled))
.append("\n");
sb.append(" resourceProviderConfigs: ")
.append(toIndentedString(resourceProviderConfigs))
.append("\n");
sb.append(" tenantName: ").append(toIndentedString(tenantName)).append("\n");
sb.append(" usageMetricsEnabled: ")
.append(toIndentedString(usageMetricsEnabled))
.append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
Loading

0 comments on commit 0d00a9d

Please sign in to comment.