Skip to content

Commit

Permalink
Document included_keywords in ListStandardPatterns response (#2292)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <[email protected]>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Nov 21, 2023
1 parent 1b0dcf2 commit cb1fc39
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 9 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-11-21 17:53:01.360921",
"spec_repo_commit": "d902bcbc"
"regenerated": "2023-11-21 19:36:33.757894",
"spec_repo_commit": "83154a77"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-11-21 17:53:01.386027",
"spec_repo_commit": "d902bcbc"
"regenerated": "2023-11-21 19:36:33.774722",
"spec_repo_commit": "83154a77"
}
}
}
5 changes: 5 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16315,6 +16315,11 @@ components:
description:
description: Description of the standard pattern.
type: string
included_keywords:
description: List of included keywords.
items:
type: string
type: array
name:
description: Name of the standard pattern.
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
type SensitiveDataScannerStandardPatternAttributes struct {
// Description of the standard pattern.
Description *string `json:"description,omitempty"`
// List of included keywords.
IncludedKeywords []string `json:"included_keywords,omitempty"`
// Name of the standard pattern.
Name *string `json:"name,omitempty"`
// Regex to match.
Expand Down Expand Up @@ -68,6 +70,34 @@ func (o *SensitiveDataScannerStandardPatternAttributes) SetDescription(v string)
o.Description = &v
}

// GetIncludedKeywords returns the IncludedKeywords field value if set, zero value otherwise.
func (o *SensitiveDataScannerStandardPatternAttributes) GetIncludedKeywords() []string {
if o == nil || o.IncludedKeywords == nil {
var ret []string
return ret
}
return o.IncludedKeywords
}

// GetIncludedKeywordsOk returns a tuple with the IncludedKeywords field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SensitiveDataScannerStandardPatternAttributes) GetIncludedKeywordsOk() (*[]string, bool) {
if o == nil || o.IncludedKeywords == nil {
return nil, false
}
return &o.IncludedKeywords, true
}

// HasIncludedKeywords returns a boolean if a field has been set.
func (o *SensitiveDataScannerStandardPatternAttributes) HasIncludedKeywords() bool {
return o != nil && o.IncludedKeywords != nil
}

// SetIncludedKeywords gets a reference to the given []string and assigns it to the IncludedKeywords field.
func (o *SensitiveDataScannerStandardPatternAttributes) SetIncludedKeywords(v []string) {
o.IncludedKeywords = v
}

// GetName returns the Name field value if set, zero value otherwise.
func (o *SensitiveDataScannerStandardPatternAttributes) GetName() string {
if o == nil || o.Name == nil {
Expand Down Expand Up @@ -161,6 +191,9 @@ func (o SensitiveDataScannerStandardPatternAttributes) MarshalJSON() ([]byte, er
if o.Description != nil {
toSerialize["description"] = o.Description
}
if o.IncludedKeywords != nil {
toSerialize["included_keywords"] = o.IncludedKeywords
}
if o.Name != nil {
toSerialize["name"] = o.Name
}
Expand All @@ -180,21 +213,23 @@ func (o SensitiveDataScannerStandardPatternAttributes) MarshalJSON() ([]byte, er
// UnmarshalJSON deserializes the given payload.
func (o *SensitiveDataScannerStandardPatternAttributes) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
Description *string `json:"description,omitempty"`
Name *string `json:"name,omitempty"`
Pattern *string `json:"pattern,omitempty"`
Tags []string `json:"tags,omitempty"`
Description *string `json:"description,omitempty"`
IncludedKeywords []string `json:"included_keywords,omitempty"`
Name *string `json:"name,omitempty"`
Pattern *string `json:"pattern,omitempty"`
Tags []string `json:"tags,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{"description", "name", "pattern", "tags"})
datadog.DeleteKeys(additionalProperties, &[]string{"description", "included_keywords", "name", "pattern", "tags"})
} else {
return err
}
o.Description = all.Description
o.IncludedKeywords = all.IncludedKeywords
o.Name = all.Name
o.Pattern = all.Pattern
o.Tags = all.Tags
Expand Down

0 comments on commit cb1fc39

Please sign in to comment.