Skip to content

Commit

Permalink
Enable all similar routes (#2646)
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 20, 2024
1 parent c68d8d4 commit 5e5429d
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 6 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-19 19:42:21.084371",
"spec_repo_commit": "e0cd2a66"
"regenerated": "2024-08-20 17:44:45.989848",
"spec_repo_commit": "2d74b3a8"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-08-19 19:42:21.102158",
"spec_repo_commit": "e0cd2a66"
"regenerated": "2024-08-20 17:44:46.008292",
"spec_repo_commit": "2d74b3a8"
}
}
}
17 changes: 17 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4498,6 +4498,9 @@ components:
key is provided (and not a token), this field is also required.
example: test-email@example.com
type: string
name:
description: The name of the Cloudflare account.
type: string
resources:
description: An allowlist of resources to restrict pulling metrics for.
example:
Expand Down Expand Up @@ -8165,6 +8168,9 @@ components:
description: The API key of the Fastly account.
example: ABCDEFG123
type: string
name:
description: The name of the Fastly account.
type: string
type: object
FastlyAccountUpdateRequestData:
description: Data object for updating a Fastly account.
Expand Down Expand Up @@ -14345,10 +14351,12 @@ components:
custom_url:
description: The custom URL for a custom region.
example: https://example.com
format: url
type: string
name:
description: The name for the Opsgenie service.
example: fake-opsgenie-service-name
maxLength: 100
type: string
opsgenie_api_key:
description: The Opsgenie API key for your Opsgenie service.
Expand Down Expand Up @@ -14406,11 +14414,13 @@ components:
custom_url:
description: The custom URL for a custom region.
example: null
format: url
nullable: true
type: string
name:
description: The name for the Opsgenie service.
example: fake-opsgenie-service-name
maxLength: 100
type: string
region:
$ref: '#/components/schemas/OpsgenieServiceRegionType'
Expand All @@ -14423,6 +14433,8 @@ components:
id:
description: The ID of the Opsgenie service.
example: 596da4af-0563-4097-90ff-07230c3f9db3
maxLength: 100
minLength: 1
type: string
type:
$ref: '#/components/schemas/OpsgenieServiceType'
Expand All @@ -14446,11 +14458,13 @@ components:
custom_url:
description: The custom URL for a custom region.
example: https://example.com
format: url
nullable: true
type: string
name:
description: The name for the Opsgenie service.
example: fake-opsgenie-service-name
maxLength: 100
type: string
opsgenie_api_key:
description: The Opsgenie API key for your Opsgenie service.
Expand All @@ -14467,6 +14481,8 @@ components:
id:
description: The ID of the Opsgenie service.
example: 596da4af-0563-4097-90ff-07230c3f9db3
maxLength: 100
minLength: 1
type: string
type:
$ref: '#/components/schemas/OpsgenieServiceType'
Expand Down Expand Up @@ -24092,6 +24108,7 @@ components:
access to the cloud cost data source in dashboards and notebooks.
cloud_cost_management_write: Configure cloud cost accounts and global
customizations.
code_analysis_read: View Code Analysis.
continuous_profiler_pgo_read: Read and query Continuous Profiler data
for Profile-Guided Optimization (PGO).
create_webhooks: Create webhooks integrations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ 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 name of the Cloudflare account.
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 @@ -94,6 +96,34 @@ 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 @@ -160,6 +190,9 @@ 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 @@ -178,6 +211,7 @@ 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 @@ -189,12 +223,13 @@ 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", "resources", "zones"})
datadog.DeleteKeys(additionalProperties, &[]string{"api_key", "email", "name", "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
37 changes: 36 additions & 1 deletion api/datadogV2/model_fastly_account_update_request_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
type FastlyAccountUpdateRequestAttributes struct {
// The API key of the Fastly account.
ApiKey *string `json:"api_key,omitempty"`
// The name of the Fastly account.
Name *string `json:"name,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
AdditionalProperties map[string]interface{} `json:"-"`
Expand Down Expand Up @@ -62,6 +64,34 @@ func (o *FastlyAccountUpdateRequestAttributes) SetApiKey(v string) {
o.ApiKey = &v
}

// GetName returns the Name field value if set, zero value otherwise.
func (o *FastlyAccountUpdateRequestAttributes) 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 *FastlyAccountUpdateRequestAttributes) 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 *FastlyAccountUpdateRequestAttributes) 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 *FastlyAccountUpdateRequestAttributes) SetName(v string) {
o.Name = &v
}

// MarshalJSON serializes the struct using spec logic.
func (o FastlyAccountUpdateRequestAttributes) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
Expand All @@ -71,6 +101,9 @@ func (o FastlyAccountUpdateRequestAttributes) MarshalJSON() ([]byte, error) {
if o.ApiKey != nil {
toSerialize["api_key"] = o.ApiKey
}
if o.Name != nil {
toSerialize["name"] = o.Name
}

for key, value := range o.AdditionalProperties {
toSerialize[key] = value
Expand All @@ -82,17 +115,19 @@ func (o FastlyAccountUpdateRequestAttributes) MarshalJSON() ([]byte, error) {
func (o *FastlyAccountUpdateRequestAttributes) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
ApiKey *string `json:"api_key,omitempty"`
Name *string `json:"name,omitempty"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"api_key"})
datadog.DeleteKeys(additionalProperties, &[]string{"api_key", "name"})
} else {
return err
}
o.ApiKey = all.ApiKey
o.Name = all.Name

if len(additionalProperties) > 0 {
o.AdditionalProperties = additionalProperties
Expand Down

0 comments on commit 5e5429d

Please sign in to comment.