Skip to content

Commit

Permalink
Regenerate client from commit 684dc00c of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Oct 22, 2024
1 parent 63cb95b commit eed0e94
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 22 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-10-21 20:59:42.801585",
"spec_repo_commit": "9ac9609b"
"regenerated": "2024-10-22 16:07:40.615758",
"spec_repo_commit": "684dc00c"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-21 20:59:42.821931",
"spec_repo_commit": "9ac9609b"
"regenerated": "2024-10-22 16:07:40.634186",
"spec_repo_commit": "684dc00c"
}
}
}
5 changes: 5 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16168,6 +16168,9 @@ components:
SyntheticsStepDetail:
description: Object describing a step for a Synthetic test.
properties:
allowFailure:
description: Whether or not the step was allowed to fail.
type: boolean
browserErrors:
description: Array of errors collected for a browser test.
items:
Expand All @@ -16185,6 +16188,8 @@ components:
error:
description: Error returned by the test.
type: string
failure:
$ref: '#/components/schemas/SyntheticsBrowserTestResultFailure'
playingTab:
$ref: '#/components/schemas/SyntheticsPlayingTab'
screenshotBucketKey:
Expand Down
109 changes: 91 additions & 18 deletions api/datadogV1/model_synthetics_step_detail.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (

// SyntheticsStepDetail Object describing a step for a Synthetic test.
type SyntheticsStepDetail struct {
// Whether or not the step was allowed to fail.
AllowFailure *bool `json:"allowFailure,omitempty"`
// Array of errors collected for a browser test.
BrowserErrors []SyntheticsBrowserError `json:"browserErrors,omitempty"`
// Type of assertion to apply in an API test.
Expand All @@ -20,6 +22,8 @@ type SyntheticsStepDetail struct {
Duration *float64 `json:"duration,omitempty"`
// Error returned by the test.
Error *string `json:"error,omitempty"`
// The browser test failure details.
Failure *SyntheticsBrowserTestResultFailure `json:"failure,omitempty"`
// Navigate between different tabs for your browser test.
PlayingTab *SyntheticsPlayingTab `json:"playingTab,omitempty"`
// Whether or not screenshots where collected by the test.
Expand Down Expand Up @@ -67,6 +71,34 @@ func NewSyntheticsStepDetailWithDefaults() *SyntheticsStepDetail {
return &this
}

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

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

// HasAllowFailure returns a boolean if a field has been set.
func (o *SyntheticsStepDetail) HasAllowFailure() bool {
return o != nil && o.AllowFailure != nil
}

// SetAllowFailure gets a reference to the given bool and assigns it to the AllowFailure field.
func (o *SyntheticsStepDetail) SetAllowFailure(v bool) {
o.AllowFailure = &v
}

// GetBrowserErrors returns the BrowserErrors field value if set, zero value otherwise.
func (o *SyntheticsStepDetail) GetBrowserErrors() []SyntheticsBrowserError {
if o == nil || o.BrowserErrors == nil {
Expand Down Expand Up @@ -207,6 +239,34 @@ func (o *SyntheticsStepDetail) SetError(v string) {
o.Error = &v
}

// GetFailure returns the Failure field value if set, zero value otherwise.
func (o *SyntheticsStepDetail) GetFailure() SyntheticsBrowserTestResultFailure {
if o == nil || o.Failure == nil {
var ret SyntheticsBrowserTestResultFailure
return ret
}
return *o.Failure
}

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

// HasFailure returns a boolean if a field has been set.
func (o *SyntheticsStepDetail) HasFailure() bool {
return o != nil && o.Failure != nil
}

// SetFailure gets a reference to the given SyntheticsBrowserTestResultFailure and assigns it to the Failure field.
func (o *SyntheticsStepDetail) SetFailure(v SyntheticsBrowserTestResultFailure) {
o.Failure = &v
}

// GetPlayingTab returns the PlayingTab field value if set, zero value otherwise.
func (o *SyntheticsStepDetail) GetPlayingTab() SyntheticsPlayingTab {
if o == nil || o.PlayingTab == nil {
Expand Down Expand Up @@ -549,6 +609,9 @@ func (o SyntheticsStepDetail) MarshalJSON() ([]byte, error) {
if o.UnparsedObject != nil {
return datadog.Marshal(o.UnparsedObject)
}
if o.AllowFailure != nil {
toSerialize["allowFailure"] = o.AllowFailure
}
if o.BrowserErrors != nil {
toSerialize["browserErrors"] = o.BrowserErrors
}
Expand All @@ -564,6 +627,9 @@ func (o SyntheticsStepDetail) MarshalJSON() ([]byte, error) {
if o.Error != nil {
toSerialize["error"] = o.Error
}
if o.Failure != nil {
toSerialize["failure"] = o.Failure
}
if o.PlayingTab != nil {
toSerialize["playingTab"] = o.PlayingTab
}
Expand Down Expand Up @@ -610,35 +676,38 @@ func (o SyntheticsStepDetail) MarshalJSON() ([]byte, error) {
// UnmarshalJSON deserializes the given payload.
func (o *SyntheticsStepDetail) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
BrowserErrors []SyntheticsBrowserError `json:"browserErrors,omitempty"`
CheckType *SyntheticsCheckType `json:"checkType,omitempty"`
Description *string `json:"description,omitempty"`
Duration *float64 `json:"duration,omitempty"`
Error *string `json:"error,omitempty"`
PlayingTab *SyntheticsPlayingTab `json:"playingTab,omitempty"`
ScreenshotBucketKey *bool `json:"screenshotBucketKey,omitempty"`
Skipped *bool `json:"skipped,omitempty"`
SnapshotBucketKey *bool `json:"snapshotBucketKey,omitempty"`
StepId *int64 `json:"stepId,omitempty"`
SubTestStepDetails []SyntheticsStepDetail `json:"subTestStepDetails,omitempty"`
TimeToInteractive *float64 `json:"timeToInteractive,omitempty"`
Type *SyntheticsStepType `json:"type,omitempty"`
Url *string `json:"url,omitempty"`
Value interface{} `json:"value,omitempty"`
VitalsMetrics []SyntheticsCoreWebVitals `json:"vitalsMetrics,omitempty"`
Warnings []SyntheticsStepDetailWarning `json:"warnings,omitempty"`
AllowFailure *bool `json:"allowFailure,omitempty"`
BrowserErrors []SyntheticsBrowserError `json:"browserErrors,omitempty"`
CheckType *SyntheticsCheckType `json:"checkType,omitempty"`
Description *string `json:"description,omitempty"`
Duration *float64 `json:"duration,omitempty"`
Error *string `json:"error,omitempty"`
Failure *SyntheticsBrowserTestResultFailure `json:"failure,omitempty"`
PlayingTab *SyntheticsPlayingTab `json:"playingTab,omitempty"`
ScreenshotBucketKey *bool `json:"screenshotBucketKey,omitempty"`
Skipped *bool `json:"skipped,omitempty"`
SnapshotBucketKey *bool `json:"snapshotBucketKey,omitempty"`
StepId *int64 `json:"stepId,omitempty"`
SubTestStepDetails []SyntheticsStepDetail `json:"subTestStepDetails,omitempty"`
TimeToInteractive *float64 `json:"timeToInteractive,omitempty"`
Type *SyntheticsStepType `json:"type,omitempty"`
Url *string `json:"url,omitempty"`
Value interface{} `json:"value,omitempty"`
VitalsMetrics []SyntheticsCoreWebVitals `json:"vitalsMetrics,omitempty"`
Warnings []SyntheticsStepDetailWarning `json:"warnings,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{"browserErrors", "checkType", "description", "duration", "error", "playingTab", "screenshotBucketKey", "skipped", "snapshotBucketKey", "stepId", "subTestStepDetails", "timeToInteractive", "type", "url", "value", "vitalsMetrics", "warnings"})
datadog.DeleteKeys(additionalProperties, &[]string{"allowFailure", "browserErrors", "checkType", "description", "duration", "error", "failure", "playingTab", "screenshotBucketKey", "skipped", "snapshotBucketKey", "stepId", "subTestStepDetails", "timeToInteractive", "type", "url", "value", "vitalsMetrics", "warnings"})
} else {
return err
}

hasInvalidField := false
o.AllowFailure = all.AllowFailure
o.BrowserErrors = all.BrowserErrors
if all.CheckType != nil && !all.CheckType.IsValid() {
hasInvalidField = true
Expand All @@ -648,6 +717,10 @@ func (o *SyntheticsStepDetail) UnmarshalJSON(bytes []byte) (err error) {
o.Description = all.Description
o.Duration = all.Duration
o.Error = all.Error
if all.Failure != nil && all.Failure.UnparsedObject != nil && o.UnparsedObject == nil {
hasInvalidField = true
}
o.Failure = all.Failure
if all.PlayingTab != nil && !all.PlayingTab.IsValid() {
hasInvalidField = true
} else {
Expand Down

0 comments on commit eed0e94

Please sign in to comment.