Skip to content

Commit

Permalink
Add orchestrator section in IP ranges (#1232)
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 Feb 10, 2023
1 parent 6de407a commit 6d7e269
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 5 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-02-08 16:22:44.829792",
"spec_repo_commit": "c826f5c2"
"regenerated": "2023-02-10 07:57:52.158791",
"spec_repo_commit": "062e75ae"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-02-08 16:22:44.841610",
"spec_repo_commit": "c826f5c2"
"regenerated": "2023-02-10 07:57:52.170778",
"spec_repo_commit": "062e75ae"
}
}
}
18 changes: 18 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3791,6 +3791,22 @@ components:
type: string
type: array
type: object
IPPrefixesOrchestrator:
description: Available prefix information for the Orchestrator endpoints.
properties:
prefixes_ipv4:
description: List of IPv4 prefixes.
items:
description: IPv4 prefix
type: string
type: array
prefixes_ipv6:
description: List of IPv6 prefixes.
items:
description: IPv6 prefix
type: string
type: array
type: object
IPPrefixesProcess:
description: Available prefix information for the Process endpoints.
properties:
Expand Down Expand Up @@ -3889,6 +3905,8 @@ components:
description: Date when last updated, in the form `YYYY-MM-DD-hh-mm-ss`.
example: 2019-10-31-20-00-00
type: string
orchestrator:
$ref: '#/components/schemas/IPPrefixesOrchestrator'
process:
$ref: '#/components/schemas/IPPrefixesProcess'
synthetics:
Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def overrides
"v1.ip_prefixes_api" => "IPPrefixesAPI",
"v1.ip_prefixes_apm" => "IPPrefixesAPM",
"v1.ip_prefixes_logs" => "IPPrefixesLogs",
"v1.ip_prefixes_orchestrator" => "IPPrefixesOrchestrator",
"v1.ip_prefixes_process" => "IPPrefixesProcess",
"v1.ip_prefixes_synthetics" => "IPPrefixesSynthetics",
"v1.ip_prefixes_synthetics_private_locations" => "IPPrefixesSyntheticsPrivateLocations",
Expand Down
105 changes: 105 additions & 0 deletions lib/datadog_api_client/v1/models/ip_prefixes_orchestrator.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
=begin
#Datadog API V1 Collection
#Collection of all Datadog Public endpoints.
The version of the OpenAPI document: 1.0
Contact: support@datadoghq.com
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
This product includes software developed at Datadog (https://www.datadoghq.com/).
Copyright 2020-Present Datadog, Inc.
=end

require 'date'
require 'time'

module DatadogAPIClient::V1
# Available prefix information for the Orchestrator endpoints.
class IPPrefixesOrchestrator
include BaseGenericModel

# Whether the object has unparsed attributes
# @!visibility private
attr_accessor :_unparsed

# List of IPv4 prefixes.
attr_accessor :prefixes_ipv4

# List of IPv6 prefixes.
attr_accessor :prefixes_ipv6

# Attribute mapping from ruby-style variable name to JSON key.
# @!visibility private
def self.attribute_map
{
:'prefixes_ipv4' => :'prefixes_ipv4',
:'prefixes_ipv6' => :'prefixes_ipv6'
}
end

# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'prefixes_ipv4' => :'Array<String>',
:'prefixes_ipv6' => :'Array<String>'
}
end

# Initializes the object
# @param attributes [Hash] Model attributes in the form of hash
# @!visibility private
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::IPPrefixesOrchestrator` initialize method"
end

# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::IPPrefixesOrchestrator`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}

if attributes.key?(:'prefixes_ipv4')
if (value = attributes[:'prefixes_ipv4']).is_a?(Array)
self.prefixes_ipv4 = value
end
end

if attributes.key?(:'prefixes_ipv6')
if (value = attributes[:'prefixes_ipv6']).is_a?(Array)
self.prefixes_ipv6 = value
end
end
end

# Check to see if the all the properties in the model are valid
# @return true if the model is valid
# @!visibility private
def valid?
true
end

# Checks equality by comparing each attribute.
# @param o [Object] Object to be compared
# @!visibility private
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
prefixes_ipv4 == o.prefixes_ipv4 &&
prefixes_ipv6 == o.prefixes_ipv6
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[prefixes_ipv4, prefixes_ipv6].hash
end
end
end
12 changes: 11 additions & 1 deletion lib/datadog_api_client/v1/models/ip_ranges.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ class IPRanges
# Date when last updated, in the form `YYYY-MM-DD-hh-mm-ss`.
attr_accessor :modified

# Available prefix information for the Orchestrator endpoints.
attr_accessor :orchestrator

# Available prefix information for the Process endpoints.
attr_accessor :process

Expand All @@ -64,6 +67,7 @@ def self.attribute_map
:'apm' => :'apm',
:'logs' => :'logs',
:'modified' => :'modified',
:'orchestrator' => :'orchestrator',
:'process' => :'process',
:'synthetics' => :'synthetics',
:'synthetics_private_locations' => :'synthetics-private-locations',
Expand All @@ -81,6 +85,7 @@ def self.openapi_types
:'apm' => :'IPPrefixesAPM',
:'logs' => :'IPPrefixesLogs',
:'modified' => :'String',
:'orchestrator' => :'IPPrefixesOrchestrator',
:'process' => :'IPPrefixesProcess',
:'synthetics' => :'IPPrefixesSynthetics',
:'synthetics_private_locations' => :'IPPrefixesSyntheticsPrivateLocations',
Expand Down Expand Up @@ -125,6 +130,10 @@ def initialize(attributes = {})
self.modified = attributes[:'modified']
end

if attributes.key?(:'orchestrator')
self.orchestrator = attributes[:'orchestrator']
end

if attributes.key?(:'process')
self.process = attributes[:'process']
end
Expand Down Expand Up @@ -164,6 +173,7 @@ def ==(o)
apm == o.apm &&
logs == o.logs &&
modified == o.modified &&
orchestrator == o.orchestrator &&
process == o.process &&
synthetics == o.synthetics &&
synthetics_private_locations == o.synthetics_private_locations &&
Expand All @@ -175,7 +185,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[agents, api, apm, logs, modified, process, synthetics, synthetics_private_locations, version, webhooks].hash
[agents, api, apm, logs, modified, orchestrator, process, synthetics, synthetics_private_locations, version, webhooks].hash
end
end
end

0 comments on commit 6d7e269

Please sign in to comment.