Skip to content

Commit

Permalink
Add deprecationDate to security monitoring rule response (#1825)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Jan 13, 2023
1 parent b0e839b commit 6d778be
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 4 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.4",
"regenerated": "2023-01-12 19:46:00.113071",
"spec_repo_commit": "8506d30d"
"regenerated": "2023-01-13 16:20:09.486359",
"spec_repo_commit": "f5badbc2"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-01-12 19:46:00.126061",
"spec_repo_commit": "8506d30d"
"regenerated": "2023-01-13 16:20:09.501919",
"spec_repo_commit": "f5badbc2"
}
}
}
8 changes: 8 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9785,6 +9785,10 @@ components:
description: User ID of the user who created the rule.
format: int64
type: integer
deprecationDate:
description: When the rule will be deprecated, timestamp in milliseconds.
format: int64
type: integer
filters:
description: Additional queries to filter matched events before they are
processed.
Expand Down Expand Up @@ -10154,6 +10158,10 @@ components:
description: User ID of the user who created the rule.
format: int64
type: integer
deprecationDate:
description: When the rule will be deprecated, timestamp in milliseconds.
format: int64
type: integer
filters:
description: Additional queries to filter matched events before they are
processed.
Expand Down
35 changes: 35 additions & 0 deletions api/datadogV2/model_security_monitoring_signal_rule_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ type SecurityMonitoringSignalRuleResponse struct {
CreatedAt *int64 `json:"createdAt,omitempty"`
// User ID of the user who created the rule.
CreationAuthorId *int64 `json:"creationAuthorId,omitempty"`
// When the rule will be deprecated, timestamp in milliseconds.
DeprecationDate *int64 `json:"deprecationDate,omitempty"`
// Additional queries to filter matched events before they are processed.
Filters []SecurityMonitoringFilter `json:"filters,omitempty"`
// Whether the notifications include the triggering group-by values in their title.
Expand Down Expand Up @@ -150,6 +152,34 @@ func (o *SecurityMonitoringSignalRuleResponse) SetCreationAuthorId(v int64) {
o.CreationAuthorId = &v
}

// GetDeprecationDate returns the DeprecationDate field value if set, zero value otherwise.
func (o *SecurityMonitoringSignalRuleResponse) GetDeprecationDate() int64 {
if o == nil || o.DeprecationDate == nil {
var ret int64
return ret
}
return *o.DeprecationDate
}

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

// HasDeprecationDate returns a boolean if a field has been set.
func (o *SecurityMonitoringSignalRuleResponse) HasDeprecationDate() bool {
return o != nil && o.DeprecationDate != nil
}

// SetDeprecationDate gets a reference to the given int64 and assigns it to the DeprecationDate field.
func (o *SecurityMonitoringSignalRuleResponse) SetDeprecationDate(v int64) {
o.DeprecationDate = &v
}

// GetFilters returns the Filters field value if set, zero value otherwise.
func (o *SecurityMonitoringSignalRuleResponse) GetFilters() []SecurityMonitoringFilter {
if o == nil || o.Filters == nil {
Expand Down Expand Up @@ -557,6 +587,9 @@ func (o SecurityMonitoringSignalRuleResponse) MarshalJSON() ([]byte, error) {
if o.CreationAuthorId != nil {
toSerialize["creationAuthorId"] = o.CreationAuthorId
}
if o.DeprecationDate != nil {
toSerialize["deprecationDate"] = o.DeprecationDate
}
if o.Filters != nil {
toSerialize["filters"] = o.Filters
}
Expand Down Expand Up @@ -613,6 +646,7 @@ func (o *SecurityMonitoringSignalRuleResponse) UnmarshalJSON(bytes []byte) (err
Cases []SecurityMonitoringRuleCase `json:"cases,omitempty"`
CreatedAt *int64 `json:"createdAt,omitempty"`
CreationAuthorId *int64 `json:"creationAuthorId,omitempty"`
DeprecationDate *int64 `json:"deprecationDate,omitempty"`
Filters []SecurityMonitoringFilter `json:"filters,omitempty"`
HasExtendedTitle *bool `json:"hasExtendedTitle,omitempty"`
Id *string `json:"id,omitempty"`
Expand Down Expand Up @@ -648,6 +682,7 @@ func (o *SecurityMonitoringSignalRuleResponse) UnmarshalJSON(bytes []byte) (err
o.Cases = all.Cases
o.CreatedAt = all.CreatedAt
o.CreationAuthorId = all.CreationAuthorId
o.DeprecationDate = all.DeprecationDate
o.Filters = all.Filters
o.HasExtendedTitle = all.HasExtendedTitle
o.Id = all.Id
Expand Down
35 changes: 35 additions & 0 deletions api/datadogV2/model_security_monitoring_standard_rule_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ type SecurityMonitoringStandardRuleResponse struct {
CreatedAt *int64 `json:"createdAt,omitempty"`
// User ID of the user who created the rule.
CreationAuthorId *int64 `json:"creationAuthorId,omitempty"`
// When the rule will be deprecated, timestamp in milliseconds.
DeprecationDate *int64 `json:"deprecationDate,omitempty"`
// Additional queries to filter matched events before they are processed.
Filters []SecurityMonitoringFilter `json:"filters,omitempty"`
// Whether the notifications include the triggering group-by values in their title.
Expand Down Expand Up @@ -180,6 +182,34 @@ func (o *SecurityMonitoringStandardRuleResponse) SetCreationAuthorId(v int64) {
o.CreationAuthorId = &v
}

// GetDeprecationDate returns the DeprecationDate field value if set, zero value otherwise.
func (o *SecurityMonitoringStandardRuleResponse) GetDeprecationDate() int64 {
if o == nil || o.DeprecationDate == nil {
var ret int64
return ret
}
return *o.DeprecationDate
}

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

// HasDeprecationDate returns a boolean if a field has been set.
func (o *SecurityMonitoringStandardRuleResponse) HasDeprecationDate() bool {
return o != nil && o.DeprecationDate != nil
}

// SetDeprecationDate gets a reference to the given int64 and assigns it to the DeprecationDate field.
func (o *SecurityMonitoringStandardRuleResponse) SetDeprecationDate(v int64) {
o.DeprecationDate = &v
}

// GetFilters returns the Filters field value if set, zero value otherwise.
func (o *SecurityMonitoringStandardRuleResponse) GetFilters() []SecurityMonitoringFilter {
if o == nil || o.Filters == nil {
Expand Down Expand Up @@ -590,6 +620,9 @@ func (o SecurityMonitoringStandardRuleResponse) MarshalJSON() ([]byte, error) {
if o.CreationAuthorId != nil {
toSerialize["creationAuthorId"] = o.CreationAuthorId
}
if o.DeprecationDate != nil {
toSerialize["deprecationDate"] = o.DeprecationDate
}
if o.Filters != nil {
toSerialize["filters"] = o.Filters
}
Expand Down Expand Up @@ -647,6 +680,7 @@ func (o *SecurityMonitoringStandardRuleResponse) UnmarshalJSON(bytes []byte) (er
ComplianceSignalOptions *CloudConfigurationRuleComplianceSignalOptions `json:"complianceSignalOptions,omitempty"`
CreatedAt *int64 `json:"createdAt,omitempty"`
CreationAuthorId *int64 `json:"creationAuthorId,omitempty"`
DeprecationDate *int64 `json:"deprecationDate,omitempty"`
Filters []SecurityMonitoringFilter `json:"filters,omitempty"`
HasExtendedTitle *bool `json:"hasExtendedTitle,omitempty"`
Id *string `json:"id,omitempty"`
Expand Down Expand Up @@ -690,6 +724,7 @@ func (o *SecurityMonitoringStandardRuleResponse) UnmarshalJSON(bytes []byte) (er
o.ComplianceSignalOptions = all.ComplianceSignalOptions
o.CreatedAt = all.CreatedAt
o.CreationAuthorId = all.CreationAuthorId
o.DeprecationDate = all.DeprecationDate
o.Filters = all.Filters
o.HasExtendedTitle = all.HasExtendedTitle
o.Id = all.Id
Expand Down

0 comments on commit 6d778be

Please sign in to comment.