Skip to content

Commit

Permalink
Regenerate client from commit e62b4d51 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Oct 3, 2023
1 parent 3283901 commit 08beba8
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 13 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-10-02 18:58:13.126434",
"spec_repo_commit": "aee9e14a"
"regenerated": "2023-10-03 23:41:02.697671",
"spec_repo_commit": "e62b4d51"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-02 18:58:13.180866",
"spec_repo_commit": "aee9e14a"
"regenerated": "2023-10-03 23:41:02.711676",
"spec_repo_commit": "e62b4d51"
}
}
}
8 changes: 8 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,14 @@ components:
description: Your Azure web application secret key.
example: testingx./Sw*g/Y33t..R1cH+hScMDt
type: string
container_app_filters:
description: 'Limit the Azure container apps that are pulled into Datadog
using tags.

Only container apps that match one of the defined tags are imported into
Datadog.'
example: key:value,filter:example
type: string
cspm_enabled:
description: Enable Cloud Security Management Misconfigurations for your
organization.
Expand Down
38 changes: 37 additions & 1 deletion api/datadogV1/model_azure_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ type AzureAccount struct {
ClientId *string `json:"client_id,omitempty"`
// Your Azure web application secret key.
ClientSecret *string `json:"client_secret,omitempty"`
// Limit the Azure container apps that are pulled into Datadog using tags.
// Only container apps that match one of the defined tags are imported into Datadog.
ContainerAppFilters *string `json:"container_app_filters,omitempty"`
// Enable Cloud Security Management Misconfigurations for your organization.
CspmEnabled *bool `json:"cspm_enabled,omitempty"`
// Enable custom metrics for your organization.
Expand Down Expand Up @@ -170,6 +173,34 @@ func (o *AzureAccount) SetClientSecret(v string) {
o.ClientSecret = &v
}

// GetContainerAppFilters returns the ContainerAppFilters field value if set, zero value otherwise.
func (o *AzureAccount) GetContainerAppFilters() string {
if o == nil || o.ContainerAppFilters == nil {
var ret string
return ret
}
return *o.ContainerAppFilters
}

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

// HasContainerAppFilters returns a boolean if a field has been set.
func (o *AzureAccount) HasContainerAppFilters() bool {
return o != nil && o.ContainerAppFilters != nil
}

// SetContainerAppFilters gets a reference to the given string and assigns it to the ContainerAppFilters field.
func (o *AzureAccount) SetContainerAppFilters(v string) {
o.ContainerAppFilters = &v
}

// GetCspmEnabled returns the CspmEnabled field value if set, zero value otherwise.
func (o *AzureAccount) GetCspmEnabled() bool {
if o == nil || o.CspmEnabled == nil {
Expand Down Expand Up @@ -384,6 +415,9 @@ func (o AzureAccount) MarshalJSON() ([]byte, error) {
if o.ClientSecret != nil {
toSerialize["client_secret"] = o.ClientSecret
}
if o.ContainerAppFilters != nil {
toSerialize["container_app_filters"] = o.ContainerAppFilters
}
if o.CspmEnabled != nil {
toSerialize["cspm_enabled"] = o.CspmEnabled
}
Expand Down Expand Up @@ -419,6 +453,7 @@ func (o *AzureAccount) UnmarshalJSON(bytes []byte) (err error) {
Automute *bool `json:"automute,omitempty"`
ClientId *string `json:"client_id,omitempty"`
ClientSecret *string `json:"client_secret,omitempty"`
ContainerAppFilters *string `json:"container_app_filters,omitempty"`
CspmEnabled *bool `json:"cspm_enabled,omitempty"`
CustomMetricsEnabled *bool `json:"custom_metrics_enabled,omitempty"`
Errors []string `json:"errors,omitempty"`
Expand All @@ -432,14 +467,15 @@ func (o *AzureAccount) UnmarshalJSON(bytes []byte) (err error) {
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"app_service_plan_filters", "automute", "client_id", "client_secret", "cspm_enabled", "custom_metrics_enabled", "errors", "host_filters", "new_client_id", "new_tenant_name", "tenant_name"})
datadog.DeleteKeys(additionalProperties, &[]string{"app_service_plan_filters", "automute", "client_id", "client_secret", "container_app_filters", "cspm_enabled", "custom_metrics_enabled", "errors", "host_filters", "new_client_id", "new_tenant_name", "tenant_name"})
} else {
return err
}
o.AppServicePlanFilters = all.AppServicePlanFilters
o.Automute = all.Automute
o.ClientId = all.ClientId
o.ClientSecret = all.ClientSecret
o.ContainerAppFilters = all.ContainerAppFilters
o.CspmEnabled = all.CspmEnabled
o.CustomMetricsEnabled = all.CustomMetricsEnabled
o.Errors = all.Errors
Expand Down
1 change: 1 addition & 0 deletions examples/v1/azure-integration/CreateAzureIntegration.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func main() {
Automute: datadog.PtrBool(true),
ClientId: datadog.PtrString("testc7f6-1234-5678-9101-3fcbf464test"),
ClientSecret: datadog.PtrString("testingx./Sw*g/Y33t..R1cH+hScMDt"),
ContainerAppFilters: datadog.PtrString("key:value,filter:example"),
CspmEnabled: datadog.PtrBool(true),
CustomMetricsEnabled: datadog.PtrBool(true),
Errors: []string{
Expand Down
1 change: 1 addition & 0 deletions examples/v1/azure-integration/DeleteAzureIntegration.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func main() {
Automute: datadog.PtrBool(true),
ClientId: datadog.PtrString("testc7f6-1234-5678-9101-3fcbf464test"),
ClientSecret: datadog.PtrString("testingx./Sw*g/Y33t..R1cH+hScMDt"),
ContainerAppFilters: datadog.PtrString("key:value,filter:example"),
CspmEnabled: datadog.PtrBool(true),
CustomMetricsEnabled: datadog.PtrBool(true),
Errors: []string{
Expand Down
1 change: 1 addition & 0 deletions examples/v1/azure-integration/UpdateAzureHostFilters.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func main() {
Automute: datadog.PtrBool(true),
ClientId: datadog.PtrString("testc7f6-1234-5678-9101-3fcbf464test"),
ClientSecret: datadog.PtrString("testingx./Sw*g/Y33t..R1cH+hScMDt"),
ContainerAppFilters: datadog.PtrString("key:value,filter:example"),
CspmEnabled: datadog.PtrBool(true),
CustomMetricsEnabled: datadog.PtrBool(true),
Errors: []string{
Expand Down
1 change: 1 addition & 0 deletions examples/v1/azure-integration/UpdateAzureIntegration.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func main() {
Automute: datadog.PtrBool(true),
ClientId: datadog.PtrString("testc7f6-1234-5678-9101-3fcbf464test"),
ClientSecret: datadog.PtrString("testingx./Sw*g/Y33t..R1cH+hScMDt"),
ContainerAppFilters: datadog.PtrString("key:value,filter:example"),
CspmEnabled: datadog.PtrBool(true),
CustomMetricsEnabled: datadog.PtrBool(true),
Errors: []string{
Expand Down
16 changes: 8 additions & 8 deletions tests/scenarios/features/v1/azure_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ Feature: Azure Integration
@generated @skip @team:DataDog/cloud-integrations
Scenario: Create an Azure integration returns "Bad Request" response
Given new "CreateAzureIntegration" request
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-integrations
Scenario: Create an Azure integration returns "OK" response
Given new "CreateAzureIntegration" request
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/cloud-integrations
Scenario: Delete an Azure integration returns "Bad Request" response
Given new "DeleteAzureIntegration" request
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-integrations
Scenario: Delete an Azure integration returns "OK" response
Given new "DeleteAzureIntegration" request
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 200 OK

Expand All @@ -52,27 +52,27 @@ Feature: Azure Integration
@generated @skip @team:DataDog/cloud-integrations
Scenario: Update Azure integration host filters returns "Bad Request" response
Given new "UpdateAzureHostFilters" request
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-integrations
Scenario: Update Azure integration host filters returns "OK" response
Given new "UpdateAzureHostFilters" request
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/cloud-integrations
Scenario: Update an Azure integration returns "Bad Request" response
Given new "UpdateAzureIntegration" request
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-integrations
Scenario: Update an Azure integration returns "OK" response
Given new "UpdateAzureIntegration" request
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
And body with value {"app_service_plan_filters": "key:value,filter:example", "automute": true, "client_id": "testc7f6-1234-5678-9101-3fcbf464test", "client_secret": "testingx./Sw*g/Y33t..R1cH+hScMDt", "container_app_filters": "key:value,filter:example", "cspm_enabled": true, "custom_metrics_enabled": true, "errors": ["*"], "host_filters": "key:value,filter:example", "new_client_id": "new1c7f6-1234-5678-9101-3fcbf464test", "new_tenant_name": "new1c44-1234-5678-9101-cc00736ftest", "tenant_name": "testc44-1234-5678-9101-cc00736ftest"}
When the request is sent
Then the response status is 200 OK

0 comments on commit 08beba8

Please sign in to comment.