Skip to content

Commit

Permalink
Add synthetics stepDetail.allowFailure and stepDetail.failure (#2531)
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 Oct 23, 2024
1 parent b2810e3 commit 26c48a1
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 5 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:51.129731",
"spec_repo_commit": "9ac9609b"
"regenerated": "2024-10-23 10:08:14.505966",
"spec_repo_commit": "df3187ca"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-21 20:59:51.148611",
"spec_repo_commit": "9ac9609b"
"regenerated": "2024-10-23 10:08:14.525893",
"spec_repo_commit": "df3187ca"
}
}
}
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@

/** Object describing a step for a Synthetic test. */
@JsonPropertyOrder({
SyntheticsStepDetail.JSON_PROPERTY_ALLOW_FAILURE,
SyntheticsStepDetail.JSON_PROPERTY_BROWSER_ERRORS,
SyntheticsStepDetail.JSON_PROPERTY_CHECK_TYPE,
SyntheticsStepDetail.JSON_PROPERTY_DESCRIPTION,
SyntheticsStepDetail.JSON_PROPERTY_DURATION,
SyntheticsStepDetail.JSON_PROPERTY_ERROR,
SyntheticsStepDetail.JSON_PROPERTY_FAILURE,
SyntheticsStepDetail.JSON_PROPERTY_PLAYING_TAB,
SyntheticsStepDetail.JSON_PROPERTY_SCREENSHOT_BUCKET_KEY,
SyntheticsStepDetail.JSON_PROPERTY_SKIPPED,
Expand All @@ -42,6 +44,9 @@
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class SyntheticsStepDetail {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_ALLOW_FAILURE = "allowFailure";
private Boolean allowFailure;

public static final String JSON_PROPERTY_BROWSER_ERRORS = "browserErrors";
private List<SyntheticsBrowserError> browserErrors = null;

Expand All @@ -57,6 +62,9 @@ public class SyntheticsStepDetail {
public static final String JSON_PROPERTY_ERROR = "error";
private String error;

public static final String JSON_PROPERTY_FAILURE = "failure";
private SyntheticsBrowserTestResultFailure failure;

public static final String JSON_PROPERTY_PLAYING_TAB = "playingTab";
private SyntheticsPlayingTab playingTab;

Expand Down Expand Up @@ -93,6 +101,27 @@ public class SyntheticsStepDetail {
public static final String JSON_PROPERTY_WARNINGS = "warnings";
private List<SyntheticsStepDetailWarning> warnings = null;

public SyntheticsStepDetail allowFailure(Boolean allowFailure) {
this.allowFailure = allowFailure;
return this;
}

/**
* Whether or not the step was allowed to fail.
*
* @return allowFailure
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ALLOW_FAILURE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getAllowFailure() {
return allowFailure;
}

public void setAllowFailure(Boolean allowFailure) {
this.allowFailure = allowFailure;
}

public SyntheticsStepDetail browserErrors(List<SyntheticsBrowserError> browserErrors) {
this.browserErrors = browserErrors;
for (SyntheticsBrowserError item : browserErrors) {
Expand Down Expand Up @@ -214,6 +243,28 @@ public void setError(String error) {
this.error = error;
}

public SyntheticsStepDetail failure(SyntheticsBrowserTestResultFailure failure) {
this.failure = failure;
this.unparsed |= failure.unparsed;
return this;
}

/**
* The browser test failure details.
*
* @return failure
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FAILURE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public SyntheticsBrowserTestResultFailure getFailure() {
return failure;
}

public void setFailure(SyntheticsBrowserTestResultFailure failure) {
this.failure = failure;
}

public SyntheticsStepDetail playingTab(SyntheticsPlayingTab playingTab) {
this.playingTab = playingTab;
this.unparsed |= !playingTab.isValid();
Expand Down Expand Up @@ -569,11 +620,13 @@ public boolean equals(Object o) {
return false;
}
SyntheticsStepDetail syntheticsStepDetail = (SyntheticsStepDetail) o;
return Objects.equals(this.browserErrors, syntheticsStepDetail.browserErrors)
return Objects.equals(this.allowFailure, syntheticsStepDetail.allowFailure)
&& Objects.equals(this.browserErrors, syntheticsStepDetail.browserErrors)
&& Objects.equals(this.checkType, syntheticsStepDetail.checkType)
&& Objects.equals(this.description, syntheticsStepDetail.description)
&& Objects.equals(this.duration, syntheticsStepDetail.duration)
&& Objects.equals(this.error, syntheticsStepDetail.error)
&& Objects.equals(this.failure, syntheticsStepDetail.failure)
&& Objects.equals(this.playingTab, syntheticsStepDetail.playingTab)
&& Objects.equals(this.screenshotBucketKey, syntheticsStepDetail.screenshotBucketKey)
&& Objects.equals(this.skipped, syntheticsStepDetail.skipped)
Expand All @@ -592,11 +645,13 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
return Objects.hash(
allowFailure,
browserErrors,
checkType,
description,
duration,
error,
failure,
playingTab,
screenshotBucketKey,
skipped,
Expand All @@ -616,11 +671,13 @@ public int hashCode() {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SyntheticsStepDetail {\n");
sb.append(" allowFailure: ").append(toIndentedString(allowFailure)).append("\n");
sb.append(" browserErrors: ").append(toIndentedString(browserErrors)).append("\n");
sb.append(" checkType: ").append(toIndentedString(checkType)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" duration: ").append(toIndentedString(duration)).append("\n");
sb.append(" error: ").append(toIndentedString(error)).append("\n");
sb.append(" failure: ").append(toIndentedString(failure)).append("\n");
sb.append(" playingTab: ").append(toIndentedString(playingTab)).append("\n");
sb.append(" screenshotBucketKey: ")
.append(toIndentedString(screenshotBucketKey))
Expand Down

0 comments on commit 26c48a1

Please sign in to comment.