Skip to content

Commit

Permalink
Regenerate client from commit c72dd3db of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Nov 5, 2024
1 parent 213dd85 commit bcc8647
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 12 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": "2024-11-04 21:14:28.135343",
"spec_repo_commit": "08338fd1"
"regenerated": "2024-11-05 15:10:39.943796",
"spec_repo_commit": "c72dd3db"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-04 21:14:28.155292",
"spec_repo_commit": "08338fd1"
"regenerated": "2024-11-05 15:10:39.962251",
"spec_repo_commit": "c72dd3db"
}
}
}
7 changes: 7 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16228,6 +16228,13 @@ components:
allowFailure:
description: A boolean set to allow this step to fail.
type: boolean
alwaysExecute:
description: A boolean set to always execute this step even if the previous
step failed or was skipped.
type: boolean
exitIfSucceed:
description: A boolean set to exit the test if the step succeeds.
type: boolean
isCritical:
description: A boolean to use in addition to `allowFailure` to determine
if the test should be marked as failed when the step fails.
Expand Down
86 changes: 78 additions & 8 deletions api/datadogV1/model_synthetics_step.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import (
type SyntheticsStep struct {
// A boolean set to allow this step to fail.
AllowFailure *bool `json:"allowFailure,omitempty"`
// A boolean set to always execute this step even if the previous step failed or was skipped.
AlwaysExecute *bool `json:"alwaysExecute,omitempty"`
// A boolean set to exit the test if the step succeeds.
ExitIfSucceed *bool `json:"exitIfSucceed,omitempty"`
// A boolean to use in addition to `allowFailure` to determine if the test should be marked as failed when the step fails.
IsCritical *bool `json:"isCritical,omitempty"`
// The name of the step.
Expand Down Expand Up @@ -74,6 +78,62 @@ func (o *SyntheticsStep) SetAllowFailure(v bool) {
o.AllowFailure = &v
}

// GetAlwaysExecute returns the AlwaysExecute field value if set, zero value otherwise.
func (o *SyntheticsStep) GetAlwaysExecute() bool {
if o == nil || o.AlwaysExecute == nil {
var ret bool
return ret
}
return *o.AlwaysExecute
}

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

// HasAlwaysExecute returns a boolean if a field has been set.
func (o *SyntheticsStep) HasAlwaysExecute() bool {
return o != nil && o.AlwaysExecute != nil
}

// SetAlwaysExecute gets a reference to the given bool and assigns it to the AlwaysExecute field.
func (o *SyntheticsStep) SetAlwaysExecute(v bool) {
o.AlwaysExecute = &v
}

// GetExitIfSucceed returns the ExitIfSucceed field value if set, zero value otherwise.
func (o *SyntheticsStep) GetExitIfSucceed() bool {
if o == nil || o.ExitIfSucceed == nil {
var ret bool
return ret
}
return *o.ExitIfSucceed
}

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

// HasExitIfSucceed returns a boolean if a field has been set.
func (o *SyntheticsStep) HasExitIfSucceed() bool {
return o != nil && o.ExitIfSucceed != nil
}

// SetExitIfSucceed gets a reference to the given bool and assigns it to the ExitIfSucceed field.
func (o *SyntheticsStep) SetExitIfSucceed(v bool) {
o.ExitIfSucceed = &v
}

// GetIsCritical returns the IsCritical field value if set, zero value otherwise.
func (o *SyntheticsStep) GetIsCritical() bool {
if o == nil || o.IsCritical == nil {
Expand Down Expand Up @@ -251,6 +311,12 @@ func (o SyntheticsStep) MarshalJSON() ([]byte, error) {
if o.AllowFailure != nil {
toSerialize["allowFailure"] = o.AllowFailure
}
if o.AlwaysExecute != nil {
toSerialize["alwaysExecute"] = o.AlwaysExecute
}
if o.ExitIfSucceed != nil {
toSerialize["exitIfSucceed"] = o.ExitIfSucceed
}
if o.IsCritical != nil {
toSerialize["isCritical"] = o.IsCritical
}
Expand Down Expand Up @@ -279,26 +345,30 @@ func (o SyntheticsStep) MarshalJSON() ([]byte, error) {
// UnmarshalJSON deserializes the given payload.
func (o *SyntheticsStep) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
AllowFailure *bool `json:"allowFailure,omitempty"`
IsCritical *bool `json:"isCritical,omitempty"`
Name *string `json:"name,omitempty"`
NoScreenshot *bool `json:"noScreenshot,omitempty"`
Params interface{} `json:"params,omitempty"`
Timeout *int64 `json:"timeout,omitempty"`
Type *SyntheticsStepType `json:"type,omitempty"`
AllowFailure *bool `json:"allowFailure,omitempty"`
AlwaysExecute *bool `json:"alwaysExecute,omitempty"`
ExitIfSucceed *bool `json:"exitIfSucceed,omitempty"`
IsCritical *bool `json:"isCritical,omitempty"`
Name *string `json:"name,omitempty"`
NoScreenshot *bool `json:"noScreenshot,omitempty"`
Params interface{} `json:"params,omitempty"`
Timeout *int64 `json:"timeout,omitempty"`
Type *SyntheticsStepType `json:"type,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{"allowFailure", "isCritical", "name", "noScreenshot", "params", "timeout", "type"})
datadog.DeleteKeys(additionalProperties, &[]string{"allowFailure", "alwaysExecute", "exitIfSucceed", "isCritical", "name", "noScreenshot", "params", "timeout", "type"})
} else {
return err
}

hasInvalidField := false
o.AllowFailure = all.AllowFailure
o.AlwaysExecute = all.AlwaysExecute
o.ExitIfSucceed = all.ExitIfSucceed
o.IsCritical = all.IsCritical
o.Name = all.Name
o.NoScreenshot = all.NoScreenshot
Expand Down

0 comments on commit bcc8647

Please sign in to comment.