Skip to content

Commit

Permalink
Regenerate client from commit 9ad4f63e of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jul 13, 2023
1 parent cc8f40e commit 3782dae
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 16 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.5",
"regenerated": "2023-07-11 16:39:35.936049",
"spec_repo_commit": "824086bb"
"regenerated": "2023-07-13 19:08:09.029200",
"spec_repo_commit": "9ad4f63e"
},
"v2": {
"apigentools_version": "1.6.5",
"regenerated": "2023-07-11 16:39:35.952370",
"spec_repo_commit": "824086bb"
"regenerated": "2023-07-13 19:08:09.042774",
"spec_repo_commit": "9ad4f63e"
}
}
}
16 changes: 16 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2756,10 +2756,17 @@ components:
CloudWorkloadSecurityAgentRuleAttributes:
description: A Cloud Workload Security Agent rule returned by the API.
properties:
agentConstraint:
description: The version of the agent.
type: string
category:
description: The category of the Agent rule.
example: Process Activity
type: string
creationAuthorUuId:
description: The ID of the user who created the rule.
example: e51c9744-d158-11ec-ad23-da7ad0900002
type: string
creationDate:
description: When the Agent rule was created, timestamp in milliseconds.
example: 1624366480320
Expand Down Expand Up @@ -2787,6 +2794,15 @@ components:
description: The name of the Agent rule.
example: my_agent_rule
type: string
updateAuthorUuId:
description: The ID of the user who updated the rule.
example: e51c9744-d158-11ec-ad23-da7ad0900002
type: string
updateDate:
description: Timestamp in milliseconds when the Agent rule was last updated.
example: 1624366480320
format: int64
type: integer
updatedAt:
description: When the Agent rule was last updated, timestamp in milliseconds.
example: 1624366480320
Expand Down
164 changes: 152 additions & 12 deletions api/datadogV2/model_cloud_workload_security_agent_rule_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ import (

// CloudWorkloadSecurityAgentRuleAttributes A Cloud Workload Security Agent rule returned by the API.
type CloudWorkloadSecurityAgentRuleAttributes struct {
// The version of the agent.
AgentConstraint *string `json:"agentConstraint,omitempty"`
// The category of the Agent rule.
Category *string `json:"category,omitempty"`
// The ID of the user who created the rule.
CreationAuthorUuId *string `json:"creationAuthorUuId,omitempty"`
// When the Agent rule was created, timestamp in milliseconds.
CreationDate *int64 `json:"creationDate,omitempty"`
// The attributes of the user who created the Agent rule.
Expand All @@ -28,6 +32,10 @@ type CloudWorkloadSecurityAgentRuleAttributes struct {
Expression *string `json:"expression,omitempty"`
// The name of the Agent rule.
Name *string `json:"name,omitempty"`
// The ID of the user who updated the rule.
UpdateAuthorUuId *string `json:"updateAuthorUuId,omitempty"`
// Timestamp in milliseconds when the Agent rule was last updated.
UpdateDate *int64 `json:"updateDate,omitempty"`
// When the Agent rule was last updated, timestamp in milliseconds.
UpdatedAt *int64 `json:"updatedAt,omitempty"`
// The attributes of the user who last updated the Agent rule.
Expand Down Expand Up @@ -56,6 +64,34 @@ func NewCloudWorkloadSecurityAgentRuleAttributesWithDefaults() *CloudWorkloadSec
return &this
}

// GetAgentConstraint returns the AgentConstraint field value if set, zero value otherwise.
func (o *CloudWorkloadSecurityAgentRuleAttributes) GetAgentConstraint() string {
if o == nil || o.AgentConstraint == nil {
var ret string
return ret
}
return *o.AgentConstraint
}

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

// HasAgentConstraint returns a boolean if a field has been set.
func (o *CloudWorkloadSecurityAgentRuleAttributes) HasAgentConstraint() bool {
return o != nil && o.AgentConstraint != nil
}

// SetAgentConstraint gets a reference to the given string and assigns it to the AgentConstraint field.
func (o *CloudWorkloadSecurityAgentRuleAttributes) SetAgentConstraint(v string) {
o.AgentConstraint = &v
}

// GetCategory returns the Category field value if set, zero value otherwise.
func (o *CloudWorkloadSecurityAgentRuleAttributes) GetCategory() string {
if o == nil || o.Category == nil {
Expand Down Expand Up @@ -84,6 +120,34 @@ func (o *CloudWorkloadSecurityAgentRuleAttributes) SetCategory(v string) {
o.Category = &v
}

// GetCreationAuthorUuId returns the CreationAuthorUuId field value if set, zero value otherwise.
func (o *CloudWorkloadSecurityAgentRuleAttributes) GetCreationAuthorUuId() string {
if o == nil || o.CreationAuthorUuId == nil {
var ret string
return ret
}
return *o.CreationAuthorUuId
}

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

// HasCreationAuthorUuId returns a boolean if a field has been set.
func (o *CloudWorkloadSecurityAgentRuleAttributes) HasCreationAuthorUuId() bool {
return o != nil && o.CreationAuthorUuId != nil
}

// SetCreationAuthorUuId gets a reference to the given string and assigns it to the CreationAuthorUuId field.
func (o *CloudWorkloadSecurityAgentRuleAttributes) SetCreationAuthorUuId(v string) {
o.CreationAuthorUuId = &v
}

// GetCreationDate returns the CreationDate field value if set, zero value otherwise.
func (o *CloudWorkloadSecurityAgentRuleAttributes) GetCreationDate() int64 {
if o == nil || o.CreationDate == nil {
Expand Down Expand Up @@ -280,6 +344,62 @@ func (o *CloudWorkloadSecurityAgentRuleAttributes) SetName(v string) {
o.Name = &v
}

// GetUpdateAuthorUuId returns the UpdateAuthorUuId field value if set, zero value otherwise.
func (o *CloudWorkloadSecurityAgentRuleAttributes) GetUpdateAuthorUuId() string {
if o == nil || o.UpdateAuthorUuId == nil {
var ret string
return ret
}
return *o.UpdateAuthorUuId
}

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

// HasUpdateAuthorUuId returns a boolean if a field has been set.
func (o *CloudWorkloadSecurityAgentRuleAttributes) HasUpdateAuthorUuId() bool {
return o != nil && o.UpdateAuthorUuId != nil
}

// SetUpdateAuthorUuId gets a reference to the given string and assigns it to the UpdateAuthorUuId field.
func (o *CloudWorkloadSecurityAgentRuleAttributes) SetUpdateAuthorUuId(v string) {
o.UpdateAuthorUuId = &v
}

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

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

// HasUpdateDate returns a boolean if a field has been set.
func (o *CloudWorkloadSecurityAgentRuleAttributes) HasUpdateDate() bool {
return o != nil && o.UpdateDate != nil
}

// SetUpdateDate gets a reference to the given int64 and assigns it to the UpdateDate field.
func (o *CloudWorkloadSecurityAgentRuleAttributes) SetUpdateDate(v int64) {
o.UpdateDate = &v
}

// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *CloudWorkloadSecurityAgentRuleAttributes) GetUpdatedAt() int64 {
if o == nil || o.UpdatedAt == nil {
Expand Down Expand Up @@ -370,9 +490,15 @@ func (o CloudWorkloadSecurityAgentRuleAttributes) MarshalJSON() ([]byte, error)
if o.UnparsedObject != nil {
return json.Marshal(o.UnparsedObject)
}
if o.AgentConstraint != nil {
toSerialize["agentConstraint"] = o.AgentConstraint
}
if o.Category != nil {
toSerialize["category"] = o.Category
}
if o.CreationAuthorUuId != nil {
toSerialize["creationAuthorUuId"] = o.CreationAuthorUuId
}
if o.CreationDate != nil {
toSerialize["creationDate"] = o.CreationDate
}
Expand All @@ -394,6 +520,12 @@ func (o CloudWorkloadSecurityAgentRuleAttributes) MarshalJSON() ([]byte, error)
if o.Name != nil {
toSerialize["name"] = o.Name
}
if o.UpdateAuthorUuId != nil {
toSerialize["updateAuthorUuId"] = o.UpdateAuthorUuId
}
if o.UpdateDate != nil {
toSerialize["updateDate"] = o.UpdateDate
}
if o.UpdatedAt != nil {
toSerialize["updatedAt"] = o.UpdatedAt
}
Expand All @@ -414,17 +546,21 @@ func (o CloudWorkloadSecurityAgentRuleAttributes) MarshalJSON() ([]byte, error)
func (o *CloudWorkloadSecurityAgentRuleAttributes) UnmarshalJSON(bytes []byte) (err error) {
raw := map[string]interface{}{}
all := struct {
Category *string `json:"category,omitempty"`
CreationDate *int64 `json:"creationDate,omitempty"`
Creator *CloudWorkloadSecurityAgentRuleCreatorAttributes `json:"creator,omitempty"`
DefaultRule *bool `json:"defaultRule,omitempty"`
Description *string `json:"description,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
Expression *string `json:"expression,omitempty"`
Name *string `json:"name,omitempty"`
UpdatedAt *int64 `json:"updatedAt,omitempty"`
Updater *CloudWorkloadSecurityAgentRuleUpdaterAttributes `json:"updater,omitempty"`
Version *int64 `json:"version,omitempty"`
AgentConstraint *string `json:"agentConstraint,omitempty"`
Category *string `json:"category,omitempty"`
CreationAuthorUuId *string `json:"creationAuthorUuId,omitempty"`
CreationDate *int64 `json:"creationDate,omitempty"`
Creator *CloudWorkloadSecurityAgentRuleCreatorAttributes `json:"creator,omitempty"`
DefaultRule *bool `json:"defaultRule,omitempty"`
Description *string `json:"description,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
Expression *string `json:"expression,omitempty"`
Name *string `json:"name,omitempty"`
UpdateAuthorUuId *string `json:"updateAuthorUuId,omitempty"`
UpdateDate *int64 `json:"updateDate,omitempty"`
UpdatedAt *int64 `json:"updatedAt,omitempty"`
Updater *CloudWorkloadSecurityAgentRuleUpdaterAttributes `json:"updater,omitempty"`
Version *int64 `json:"version,omitempty"`
}{}
if err = json.Unmarshal(bytes, &all); err != nil {
err = json.Unmarshal(bytes, &raw)
Expand All @@ -436,11 +572,13 @@ func (o *CloudWorkloadSecurityAgentRuleAttributes) UnmarshalJSON(bytes []byte) (
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"category", "creationDate", "creator", "defaultRule", "description", "enabled", "expression", "name", "updatedAt", "updater", "version"})
datadog.DeleteKeys(additionalProperties, &[]string{"agentConstraint", "category", "creationAuthorUuId", "creationDate", "creator", "defaultRule", "description", "enabled", "expression", "name", "updateAuthorUuId", "updateDate", "updatedAt", "updater", "version"})
} else {
return err
}
o.AgentConstraint = all.AgentConstraint
o.Category = all.Category
o.CreationAuthorUuId = all.CreationAuthorUuId
o.CreationDate = all.CreationDate
if all.Creator != nil && all.Creator.UnparsedObject != nil && o.UnparsedObject == nil {
err = json.Unmarshal(bytes, &raw)
Expand All @@ -455,6 +593,8 @@ func (o *CloudWorkloadSecurityAgentRuleAttributes) UnmarshalJSON(bytes []byte) (
o.Enabled = all.Enabled
o.Expression = all.Expression
o.Name = all.Name
o.UpdateAuthorUuId = all.UpdateAuthorUuId
o.UpdateDate = all.UpdateDate
o.UpdatedAt = all.UpdatedAt
if all.Updater != nil && all.Updater.UnparsedObject != nil && o.UnparsedObject == nil {
err = json.Unmarshal(bytes, &raw)
Expand Down

0 comments on commit 3782dae

Please sign in to comment.