Skip to content

Commit

Permalink
Revert "Enable automerging for cloudflare routes." (#2639)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec committed Aug 19, 2024
1 parent a3b504c commit a0c0e61
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 83 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-08-16 20:36:51.240342",
"spec_repo_commit": "9c789d05"
"regenerated": "2024-08-19 14:31:49.249832",
"spec_repo_commit": "a4585fac"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-08-16 20:36:51.258646",
"spec_repo_commit": "9c789d05"
"regenerated": "2024-08-19 14:31:49.268150",
"spec_repo_commit": "a4585fac"
}
}
}
7 changes: 0 additions & 7 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4426,10 +4426,6 @@ components:
CloudflareAccountResponseAttributes:
description: Attributes object of a Cloudflare account.
properties:
api_key:
description: The CloudflareAccountResponseAttributes api_key.
type: string
writeOnly: true
email:
description: The email associated with the Cloudflare account.
example: test-email@example.com
Expand Down Expand Up @@ -4502,9 +4498,6 @@ components:
key is provided (and not a token), this field is also required.
example: test-email@example.com
type: string
name:
description: The CloudflareAccountUpdateRequestAttributes name.
type: string
resources:
description: An allowlist of resources to restrict pulling metrics for.
example:
Expand Down
37 changes: 1 addition & 36 deletions api/datadogV2/model_cloudflare_account_response_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import (

// CloudflareAccountResponseAttributes Attributes object of a Cloudflare account.
type CloudflareAccountResponseAttributes struct {
// The CloudflareAccountResponseAttributes api_key.
ApiKey *string `json:"api_key,omitempty"`
// The email associated with the Cloudflare account.
Email *string `json:"email,omitempty"`
// The name of the Cloudflare account.
Expand Down Expand Up @@ -45,34 +43,6 @@ func NewCloudflareAccountResponseAttributesWithDefaults() *CloudflareAccountResp
return &this
}

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

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

// HasApiKey returns a boolean if a field has been set.
func (o *CloudflareAccountResponseAttributes) HasApiKey() bool {
return o != nil && o.ApiKey != nil
}

// SetApiKey gets a reference to the given string and assigns it to the ApiKey field.
func (o *CloudflareAccountResponseAttributes) SetApiKey(v string) {
o.ApiKey = &v
}

// GetEmail returns the Email field value if set, zero value otherwise.
func (o *CloudflareAccountResponseAttributes) GetEmail() string {
if o == nil || o.Email == nil {
Expand Down Expand Up @@ -186,9 +156,6 @@ func (o CloudflareAccountResponseAttributes) MarshalJSON() ([]byte, error) {
if o.UnparsedObject != nil {
return datadog.Marshal(o.UnparsedObject)
}
if o.ApiKey != nil {
toSerialize["api_key"] = o.ApiKey
}
if o.Email != nil {
toSerialize["email"] = o.Email
}
Expand All @@ -209,7 +176,6 @@ func (o CloudflareAccountResponseAttributes) MarshalJSON() ([]byte, error) {
// UnmarshalJSON deserializes the given payload.
func (o *CloudflareAccountResponseAttributes) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
ApiKey *string `json:"api_key,omitempty"`
Email *string `json:"email,omitempty"`
Name *string `json:"name"`
Resources []string `json:"resources,omitempty"`
Expand All @@ -223,11 +189,10 @@ func (o *CloudflareAccountResponseAttributes) UnmarshalJSON(bytes []byte) (err e
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"api_key", "email", "name", "resources", "zones"})
datadog.DeleteKeys(additionalProperties, &[]string{"email", "name", "resources", "zones"})
} else {
return err
}
o.ApiKey = all.ApiKey
o.Email = all.Email
o.Name = *all.Name
o.Resources = all.Resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ type CloudflareAccountUpdateRequestAttributes struct {
ApiKey string `json:"api_key"`
// The email associated with the Cloudflare account. If an API key is provided (and not a token), this field is also required.
Email *string `json:"email,omitempty"`
// The CloudflareAccountUpdateRequestAttributes name.
Name *string `json:"name,omitempty"`
// An allowlist of resources to restrict pulling metrics for.
Resources []string `json:"resources,omitempty"`
// An allowlist of zones to restrict pulling metrics for.
Expand Down Expand Up @@ -96,34 +94,6 @@ func (o *CloudflareAccountUpdateRequestAttributes) SetEmail(v string) {
o.Email = &v
}

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

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

// HasName returns a boolean if a field has been set.
func (o *CloudflareAccountUpdateRequestAttributes) HasName() bool {
return o != nil && o.Name != nil
}

// SetName gets a reference to the given string and assigns it to the Name field.
func (o *CloudflareAccountUpdateRequestAttributes) SetName(v string) {
o.Name = &v
}

// GetResources returns the Resources field value if set, zero value otherwise.
func (o *CloudflareAccountUpdateRequestAttributes) GetResources() []string {
if o == nil || o.Resources == nil {
Expand Down Expand Up @@ -190,9 +160,6 @@ func (o CloudflareAccountUpdateRequestAttributes) MarshalJSON() ([]byte, error)
if o.Email != nil {
toSerialize["email"] = o.Email
}
if o.Name != nil {
toSerialize["name"] = o.Name
}
if o.Resources != nil {
toSerialize["resources"] = o.Resources
}
Expand All @@ -211,7 +178,6 @@ func (o *CloudflareAccountUpdateRequestAttributes) UnmarshalJSON(bytes []byte) (
all := struct {
ApiKey *string `json:"api_key"`
Email *string `json:"email,omitempty"`
Name *string `json:"name,omitempty"`
Resources []string `json:"resources,omitempty"`
Zones []string `json:"zones,omitempty"`
}{}
Expand All @@ -223,13 +189,12 @@ func (o *CloudflareAccountUpdateRequestAttributes) UnmarshalJSON(bytes []byte) (
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"api_key", "email", "name", "resources", "zones"})
datadog.DeleteKeys(additionalProperties, &[]string{"api_key", "email", "resources", "zones"})
} else {
return err
}
o.ApiKey = *all.ApiKey
o.Email = all.Email
o.Name = all.Name
o.Resources = all.Resources
o.Zones = all.Zones

Expand Down

0 comments on commit a0c0e61

Please sign in to comment.