From a34bf6773a9d2cc8276f8907a2da727fe2b736e9 Mon Sep 17 00:00:00 2001
From: "api-clients-generation-pipeline[bot]"
 <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
Date: Thu, 17 Nov 2022 16:44:11 +0000
Subject: [PATCH] Add fields for CSPM GCP usage (#1756)

Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
---
 .apigentools-info                             |  8 ++--
 .generator/schemas/v1/openapi.yaml            | 21 +++++++++
 ..._cloud_security_posture_management_hour.go | 46 +++++++++++++++++++
 api/datadogV1/model_usage_summary_date.go     | 35 ++++++++++++++
 api/datadogV1/model_usage_summary_date_org.go | 35 ++++++++++++++
 api/datadogV1/model_usage_summary_response.go | 35 ++++++++++++++
 6 files changed, 176 insertions(+), 4 deletions(-)

diff --git a/.apigentools-info b/.apigentools-info
index 1dfbdeca594..edef33e78da 100644
--- a/.apigentools-info
+++ b/.apigentools-info
@@ -4,13 +4,13 @@
     "spec_versions": {
         "v1": {
             "apigentools_version": "1.6.4",
-            "regenerated": "2022-11-15 14:55:19.464120",
-            "spec_repo_commit": "63774181"
+            "regenerated": "2022-11-16 21:36:50.117796",
+            "spec_repo_commit": "b9a1fc71"
         },
         "v2": {
             "apigentools_version": "1.6.4",
-            "regenerated": "2022-11-15 14:55:19.476417",
-            "spec_repo_commit": "63774181"
+            "regenerated": "2022-11-16 21:36:50.132070",
+            "spec_repo_commit": "b9a1fc71"
         }
     }
 }
\ No newline at end of file
diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml
index 4ac9e2cf49e..34b1a00d219 100644
--- a/.generator/schemas/v1/openapi.yaml
+++ b/.generator/schemas/v1/openapi.yaml
@@ -15044,6 +15044,12 @@ components:
           format: double
           nullable: true
           type: number
+        gcp_host_count:
+          description: The number of Cloud Security Posture Management GCP hosts during
+            a given hour.
+          format: double
+          nullable: true
+          type: number
         host_count:
           description: The total number of Cloud Security Posture Management hosts
             during a given hour.
@@ -16119,6 +16125,11 @@ components:
             containers over all hours in the current date for all organizations.
           format: int64
           type: integer
+        cspm_gcp_host_top99p:
+          description: Shows the 99th percentile of all Cloud Security Posture Management
+            GCP hosts over all hours in the current date for all organizations.
+          format: int64
+          type: integer
         cspm_host_top99p:
           description: Shows the 99th percentile of all Cloud Security Posture Management
             hosts over all hours in the current date for all organizations.
@@ -16475,6 +16486,11 @@ components:
             containers over all hours in the current date for the given org.
           format: int64
           type: integer
+        cspm_gcp_host_top99p:
+          description: Shows the 99th percentile of all Cloud Security Posture Management
+            GCP hosts over all hours in the current date for the given org.
+          format: int64
+          type: integer
         cspm_host_top99p:
           description: Shows the 99th percentile of all Cloud Security Posture Management
             hosts over all hours in the current date for the given org.
@@ -16840,6 +16856,11 @@ components:
             all organizations.
           format: int64
           type: integer
+        cspm_gcp_host_top99p_sum:
+          description: Shows the 99th percentile of all Cloud Security Posture Management
+            GCP hosts over all hours in the current months for all organizations.
+          format: int64
+          type: integer
         cspm_host_top99p_sum:
           description: Shows the 99th percentile of all Cloud Security Posture Management
             hosts over all hours in the current months for all organizations.
diff --git a/api/datadogV1/model_usage_cloud_security_posture_management_hour.go b/api/datadogV1/model_usage_cloud_security_posture_management_hour.go
index 75bcdaaa63d..b1f88d5cf2b 100644
--- a/api/datadogV1/model_usage_cloud_security_posture_management_hour.go
+++ b/api/datadogV1/model_usage_cloud_security_posture_management_hour.go
@@ -23,6 +23,8 @@ type UsageCloudSecurityPostureManagementHour struct {
 	ComplianceHostCount datadog.NullableFloat64 `json:"compliance_host_count,omitempty"`
 	// The total number of Cloud Security Posture Management containers during a given hour.
 	ContainerCount datadog.NullableFloat64 `json:"container_count,omitempty"`
+	// The number of Cloud Security Posture Management GCP hosts during a given hour.
+	GcpHostCount datadog.NullableFloat64 `json:"gcp_host_count,omitempty"`
 	// The total number of Cloud Security Posture Management hosts during a given hour.
 	HostCount datadog.NullableFloat64 `json:"host_count,omitempty"`
 	// The hour for the usage.
@@ -248,6 +250,45 @@ func (o *UsageCloudSecurityPostureManagementHour) UnsetContainerCount() {
 	o.ContainerCount.Unset()
 }
 
+// GetGcpHostCount returns the GcpHostCount field value if set, zero value otherwise (both if not set or set to explicit null).
+func (o *UsageCloudSecurityPostureManagementHour) GetGcpHostCount() float64 {
+	if o == nil || o.GcpHostCount.Get() == nil {
+		var ret float64
+		return ret
+	}
+	return *o.GcpHostCount.Get()
+}
+
+// GetGcpHostCountOk returns a tuple with the GcpHostCount field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned.
+func (o *UsageCloudSecurityPostureManagementHour) GetGcpHostCountOk() (*float64, bool) {
+	if o == nil {
+		return nil, false
+	}
+	return o.GcpHostCount.Get(), o.GcpHostCount.IsSet()
+}
+
+// HasGcpHostCount returns a boolean if a field has been set.
+func (o *UsageCloudSecurityPostureManagementHour) HasGcpHostCount() bool {
+	return o != nil && o.GcpHostCount.IsSet()
+}
+
+// SetGcpHostCount gets a reference to the given datadog.NullableFloat64 and assigns it to the GcpHostCount field.
+func (o *UsageCloudSecurityPostureManagementHour) SetGcpHostCount(v float64) {
+	o.GcpHostCount.Set(&v)
+}
+
+// SetGcpHostCountNil sets the value for GcpHostCount to be an explicit nil.
+func (o *UsageCloudSecurityPostureManagementHour) SetGcpHostCountNil() {
+	o.GcpHostCount.Set(nil)
+}
+
+// UnsetGcpHostCount ensures that no value is present for GcpHostCount, not even an explicit nil.
+func (o *UsageCloudSecurityPostureManagementHour) UnsetGcpHostCount() {
+	o.GcpHostCount.Unset()
+}
+
 // GetHostCount returns the HostCount field value if set, zero value otherwise (both if not set or set to explicit null).
 func (o *UsageCloudSecurityPostureManagementHour) GetHostCount() float64 {
 	if o == nil || o.HostCount.Get() == nil {
@@ -392,6 +433,9 @@ func (o UsageCloudSecurityPostureManagementHour) MarshalJSON() ([]byte, error) {
 	if o.ContainerCount.IsSet() {
 		toSerialize["container_count"] = o.ContainerCount.Get()
 	}
+	if o.GcpHostCount.IsSet() {
+		toSerialize["gcp_host_count"] = o.GcpHostCount.Get()
+	}
 	if o.HostCount.IsSet() {
 		toSerialize["host_count"] = o.HostCount.Get()
 	}
@@ -424,6 +468,7 @@ func (o *UsageCloudSecurityPostureManagementHour) UnmarshalJSON(bytes []byte) (e
 		AzureHostCount      datadog.NullableFloat64 `json:"azure_host_count,omitempty"`
 		ComplianceHostCount datadog.NullableFloat64 `json:"compliance_host_count,omitempty"`
 		ContainerCount      datadog.NullableFloat64 `json:"container_count,omitempty"`
+		GcpHostCount        datadog.NullableFloat64 `json:"gcp_host_count,omitempty"`
 		HostCount           datadog.NullableFloat64 `json:"host_count,omitempty"`
 		Hour                *time.Time              `json:"hour,omitempty"`
 		OrgName             *string                 `json:"org_name,omitempty"`
@@ -443,6 +488,7 @@ func (o *UsageCloudSecurityPostureManagementHour) UnmarshalJSON(bytes []byte) (e
 	o.AzureHostCount = all.AzureHostCount
 	o.ComplianceHostCount = all.ComplianceHostCount
 	o.ContainerCount = all.ContainerCount
+	o.GcpHostCount = all.GcpHostCount
 	o.HostCount = all.HostCount
 	o.Hour = all.Hour
 	o.OrgName = all.OrgName
diff --git a/api/datadogV1/model_usage_summary_date.go b/api/datadogV1/model_usage_summary_date.go
index 8ce6ce6a2ab..7d0f40c4261 100644
--- a/api/datadogV1/model_usage_summary_date.go
+++ b/api/datadogV1/model_usage_summary_date.go
@@ -63,6 +63,8 @@ type UsageSummaryDate struct {
 	CspmContainerAvg *int64 `json:"cspm_container_avg,omitempty"`
 	// Shows the high-water mark of Cloud Security Posture Management containers over all hours in the current date for all organizations.
 	CspmContainerHwm *int64 `json:"cspm_container_hwm,omitempty"`
+	// Shows the 99th percentile of all Cloud Security Posture Management GCP hosts over all hours in the current date for all organizations.
+	CspmGcpHostTop99p *int64 `json:"cspm_gcp_host_top99p,omitempty"`
 	// Shows the 99th percentile of all Cloud Security Posture Management hosts over all hours in the current date for all organizations.
 	CspmHostTop99p *int64 `json:"cspm_host_top99p,omitempty"`
 	// Shows the average number of distinct custom metrics over all hours in the current date for all organizations.
@@ -901,6 +903,34 @@ func (o *UsageSummaryDate) SetCspmContainerHwm(v int64) {
 	o.CspmContainerHwm = &v
 }
 
+// GetCspmGcpHostTop99p returns the CspmGcpHostTop99p field value if set, zero value otherwise.
+func (o *UsageSummaryDate) GetCspmGcpHostTop99p() int64 {
+	if o == nil || o.CspmGcpHostTop99p == nil {
+		var ret int64
+		return ret
+	}
+	return *o.CspmGcpHostTop99p
+}
+
+// GetCspmGcpHostTop99pOk returns a tuple with the CspmGcpHostTop99p field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UsageSummaryDate) GetCspmGcpHostTop99pOk() (*int64, bool) {
+	if o == nil || o.CspmGcpHostTop99p == nil {
+		return nil, false
+	}
+	return o.CspmGcpHostTop99p, true
+}
+
+// HasCspmGcpHostTop99p returns a boolean if a field has been set.
+func (o *UsageSummaryDate) HasCspmGcpHostTop99p() bool {
+	return o != nil && o.CspmGcpHostTop99p != nil
+}
+
+// SetCspmGcpHostTop99p gets a reference to the given int64 and assigns it to the CspmGcpHostTop99p field.
+func (o *UsageSummaryDate) SetCspmGcpHostTop99p(v int64) {
+	o.CspmGcpHostTop99p = &v
+}
+
 // GetCspmHostTop99p returns the CspmHostTop99p field value if set, zero value otherwise.
 func (o *UsageSummaryDate) GetCspmHostTop99p() int64 {
 	if o == nil || o.CspmHostTop99p == nil {
@@ -2217,6 +2247,9 @@ func (o UsageSummaryDate) MarshalJSON() ([]byte, error) {
 	if o.CspmContainerHwm != nil {
 		toSerialize["cspm_container_hwm"] = o.CspmContainerHwm
 	}
+	if o.CspmGcpHostTop99p != nil {
+		toSerialize["cspm_gcp_host_top99p"] = o.CspmGcpHostTop99p
+	}
 	if o.CspmHostTop99p != nil {
 		toSerialize["cspm_host_top99p"] = o.CspmHostTop99p
 	}
@@ -2390,6 +2423,7 @@ func (o *UsageSummaryDate) UnmarshalJSON(bytes []byte) (err error) {
 		CspmAzureHostTop99p                     *int64                `json:"cspm_azure_host_top99p,omitempty"`
 		CspmContainerAvg                        *int64                `json:"cspm_container_avg,omitempty"`
 		CspmContainerHwm                        *int64                `json:"cspm_container_hwm,omitempty"`
+		CspmGcpHostTop99p                       *int64                `json:"cspm_gcp_host_top99p,omitempty"`
 		CspmHostTop99p                          *int64                `json:"cspm_host_top99p,omitempty"`
 		CustomTsAvg                             *int64                `json:"custom_ts_avg,omitempty"`
 		CwsContainerCountAvg                    *int64                `json:"cws_container_count_avg,omitempty"`
@@ -2470,6 +2504,7 @@ func (o *UsageSummaryDate) UnmarshalJSON(bytes []byte) (err error) {
 	o.CspmAzureHostTop99p = all.CspmAzureHostTop99p
 	o.CspmContainerAvg = all.CspmContainerAvg
 	o.CspmContainerHwm = all.CspmContainerHwm
+	o.CspmGcpHostTop99p = all.CspmGcpHostTop99p
 	o.CspmHostTop99p = all.CspmHostTop99p
 	o.CustomTsAvg = all.CustomTsAvg
 	o.CwsContainerCountAvg = all.CwsContainerCountAvg
diff --git a/api/datadogV1/model_usage_summary_date_org.go b/api/datadogV1/model_usage_summary_date_org.go
index a5b0f033147..f73955a432b 100644
--- a/api/datadogV1/model_usage_summary_date_org.go
+++ b/api/datadogV1/model_usage_summary_date_org.go
@@ -62,6 +62,8 @@ type UsageSummaryDateOrg struct {
 	CspmContainerAvg *int64 `json:"cspm_container_avg,omitempty"`
 	// Shows the high-water mark of Cloud Security Posture Management containers over all hours in the current date for the given org.
 	CspmContainerHwm *int64 `json:"cspm_container_hwm,omitempty"`
+	// Shows the 99th percentile of all Cloud Security Posture Management GCP hosts over all hours in the current date for the given org.
+	CspmGcpHostTop99p *int64 `json:"cspm_gcp_host_top99p,omitempty"`
 	// Shows the 99th percentile of all Cloud Security Posture Management hosts over all hours in the current date for the given org.
 	CspmHostTop99p *int64 `json:"cspm_host_top99p,omitempty"`
 	// Shows the average number of distinct custom metrics over all hours in the current date for the given org.
@@ -904,6 +906,34 @@ func (o *UsageSummaryDateOrg) SetCspmContainerHwm(v int64) {
 	o.CspmContainerHwm = &v
 }
 
+// GetCspmGcpHostTop99p returns the CspmGcpHostTop99p field value if set, zero value otherwise.
+func (o *UsageSummaryDateOrg) GetCspmGcpHostTop99p() int64 {
+	if o == nil || o.CspmGcpHostTop99p == nil {
+		var ret int64
+		return ret
+	}
+	return *o.CspmGcpHostTop99p
+}
+
+// GetCspmGcpHostTop99pOk returns a tuple with the CspmGcpHostTop99p field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UsageSummaryDateOrg) GetCspmGcpHostTop99pOk() (*int64, bool) {
+	if o == nil || o.CspmGcpHostTop99p == nil {
+		return nil, false
+	}
+	return o.CspmGcpHostTop99p, true
+}
+
+// HasCspmGcpHostTop99p returns a boolean if a field has been set.
+func (o *UsageSummaryDateOrg) HasCspmGcpHostTop99p() bool {
+	return o != nil && o.CspmGcpHostTop99p != nil
+}
+
+// SetCspmGcpHostTop99p gets a reference to the given int64 and assigns it to the CspmGcpHostTop99p field.
+func (o *UsageSummaryDateOrg) SetCspmGcpHostTop99p(v int64) {
+	o.CspmGcpHostTop99p = &v
+}
+
 // GetCspmHostTop99p returns the CspmHostTop99p field value if set, zero value otherwise.
 func (o *UsageSummaryDateOrg) GetCspmHostTop99p() int64 {
 	if o == nil || o.CspmHostTop99p == nil {
@@ -2276,6 +2306,9 @@ func (o UsageSummaryDateOrg) MarshalJSON() ([]byte, error) {
 	if o.CspmContainerHwm != nil {
 		toSerialize["cspm_container_hwm"] = o.CspmContainerHwm
 	}
+	if o.CspmGcpHostTop99p != nil {
+		toSerialize["cspm_gcp_host_top99p"] = o.CspmGcpHostTop99p
+	}
 	if o.CspmHostTop99p != nil {
 		toSerialize["cspm_host_top99p"] = o.CspmHostTop99p
 	}
@@ -2451,6 +2484,7 @@ func (o *UsageSummaryDateOrg) UnmarshalJSON(bytes []byte) (err error) {
 		CspmAzureHostTop99p                     *int64  `json:"cspm_azure_host_top99p,omitempty"`
 		CspmContainerAvg                        *int64  `json:"cspm_container_avg,omitempty"`
 		CspmContainerHwm                        *int64  `json:"cspm_container_hwm,omitempty"`
+		CspmGcpHostTop99p                       *int64  `json:"cspm_gcp_host_top99p,omitempty"`
 		CspmHostTop99p                          *int64  `json:"cspm_host_top99p,omitempty"`
 		CustomTsAvg                             *int64  `json:"custom_ts_avg,omitempty"`
 		CwsContainerCountAvg                    *int64  `json:"cws_container_count_avg,omitempty"`
@@ -2533,6 +2567,7 @@ func (o *UsageSummaryDateOrg) UnmarshalJSON(bytes []byte) (err error) {
 	o.CspmAzureHostTop99p = all.CspmAzureHostTop99p
 	o.CspmContainerAvg = all.CspmContainerAvg
 	o.CspmContainerHwm = all.CspmContainerHwm
+	o.CspmGcpHostTop99p = all.CspmGcpHostTop99p
 	o.CspmHostTop99p = all.CspmHostTop99p
 	o.CustomTsAvg = all.CustomTsAvg
 	o.CwsContainerCountAvg = all.CwsContainerCountAvg
diff --git a/api/datadogV1/model_usage_summary_response.go b/api/datadogV1/model_usage_summary_response.go
index 42ed2b67bfa..37fc0f01339 100644
--- a/api/datadogV1/model_usage_summary_response.go
+++ b/api/datadogV1/model_usage_summary_response.go
@@ -65,6 +65,8 @@ type UsageSummaryResponse struct {
 	CspmContainerAvgSum *int64 `json:"cspm_container_avg_sum,omitempty"`
 	// Shows the sum of the the high-water marks of Cloud Security Posture Management containers over all hours in the current months for all organizations.
 	CspmContainerHwmSum *int64 `json:"cspm_container_hwm_sum,omitempty"`
+	// Shows the 99th percentile of all Cloud Security Posture Management GCP hosts over all hours in the current months for all organizations.
+	CspmGcpHostTop99pSum *int64 `json:"cspm_gcp_host_top99p_sum,omitempty"`
 	// Shows the 99th percentile of all Cloud Security Posture Management hosts over all hours in the current months for all organizations.
 	CspmHostTop99pSum *int64 `json:"cspm_host_top99p_sum,omitempty"`
 	// Shows the average number of distinct custom metrics over all hours in the current months for all organizations.
@@ -947,6 +949,34 @@ func (o *UsageSummaryResponse) SetCspmContainerHwmSum(v int64) {
 	o.CspmContainerHwmSum = &v
 }
 
+// GetCspmGcpHostTop99pSum returns the CspmGcpHostTop99pSum field value if set, zero value otherwise.
+func (o *UsageSummaryResponse) GetCspmGcpHostTop99pSum() int64 {
+	if o == nil || o.CspmGcpHostTop99pSum == nil {
+		var ret int64
+		return ret
+	}
+	return *o.CspmGcpHostTop99pSum
+}
+
+// GetCspmGcpHostTop99pSumOk returns a tuple with the CspmGcpHostTop99pSum field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UsageSummaryResponse) GetCspmGcpHostTop99pSumOk() (*int64, bool) {
+	if o == nil || o.CspmGcpHostTop99pSum == nil {
+		return nil, false
+	}
+	return o.CspmGcpHostTop99pSum, true
+}
+
+// HasCspmGcpHostTop99pSum returns a boolean if a field has been set.
+func (o *UsageSummaryResponse) HasCspmGcpHostTop99pSum() bool {
+	return o != nil && o.CspmGcpHostTop99pSum != nil
+}
+
+// SetCspmGcpHostTop99pSum gets a reference to the given int64 and assigns it to the CspmGcpHostTop99pSum field.
+func (o *UsageSummaryResponse) SetCspmGcpHostTop99pSum(v int64) {
+	o.CspmGcpHostTop99pSum = &v
+}
+
 // GetCspmHostTop99pSum returns the CspmHostTop99pSum field value if set, zero value otherwise.
 func (o *UsageSummaryResponse) GetCspmHostTop99pSum() int64 {
 	if o == nil || o.CspmHostTop99pSum == nil {
@@ -2490,6 +2520,9 @@ func (o UsageSummaryResponse) MarshalJSON() ([]byte, error) {
 	if o.CspmContainerHwmSum != nil {
 		toSerialize["cspm_container_hwm_sum"] = o.CspmContainerHwmSum
 	}
+	if o.CspmGcpHostTop99pSum != nil {
+		toSerialize["cspm_gcp_host_top99p_sum"] = o.CspmGcpHostTop99pSum
+	}
 	if o.CspmHostTop99pSum != nil {
 		toSerialize["cspm_host_top99p_sum"] = o.CspmHostTop99pSum
 	}
@@ -2696,6 +2729,7 @@ func (o *UsageSummaryResponse) UnmarshalJSON(bytes []byte) (err error) {
 		CspmAzureHostTop99pSum                     *int64             `json:"cspm_azure_host_top99p_sum,omitempty"`
 		CspmContainerAvgSum                        *int64             `json:"cspm_container_avg_sum,omitempty"`
 		CspmContainerHwmSum                        *int64             `json:"cspm_container_hwm_sum,omitempty"`
+		CspmGcpHostTop99pSum                       *int64             `json:"cspm_gcp_host_top99p_sum,omitempty"`
 		CspmHostTop99pSum                          *int64             `json:"cspm_host_top99p_sum,omitempty"`
 		CustomTsSum                                *int64             `json:"custom_ts_sum,omitempty"`
 		CwsContainersAvgSum                        *int64             `json:"cws_containers_avg_sum,omitempty"`
@@ -2785,6 +2819,7 @@ func (o *UsageSummaryResponse) UnmarshalJSON(bytes []byte) (err error) {
 	o.CspmAzureHostTop99pSum = all.CspmAzureHostTop99pSum
 	o.CspmContainerAvgSum = all.CspmContainerAvgSum
 	o.CspmContainerHwmSum = all.CspmContainerHwmSum
+	o.CspmGcpHostTop99pSum = all.CspmGcpHostTop99pSum
 	o.CspmHostTop99pSum = all.CspmHostTop99pSum
 	o.CustomTsSum = all.CustomTsSum
 	o.CwsContainersAvgSum = all.CwsContainersAvgSum