Skip to content

Commit

Permalink
Merge branch 'master' into datadog-api-spec/generated/2542
Browse files Browse the repository at this point in the history
  • Loading branch information
HantingZhang2 committed Dec 4, 2023
2 parents 49c6251 + 4716685 commit e1ec421
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 59 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-01 21:30:59.765888",
"spec_repo_commit": "8855a8d3"
"regenerated": "2023-12-04 15:37:48.058716",
"spec_repo_commit": "e66bf244"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-12-01 21:30:59.783582",
"spec_repo_commit": "8855a8d3"
"regenerated": "2023-12-04 15:37:48.084181",
"spec_repo_commit": "e66bf244"
}
}
}
11 changes: 9 additions & 2 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -808,8 +808,9 @@ components:
example: key:value,filter:example
type: string
cspm_enabled:
description: Enable Cloud Security Management Misconfigurations for your
organization.
description: "When enabled, Datadog\u2019s Cloud Security Management product
will scan resource configurations monitored by this app registration.\nNote:
This requires resource_collection_enabled to be set to true."
example: true
type: boolean
custom_metrics_enabled:
Expand Down Expand Up @@ -840,6 +841,12 @@ components:
description: Your New Azure Active Directory ID.
example: new1c44-1234-5678-9101-cc00736ftest
type: string
resource_collection_enabled:
description: When enabled, Datadog collects metadata and configuration info
from cloud resources (compute instances, databases, load balancers, etc.)
monitored by this app registration.
example: true
type: boolean
tenant_name:
description: Your Azure Active Directory ID.
example: testc44-1234-5678-9101-cc00736ftest
Expand Down
6 changes: 3 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4425,8 +4425,8 @@ components:
description: Attributes to create a DORA incident event.
properties:
finished_at:
description: Unix timestamp in nanoseconds when the deployment finished.
It should not be older than 3 hours.
description: Unix timestamp in nanoseconds when the incident finished. It
should not be older than 3 hours.
example: 1693491984000000000
format: int64
type: integer
Expand All @@ -4448,7 +4448,7 @@ components:
example: High
type: string
started_at:
description: Unix timestamp in nanoseconds when the deployment started.
description: Unix timestamp in nanoseconds when the incident started.
example: 1693491974000000000
format: int64
type: integer
Expand Down
64 changes: 50 additions & 14 deletions api/datadogV1/model_azure_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ type AzureAccount struct {
// 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.
// When enabled, Datadog’s Cloud Security Management product will scan resource configurations monitored by this app registration.
// Note: This requires resource_collection_enabled to be set to true.
CspmEnabled *bool `json:"cspm_enabled,omitempty"`
// Enable custom metrics for your organization.
CustomMetricsEnabled *bool `json:"custom_metrics_enabled,omitempty"`
Expand All @@ -35,6 +36,8 @@ type AzureAccount struct {
NewClientId *string `json:"new_client_id,omitempty"`
// Your New Azure Active Directory ID.
NewTenantName *string `json:"new_tenant_name,omitempty"`
// When enabled, Datadog collects metadata and configuration info from cloud resources (compute instances, databases, load balancers, etc.) monitored by this app registration.
ResourceCollectionEnabled *bool `json:"resource_collection_enabled,omitempty"`
// Your Azure Active Directory ID.
TenantName *string `json:"tenant_name,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
Expand Down Expand Up @@ -367,6 +370,34 @@ func (o *AzureAccount) SetNewTenantName(v string) {
o.NewTenantName = &v
}

// GetResourceCollectionEnabled returns the ResourceCollectionEnabled field value if set, zero value otherwise.
func (o *AzureAccount) 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 *AzureAccount) 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 *AzureAccount) 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 *AzureAccount) SetResourceCollectionEnabled(v bool) {
o.ResourceCollectionEnabled = &v
}

// GetTenantName returns the TenantName field value if set, zero value otherwise.
func (o *AzureAccount) GetTenantName() string {
if o == nil || o.TenantName == nil {
Expand Down Expand Up @@ -434,6 +465,9 @@ func (o AzureAccount) MarshalJSON() ([]byte, error) {
if o.NewTenantName != nil {
toSerialize["new_tenant_name"] = o.NewTenantName
}
if o.ResourceCollectionEnabled != nil {
toSerialize["resource_collection_enabled"] = o.ResourceCollectionEnabled
}
if o.TenantName != nil {
toSerialize["tenant_name"] = o.TenantName
}
Expand All @@ -447,25 +481,26 @@ func (o AzureAccount) MarshalJSON() ([]byte, error) {
// UnmarshalJSON deserializes the given payload.
func (o *AzureAccount) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
AppServicePlanFilters *string `json:"app_service_plan_filters,omitempty"`
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"`
HostFilters *string `json:"host_filters,omitempty"`
NewClientId *string `json:"new_client_id,omitempty"`
NewTenantName *string `json:"new_tenant_name,omitempty"`
TenantName *string `json:"tenant_name,omitempty"`
AppServicePlanFilters *string `json:"app_service_plan_filters,omitempty"`
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"`
HostFilters *string `json:"host_filters,omitempty"`
NewClientId *string `json:"new_client_id,omitempty"`
NewTenantName *string `json:"new_tenant_name,omitempty"`
ResourceCollectionEnabled *bool `json:"resource_collection_enabled,omitempty"`
TenantName *string `json:"tenant_name,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{"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"})
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", "resource_collection_enabled", "tenant_name"})
} else {
return err
}
Expand All @@ -480,6 +515,7 @@ func (o *AzureAccount) UnmarshalJSON(bytes []byte) (err error) {
o.HostFilters = all.HostFilters
o.NewClientId = all.NewClientId
o.NewTenantName = all.NewTenantName
o.ResourceCollectionEnabled = all.ResourceCollectionEnabled
o.TenantName = all.TenantName

if len(additionalProperties) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions api/datadogV2/model_dora_incident_request_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

// DORAIncidentRequestAttributes Attributes to create a DORA incident event.
type DORAIncidentRequestAttributes struct {
// Unix timestamp in nanoseconds when the deployment finished. It should not be older than 3 hours.
// Unix timestamp in nanoseconds when the incident finished. It should not be older than 3 hours.
FinishedAt *int64 `json:"finished_at,omitempty"`
// Git info for DORA Metrics events.
Git *DORAGitInfo `json:"git,omitempty"`
Expand All @@ -24,7 +24,7 @@ type DORAIncidentRequestAttributes struct {
Service string `json:"service"`
// Incident severity.
Severity *string `json:"severity,omitempty"`
// Unix timestamp in nanoseconds when the deployment started.
// Unix timestamp in nanoseconds when the incident started.
StartedAt int64 `json:"started_at"`
// Version to correlate with [APM Deployment Tracking](https://docs.datadoghq.com/tracing/services/deployment_tracking/).
Version *string `json:"version,omitempty"`
Expand Down
9 changes: 5 additions & 4 deletions examples/v1/azure-integration/CreateAzureIntegration.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ func main() {
Errors: []string{
"*",
},
HostFilters: datadog.PtrString("key:value,filter:example"),
NewClientId: datadog.PtrString("new1c7f6-1234-5678-9101-3fcbf464test"),
NewTenantName: datadog.PtrString("new1c44-1234-5678-9101-cc00736ftest"),
TenantName: datadog.PtrString("testc44-1234-5678-9101-cc00736ftest"),
HostFilters: datadog.PtrString("key:value,filter:example"),
NewClientId: datadog.PtrString("new1c7f6-1234-5678-9101-3fcbf464test"),
NewTenantName: datadog.PtrString("new1c44-1234-5678-9101-cc00736ftest"),
ResourceCollectionEnabled: datadog.PtrBool(true),
TenantName: datadog.PtrString("testc44-1234-5678-9101-cc00736ftest"),
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
Expand Down
9 changes: 5 additions & 4 deletions examples/v1/azure-integration/DeleteAzureIntegration.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ func main() {
Errors: []string{
"*",
},
HostFilters: datadog.PtrString("key:value,filter:example"),
NewClientId: datadog.PtrString("new1c7f6-1234-5678-9101-3fcbf464test"),
NewTenantName: datadog.PtrString("new1c44-1234-5678-9101-cc00736ftest"),
TenantName: datadog.PtrString("testc44-1234-5678-9101-cc00736ftest"),
HostFilters: datadog.PtrString("key:value,filter:example"),
NewClientId: datadog.PtrString("new1c7f6-1234-5678-9101-3fcbf464test"),
NewTenantName: datadog.PtrString("new1c44-1234-5678-9101-cc00736ftest"),
ResourceCollectionEnabled: datadog.PtrBool(true),
TenantName: datadog.PtrString("testc44-1234-5678-9101-cc00736ftest"),
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
Expand Down
9 changes: 5 additions & 4 deletions examples/v1/azure-integration/UpdateAzureHostFilters.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ func main() {
Errors: []string{
"*",
},
HostFilters: datadog.PtrString("key:value,filter:example"),
NewClientId: datadog.PtrString("new1c7f6-1234-5678-9101-3fcbf464test"),
NewTenantName: datadog.PtrString("new1c44-1234-5678-9101-cc00736ftest"),
TenantName: datadog.PtrString("testc44-1234-5678-9101-cc00736ftest"),
HostFilters: datadog.PtrString("key:value,filter:example"),
NewClientId: datadog.PtrString("new1c7f6-1234-5678-9101-3fcbf464test"),
NewTenantName: datadog.PtrString("new1c44-1234-5678-9101-cc00736ftest"),
ResourceCollectionEnabled: datadog.PtrBool(true),
TenantName: datadog.PtrString("testc44-1234-5678-9101-cc00736ftest"),
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
Expand Down
9 changes: 5 additions & 4 deletions examples/v1/azure-integration/UpdateAzureIntegration.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ func main() {
Errors: []string{
"*",
},
HostFilters: datadog.PtrString("key:value,filter:example"),
NewClientId: datadog.PtrString("new1c7f6-1234-5678-9101-3fcbf464test"),
NewTenantName: datadog.PtrString("new1c44-1234-5678-9101-cc00736ftest"),
TenantName: datadog.PtrString("testc44-1234-5678-9101-cc00736ftest"),
HostFilters: datadog.PtrString("key:value,filter:example"),
NewClientId: datadog.PtrString("new1c7f6-1234-5678-9101-3fcbf464test"),
NewTenantName: datadog.PtrString("new1c44-1234-5678-9101-cc00736ftest"),
ResourceCollectionEnabled: datadog.PtrBool(true),
TenantName: datadog.PtrString("testc44-1234-5678-9101-cc00736ftest"),
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
Expand Down
Loading

0 comments on commit e1ec421

Please sign in to comment.