From 2ff014ddacc4c2c64accad6fa8fd25a663507603 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 7 Nov 2024 22:37:51 +0000 Subject: [PATCH] Regenerate client from commit 8233abfb of spec repo --- .apigentools-info | 8 ++--- .generator/schemas/v1/openapi.yaml | 9 ++--- .../v1/model/SyntheticsMobileTestOptions.java | 3 +- ...yntheticsTestRestrictionPolicyBinding.java | 36 +++++++++---------- .../api/client/v1/api/synthetics.feature | 8 ++--- 5 files changed, 33 insertions(+), 31 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 5e93089302e..ea78cb2b48e 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-11-07 21:30:09.905137", - "spec_repo_commit": "66d9d069" + "regenerated": "2024-11-07 22:36:09.628061", + "spec_repo_commit": "8233abfb" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-11-07 21:30:09.923995", - "spec_repo_commit": "66d9d069" + "regenerated": "2024-11-07 22:36:09.647241", + "spec_repo_commit": "8233abfb" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index ef31557ee46..2e2f4139f93 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -15897,7 +15897,8 @@ components: minimum: 300 type: integer verbosity: - description: The level of verbosity for the mobile test. + description: The level of verbosity for the mobile test. This field can + not be set by a user. format: int32 maximum: 5 minimum: 0 @@ -17007,12 +17008,12 @@ components: SyntheticsTestRestrictionPolicyBinding: description: Objects describing the binding used for a mobile test. properties: - principals: - $ref: '#/components/schemas/SyntheticsTestRestrictionPolicyBindingPrincipals' + principal: + $ref: '#/components/schemas/SyntheticsTestRestrictionPolicyBindingPrincipal' relation: $ref: '#/components/schemas/SyntheticsTestRestrictionPolicyBindingRelation' type: object - SyntheticsTestRestrictionPolicyBindingPrincipals: + SyntheticsTestRestrictionPolicyBindingPrincipal: description: List of principals for a mobile test binding. items: description: A principal for a mobile test binding. diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsMobileTestOptions.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsMobileTestOptions.java index edf3db17a51..6f12a364361 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsMobileTestOptions.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsMobileTestOptions.java @@ -483,7 +483,8 @@ public SyntheticsMobileTestOptions verbosity(Integer verbosity) { } /** - * The level of verbosity for the mobile test. minimum: 0 maximum: 5 + * The level of verbosity for the mobile test. This field can not be set by a user. minimum: 0 + * maximum: 5 * * @return verbosity */ diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRestrictionPolicyBinding.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRestrictionPolicyBinding.java index d058907062a..9bfb5a9fc42 100644 --- a/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRestrictionPolicyBinding.java +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsTestRestrictionPolicyBinding.java @@ -20,46 +20,46 @@ /** Objects describing the binding used for a mobile test. */ @JsonPropertyOrder({ - SyntheticsTestRestrictionPolicyBinding.JSON_PROPERTY_PRINCIPALS, + SyntheticsTestRestrictionPolicyBinding.JSON_PROPERTY_PRINCIPAL, SyntheticsTestRestrictionPolicyBinding.JSON_PROPERTY_RELATION }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class SyntheticsTestRestrictionPolicyBinding { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_PRINCIPALS = "principals"; - private List principals = null; + public static final String JSON_PROPERTY_PRINCIPAL = "principal"; + private List principal = null; public static final String JSON_PROPERTY_RELATION = "relation"; private SyntheticsTestRestrictionPolicyBindingRelation relation; - public SyntheticsTestRestrictionPolicyBinding principals(List principals) { - this.principals = principals; + public SyntheticsTestRestrictionPolicyBinding principal(List principal) { + this.principal = principal; return this; } - public SyntheticsTestRestrictionPolicyBinding addPrincipalsItem(String principalsItem) { - if (this.principals == null) { - this.principals = new ArrayList<>(); + public SyntheticsTestRestrictionPolicyBinding addPrincipalItem(String principalItem) { + if (this.principal == null) { + this.principal = new ArrayList<>(); } - this.principals.add(principalsItem); + this.principal.add(principalItem); return this; } /** * List of principals for a mobile test binding. * - * @return principals + * @return principal */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PRINCIPALS) + @JsonProperty(JSON_PROPERTY_PRINCIPAL) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPrincipals() { - return principals; + public List getPrincipal() { + return principal; } - public void setPrincipals(List principals) { - this.principals = principals; + public void setPrincipal(List principal) { + this.principal = principal; } public SyntheticsTestRestrictionPolicyBinding relation( @@ -145,7 +145,7 @@ public boolean equals(Object o) { } SyntheticsTestRestrictionPolicyBinding syntheticsTestRestrictionPolicyBinding = (SyntheticsTestRestrictionPolicyBinding) o; - return Objects.equals(this.principals, syntheticsTestRestrictionPolicyBinding.principals) + return Objects.equals(this.principal, syntheticsTestRestrictionPolicyBinding.principal) && Objects.equals(this.relation, syntheticsTestRestrictionPolicyBinding.relation) && Objects.equals( this.additionalProperties, syntheticsTestRestrictionPolicyBinding.additionalProperties); @@ -153,14 +153,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(principals, relation, additionalProperties); + return Objects.hash(principal, relation, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class SyntheticsTestRestrictionPolicyBinding {\n"); - sb.append(" principals: ").append(toIndentedString(principals)).append("\n"); + sb.append(" principal: ").append(toIndentedString(principal)).append("\n"); sb.append(" relation: ").append(toIndentedString(relation)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/test/resources/com/datadog/api/client/v1/api/synthetics.feature b/src/test/resources/com/datadog/api/client/v1/api/synthetics.feature index fb90d094941..be28590aed8 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/synthetics.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/synthetics.feature @@ -128,7 +128,7 @@ Feature: Synthetics @generated @skip @team:DataDog/synthetics-ct Scenario: Create a mobile test returns "- JSON format is wrong" response Given new "CreateSyntheticsMobileTest" request - And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"} + And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principal": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"} When the request is sent Then the response status is 400 - JSON format is wrong @@ -147,7 +147,7 @@ Feature: Synthetics @generated @skip @team:DataDog/synthetics-ct Scenario: Create a mobile test returns "Test quota is reached" response Given new "CreateSyntheticsMobileTest" request - And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"} + And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principal": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"} When the request is sent Then the response status is 402 Test quota is reached @@ -361,7 +361,7 @@ Feature: Synthetics Scenario: Edit a Mobile test returns "- JSON format is wrong" response Given new "UpdateMobileTest" request And request contains "public_id" parameter from "REPLACE.ME" - And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"} + And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principal": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"} When the request is sent Then the response status is 400 - JSON format is wrong @@ -369,7 +369,7 @@ Feature: Synthetics Scenario: Edit a Mobile test returns "- Synthetic Monitoring is not activated for the user" response Given new "UpdateMobileTest" request And request contains "public_id" parameter from "REPLACE.ME" - And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principals": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"} + And body with value {"config": {"variables": [{"name": "VARIABLE_NAME", "secure": false, "type": "text"}]}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "message": "Notification message", "name": "Example test name", "options": {"bindings": [{"principal": [], "relation": "editor"}], "ci": {"executionRule": "blocking"}, "device_ids": ["synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16"], "mobileApplication": {"applicationId": "00000000-0000-0000-0000-aaaaaaaaaaaa", "referenceId": "00000000-0000-0000-0000-aaaaaaaaaaab", "referenceType": "latest"}, "monitor_options": {"notification_preset_name": "show_all"}, "restricted_roles": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], "retry": {}, "scheduling": {"timeframes": [{"day": 1, "from": "07:00", "to": "16:00"}, {"day": 3, "from": "07:00", "to": "16:00"}], "timezone": "America/New_York"}, "tick_every": 300}, "status": "live", "steps": [{"name": "", "params": {"check": "equals", "direction": "up", "element": {"contextType": "native", "relativePosition": {}, "userLocator": {"values": [{"type": "accessibility-id"}]}}, "positions": [{}], "variable": {"example": "", "name": "VAR_NAME"}}, "publicId": "pub-lic-id0", "type": "assertElementContent"}], "tags": ["env:production"], "type": "mobile"} When the request is sent Then the response status is 404 - Synthetic Monitoring is not activated for the user