Skip to content

Commit

Permalink
Regenerate client from commit bfabbaf0 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jan 23, 2024
1 parent 8181322 commit ef33e43
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 11 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-01-22 19:09:09.236607",
"spec_repo_commit": "7def3c63"
"regenerated": "2024-01-23 22:58:38.711524",
"spec_repo_commit": "bfabbaf0"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-01-22 19:09:09.252174",
"spec_repo_commit": "7def3c63"
"regenerated": "2024-01-23 22:58:38.738010",
"spec_repo_commit": "bfabbaf0"
}
}
}
12 changes: 12 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3207,6 +3207,18 @@ components:
key.'
example: https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL
type: string
cloud_run_revision_filters:
description: 'Limit the Cloud Run revisions that are pulled into Datadog
by using tags.

Only Cloud Run revision resources that match one of the defined tags are
imported into Datadog.'
example:
- $KEY:$VALUE
items:
description: Cloud Run Filters
type: string
type: array
errors:
description: An array of errors.
example:
Expand Down
12 changes: 12 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6988,6 +6988,18 @@ components:
description: Your service account email address.
example: datadog-service-account@test-project.iam.gserviceaccount.com
type: string
cloud_run_revision_filters:
description: 'List of filters to limit the Cloud Run revisions that are
pulled into Datadog by using tags.

Only Cloud Run revision resources that match one of the defined tags are
imported into Datadog.'
example:
- $KEY:$VALUE
items:
description: Cloud Run Filters
type: string
type: array
host_filters:
description: Your Host Filters.
items:
Expand Down
40 changes: 40 additions & 0 deletions src/main/java/com/datadog/api/client/v1/model/GCPAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
GCPAccount.JSON_PROPERTY_CLIENT_EMAIL,
GCPAccount.JSON_PROPERTY_CLIENT_ID,
GCPAccount.JSON_PROPERTY_CLIENT_X509_CERT_URL,
GCPAccount.JSON_PROPERTY_CLOUD_RUN_REVISION_FILTERS,
GCPAccount.JSON_PROPERTY_ERRORS,
GCPAccount.JSON_PROPERTY_HOST_FILTERS,
GCPAccount.JSON_PROPERTY_IS_CSPM_ENABLED,
Expand Down Expand Up @@ -60,6 +61,10 @@ public class GCPAccount {
public static final String JSON_PROPERTY_CLIENT_X509_CERT_URL = "client_x509_cert_url";
private String clientX509CertUrl;

public static final String JSON_PROPERTY_CLOUD_RUN_REVISION_FILTERS =
"cloud_run_revision_filters";
private List<String> cloudRunRevisionFilters = null;

public static final String JSON_PROPERTY_ERRORS = "errors";
private List<String> errors = null;

Expand Down Expand Up @@ -219,6 +224,36 @@ public void setClientX509CertUrl(String clientX509CertUrl) {
this.clientX509CertUrl = clientX509CertUrl;
}

public GCPAccount cloudRunRevisionFilters(List<String> cloudRunRevisionFilters) {
this.cloudRunRevisionFilters = cloudRunRevisionFilters;
return this;
}

public GCPAccount addCloudRunRevisionFiltersItem(String cloudRunRevisionFiltersItem) {
if (this.cloudRunRevisionFilters == null) {
this.cloudRunRevisionFilters = new ArrayList<>();
}
this.cloudRunRevisionFilters.add(cloudRunRevisionFiltersItem);
return this;
}

/**
* Limit the Cloud Run revisions that are pulled into Datadog by using tags. Only Cloud Run
* revision resources that match one of the defined tags are imported into Datadog.
*
* @return cloudRunRevisionFilters
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CLOUD_RUN_REVISION_FILTERS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getCloudRunRevisionFilters() {
return cloudRunRevisionFilters;
}

public void setCloudRunRevisionFilters(List<String> cloudRunRevisionFilters) {
this.cloudRunRevisionFilters = cloudRunRevisionFilters;
}

public GCPAccount errors(List<String> errors) {
this.errors = errors;
return this;
Expand Down Expand Up @@ -502,6 +537,7 @@ public boolean equals(Object o) {
&& Objects.equals(this.clientEmail, gcpAccount.clientEmail)
&& Objects.equals(this.clientId, gcpAccount.clientId)
&& Objects.equals(this.clientX509CertUrl, gcpAccount.clientX509CertUrl)
&& Objects.equals(this.cloudRunRevisionFilters, gcpAccount.cloudRunRevisionFilters)
&& Objects.equals(this.errors, gcpAccount.errors)
&& Objects.equals(this.hostFilters, gcpAccount.hostFilters)
&& Objects.equals(this.isCspmEnabled, gcpAccount.isCspmEnabled)
Expand All @@ -525,6 +561,7 @@ public int hashCode() {
clientEmail,
clientId,
clientX509CertUrl,
cloudRunRevisionFilters,
errors,
hostFilters,
isCspmEnabled,
Expand All @@ -550,6 +587,9 @@ public String toString() {
sb.append(" clientEmail: ").append(toIndentedString(clientEmail)).append("\n");
sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n");
sb.append(" clientX509CertUrl: ").append(toIndentedString(clientX509CertUrl)).append("\n");
sb.append(" cloudRunRevisionFilters: ")
.append(toIndentedString(cloudRunRevisionFilters))
.append("\n");
sb.append(" errors: ").append(toIndentedString(errors)).append("\n");
sb.append(" hostFilters: ").append(toIndentedString(hostFilters)).append("\n");
sb.append(" isCspmEnabled: ").append(toIndentedString(isCspmEnabled)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
GCPSTSServiceAccountAttributes.JSON_PROPERTY_ACCOUNT_TAGS,
GCPSTSServiceAccountAttributes.JSON_PROPERTY_AUTOMUTE,
GCPSTSServiceAccountAttributes.JSON_PROPERTY_CLIENT_EMAIL,
GCPSTSServiceAccountAttributes.JSON_PROPERTY_CLOUD_RUN_REVISION_FILTERS,
GCPSTSServiceAccountAttributes.JSON_PROPERTY_HOST_FILTERS,
GCPSTSServiceAccountAttributes.JSON_PROPERTY_IS_CSPM_ENABLED,
GCPSTSServiceAccountAttributes.JSON_PROPERTY_IS_SECURITY_COMMAND_CENTER_ENABLED,
Expand All @@ -41,6 +42,10 @@ public class GCPSTSServiceAccountAttributes {
public static final String JSON_PROPERTY_CLIENT_EMAIL = "client_email";
private String clientEmail;

public static final String JSON_PROPERTY_CLOUD_RUN_REVISION_FILTERS =
"cloud_run_revision_filters";
private List<String> cloudRunRevisionFilters = null;

public static final String JSON_PROPERTY_HOST_FILTERS = "host_filters";
private List<String> hostFilters = null;

Expand Down Expand Up @@ -126,6 +131,38 @@ public void setClientEmail(String clientEmail) {
this.clientEmail = clientEmail;
}

public GCPSTSServiceAccountAttributes cloudRunRevisionFilters(
List<String> cloudRunRevisionFilters) {
this.cloudRunRevisionFilters = cloudRunRevisionFilters;
return this;
}

public GCPSTSServiceAccountAttributes addCloudRunRevisionFiltersItem(
String cloudRunRevisionFiltersItem) {
if (this.cloudRunRevisionFilters == null) {
this.cloudRunRevisionFilters = new ArrayList<>();
}
this.cloudRunRevisionFilters.add(cloudRunRevisionFiltersItem);
return this;
}

/**
* List of filters to limit the Cloud Run revisions that are pulled into Datadog by using tags.
* Only Cloud Run revision resources that match one of the defined tags are imported into Datadog.
*
* @return cloudRunRevisionFilters
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CLOUD_RUN_REVISION_FILTERS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getCloudRunRevisionFilters() {
return cloudRunRevisionFilters;
}

public void setCloudRunRevisionFilters(List<String> cloudRunRevisionFilters) {
this.cloudRunRevisionFilters = cloudRunRevisionFilters;
}

public GCPSTSServiceAccountAttributes hostFilters(List<String> hostFilters) {
this.hostFilters = hostFilters;
return this;
Expand Down Expand Up @@ -282,6 +319,8 @@ public boolean equals(Object o) {
return Objects.equals(this.accountTags, gcpstsServiceAccountAttributes.accountTags)
&& Objects.equals(this.automute, gcpstsServiceAccountAttributes.automute)
&& Objects.equals(this.clientEmail, gcpstsServiceAccountAttributes.clientEmail)
&& Objects.equals(
this.cloudRunRevisionFilters, gcpstsServiceAccountAttributes.cloudRunRevisionFilters)
&& Objects.equals(this.hostFilters, gcpstsServiceAccountAttributes.hostFilters)
&& Objects.equals(this.isCspmEnabled, gcpstsServiceAccountAttributes.isCspmEnabled)
&& Objects.equals(
Expand All @@ -300,6 +339,7 @@ public int hashCode() {
accountTags,
automute,
clientEmail,
cloudRunRevisionFilters,
hostFilters,
isCspmEnabled,
isSecurityCommandCenterEnabled,
Expand All @@ -314,6 +354,9 @@ public String toString() {
sb.append(" accountTags: ").append(toIndentedString(accountTags)).append("\n");
sb.append(" automute: ").append(toIndentedString(automute)).append("\n");
sb.append(" clientEmail: ").append(toIndentedString(clientEmail)).append("\n");
sb.append(" cloudRunRevisionFilters: ")
.append(toIndentedString(cloudRunRevisionFilters))
.append("\n");
sb.append(" hostFilters: ").append(toIndentedString(hostFilters)).append("\n");
sb.append(" isCspmEnabled: ").append(toIndentedString(isCspmEnabled)).append("\n");
sb.append(" isSecurityCommandCenterEnabled: ")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Feature: GCP Integration
@generated @skip @team:DataDog/gcp-integrations
Scenario: Create a GCP integration returns "Bad Request" response
Given new "CreateGCPIntegration" request
And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"}
And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "cloud_run_revision_filters": ["$KEY:$VALUE"], "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"}
When the request is sent
Then the response status is 400 Bad Request

Expand All @@ -27,7 +27,7 @@ Feature: GCP Integration
@generated @skip @team:DataDog/gcp-integrations
Scenario: Delete a GCP integration returns "Bad Request" response
Given new "DeleteGCPIntegration" request
And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"}
And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "cloud_run_revision_filters": ["$KEY:$VALUE"], "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"}
When the request is sent
Then the response status is 400 Bad Request

Expand All @@ -54,7 +54,7 @@ Feature: GCP Integration
@generated @skip @team:DataDog/gcp-integrations
Scenario: Update a GCP integration returns "Bad Request" response
Given new "UpdateGCPIntegration" request
And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"}
And body with value {"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "client_email": "api-dev@datadog-sandbox.iam.gserviceaccount.com", "client_id": "123456712345671234567", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL", "cloud_run_revision_filters": ["$KEY:$VALUE"], "errors": ["*"], "host_filters": "key:value,filter:example", "is_cspm_enabled": true, "is_security_command_center_enabled": true, "private_key": "private_key", "private_key_id": "123456789abcdefghi123456789abcdefghijklm", "project_id": "datadog-apitest", "resource_collection_enabled": true, "token_uri": "https://accounts.google.com/o/oauth2/token", "type": "service_account"}
When the request is sent
Then the response status is 400 Bad Request

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ Feature: GCP Integration
@generated @skip @team:DataDog/gcp-integrations
Scenario: Create a new entry for your service account returns "Bad Request" response
Given new "CreateGCPSTSAccount" request
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": [], "is_security_command_center_enabled": true}, "type": "gcp_service_account"}}
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_security_command_center_enabled": true}, "type": "gcp_service_account"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/gcp-integrations
Scenario: Create a new entry for your service account returns "Conflict" response
Given new "CreateGCPSTSAccount" request
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": [], "is_security_command_center_enabled": true}, "type": "gcp_service_account"}}
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_security_command_center_enabled": true}, "type": "gcp_service_account"}}
When the request is sent
Then the response status is 409 Conflict

Expand Down Expand Up @@ -140,15 +140,15 @@ Feature: GCP Integration
Scenario: Update STS Service Account returns "Bad Request" response
Given new "UpdateGCPSTSAccount" request
And request contains "account_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": [], "is_security_command_center_enabled": true}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_security_command_center_enabled": true}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/gcp-integrations
Scenario: Update STS Service Account returns "Not Found" response
Given new "UpdateGCPSTSAccount" request
And request contains "account_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "host_filters": [], "is_security_command_center_enabled": true}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_security_command_center_enabled": true}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
When the request is sent
Then the response status is 404 Not Found

Expand Down

0 comments on commit ef33e43

Please sign in to comment.