Skip to content

Commit 2a004b3

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update security finding triage specs (DataDog#3522)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 2abe96a commit 2a004b3

46 files changed

Lines changed: 417 additions & 1368 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.generator/schemas/v2/openapi.yaml

Lines changed: 104 additions & 113 deletions
Large diffs are not rendered by default.

api/datadogV2/api_security_monitoring.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import (
2020
type SecurityMonitoringApi datadog.Service
2121

2222
// AttachCase Attach security findings to a case.
23-
// Attach security findings to a case. You can attach up to 50 security findings per case. Security findings that are already attached to another case will be detached from their previous case and attached to the specified case.
23+
// Attach security findings to a case.
24+
// You can attach up to 50 security findings per case. Security findings that are already attached to another case will be detached from their previous case and attached to the specified case.
2425
func (a *SecurityMonitoringApi) AttachCase(ctx _context.Context, caseId string, body AttachCaseRequest) (FindingCaseResponse, *_nethttp.Response, error) {
2526
var (
2627
localVarHTTPMethod = _nethttp.MethodPatch
@@ -101,7 +102,8 @@ func (a *SecurityMonitoringApi) AttachCase(ctx _context.Context, caseId string,
101102
}
102103

103104
// AttachJiraIssue Attach security findings to a Jira issue.
104-
// Attach security findings to a Jira issue by providing the Jira issue URL. You can attach up to 50 security findings per Jira issue. If the Jira issue is not linked to any case, this operation will create a case for the security findings and link the Jira issue to the newly created case. Security findings that are already attached to another Jira issue will be detached from their previous Jira issue and attached to the specified Jira issue.
105+
// Attach security findings to a Jira issue by providing the Jira issue URL.
106+
// You can attach up to 50 security findings per Jira issue. If the Jira issue is not linked to any case, this operation will create a case for the security findings and link the Jira issue to the newly created case. To configure the Jira integration, see [Bidirectional ticket syncing with Jira](https://docs.datadoghq.com/security/ticketing_integrations/#bidirectional-ticket-syncing-with-jira). Security findings that are already attached to another Jira issue will be detached from their previous Jira issue and attached to the specified Jira issue.
105107
func (a *SecurityMonitoringApi) AttachJiraIssue(ctx _context.Context, body AttachJiraIssueRequest) (FindingCaseResponse, *_nethttp.Response, error) {
106108
var (
107109
localVarHTTPMethod = _nethttp.MethodPatch
@@ -516,7 +518,8 @@ func (a *SecurityMonitoringApi) ConvertSecurityMonitoringRuleFromJSONToTerraform
516518
}
517519

518520
// CreateCases Create cases for security findings.
519-
// Create cases for security findings. You can create up to 50 cases per request and associate up to 50 security findings per case. Security findings that are already attached to another case will be detached from their previous case and attached to the newly created case.
521+
// Create cases for security findings.
522+
// You can create up to 50 cases per request and associate up to 50 security findings per case. Security findings that are already attached to another case will be detached from their previous case and attached to the newly created case.
520523
func (a *SecurityMonitoringApi) CreateCases(ctx _context.Context, body CreateCaseRequestArray) (FindingCaseResponseArray, *_nethttp.Response, error) {
521524
var (
522525
localVarHTTPMethod = _nethttp.MethodPost
@@ -676,7 +679,8 @@ func (a *SecurityMonitoringApi) CreateCustomFramework(ctx _context.Context, body
676679
}
677680

678681
// CreateJiraIssues Create Jira issues for security findings.
679-
// Create Jira issues for security findings. This operation creates a case in Datadog and a Jira issue linked to that case for bidirectional sync between Datadog and Jira. You can create up to 50 Jira issues per request and associate up to 50 security findings per Jira issue. Security findings that are already attached to another Jira issue will be detached from their previous Jira issue and attached to the newly created Jira issue.
682+
// Create Jira issues for security findings.
683+
// This operation creates a case in Datadog and a Jira issue linked to that case for bidirectional sync between Datadog and Jira. To configure the Jira integration, see [Bidirectional ticket syncing with Jira](https://docs.datadoghq.com/security/ticketing_integrations/#bidirectional-ticket-syncing-with-jira). You can create up to 50 Jira issues per request and associate up to 50 security findings per Jira issue. Security findings that are already attached to another Jira issue will be detached from their previous Jira issue and attached to the newly created Jira issue.
680684
func (a *SecurityMonitoringApi) CreateJiraIssues(ctx _context.Context, body CreateJiraIssueRequestArray) (FindingCaseResponseArray, *_nethttp.Response, error) {
681685
var (
682686
localVarHTTPMethod = _nethttp.MethodPost
@@ -1664,7 +1668,8 @@ func (a *SecurityMonitoringApi) DeleteVulnerabilityNotificationRule(ctx _context
16641668
}
16651669

16661670
// DetachCase Detach security findings from their case.
1667-
// Detach security findings from their case. This operation dissociates security findings from their associated cases without deleting the cases themselves. You can detach security findings from multiple different cases in a single request, with a limit of 50 security findings per request. Security findings that are not currently attached to any case will be ignored.
1671+
// Detach security findings from their case.
1672+
// This operation dissociates security findings from their associated cases without deleting the cases themselves. You can detach security findings from multiple different cases in a single request, with a limit of 50 security findings per request. Security findings that are not currently attached to any case will be ignored.
16681673
func (a *SecurityMonitoringApi) DetachCase(ctx _context.Context, body DetachCaseRequest) (*_nethttp.Response, error) {
16691674
var (
16701675
localVarHTTPMethod = _nethttp.MethodDelete

api/datadogV2/model_attach_case_request_data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
// AttachCaseRequestData Data of the case to attach security findings to.
1414
type AttachCaseRequestData struct {
15-
// The unique identifier of the case.
15+
// Unique identifier of the case.
1616
Id string `json:"id"`
1717
// Relationships of the case to attach security findings to.
1818
Relationships *AttachCaseRequestDataRelationships `json:"relationships,omitempty"`

api/datadogV2/model_attach_jira_issue_request_data.go

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import (
1414
type AttachJiraIssueRequestData struct {
1515
// Attributes of the Jira issue to attach security findings to.
1616
Attributes *AttachJiraIssueRequestDataAttributes `json:"attributes,omitempty"`
17-
// The unique identifier of the Jira issue attachment request.
18-
Id *string `json:"id,omitempty"`
1917
// Relationships of the Jira issue to attach security findings to.
2018
Relationships *AttachJiraIssueRequestDataRelationships `json:"relationships,omitempty"`
2119
// Jira issues resource type.
@@ -73,34 +71,6 @@ func (o *AttachJiraIssueRequestData) SetAttributes(v AttachJiraIssueRequestDataA
7371
o.Attributes = &v
7472
}
7573

76-
// GetId returns the Id field value if set, zero value otherwise.
77-
func (o *AttachJiraIssueRequestData) GetId() string {
78-
if o == nil || o.Id == nil {
79-
var ret string
80-
return ret
81-
}
82-
return *o.Id
83-
}
84-
85-
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
86-
// and a boolean to check if the value has been set.
87-
func (o *AttachJiraIssueRequestData) GetIdOk() (*string, bool) {
88-
if o == nil || o.Id == nil {
89-
return nil, false
90-
}
91-
return o.Id, true
92-
}
93-
94-
// HasId returns a boolean if a field has been set.
95-
func (o *AttachJiraIssueRequestData) HasId() bool {
96-
return o != nil && o.Id != nil
97-
}
98-
99-
// SetId gets a reference to the given string and assigns it to the Id field.
100-
func (o *AttachJiraIssueRequestData) SetId(v string) {
101-
o.Id = &v
102-
}
103-
10474
// GetRelationships returns the Relationships field value if set, zero value otherwise.
10575
func (o *AttachJiraIssueRequestData) GetRelationships() AttachJiraIssueRequestDataRelationships {
10676
if o == nil || o.Relationships == nil {
@@ -161,9 +131,6 @@ func (o AttachJiraIssueRequestData) MarshalJSON() ([]byte, error) {
161131
if o.Attributes != nil {
162132
toSerialize["attributes"] = o.Attributes
163133
}
164-
if o.Id != nil {
165-
toSerialize["id"] = o.Id
166-
}
167134
if o.Relationships != nil {
168135
toSerialize["relationships"] = o.Relationships
169136
}
@@ -179,7 +146,6 @@ func (o AttachJiraIssueRequestData) MarshalJSON() ([]byte, error) {
179146
func (o *AttachJiraIssueRequestData) UnmarshalJSON(bytes []byte) (err error) {
180147
all := struct {
181148
Attributes *AttachJiraIssueRequestDataAttributes `json:"attributes,omitempty"`
182-
Id *string `json:"id,omitempty"`
183149
Relationships *AttachJiraIssueRequestDataRelationships `json:"relationships,omitempty"`
184150
Type *JiraIssuesDataType `json:"type"`
185151
}{}
@@ -191,7 +157,7 @@ func (o *AttachJiraIssueRequestData) UnmarshalJSON(bytes []byte) (err error) {
191157
}
192158
additionalProperties := make(map[string]interface{})
193159
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
194-
datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "id", "relationships", "type"})
160+
datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "relationships", "type"})
195161
} else {
196162
return err
197163
}
@@ -201,7 +167,6 @@ func (o *AttachJiraIssueRequestData) UnmarshalJSON(bytes []byte) (err error) {
201167
hasInvalidField = true
202168
}
203169
o.Attributes = all.Attributes
204-
o.Id = all.Id
205170
if all.Relationships != nil && all.Relationships.UnparsedObject != nil && o.UnparsedObject == nil {
206171
hasInvalidField = true
207172
}

api/datadogV2/model_attach_jira_issue_request_data_attributes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
// AttachJiraIssueRequestDataAttributes Attributes of the Jira issue to attach security findings to.
1414
type AttachJiraIssueRequestDataAttributes struct {
15-
// The URL of the Jira issue to attach security findings to.
15+
// URL of the Jira issue to attach security findings to.
1616
JiraIssueUrl string `json:"jira_issue_url"`
1717
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
1818
UnparsedObject map[string]interface{} `json:"-"`

api/datadogV2/model_case_insights_items.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import (
1010

1111
// CaseInsightsItems An insight of the case.
1212
type CaseInsightsItems struct {
13-
// The reference of the insight.
13+
// Reference of the insight.
1414
Ref *string `json:"ref,omitempty"`
15-
// The unique identifier of the resource. For example, the unique identifier of a security finding.
15+
// Unique identifier of the resource. For example, the unique identifier of a security finding.
1616
ResourceId *string `json:"resource_id,omitempty"`
17-
// The type of the resource. For example, the type of a security finding is "SECURITY_FINDING".
17+
// Type of the resource. For example, the type of a security finding is "SECURITY_FINDING".
1818
Type *string `json:"type,omitempty"`
1919
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
2020
UnparsedObject map[string]interface{} `json:"-"`

api/datadogV2/model_case_management_project_data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
// CaseManagementProjectData
1414
type CaseManagementProjectData struct {
15-
// The unique identifier of the case management project.
15+
// Unique identifier of the case management project.
1616
Id string `json:"id"`
1717
// Projects resource type.
1818
Type CaseManagementProjectDataType `json:"type"`

api/datadogV2/model_create_case_request_data.go

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import (
1414
type CreateCaseRequestData struct {
1515
// Attributes of the case to create.
1616
Attributes *CreateCaseRequestDataAttributes `json:"attributes,omitempty"`
17-
// The unique identifier of the case.
18-
Id *string `json:"id,omitempty"`
1917
// Relationships of the case to create.
2018
Relationships *CreateCaseRequestDataRelationships `json:"relationships,omitempty"`
2119
// Cases resource type.
@@ -73,34 +71,6 @@ func (o *CreateCaseRequestData) SetAttributes(v CreateCaseRequestDataAttributes)
7371
o.Attributes = &v
7472
}
7573

76-
// GetId returns the Id field value if set, zero value otherwise.
77-
func (o *CreateCaseRequestData) GetId() string {
78-
if o == nil || o.Id == nil {
79-
var ret string
80-
return ret
81-
}
82-
return *o.Id
83-
}
84-
85-
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
86-
// and a boolean to check if the value has been set.
87-
func (o *CreateCaseRequestData) GetIdOk() (*string, bool) {
88-
if o == nil || o.Id == nil {
89-
return nil, false
90-
}
91-
return o.Id, true
92-
}
93-
94-
// HasId returns a boolean if a field has been set.
95-
func (o *CreateCaseRequestData) HasId() bool {
96-
return o != nil && o.Id != nil
97-
}
98-
99-
// SetId gets a reference to the given string and assigns it to the Id field.
100-
func (o *CreateCaseRequestData) SetId(v string) {
101-
o.Id = &v
102-
}
103-
10474
// GetRelationships returns the Relationships field value if set, zero value otherwise.
10575
func (o *CreateCaseRequestData) GetRelationships() CreateCaseRequestDataRelationships {
10676
if o == nil || o.Relationships == nil {
@@ -161,9 +131,6 @@ func (o CreateCaseRequestData) MarshalJSON() ([]byte, error) {
161131
if o.Attributes != nil {
162132
toSerialize["attributes"] = o.Attributes
163133
}
164-
if o.Id != nil {
165-
toSerialize["id"] = o.Id
166-
}
167134
if o.Relationships != nil {
168135
toSerialize["relationships"] = o.Relationships
169136
}
@@ -179,7 +146,6 @@ func (o CreateCaseRequestData) MarshalJSON() ([]byte, error) {
179146
func (o *CreateCaseRequestData) UnmarshalJSON(bytes []byte) (err error) {
180147
all := struct {
181148
Attributes *CreateCaseRequestDataAttributes `json:"attributes,omitempty"`
182-
Id *string `json:"id,omitempty"`
183149
Relationships *CreateCaseRequestDataRelationships `json:"relationships,omitempty"`
184150
Type *CaseDataType `json:"type"`
185151
}{}
@@ -191,7 +157,7 @@ func (o *CreateCaseRequestData) UnmarshalJSON(bytes []byte) (err error) {
191157
}
192158
additionalProperties := make(map[string]interface{})
193159
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
194-
datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "id", "relationships", "type"})
160+
datadog.DeleteKeys(additionalProperties, &[]string{"attributes", "relationships", "type"})
195161
} else {
196162
return err
197163
}
@@ -201,7 +167,6 @@ func (o *CreateCaseRequestData) UnmarshalJSON(bytes []byte) (err error) {
201167
hasInvalidField = true
202168
}
203169
o.Attributes = all.Attributes
204-
o.Id = all.Id
205170
if all.Relationships != nil && all.Relationships.UnparsedObject != nil && o.UnparsedObject == nil {
206171
hasInvalidField = true
207172
}

api/datadogV2/model_create_case_request_data_attributes.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import (
1010

1111
// CreateCaseRequestDataAttributes Attributes of the case to create.
1212
type CreateCaseRequestDataAttributes struct {
13-
// The unique identifier of the user assigned to the case.
13+
// Unique identifier of the user assigned to the case.
1414
AssigneeId *string `json:"assignee_id,omitempty"`
15-
// The description of the case. If not provided, the description will be automatically generated.
15+
// Description of the case. If not provided, the description will be automatically generated.
1616
Description *string `json:"description,omitempty"`
1717
// Case priority
1818
Priority *CasePriority `json:"priority,omitempty"`
19-
// The title of the case. If not provided, the title will be automatically generated.
19+
// Title of the case. If not provided, the title will be automatically generated.
2020
Title *string `json:"title,omitempty"`
2121
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
2222
UnparsedObject map[string]interface{} `json:"-"`

api/datadogV2/model_create_jira_issue_request_array.go

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import (
1414
type CreateJiraIssueRequestArray struct {
1515
//
1616
Data []CreateJiraIssueRequestData `json:"data"`
17-
//
18-
Included []CreateJiraIssueRequestArrayIncluded `json:"included,omitempty"`
1917
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
2018
UnparsedObject map[string]interface{} `json:"-"`
2119
AdditionalProperties map[string]interface{} `json:"-"`
@@ -62,44 +60,13 @@ func (o *CreateJiraIssueRequestArray) SetData(v []CreateJiraIssueRequestData) {
6260
o.Data = v
6361
}
6462

65-
// GetIncluded returns the Included field value if set, zero value otherwise.
66-
func (o *CreateJiraIssueRequestArray) GetIncluded() []CreateJiraIssueRequestArrayIncluded {
67-
if o == nil || o.Included == nil {
68-
var ret []CreateJiraIssueRequestArrayIncluded
69-
return ret
70-
}
71-
return o.Included
72-
}
73-
74-
// GetIncludedOk returns a tuple with the Included field value if set, nil otherwise
75-
// and a boolean to check if the value has been set.
76-
func (o *CreateJiraIssueRequestArray) GetIncludedOk() (*[]CreateJiraIssueRequestArrayIncluded, bool) {
77-
if o == nil || o.Included == nil {
78-
return nil, false
79-
}
80-
return &o.Included, true
81-
}
82-
83-
// HasIncluded returns a boolean if a field has been set.
84-
func (o *CreateJiraIssueRequestArray) HasIncluded() bool {
85-
return o != nil && o.Included != nil
86-
}
87-
88-
// SetIncluded gets a reference to the given []CreateJiraIssueRequestArrayIncluded and assigns it to the Included field.
89-
func (o *CreateJiraIssueRequestArray) SetIncluded(v []CreateJiraIssueRequestArrayIncluded) {
90-
o.Included = v
91-
}
92-
9363
// MarshalJSON serializes the struct using spec logic.
9464
func (o CreateJiraIssueRequestArray) MarshalJSON() ([]byte, error) {
9565
toSerialize := map[string]interface{}{}
9666
if o.UnparsedObject != nil {
9767
return datadog.Marshal(o.UnparsedObject)
9868
}
9969
toSerialize["data"] = o.Data
100-
if o.Included != nil {
101-
toSerialize["included"] = o.Included
102-
}
10370

10471
for key, value := range o.AdditionalProperties {
10572
toSerialize[key] = value
@@ -110,8 +77,7 @@ func (o CreateJiraIssueRequestArray) MarshalJSON() ([]byte, error) {
11077
// UnmarshalJSON deserializes the given payload.
11178
func (o *CreateJiraIssueRequestArray) UnmarshalJSON(bytes []byte) (err error) {
11279
all := struct {
113-
Data *[]CreateJiraIssueRequestData `json:"data"`
114-
Included []CreateJiraIssueRequestArrayIncluded `json:"included,omitempty"`
80+
Data *[]CreateJiraIssueRequestData `json:"data"`
11581
}{}
11682
if err = datadog.Unmarshal(bytes, &all); err != nil {
11783
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -121,12 +87,11 @@ func (o *CreateJiraIssueRequestArray) UnmarshalJSON(bytes []byte) (err error) {
12187
}
12288
additionalProperties := make(map[string]interface{})
12389
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
124-
datadog.DeleteKeys(additionalProperties, &[]string{"data", "included"})
90+
datadog.DeleteKeys(additionalProperties, &[]string{"data"})
12591
} else {
12692
return err
12793
}
12894
o.Data = *all.Data
129-
o.Included = all.Included
13095

13196
if len(additionalProperties) > 0 {
13297
o.AdditionalProperties = additionalProperties

0 commit comments

Comments
 (0)