Skip to content

Commit f89adad

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit da3f25d2 of spec repo
1 parent 2d8705f commit f89adad

File tree

5 files changed

+28
-13
lines changed

5 files changed

+28
-13
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": "2025-04-17 13:26:11.488046",
8-
"spec_repo_commit": "12ab5180"
7+
"regenerated": "2025-04-21 22:29:19.206444",
8+
"spec_repo_commit": "da3f25d2"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-17 13:26:11.504561",
13-
"spec_repo_commit": "12ab5180"
12+
"regenerated": "2025-04-21 22:29:19.222252",
13+
"spec_repo_commit": "da3f25d2"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14676,6 +14676,13 @@ components:
1467614676
product for this service account. Note: This requires resource_collection_enabled
1467714677
to be set to true.'
1467814678
type: boolean
14679+
is_per_project_quota_enabled:
14680+
default: false
14681+
description: When enabled, Datadog applies the `X-Goog-User-Project` header,
14682+
attributing Google Cloud billing and quota usage to the project being
14683+
monitored rather than the default service account project.
14684+
example: true
14685+
type: boolean
1467914686
is_resource_change_collection_enabled:
1468014687
default: false
1468114688
description: When enabled, Datadog scans for all resource change data in

features/v2/gcp_integration.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ Feature: GCP Integration
3434
@generated @skip @team:DataDog/gcp-integrations
3535
Scenario: Create a new entry for your service account returns "Bad Request" response
3636
Given new "CreateGCPSTSAccount" request
37-
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}]}, "type": "gcp_service_account"}}
37+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_per_project_quota_enabled": true, "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}]}, "type": "gcp_service_account"}}
3838
When the request is sent
3939
Then the response status is 400 Bad Request
4040

4141
@generated @skip @team:DataDog/gcp-integrations
4242
Scenario: Create a new entry for your service account returns "Conflict" response
4343
Given new "CreateGCPSTSAccount" request
44-
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}]}, "type": "gcp_service_account"}}
44+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_per_project_quota_enabled": true, "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}]}, "type": "gcp_service_account"}}
4545
When the request is sent
4646
Then the response status is 409 Conflict
4747

@@ -151,15 +151,15 @@ Feature: GCP Integration
151151
Scenario: Update STS Service Account returns "Bad Request" response
152152
Given new "UpdateGCPSTSAccount" request
153153
And request contains "account_id" parameter from "REPLACE.ME"
154-
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}]}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
154+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_per_project_quota_enabled": true, "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}]}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
155155
When the request is sent
156156
Then the response status is 400 Bad Request
157157

158158
@generated @skip @team:DataDog/gcp-integrations
159159
Scenario: Update STS Service Account returns "Not Found" response
160160
Given new "UpdateGCPSTSAccount" request
161161
And request contains "account_id" parameter from "REPLACE.ME"
162-
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}]}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
162+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_per_project_quota_enabled": true, "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}]}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
163163
When the request is sent
164164
Then the response status is 404 Not Found
165165

lib/datadog_api_client/v2/model_base.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def _deserialize(type, value)
124124
# generic array, return directly
125125
value
126126
when :UUID
127-
value
127+
value.to_s
128128
when /\AArray<(?<inner_type>.+)>\z/
129129
inner_type = Regexp.last_match[:inner_type]
130130
value.map { |v| _deserialize(inner_type, v) }
@@ -255,9 +255,7 @@ def find_and_cast_into_type(klass, data)
255255
when 'Object' # "type: object"
256256
return data if data.instance_of?(Hash)
257257
when 'UUID'
258-
raise TypeError, "Expected String, got #{uuid_string.class.name} instead." unless uuid_string.kind_of?(String)
259-
raise ArgumentError, "Invalid UUID format." unless /\A\h{8}-\h{4}-\h{4}-\h{4}-\h{12}\z/.match?(data)
260-
return data
258+
return UUIDTools::UUID.parse(data)
261259
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
262260
if data.instance_of?(Array)
263261
sub_type = Regexp.last_match[:sub_type]

lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ class GCPSTSServiceAccountAttributes
4040
# When enabled, Datadog will activate the Cloud Security Monitoring product for this service account. Note: This requires resource_collection_enabled to be set to true.
4141
attr_accessor :is_cspm_enabled
4242

43+
# When enabled, Datadog applies the `X-Goog-User-Project` header, attributing Google Cloud billing and quota usage to the project being monitored rather than the default service account project.
44+
attr_accessor :is_per_project_quota_enabled
45+
4346
# When enabled, Datadog scans for all resource change data in your Google Cloud environment.
4447
attr_accessor :is_resource_change_collection_enabled
4548

@@ -64,6 +67,7 @@ def self.attribute_map
6467
:'cloud_run_revision_filters' => :'cloud_run_revision_filters',
6568
:'host_filters' => :'host_filters',
6669
:'is_cspm_enabled' => :'is_cspm_enabled',
70+
:'is_per_project_quota_enabled' => :'is_per_project_quota_enabled',
6771
:'is_resource_change_collection_enabled' => :'is_resource_change_collection_enabled',
6872
:'is_security_command_center_enabled' => :'is_security_command_center_enabled',
6973
:'metric_namespace_configs' => :'metric_namespace_configs',
@@ -81,6 +85,7 @@ def self.openapi_types
8185
:'cloud_run_revision_filters' => :'Array<String>',
8286
:'host_filters' => :'Array<String>',
8387
:'is_cspm_enabled' => :'Boolean',
88+
:'is_per_project_quota_enabled' => :'Boolean',
8489
:'is_resource_change_collection_enabled' => :'Boolean',
8590
:'is_security_command_center_enabled' => :'Boolean',
8691
:'metric_namespace_configs' => :'Array<GCPMetricNamespaceConfig>',
@@ -136,6 +141,10 @@ def initialize(attributes = {})
136141
self.is_cspm_enabled = attributes[:'is_cspm_enabled']
137142
end
138143

144+
if attributes.key?(:'is_per_project_quota_enabled')
145+
self.is_per_project_quota_enabled = attributes[:'is_per_project_quota_enabled']
146+
end
147+
139148
if attributes.key?(:'is_resource_change_collection_enabled')
140149
self.is_resource_change_collection_enabled = attributes[:'is_resource_change_collection_enabled']
141150
end
@@ -187,6 +196,7 @@ def ==(o)
187196
cloud_run_revision_filters == o.cloud_run_revision_filters &&
188197
host_filters == o.host_filters &&
189198
is_cspm_enabled == o.is_cspm_enabled &&
199+
is_per_project_quota_enabled == o.is_per_project_quota_enabled &&
190200
is_resource_change_collection_enabled == o.is_resource_change_collection_enabled &&
191201
is_security_command_center_enabled == o.is_security_command_center_enabled &&
192202
metric_namespace_configs == o.metric_namespace_configs &&
@@ -198,7 +208,7 @@ def ==(o)
198208
# @return [Integer] Hash code
199209
# @!visibility private
200210
def hash
201-
[account_tags, automute, client_email, cloud_run_revision_filters, host_filters, is_cspm_enabled, is_resource_change_collection_enabled, is_security_command_center_enabled, metric_namespace_configs, resource_collection_enabled, additional_properties].hash
211+
[account_tags, automute, client_email, cloud_run_revision_filters, host_filters, is_cspm_enabled, is_per_project_quota_enabled, is_resource_change_collection_enabled, is_security_command_center_enabled, metric_namespace_configs, resource_collection_enabled, additional_properties].hash
202212
end
203213
end
204214
end

0 commit comments

Comments
 (0)