Skip to content

Commit 3f6c208

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add version parameter to synthetic test trigger ci endpoint (DataDog#3295)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent dd80b09 commit 3f6c208

3 files changed

Lines changed: 42 additions & 3 deletions

File tree

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "335aa67",
3-
"generated": "2025-08-27 07:15:29.692"
2+
"spec_repo_commit": "98e3371",
3+
"generated": "2025-08-27 08:46:47.876"
44
}

.generator/schemas/v1/openapi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15696,6 +15696,10 @@ components:
1569615696
type: string
1569715697
description: Variables to replace in the test.
1569815698
type: object
15699+
version:
15700+
description: The version number of the Synthetic test version to trigger.
15701+
format: int64
15702+
type: integer
1569915703
required:
1570015704
- public_id
1570115705
type: object

api/datadogV1/model_synthetics_ci_test_.go

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ type SyntheticsCITest struct {
4040
StartUrl *string `json:"startUrl,omitempty"`
4141
// Variables to replace in the test.
4242
Variables map[string]string `json:"variables,omitempty"`
43+
// The version number of the Synthetic test version to trigger.
44+
Version *int64 `json:"version,omitempty"`
4345
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
4446
UnparsedObject map[string]interface{} `json:"-"`
4547
AdditionalProperties map[string]interface{} `json:"-"`
@@ -450,6 +452,34 @@ func (o *SyntheticsCITest) SetVariables(v map[string]string) {
450452
o.Variables = v
451453
}
452454

455+
// GetVersion returns the Version field value if set, zero value otherwise.
456+
func (o *SyntheticsCITest) GetVersion() int64 {
457+
if o == nil || o.Version == nil {
458+
var ret int64
459+
return ret
460+
}
461+
return *o.Version
462+
}
463+
464+
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
465+
// and a boolean to check if the value has been set.
466+
func (o *SyntheticsCITest) GetVersionOk() (*int64, bool) {
467+
if o == nil || o.Version == nil {
468+
return nil, false
469+
}
470+
return o.Version, true
471+
}
472+
473+
// HasVersion returns a boolean if a field has been set.
474+
func (o *SyntheticsCITest) HasVersion() bool {
475+
return o != nil && o.Version != nil
476+
}
477+
478+
// SetVersion gets a reference to the given int64 and assigns it to the Version field.
479+
func (o *SyntheticsCITest) SetVersion(v int64) {
480+
o.Version = &v
481+
}
482+
453483
// MarshalJSON serializes the struct using spec logic.
454484
func (o SyntheticsCITest) MarshalJSON() ([]byte, error) {
455485
toSerialize := map[string]interface{}{}
@@ -496,6 +526,9 @@ func (o SyntheticsCITest) MarshalJSON() ([]byte, error) {
496526
if o.Variables != nil {
497527
toSerialize["variables"] = o.Variables
498528
}
529+
if o.Version != nil {
530+
toSerialize["version"] = o.Version
531+
}
499532

500533
for key, value := range o.AdditionalProperties {
501534
toSerialize[key] = value
@@ -520,6 +553,7 @@ func (o *SyntheticsCITest) UnmarshalJSON(bytes []byte) (err error) {
520553
Retry *SyntheticsTestOptionsRetry `json:"retry,omitempty"`
521554
StartUrl *string `json:"startUrl,omitempty"`
522555
Variables map[string]string `json:"variables,omitempty"`
556+
Version *int64 `json:"version,omitempty"`
523557
}{}
524558
if err = datadog.Unmarshal(bytes, &all); err != nil {
525559
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -529,7 +563,7 @@ func (o *SyntheticsCITest) UnmarshalJSON(bytes []byte) (err error) {
529563
}
530564
additionalProperties := make(map[string]interface{})
531565
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
532-
datadog.DeleteKeys(additionalProperties, &[]string{"allowInsecureCertificates", "basicAuth", "body", "bodyType", "cookies", "deviceIds", "followRedirects", "headers", "locations", "metadata", "public_id", "retry", "startUrl", "variables"})
566+
datadog.DeleteKeys(additionalProperties, &[]string{"allowInsecureCertificates", "basicAuth", "body", "bodyType", "cookies", "deviceIds", "followRedirects", "headers", "locations", "metadata", "public_id", "retry", "startUrl", "variables", "version"})
533567
} else {
534568
return err
535569
}
@@ -555,6 +589,7 @@ func (o *SyntheticsCITest) UnmarshalJSON(bytes []byte) (err error) {
555589
o.Retry = all.Retry
556590
o.StartUrl = all.StartUrl
557591
o.Variables = all.Variables
592+
o.Version = all.Version
558593

559594
if len(additionalProperties) > 0 {
560595
o.AdditionalProperties = additionalProperties

0 commit comments

Comments
 (0)