Skip to content

Commit 5d30c15

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 67b7e114 of spec repo
1 parent 070eb24 commit 5d30c15

File tree

4 files changed

+32
-32
lines changed

4 files changed

+32
-32
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-11-11 17:25:14.651723",
8-
"spec_repo_commit": "9de1804a"
7+
"regenerated": "2024-11-12 16:11:25.057465",
8+
"spec_repo_commit": "67b7e114"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-11-11 17:25:14.670393",
13-
"spec_repo_commit": "9de1804a"
12+
"regenerated": "2024-11-12 16:11:25.076160",
13+
"spec_repo_commit": "67b7e114"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17027,12 +17027,12 @@ components:
1702717027
SyntheticsTestRestrictionPolicyBinding:
1702817028
description: Objects describing the binding used for a mobile test.
1702917029
properties:
17030-
principal:
17031-
$ref: '#/components/schemas/SyntheticsTestRestrictionPolicyBindingPrincipal'
17030+
principals:
17031+
$ref: '#/components/schemas/SyntheticsTestRestrictionPolicyBindingPrincipals'
1703217032
relation:
1703317033
$ref: '#/components/schemas/SyntheticsTestRestrictionPolicyBindingRelation'
1703417034
type: object
17035-
SyntheticsTestRestrictionPolicyBindingPrincipal:
17035+
SyntheticsTestRestrictionPolicyBindingPrincipals:
1703617036
description: List of principals for a mobile test binding.
1703717037
items:
1703817038
description: A principal for a mobile test binding.

api/datadogV1/model_synthetics_test_restriction_policy_binding.go

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
// SyntheticsTestRestrictionPolicyBinding Objects describing the binding used for a mobile test.
1212
type SyntheticsTestRestrictionPolicyBinding struct {
1313
// List of principals for a mobile test binding.
14-
Principal []string `json:"principal,omitempty"`
14+
Principals []string `json:"principals,omitempty"`
1515
// The type of relation for the binding.
1616
Relation *SyntheticsTestRestrictionPolicyBindingRelation `json:"relation,omitempty"`
1717
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
@@ -36,32 +36,32 @@ func NewSyntheticsTestRestrictionPolicyBindingWithDefaults() *SyntheticsTestRest
3636
return &this
3737
}
3838

39-
// GetPrincipal returns the Principal field value if set, zero value otherwise.
40-
func (o *SyntheticsTestRestrictionPolicyBinding) GetPrincipal() []string {
41-
if o == nil || o.Principal == nil {
39+
// GetPrincipals returns the Principals field value if set, zero value otherwise.
40+
func (o *SyntheticsTestRestrictionPolicyBinding) GetPrincipals() []string {
41+
if o == nil || o.Principals == nil {
4242
var ret []string
4343
return ret
4444
}
45-
return o.Principal
45+
return o.Principals
4646
}
4747

48-
// GetPrincipalOk returns a tuple with the Principal field value if set, nil otherwise
48+
// GetPrincipalsOk returns a tuple with the Principals field value if set, nil otherwise
4949
// and a boolean to check if the value has been set.
50-
func (o *SyntheticsTestRestrictionPolicyBinding) GetPrincipalOk() (*[]string, bool) {
51-
if o == nil || o.Principal == nil {
50+
func (o *SyntheticsTestRestrictionPolicyBinding) GetPrincipalsOk() (*[]string, bool) {
51+
if o == nil || o.Principals == nil {
5252
return nil, false
5353
}
54-
return &o.Principal, true
54+
return &o.Principals, true
5555
}
5656

57-
// HasPrincipal returns a boolean if a field has been set.
58-
func (o *SyntheticsTestRestrictionPolicyBinding) HasPrincipal() bool {
59-
return o != nil && o.Principal != nil
57+
// HasPrincipals returns a boolean if a field has been set.
58+
func (o *SyntheticsTestRestrictionPolicyBinding) HasPrincipals() bool {
59+
return o != nil && o.Principals != nil
6060
}
6161

62-
// SetPrincipal gets a reference to the given []string and assigns it to the Principal field.
63-
func (o *SyntheticsTestRestrictionPolicyBinding) SetPrincipal(v []string) {
64-
o.Principal = v
62+
// SetPrincipals gets a reference to the given []string and assigns it to the Principals field.
63+
func (o *SyntheticsTestRestrictionPolicyBinding) SetPrincipals(v []string) {
64+
o.Principals = v
6565
}
6666

6767
// GetRelation returns the Relation field value if set, zero value otherwise.
@@ -98,8 +98,8 @@ func (o SyntheticsTestRestrictionPolicyBinding) MarshalJSON() ([]byte, error) {
9898
if o.UnparsedObject != nil {
9999
return datadog.Marshal(o.UnparsedObject)
100100
}
101-
if o.Principal != nil {
102-
toSerialize["principal"] = o.Principal
101+
if o.Principals != nil {
102+
toSerialize["principals"] = o.Principals
103103
}
104104
if o.Relation != nil {
105105
toSerialize["relation"] = o.Relation
@@ -114,21 +114,21 @@ func (o SyntheticsTestRestrictionPolicyBinding) MarshalJSON() ([]byte, error) {
114114
// UnmarshalJSON deserializes the given payload.
115115
func (o *SyntheticsTestRestrictionPolicyBinding) UnmarshalJSON(bytes []byte) (err error) {
116116
all := struct {
117-
Principal []string `json:"principal,omitempty"`
118-
Relation *SyntheticsTestRestrictionPolicyBindingRelation `json:"relation,omitempty"`
117+
Principals []string `json:"principals,omitempty"`
118+
Relation *SyntheticsTestRestrictionPolicyBindingRelation `json:"relation,omitempty"`
119119
}{}
120120
if err = datadog.Unmarshal(bytes, &all); err != nil {
121121
return datadog.Unmarshal(bytes, &o.UnparsedObject)
122122
}
123123
additionalProperties := make(map[string]interface{})
124124
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
125-
datadog.DeleteKeys(additionalProperties, &[]string{"principal", "relation"})
125+
datadog.DeleteKeys(additionalProperties, &[]string{"principals", "relation"})
126126
} else {
127127
return err
128128
}
129129

130130
hasInvalidField := false
131-
o.Principal = all.Principal
131+
o.Principals = all.Principals
132132
if all.Relation != nil && !all.Relation.IsValid() {
133133
hasInvalidField = true
134134
} else {

tests/scenarios/features/v1/synthetics.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Feature: Synthetics
128128
@generated @skip @team:DataDog/synthetics-ct
129129
Scenario: Create a mobile test returns "- JSON format is wrong" response
130130
Given new "CreateSyntheticsMobileTest" request
131-
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"}
131+
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"}
132132
When the request is sent
133133
Then the response status is 400 - JSON format is wrong
134134

@@ -147,7 +147,7 @@ Feature: Synthetics
147147
@generated @skip @team:DataDog/synthetics-ct
148148
Scenario: Create a mobile test returns "Test quota is reached" response
149149
Given new "CreateSyntheticsMobileTest" request
150-
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"}
150+
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"}
151151
When the request is sent
152152
Then the response status is 402 Test quota is reached
153153

@@ -361,15 +361,15 @@ Feature: Synthetics
361361
Scenario: Edit a Mobile test returns "- JSON format is wrong" response
362362
Given new "UpdateMobileTest" request
363363
And request contains "public_id" parameter from "REPLACE.ME"
364-
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"}
364+
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"}
365365
When the request is sent
366366
Then the response status is 400 - JSON format is wrong
367367

368368
@generated @skip @team:DataDog/synthetics-ct
369369
Scenario: Edit a Mobile test returns "- Synthetic Monitoring is not activated for the user" response
370370
Given new "UpdateMobileTest" request
371371
And request contains "public_id" parameter from "REPLACE.ME"
372-
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"}
372+
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"}
373373
When the request is sent
374374
Then the response status is 404 - Synthetic Monitoring is not activated for the user
375375

0 commit comments

Comments
 (0)