Skip to content

Commit

Permalink
Add compressedJsonDescriptor to Synthetics gRPC tests (#1932)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Apr 7, 2023
1 parent 5958bc6 commit 0e88457
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 29 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.4",
"regenerated": "2023-04-07 14:30:16.995363",
"spec_repo_commit": "642e33ec"
"regenerated": "2023-04-07 17:48:37.606299",
"spec_repo_commit": "e6f88173"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-04-07 14:30:17.009192",
"spec_repo_commit": "642e33ec"
"regenerated": "2023-04-07 17:48:37.619196",
"spec_repo_commit": "e6f88173"
}
}
}
4 changes: 4 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13932,6 +13932,10 @@ components:
example: ''
type: string
type: array
compressedJsonDescriptor:
description: A protobuf JSON descriptor that needs to be gzipped first then
base64 encoded.
type: string
dnsServer:
description: DNS server to use for DNS tests.
type: string
Expand Down
85 changes: 60 additions & 25 deletions api/datadogV1/model_synthetics_test_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ type SyntheticsTestRequest struct {
Certificate *SyntheticsTestRequestCertificate `json:"certificate,omitempty"`
// By default, the client certificate is applied on the domain of the starting URL for browser tests. If you want your client certificate to be applied on other domains instead, add them in `certificateDomains`.
CertificateDomains []string `json:"certificateDomains,omitempty"`
// A protobuf JSON descriptor that needs to be gzipped first then base64 encoded.
CompressedJsonDescriptor *string `json:"compressedJsonDescriptor,omitempty"`
// DNS server to use for DNS tests.
DnsServer *string `json:"dnsServer,omitempty"`
// DNS server port to use for DNS tests.
Expand Down Expand Up @@ -280,6 +282,34 @@ func (o *SyntheticsTestRequest) SetCertificateDomains(v []string) {
o.CertificateDomains = v
}

// GetCompressedJsonDescriptor returns the CompressedJsonDescriptor field value if set, zero value otherwise.
func (o *SyntheticsTestRequest) GetCompressedJsonDescriptor() string {
if o == nil || o.CompressedJsonDescriptor == nil {
var ret string
return ret
}
return *o.CompressedJsonDescriptor
}

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

// HasCompressedJsonDescriptor returns a boolean if a field has been set.
func (o *SyntheticsTestRequest) HasCompressedJsonDescriptor() bool {
return o != nil && o.CompressedJsonDescriptor != nil
}

// SetCompressedJsonDescriptor gets a reference to the given string and assigns it to the CompressedJsonDescriptor field.
func (o *SyntheticsTestRequest) SetCompressedJsonDescriptor(v string) {
o.CompressedJsonDescriptor = &v
}

// GetDnsServer returns the DnsServer field value if set, zero value otherwise.
func (o *SyntheticsTestRequest) GetDnsServer() string {
if o == nil || o.DnsServer == nil {
Expand Down Expand Up @@ -811,6 +841,9 @@ func (o SyntheticsTestRequest) MarshalJSON() ([]byte, error) {
if o.CertificateDomains != nil {
toSerialize["certificateDomains"] = o.CertificateDomains
}
if o.CompressedJsonDescriptor != nil {
toSerialize["compressedJsonDescriptor"] = o.CompressedJsonDescriptor
}
if o.DnsServer != nil {
toSerialize["dnsServer"] = o.DnsServer
}
Expand Down Expand Up @@ -876,31 +909,32 @@ func (o SyntheticsTestRequest) MarshalJSON() ([]byte, error) {
func (o *SyntheticsTestRequest) UnmarshalJSON(bytes []byte) (err error) {
raw := map[string]interface{}{}
all := struct {
AllowInsecure *bool `json:"allow_insecure,omitempty"`
BasicAuth *SyntheticsBasicAuth `json:"basicAuth,omitempty"`
Body *string `json:"body,omitempty"`
BodyType *SyntheticsTestRequestBodyType `json:"bodyType,omitempty"`
CallType *SyntheticsTestCallType `json:"callType,omitempty"`
Certificate *SyntheticsTestRequestCertificate `json:"certificate,omitempty"`
CertificateDomains []string `json:"certificateDomains,omitempty"`
DnsServer *string `json:"dnsServer,omitempty"`
DnsServerPort *int32 `json:"dnsServerPort,omitempty"`
FollowRedirects *bool `json:"follow_redirects,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
Host *string `json:"host,omitempty"`
Message *string `json:"message,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
Method *string `json:"method,omitempty"`
NoSavingResponseBody *bool `json:"noSavingResponseBody,omitempty"`
NumberOfPackets *int32 `json:"numberOfPackets,omitempty"`
Port *int64 `json:"port,omitempty"`
Proxy *SyntheticsTestRequestProxy `json:"proxy,omitempty"`
Query interface{} `json:"query,omitempty"`
Servername *string `json:"servername,omitempty"`
Service *string `json:"service,omitempty"`
ShouldTrackHops *bool `json:"shouldTrackHops,omitempty"`
Timeout *float64 `json:"timeout,omitempty"`
Url *string `json:"url,omitempty"`
AllowInsecure *bool `json:"allow_insecure,omitempty"`
BasicAuth *SyntheticsBasicAuth `json:"basicAuth,omitempty"`
Body *string `json:"body,omitempty"`
BodyType *SyntheticsTestRequestBodyType `json:"bodyType,omitempty"`
CallType *SyntheticsTestCallType `json:"callType,omitempty"`
Certificate *SyntheticsTestRequestCertificate `json:"certificate,omitempty"`
CertificateDomains []string `json:"certificateDomains,omitempty"`
CompressedJsonDescriptor *string `json:"compressedJsonDescriptor,omitempty"`
DnsServer *string `json:"dnsServer,omitempty"`
DnsServerPort *int32 `json:"dnsServerPort,omitempty"`
FollowRedirects *bool `json:"follow_redirects,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
Host *string `json:"host,omitempty"`
Message *string `json:"message,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
Method *string `json:"method,omitempty"`
NoSavingResponseBody *bool `json:"noSavingResponseBody,omitempty"`
NumberOfPackets *int32 `json:"numberOfPackets,omitempty"`
Port *int64 `json:"port,omitempty"`
Proxy *SyntheticsTestRequestProxy `json:"proxy,omitempty"`
Query interface{} `json:"query,omitempty"`
Servername *string `json:"servername,omitempty"`
Service *string `json:"service,omitempty"`
ShouldTrackHops *bool `json:"shouldTrackHops,omitempty"`
Timeout *float64 `json:"timeout,omitempty"`
Url *string `json:"url,omitempty"`
}{}
err = json.Unmarshal(bytes, &all)
if err != nil {
Expand Down Expand Up @@ -941,6 +975,7 @@ func (o *SyntheticsTestRequest) UnmarshalJSON(bytes []byte) (err error) {
}
o.Certificate = all.Certificate
o.CertificateDomains = all.CertificateDomains
o.CompressedJsonDescriptor = all.CompressedJsonDescriptor
o.DnsServer = all.DnsServer
o.DnsServerPort = all.DnsServerPort
o.FollowRedirects = all.FollowRedirects
Expand Down

0 comments on commit 0e88457

Please sign in to comment.