Skip to content

Commit

Permalink
Regenerate client from commit fd0b0fcb of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Dec 14, 2023
1 parent c8d58a8 commit eb9ab37
Show file tree
Hide file tree
Showing 24 changed files with 665 additions and 70 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": "2023-12-14 10:49:24.189468",
"spec_repo_commit": "43a99a56"
"regenerated": "2023-12-14 16:38:26.843043",
"spec_repo_commit": "fd0b0fcb"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-12-14 10:49:24.208935",
"spec_repo_commit": "43a99a56"
"regenerated": "2023-12-14 16:38:26.858681",
"spec_repo_commit": "fd0b0fcb"
}
}
}
17 changes: 15 additions & 2 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3212,8 +3212,16 @@ components:
type: string
is_cspm_enabled:
default: false
description: When enabled, Datadog performs configuration checks across
your Google Cloud environment by continuously scanning every resource.
description: '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.'
example: true
type: boolean
is_security_command_center_enabled:
default: false
description: 'When enabled, Datadog will attempt to collect Security Command
Center Findings. Note: This requires additional permissions on the service
account.'
example: true
type: boolean
private_key:
Expand All @@ -3229,6 +3237,11 @@ components:
key.
example: datadog-apitest
type: string
resource_collection_enabled:
default: false
description: When enabled, Datadog scans for all resources in your GCP environment.
example: true
type: boolean
token_uri:
description: Should be `https://accounts.google.com/o/oauth2/token`.
example: https://accounts.google.com/o/oauth2/token
Expand Down
16 changes: 14 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6393,8 +6393,20 @@ components:
type: string
type: array
is_cspm_enabled:
description: When enabled, Datadog performs configuration checks across
your Google Cloud environment by continuously scanning every resource.
description: '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.'
type: boolean
is_security_command_center_enabled:
default: false
description: 'When enabled, Datadog will attempt to collect Security Command
Center Findings. Note: This requires additional permissions on the service
account.'
example: true
type: boolean
resource_collection_enabled:
default: false
description: When enabled, Datadog scans for all resources in your GCP environment.
type: boolean
type: object
GCPSTSServiceAccountCreateRequest:
Expand Down
110 changes: 94 additions & 16 deletions api/datadogV1/model_gcp_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,18 @@ type GCPAccount struct {
// Limit the GCE instances that are pulled into Datadog by using tags.
// Only hosts that match one of the defined tags are imported into Datadog.
HostFilters *string `json:"host_filters,omitempty"`
// When enabled, Datadog performs configuration checks across your Google Cloud environment by continuously scanning every resource.
// 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.
IsCspmEnabled *bool `json:"is_cspm_enabled,omitempty"`
// When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account.
IsSecurityCommandCenterEnabled *bool `json:"is_security_command_center_enabled,omitempty"`
// Your private key name found in your JSON service account key.
PrivateKey *string `json:"private_key,omitempty"`
// Your private key ID found in your JSON service account key.
PrivateKeyId *string `json:"private_key_id,omitempty"`
// Your Google Cloud project ID found in your JSON service account key.
ProjectId *string `json:"project_id,omitempty"`
// When enabled, Datadog scans for all resources in your GCP environment.
ResourceCollectionEnabled *bool `json:"resource_collection_enabled,omitempty"`
// Should be `https://accounts.google.com/o/oauth2/token`.
TokenUri *string `json:"token_uri,omitempty"`
// The value for service_account found in your JSON service account key.
Expand All @@ -53,6 +57,10 @@ func NewGCPAccount() *GCPAccount {
this := GCPAccount{}
var isCspmEnabled bool = false
this.IsCspmEnabled = &isCspmEnabled
var isSecurityCommandCenterEnabled bool = false
this.IsSecurityCommandCenterEnabled = &isSecurityCommandCenterEnabled
var resourceCollectionEnabled bool = false
this.ResourceCollectionEnabled = &resourceCollectionEnabled
return &this
}

Expand All @@ -63,6 +71,10 @@ func NewGCPAccountWithDefaults() *GCPAccount {
this := GCPAccount{}
var isCspmEnabled bool = false
this.IsCspmEnabled = &isCspmEnabled
var isSecurityCommandCenterEnabled bool = false
this.IsSecurityCommandCenterEnabled = &isSecurityCommandCenterEnabled
var resourceCollectionEnabled bool = false
this.ResourceCollectionEnabled = &resourceCollectionEnabled
return &this
}

Expand Down Expand Up @@ -318,6 +330,34 @@ func (o *GCPAccount) SetIsCspmEnabled(v bool) {
o.IsCspmEnabled = &v
}

// GetIsSecurityCommandCenterEnabled returns the IsSecurityCommandCenterEnabled field value if set, zero value otherwise.
func (o *GCPAccount) GetIsSecurityCommandCenterEnabled() bool {
if o == nil || o.IsSecurityCommandCenterEnabled == nil {
var ret bool
return ret
}
return *o.IsSecurityCommandCenterEnabled
}

// GetIsSecurityCommandCenterEnabledOk returns a tuple with the IsSecurityCommandCenterEnabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GCPAccount) GetIsSecurityCommandCenterEnabledOk() (*bool, bool) {
if o == nil || o.IsSecurityCommandCenterEnabled == nil {
return nil, false
}
return o.IsSecurityCommandCenterEnabled, true
}

// HasIsSecurityCommandCenterEnabled returns a boolean if a field has been set.
func (o *GCPAccount) HasIsSecurityCommandCenterEnabled() bool {
return o != nil && o.IsSecurityCommandCenterEnabled != nil
}

// SetIsSecurityCommandCenterEnabled gets a reference to the given bool and assigns it to the IsSecurityCommandCenterEnabled field.
func (o *GCPAccount) SetIsSecurityCommandCenterEnabled(v bool) {
o.IsSecurityCommandCenterEnabled = &v
}

// GetPrivateKey returns the PrivateKey field value if set, zero value otherwise.
func (o *GCPAccount) GetPrivateKey() string {
if o == nil || o.PrivateKey == nil {
Expand Down Expand Up @@ -402,6 +442,34 @@ func (o *GCPAccount) SetProjectId(v string) {
o.ProjectId = &v
}

// GetResourceCollectionEnabled returns the ResourceCollectionEnabled field value if set, zero value otherwise.
func (o *GCPAccount) GetResourceCollectionEnabled() bool {
if o == nil || o.ResourceCollectionEnabled == nil {
var ret bool
return ret
}
return *o.ResourceCollectionEnabled
}

// GetResourceCollectionEnabledOk returns a tuple with the ResourceCollectionEnabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GCPAccount) GetResourceCollectionEnabledOk() (*bool, bool) {
if o == nil || o.ResourceCollectionEnabled == nil {
return nil, false
}
return o.ResourceCollectionEnabled, true
}

// HasResourceCollectionEnabled returns a boolean if a field has been set.
func (o *GCPAccount) HasResourceCollectionEnabled() bool {
return o != nil && o.ResourceCollectionEnabled != nil
}

// SetResourceCollectionEnabled gets a reference to the given bool and assigns it to the ResourceCollectionEnabled field.
func (o *GCPAccount) SetResourceCollectionEnabled(v bool) {
o.ResourceCollectionEnabled = &v
}

// GetTokenUri returns the TokenUri field value if set, zero value otherwise.
func (o *GCPAccount) GetTokenUri() string {
if o == nil || o.TokenUri == nil {
Expand Down Expand Up @@ -491,6 +559,9 @@ func (o GCPAccount) MarshalJSON() ([]byte, error) {
if o.IsCspmEnabled != nil {
toSerialize["is_cspm_enabled"] = o.IsCspmEnabled
}
if o.IsSecurityCommandCenterEnabled != nil {
toSerialize["is_security_command_center_enabled"] = o.IsSecurityCommandCenterEnabled
}
if o.PrivateKey != nil {
toSerialize["private_key"] = o.PrivateKey
}
Expand All @@ -500,6 +571,9 @@ func (o GCPAccount) MarshalJSON() ([]byte, error) {
if o.ProjectId != nil {
toSerialize["project_id"] = o.ProjectId
}
if o.ResourceCollectionEnabled != nil {
toSerialize["resource_collection_enabled"] = o.ResourceCollectionEnabled
}
if o.TokenUri != nil {
toSerialize["token_uri"] = o.TokenUri
}
Expand All @@ -516,27 +590,29 @@ func (o GCPAccount) MarshalJSON() ([]byte, error) {
// UnmarshalJSON deserializes the given payload.
func (o *GCPAccount) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
AuthProviderX509CertUrl *string `json:"auth_provider_x509_cert_url,omitempty"`
AuthUri *string `json:"auth_uri,omitempty"`
Automute *bool `json:"automute,omitempty"`
ClientEmail *string `json:"client_email,omitempty"`
ClientId *string `json:"client_id,omitempty"`
ClientX509CertUrl *string `json:"client_x509_cert_url,omitempty"`
Errors []string `json:"errors,omitempty"`
HostFilters *string `json:"host_filters,omitempty"`
IsCspmEnabled *bool `json:"is_cspm_enabled,omitempty"`
PrivateKey *string `json:"private_key,omitempty"`
PrivateKeyId *string `json:"private_key_id,omitempty"`
ProjectId *string `json:"project_id,omitempty"`
TokenUri *string `json:"token_uri,omitempty"`
Type *string `json:"type,omitempty"`
AuthProviderX509CertUrl *string `json:"auth_provider_x509_cert_url,omitempty"`
AuthUri *string `json:"auth_uri,omitempty"`
Automute *bool `json:"automute,omitempty"`
ClientEmail *string `json:"client_email,omitempty"`
ClientId *string `json:"client_id,omitempty"`
ClientX509CertUrl *string `json:"client_x509_cert_url,omitempty"`
Errors []string `json:"errors,omitempty"`
HostFilters *string `json:"host_filters,omitempty"`
IsCspmEnabled *bool `json:"is_cspm_enabled,omitempty"`
IsSecurityCommandCenterEnabled *bool `json:"is_security_command_center_enabled,omitempty"`
PrivateKey *string `json:"private_key,omitempty"`
PrivateKeyId *string `json:"private_key_id,omitempty"`
ProjectId *string `json:"project_id,omitempty"`
ResourceCollectionEnabled *bool `json:"resource_collection_enabled,omitempty"`
TokenUri *string `json:"token_uri,omitempty"`
Type *string `json:"type,omitempty"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"auth_provider_x509_cert_url", "auth_uri", "automute", "client_email", "client_id", "client_x509_cert_url", "errors", "host_filters", "is_cspm_enabled", "private_key", "private_key_id", "project_id", "token_uri", "type"})
datadog.DeleteKeys(additionalProperties, &[]string{"auth_provider_x509_cert_url", "auth_uri", "automute", "client_email", "client_id", "client_x509_cert_url", "errors", "host_filters", "is_cspm_enabled", "is_security_command_center_enabled", "private_key", "private_key_id", "project_id", "resource_collection_enabled", "token_uri", "type"})
} else {
return err
}
Expand All @@ -549,9 +625,11 @@ func (o *GCPAccount) UnmarshalJSON(bytes []byte) (err error) {
o.Errors = all.Errors
o.HostFilters = all.HostFilters
o.IsCspmEnabled = all.IsCspmEnabled
o.IsSecurityCommandCenterEnabled = all.IsSecurityCommandCenterEnabled
o.PrivateKey = all.PrivateKey
o.PrivateKeyId = all.PrivateKeyId
o.ProjectId = all.ProjectId
o.ResourceCollectionEnabled = all.ResourceCollectionEnabled
o.TokenUri = all.TokenUri
o.Type = all.Type

Expand Down
Loading

0 comments on commit eb9ab37

Please sign in to comment.