diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c554255f1343..bf6a0f68e106 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -49436,9 +49436,9 @@ components: description: The unique identifier for this component. example: databricks-zerobus-destination type: string - ingestion_endpoint: - description: Your Databricks Zerobus ingestion endpoint. This is the endpoint used to stream data directly into your Databricks Lakehouse. - example: https://my-workspace-id.zerobus.us-east-1.cloud.databricks.com + ingestion_endpoint_key: + description: Name of the environment variable or the secret identifier that references the Databricks Zerobus ingestion endpoint, which is used to stream data directly into your Databricks Lakehouse. + example: DD_OP_DESTINATION_DATABRICKS_ZEROBUS_INGESTION_ENDPOINT type: string inputs: description: A list of component IDs whose output is used as the `input` for this component. @@ -49453,17 +49453,15 @@ components: type: string type: $ref: "#/components/schemas/ObservabilityPipelineDatabricksZerobusDestinationType" - unity_catalog_endpoint: - description: Your Databricks workspace URL. This is used to communicate with the Unity Catalog API. - example: https://my-workspace.cloud.databricks.com + unity_catalog_endpoint_key: + description: Name of the environment variable or the secret identifier that references your Databricks workspace URL, which is used to communicate with the Unity Catalog API. + example: DD_OP_DESTINATION_DATABRICKS_ZEROBUS_UNITY_CATALOG_ENDPOINT type: string required: - id - type - inputs - - ingestion_endpoint - table_name - - unity_catalog_endpoint - auth type: object x-pipeline-types: [logs, rehydration] @@ -75138,6 +75136,8 @@ components: example: 1 format: int64 type: integer + weekdayPositions: + $ref: "#/components/schemas/SyntheticsDowntimeWeekdayPositions" weekdays: $ref: "#/components/schemas/SyntheticsDowntimeWeekdays" required: @@ -75155,6 +75155,8 @@ components: type: integer until: $ref: "#/components/schemas/SyntheticsDowntimeTimeSlotDate" + weekdayPositions: + $ref: "#/components/schemas/SyntheticsDowntimeWeekdayPositions" weekdays: $ref: "#/components/schemas/SyntheticsDowntimeWeekdays" required: @@ -75266,6 +75268,32 @@ components: - FRIDAY - SATURDAY - SUNDAY + SyntheticsDowntimeWeekdayPosition: + description: >- + The position of a weekday within a month for a monthly Synthetics downtime recurrence. `1` through `4` select the first through fourth occurrence of the weekday in the month, and `-1` selects the last occurrence. + enum: + - 1 + - 2 + - 3 + - 4 + - -1 + example: 1 + format: int64 + type: integer + x-enum-varnames: + - FIRST + - SECOND + - THIRD + - FOURTH + - LAST + SyntheticsDowntimeWeekdayPositions: + description: >- + Positions of the weekdays within a month for a monthly Synthetics downtime recurrence. Used in combination with `weekdays` to schedule occurrences such as "the first Monday of the month". + example: + - 1 + items: + $ref: "#/components/schemas/SyntheticsDowntimeWeekdayPosition" + type: array SyntheticsDowntimeWeekdays: description: Days of the week for a Synthetics downtime recurrence schedule. example: @@ -143383,6 +143411,7 @@ paths: operator: AND permissions: - synthetics_write + - synthetics_default_settings_write /api/v2/synthetics/downtimes/{downtime_id}: delete: description: Delete a Synthetics downtime by its ID. @@ -143425,6 +143454,7 @@ paths: operator: AND permissions: - synthetics_write + - synthetics_default_settings_write get: description: Get a Synthetics downtime by its ID. operationId: GetSyntheticsDowntime @@ -143598,6 +143628,7 @@ paths: operator: AND permissions: - synthetics_write + - synthetics_default_settings_write /api/v2/synthetics/downtimes/{downtime_id}/tests/{test_id}: delete: description: Disassociate a Synthetics test from a downtime. diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 45d174b12c04..7d056c822e23 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -5817,6 +5817,7 @@ def overrides "v2.synthetics_downtime_time_slot_request" => "SyntheticsDowntimeTimeSlotRequest", "v2.synthetics_downtime_time_slot_response" => "SyntheticsDowntimeTimeSlotResponse", "v2.synthetics_downtime_weekday" => "SyntheticsDowntimeWeekday", + "v2.synthetics_downtime_weekday_position" => "SyntheticsDowntimeWeekdayPosition", "v2.synthetics_fast_test_result" => "SyntheticsFastTestResult", "v2.synthetics_fast_test_result_attributes" => "SyntheticsFastTestResultAttributes", "v2.synthetics_fast_test_result_data" => "SyntheticsFastTestResultData", diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination.rb b/lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination.rb index b34d4233a710..ab3bfc478add 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination.rb @@ -32,8 +32,8 @@ class ObservabilityPipelineDatabricksZerobusDestination # The unique identifier for this component. attr_reader :id - # Your Databricks Zerobus ingestion endpoint. This is the endpoint used to stream data directly into your Databricks Lakehouse. - attr_reader :ingestion_endpoint + # Name of the environment variable or the secret identifier that references the Databricks Zerobus ingestion endpoint, which is used to stream data directly into your Databricks Lakehouse. + attr_accessor :ingestion_endpoint_key # A list of component IDs whose output is used as the `input` for this component. attr_reader :inputs @@ -44,8 +44,8 @@ class ObservabilityPipelineDatabricksZerobusDestination # The destination type. The value must be `databricks_zerobus`. attr_reader :type - # Your Databricks workspace URL. This is used to communicate with the Unity Catalog API. - attr_reader :unity_catalog_endpoint + # Name of the environment variable or the secret identifier that references your Databricks workspace URL, which is used to communicate with the Unity Catalog API. + attr_accessor :unity_catalog_endpoint_key attr_accessor :additional_properties @@ -56,11 +56,11 @@ def self.attribute_map :'auth' => :'auth', :'buffer' => :'buffer', :'id' => :'id', - :'ingestion_endpoint' => :'ingestion_endpoint', + :'ingestion_endpoint_key' => :'ingestion_endpoint_key', :'inputs' => :'inputs', :'table_name' => :'table_name', :'type' => :'type', - :'unity_catalog_endpoint' => :'unity_catalog_endpoint' + :'unity_catalog_endpoint_key' => :'unity_catalog_endpoint_key' } end @@ -71,11 +71,11 @@ def self.openapi_types :'auth' => :'ObservabilityPipelineDatabricksZerobusDestinationAuth', :'buffer' => :'ObservabilityPipelineBufferOptions', :'id' => :'String', - :'ingestion_endpoint' => :'String', + :'ingestion_endpoint_key' => :'String', :'inputs' => :'Array', :'table_name' => :'String', :'type' => :'ObservabilityPipelineDatabricksZerobusDestinationType', - :'unity_catalog_endpoint' => :'String' + :'unity_catalog_endpoint_key' => :'String' } end @@ -109,8 +109,8 @@ def initialize(attributes = {}) self.id = attributes[:'id'] end - if attributes.key?(:'ingestion_endpoint') - self.ingestion_endpoint = attributes[:'ingestion_endpoint'] + if attributes.key?(:'ingestion_endpoint_key') + self.ingestion_endpoint_key = attributes[:'ingestion_endpoint_key'] end if attributes.key?(:'inputs') @@ -127,8 +127,8 @@ def initialize(attributes = {}) self.type = attributes[:'type'] end - if attributes.key?(:'unity_catalog_endpoint') - self.unity_catalog_endpoint = attributes[:'unity_catalog_endpoint'] + if attributes.key?(:'unity_catalog_endpoint_key') + self.unity_catalog_endpoint_key = attributes[:'unity_catalog_endpoint_key'] end end @@ -138,11 +138,9 @@ def initialize(attributes = {}) def valid? return false if @auth.nil? return false if @id.nil? - return false if @ingestion_endpoint.nil? return false if @inputs.nil? return false if @table_name.nil? return false if @type.nil? - return false if @unity_catalog_endpoint.nil? true end @@ -166,16 +164,6 @@ def id=(id) @id = id end - # Custom attribute writer method with validation - # @param ingestion_endpoint [Object] Object to be assigned - # @!visibility private - def ingestion_endpoint=(ingestion_endpoint) - if ingestion_endpoint.nil? - fail ArgumentError, 'invalid value for "ingestion_endpoint", ingestion_endpoint cannot be nil.' - end - @ingestion_endpoint = ingestion_endpoint - end - # Custom attribute writer method with validation # @param inputs [Object] Object to be assigned # @!visibility private @@ -206,16 +194,6 @@ def type=(type) @type = type end - # Custom attribute writer method with validation - # @param unity_catalog_endpoint [Object] Object to be assigned - # @!visibility private - def unity_catalog_endpoint=(unity_catalog_endpoint) - if unity_catalog_endpoint.nil? - fail ArgumentError, 'invalid value for "unity_catalog_endpoint", unity_catalog_endpoint cannot be nil.' - end - @unity_catalog_endpoint = unity_catalog_endpoint - end - # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private @@ -245,11 +223,11 @@ def ==(o) auth == o.auth && buffer == o.buffer && id == o.id && - ingestion_endpoint == o.ingestion_endpoint && + ingestion_endpoint_key == o.ingestion_endpoint_key && inputs == o.inputs && table_name == o.table_name && type == o.type && - unity_catalog_endpoint == o.unity_catalog_endpoint && + unity_catalog_endpoint_key == o.unity_catalog_endpoint_key && additional_properties == o.additional_properties end @@ -257,7 +235,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [auth, buffer, id, ingestion_endpoint, inputs, table_name, type, unity_catalog_endpoint, additional_properties].hash + [auth, buffer, id, ingestion_endpoint_key, inputs, table_name, type, unity_catalog_endpoint_key, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/synthetics_downtime_time_slot_recurrence_request.rb b/lib/datadog_api_client/v2/models/synthetics_downtime_time_slot_recurrence_request.rb index 049598c83b68..00e33bbbfa1d 100644 --- a/lib/datadog_api_client/v2/models/synthetics_downtime_time_slot_recurrence_request.rb +++ b/lib/datadog_api_client/v2/models/synthetics_downtime_time_slot_recurrence_request.rb @@ -30,6 +30,9 @@ class SyntheticsDowntimeTimeSlotRecurrenceRequest # The interval between recurrences, relative to the frequency. attr_accessor :interval + # Positions of the weekdays within a month for a monthly Synthetics downtime recurrence. Used in combination with `weekdays` to schedule occurrences such as "the first Monday of the month". + attr_accessor :weekday_positions + # Days of the week for a Synthetics downtime recurrence schedule. attr_accessor :weekdays @@ -42,6 +45,7 @@ def self.attribute_map :'_end' => :'end', :'frequency' => :'frequency', :'interval' => :'interval', + :'weekday_positions' => :'weekdayPositions', :'weekdays' => :'weekdays' } end @@ -53,6 +57,7 @@ def self.openapi_types :'_end' => :'SyntheticsDowntimeTimeSlotDate', :'frequency' => :'SyntheticsDowntimeFrequency', :'interval' => :'Integer', + :'weekday_positions' => :'Array', :'weekdays' => :'Array' } end @@ -87,6 +92,12 @@ def initialize(attributes = {}) self.interval = attributes[:'interval'] end + if attributes.key?(:'weekday_positions') + if (value = attributes[:'weekday_positions']).is_a?(Array) + self.weekday_positions = value + end + end + if attributes.key?(:'weekdays') if (value = attributes[:'weekdays']).is_a?(Array) self.weekdays = value @@ -141,6 +152,7 @@ def ==(o) _end == o._end && frequency == o.frequency && interval == o.interval && + weekday_positions == o.weekday_positions && weekdays == o.weekdays && additional_properties == o.additional_properties end @@ -149,7 +161,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [_end, frequency, interval, weekdays, additional_properties].hash + [_end, frequency, interval, weekday_positions, weekdays, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/synthetics_downtime_time_slot_recurrence_response.rb b/lib/datadog_api_client/v2/models/synthetics_downtime_time_slot_recurrence_response.rb index 56143796e6b4..0e12e8780db0 100644 --- a/lib/datadog_api_client/v2/models/synthetics_downtime_time_slot_recurrence_response.rb +++ b/lib/datadog_api_client/v2/models/synthetics_downtime_time_slot_recurrence_response.rb @@ -30,6 +30,9 @@ class SyntheticsDowntimeTimeSlotRecurrenceResponse # A specific date and time used to define the start or end of a Synthetics downtime time slot. attr_accessor :_until + # Positions of the weekdays within a month for a monthly Synthetics downtime recurrence. Used in combination with `weekdays` to schedule occurrences such as "the first Monday of the month". + attr_accessor :weekday_positions + # Days of the week for a Synthetics downtime recurrence schedule. attr_reader :weekdays @@ -42,6 +45,7 @@ def self.attribute_map :'frequency' => :'frequency', :'interval' => :'interval', :'_until' => :'until', + :'weekday_positions' => :'weekdayPositions', :'weekdays' => :'weekdays' } end @@ -53,6 +57,7 @@ def self.openapi_types :'frequency' => :'SyntheticsDowntimeFrequency', :'interval' => :'Integer', :'_until' => :'SyntheticsDowntimeTimeSlotDate', + :'weekday_positions' => :'Array', :'weekdays' => :'Array' } end @@ -87,6 +92,12 @@ def initialize(attributes = {}) self._until = attributes[:'_until'] end + if attributes.key?(:'weekday_positions') + if (value = attributes[:'weekday_positions']).is_a?(Array) + self.weekday_positions = value + end + end + if attributes.key?(:'weekdays') if (value = attributes[:'weekdays']).is_a?(Array) self.weekdays = value @@ -163,6 +174,7 @@ def ==(o) frequency == o.frequency && interval == o.interval && _until == o._until && + weekday_positions == o.weekday_positions && weekdays == o.weekdays && additional_properties == o.additional_properties end @@ -171,7 +183,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [frequency, interval, _until, weekdays, additional_properties].hash + [frequency, interval, _until, weekday_positions, weekdays, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/synthetics_downtime_weekday_position.rb b/lib/datadog_api_client/v2/models/synthetics_downtime_weekday_position.rb new file mode 100644 index 000000000000..6cf74706e6a1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_downtime_weekday_position.rb @@ -0,0 +1,30 @@ +=begin +#Datadog API V2 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::V2 + # The position of a weekday within a month for a monthly Synthetics downtime recurrence. `1` through `4` select the first through fourth occurrence of the weekday in the month, and `-1` selects the last occurrence. + class SyntheticsDowntimeWeekdayPosition + include BaseEnumModel + + FIRST = 1.freeze + SECOND = 2.freeze + THIRD = 3.freeze + FOURTH = 4.freeze + LAST = -1.freeze + end +end