Skip to content

Commit 85729bf

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 924a9178 of spec repo
1 parent 1d5288a commit 85729bf

File tree

8 files changed

+223
-109
lines changed

8 files changed

+223
-109
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-12-17 15:51:05.988918",
8-
"spec_repo_commit": "b82d3677"
7+
"regenerated": "2024-12-17 21:45:13.513458",
8+
"spec_repo_commit": "924a9178"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-12-17 15:51:06.004049",
13-
"spec_repo_commit": "b82d3677"
12+
"regenerated": "2024-12-17 21:45:13.532342",
13+
"spec_repo_commit": "924a9178"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,15 @@ components:
844844
Only hosts that match one of the defined tags are imported into Datadog.'
845845
example: key:value,filter:example
846846
type: string
847-
metrics_config:
848-
$ref: '#/components/schemas/AzureAccountMetricsConfig'
847+
metrics_enabled:
848+
description: Enable Azure metrics for your organization.
849+
example: true
850+
type: boolean
851+
metrics_enabled_default:
852+
description: Enable Azure metrics for your organization for resource providers
853+
where no resource provider config is specified.
854+
example: true
855+
type: boolean
849856
new_client_id:
850857
description: Your New Azure web application ID.
851858
example: new1c7f6-1234-5678-9101-3fcbf464test
@@ -860,37 +867,26 @@ components:
860867
monitored by this app registration.
861868
example: true
862869
type: boolean
870+
resource_provider_configs:
871+
description: Configuration settings applied to resources from the specified
872+
Azure resource providers.
873+
items:
874+
$ref: '#/components/schemas/ResourceProviderConfig'
875+
type: array
863876
tenant_name:
864877
description: Your Azure Active Directory ID.
865878
example: testc44-1234-5678-9101-cc00736ftest
866879
type: string
880+
usage_metrics_enabled:
881+
description: Enable azure.usage metrics for your organization.
882+
example: true
883+
type: boolean
867884
type: object
868885
AzureAccountListResponse:
869886
description: Accounts configured for your organization.
870887
items:
871888
$ref: '#/components/schemas/AzureAccount'
872889
type: array
873-
AzureAccountMetricsConfig:
874-
description: 'Dictionary containing the key `excluded_resource_providers` which
875-
has to be a list of Microsoft Azure Resource Provider names.
876-
877-
This feature is currently being beta tested.
878-
879-
In order to enable all resource providers for metric collection, pass:
880-
881-
`metrics_config: {"excluded_resource_providers": []}` (i.e., an empty list
882-
for `excluded_resource_providers`).'
883-
properties:
884-
excluded_resource_providers:
885-
description: List of Microsoft Azure Resource Providers to exclude from
886-
metric collection.
887-
example:
888-
- Microsoft.Sql
889-
- Microsoft.Cdn
890-
items:
891-
type: string
892-
type: array
893-
type: object
894890
CancelDowntimesByScopeRequest:
895891
description: Cancel downtimes according to scope.
896892
properties:
@@ -10209,6 +10205,19 @@ components:
1020910205
- lookup_enrichment_table
1021010206
- type
1021110207
type: object
10208+
ResourceProviderConfig:
10209+
description: Configuration settings applied to resources from the specified
10210+
Azure resource provider.
10211+
properties:
10212+
metrics_enabled:
10213+
description: Collect metrics for resources from this provider.
10214+
example: true
10215+
type: boolean
10216+
namespace:
10217+
description: The provider namespace to apply this configuration to.
10218+
example: Microsoft.Compute
10219+
type: string
10220+
type: object
1021210221
ResponseMetaAttributes:
1021310222
description: Object describing meta attributes of response.
1021410223
properties:

examples/v1/azure-integration/UpdateAzureHostFilters.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
import com.datadog.api.client.ApiException;
55
import com.datadog.api.client.v1.api.AzureIntegrationApi;
66
import com.datadog.api.client.v1.model.AzureAccount;
7-
import com.datadog.api.client.v1.model.AzureAccountMetricsConfig;
8-
import java.util.Arrays;
7+
import com.datadog.api.client.v1.model.ResourceProviderConfig;
98
import java.util.Collections;
109

1110
public class Example {
@@ -24,13 +23,18 @@ public static void main(String[] args) {
2423
.customMetricsEnabled(true)
2524
.errors(Collections.singletonList("*"))
2625
.hostFilters("key:value,filter:example")
27-
.metricsConfig(
28-
new AzureAccountMetricsConfig()
29-
.excludedResourceProviders(Arrays.asList("Microsoft.Sql", "Microsoft.Cdn")))
26+
.metricsEnabled(true)
27+
.metricsEnabledDefault(true)
3028
.newClientId("new1c7f6-1234-5678-9101-3fcbf464test")
3129
.newTenantName("new1c44-1234-5678-9101-cc00736ftest")
3230
.resourceCollectionEnabled(true)
33-
.tenantName("testc44-1234-5678-9101-cc00736ftest");
31+
.resourceProviderConfigs(
32+
Collections.singletonList(
33+
new ResourceProviderConfig()
34+
.metricsEnabled(true)
35+
.namespace("Microsoft.Compute")))
36+
.tenantName("testc44-1234-5678-9101-cc00736ftest")
37+
.usageMetricsEnabled(true);
3438

3539
try {
3640
apiInstance.updateAzureHostFilters(body);

examples/v1/azure-integration/UpdateAzureIntegration.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
import com.datadog.api.client.ApiException;
55
import com.datadog.api.client.v1.api.AzureIntegrationApi;
66
import com.datadog.api.client.v1.model.AzureAccount;
7-
import com.datadog.api.client.v1.model.AzureAccountMetricsConfig;
8-
import java.util.Arrays;
97
import java.util.Collections;
108

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

3530
try {

src/main/java/com/datadog/api/client/v1/model/AzureAccount.java

Lines changed: 121 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@
2929
AzureAccount.JSON_PROPERTY_CUSTOM_METRICS_ENABLED,
3030
AzureAccount.JSON_PROPERTY_ERRORS,
3131
AzureAccount.JSON_PROPERTY_HOST_FILTERS,
32-
AzureAccount.JSON_PROPERTY_METRICS_CONFIG,
32+
AzureAccount.JSON_PROPERTY_METRICS_ENABLED,
33+
AzureAccount.JSON_PROPERTY_METRICS_ENABLED_DEFAULT,
3334
AzureAccount.JSON_PROPERTY_NEW_CLIENT_ID,
3435
AzureAccount.JSON_PROPERTY_NEW_TENANT_NAME,
3536
AzureAccount.JSON_PROPERTY_RESOURCE_COLLECTION_ENABLED,
36-
AzureAccount.JSON_PROPERTY_TENANT_NAME
37+
AzureAccount.JSON_PROPERTY_RESOURCE_PROVIDER_CONFIGS,
38+
AzureAccount.JSON_PROPERTY_TENANT_NAME,
39+
AzureAccount.JSON_PROPERTY_USAGE_METRICS_ENABLED
3740
})
3841
@jakarta.annotation.Generated(
3942
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
@@ -66,8 +69,11 @@ public class AzureAccount {
6669
public static final String JSON_PROPERTY_HOST_FILTERS = "host_filters";
6770
private String hostFilters;
6871

69-
public static final String JSON_PROPERTY_METRICS_CONFIG = "metrics_config";
70-
private AzureAccountMetricsConfig metricsConfig;
72+
public static final String JSON_PROPERTY_METRICS_ENABLED = "metrics_enabled";
73+
private Boolean metricsEnabled;
74+
75+
public static final String JSON_PROPERTY_METRICS_ENABLED_DEFAULT = "metrics_enabled_default";
76+
private Boolean metricsEnabledDefault;
7177

7278
public static final String JSON_PROPERTY_NEW_CLIENT_ID = "new_client_id";
7379
private String newClientId;
@@ -79,9 +85,15 @@ public class AzureAccount {
7985
"resource_collection_enabled";
8086
private Boolean resourceCollectionEnabled;
8187

88+
public static final String JSON_PROPERTY_RESOURCE_PROVIDER_CONFIGS = "resource_provider_configs";
89+
private List<ResourceProviderConfig> resourceProviderConfigs = null;
90+
8291
public static final String JSON_PROPERTY_TENANT_NAME = "tenant_name";
8392
private String tenantName;
8493

94+
public static final String JSON_PROPERTY_USAGE_METRICS_ENABLED = "usage_metrics_enabled";
95+
private Boolean usageMetricsEnabled;
96+
8597
public AzureAccount appServicePlanFilters(String appServicePlanFilters) {
8698
this.appServicePlanFilters = appServicePlanFilters;
8799
return this;
@@ -284,30 +296,47 @@ public void setHostFilters(String hostFilters) {
284296
this.hostFilters = hostFilters;
285297
}
286298

287-
public AzureAccount metricsConfig(AzureAccountMetricsConfig metricsConfig) {
288-
this.metricsConfig = metricsConfig;
289-
this.unparsed |= metricsConfig.unparsed;
299+
public AzureAccount metricsEnabled(Boolean metricsEnabled) {
300+
this.metricsEnabled = metricsEnabled;
301+
return this;
302+
}
303+
304+
/**
305+
* Enable Azure metrics for your organization.
306+
*
307+
* @return metricsEnabled
308+
*/
309+
@jakarta.annotation.Nullable
310+
@JsonProperty(JSON_PROPERTY_METRICS_ENABLED)
311+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
312+
public Boolean getMetricsEnabled() {
313+
return metricsEnabled;
314+
}
315+
316+
public void setMetricsEnabled(Boolean metricsEnabled) {
317+
this.metricsEnabled = metricsEnabled;
318+
}
319+
320+
public AzureAccount metricsEnabledDefault(Boolean metricsEnabledDefault) {
321+
this.metricsEnabledDefault = metricsEnabledDefault;
290322
return this;
291323
}
292324

293325
/**
294-
* Dictionary containing the key <code>excluded_resource_providers</code> which has to be a list
295-
* of Microsoft Azure Resource Provider names. This feature is currently being beta tested. In
296-
* order to enable all resource providers for metric collection, pass: <code>
297-
* metrics_config: {"excluded_resource_providers": []}</code> (i.e., an empty list for <code>
298-
* excluded_resource_providers</code>).
326+
* Enable Azure metrics for your organization for resource providers where no resource provider
327+
* config is specified.
299328
*
300-
* @return metricsConfig
329+
* @return metricsEnabledDefault
301330
*/
302331
@jakarta.annotation.Nullable
303-
@JsonProperty(JSON_PROPERTY_METRICS_CONFIG)
332+
@JsonProperty(JSON_PROPERTY_METRICS_ENABLED_DEFAULT)
304333
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
305-
public AzureAccountMetricsConfig getMetricsConfig() {
306-
return metricsConfig;
334+
public Boolean getMetricsEnabledDefault() {
335+
return metricsEnabledDefault;
307336
}
308337

309-
public void setMetricsConfig(AzureAccountMetricsConfig metricsConfig) {
310-
this.metricsConfig = metricsConfig;
338+
public void setMetricsEnabledDefault(Boolean metricsEnabledDefault) {
339+
this.metricsEnabledDefault = metricsEnabledDefault;
311340
}
312341

313342
public AzureAccount newClientId(String newClientId) {
@@ -374,6 +403,41 @@ public void setResourceCollectionEnabled(Boolean resourceCollectionEnabled) {
374403
this.resourceCollectionEnabled = resourceCollectionEnabled;
375404
}
376405

406+
public AzureAccount resourceProviderConfigs(
407+
List<ResourceProviderConfig> resourceProviderConfigs) {
408+
this.resourceProviderConfigs = resourceProviderConfigs;
409+
for (ResourceProviderConfig item : resourceProviderConfigs) {
410+
this.unparsed |= item.unparsed;
411+
}
412+
return this;
413+
}
414+
415+
public AzureAccount addResourceProviderConfigsItem(
416+
ResourceProviderConfig resourceProviderConfigsItem) {
417+
if (this.resourceProviderConfigs == null) {
418+
this.resourceProviderConfigs = new ArrayList<>();
419+
}
420+
this.resourceProviderConfigs.add(resourceProviderConfigsItem);
421+
this.unparsed |= resourceProviderConfigsItem.unparsed;
422+
return this;
423+
}
424+
425+
/**
426+
* Configuration settings applied to resources from the specified Azure resource providers.
427+
*
428+
* @return resourceProviderConfigs
429+
*/
430+
@jakarta.annotation.Nullable
431+
@JsonProperty(JSON_PROPERTY_RESOURCE_PROVIDER_CONFIGS)
432+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
433+
public List<ResourceProviderConfig> getResourceProviderConfigs() {
434+
return resourceProviderConfigs;
435+
}
436+
437+
public void setResourceProviderConfigs(List<ResourceProviderConfig> resourceProviderConfigs) {
438+
this.resourceProviderConfigs = resourceProviderConfigs;
439+
}
440+
377441
public AzureAccount tenantName(String tenantName) {
378442
this.tenantName = tenantName;
379443
return this;
@@ -395,6 +459,27 @@ public void setTenantName(String tenantName) {
395459
this.tenantName = tenantName;
396460
}
397461

462+
public AzureAccount usageMetricsEnabled(Boolean usageMetricsEnabled) {
463+
this.usageMetricsEnabled = usageMetricsEnabled;
464+
return this;
465+
}
466+
467+
/**
468+
* Enable azure.usage metrics for your organization.
469+
*
470+
* @return usageMetricsEnabled
471+
*/
472+
@jakarta.annotation.Nullable
473+
@JsonProperty(JSON_PROPERTY_USAGE_METRICS_ENABLED)
474+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
475+
public Boolean getUsageMetricsEnabled() {
476+
return usageMetricsEnabled;
477+
}
478+
479+
public void setUsageMetricsEnabled(Boolean usageMetricsEnabled) {
480+
this.usageMetricsEnabled = usageMetricsEnabled;
481+
}
482+
398483
/**
399484
* A container for additional, undeclared properties. This is a holder for any undeclared
400485
* properties as specified with the 'additionalProperties' keyword in the OAS document.
@@ -460,11 +545,14 @@ public boolean equals(Object o) {
460545
&& Objects.equals(this.customMetricsEnabled, azureAccount.customMetricsEnabled)
461546
&& Objects.equals(this.errors, azureAccount.errors)
462547
&& Objects.equals(this.hostFilters, azureAccount.hostFilters)
463-
&& Objects.equals(this.metricsConfig, azureAccount.metricsConfig)
548+
&& Objects.equals(this.metricsEnabled, azureAccount.metricsEnabled)
549+
&& Objects.equals(this.metricsEnabledDefault, azureAccount.metricsEnabledDefault)
464550
&& Objects.equals(this.newClientId, azureAccount.newClientId)
465551
&& Objects.equals(this.newTenantName, azureAccount.newTenantName)
466552
&& Objects.equals(this.resourceCollectionEnabled, azureAccount.resourceCollectionEnabled)
553+
&& Objects.equals(this.resourceProviderConfigs, azureAccount.resourceProviderConfigs)
467554
&& Objects.equals(this.tenantName, azureAccount.tenantName)
555+
&& Objects.equals(this.usageMetricsEnabled, azureAccount.usageMetricsEnabled)
468556
&& Objects.equals(this.additionalProperties, azureAccount.additionalProperties);
469557
}
470558

@@ -480,11 +568,14 @@ public int hashCode() {
480568
customMetricsEnabled,
481569
errors,
482570
hostFilters,
483-
metricsConfig,
571+
metricsEnabled,
572+
metricsEnabledDefault,
484573
newClientId,
485574
newTenantName,
486575
resourceCollectionEnabled,
576+
resourceProviderConfigs,
487577
tenantName,
578+
usageMetricsEnabled,
488579
additionalProperties);
489580
}
490581

@@ -507,13 +598,22 @@ public String toString() {
507598
.append("\n");
508599
sb.append(" errors: ").append(toIndentedString(errors)).append("\n");
509600
sb.append(" hostFilters: ").append(toIndentedString(hostFilters)).append("\n");
510-
sb.append(" metricsConfig: ").append(toIndentedString(metricsConfig)).append("\n");
601+
sb.append(" metricsEnabled: ").append(toIndentedString(metricsEnabled)).append("\n");
602+
sb.append(" metricsEnabledDefault: ")
603+
.append(toIndentedString(metricsEnabledDefault))
604+
.append("\n");
511605
sb.append(" newClientId: ").append(toIndentedString(newClientId)).append("\n");
512606
sb.append(" newTenantName: ").append(toIndentedString(newTenantName)).append("\n");
513607
sb.append(" resourceCollectionEnabled: ")
514608
.append(toIndentedString(resourceCollectionEnabled))
515609
.append("\n");
610+
sb.append(" resourceProviderConfigs: ")
611+
.append(toIndentedString(resourceProviderConfigs))
612+
.append("\n");
516613
sb.append(" tenantName: ").append(toIndentedString(tenantName)).append("\n");
614+
sb.append(" usageMetricsEnabled: ")
615+
.append(toIndentedString(usageMetricsEnabled))
616+
.append("\n");
517617
sb.append(" additionalProperties: ")
518618
.append(toIndentedString(additionalProperties))
519619
.append("\n");

0 commit comments

Comments
 (0)