Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document included_keywords in ListStandardPatterns response #2292

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading