diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a27042d9b8fc..c6e015ed15cd 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -7475,89 +7475,23 @@ components: properties: data: items: - $ref: '#/components/schemas/TableRowResourceIdentifier' + $ref: '#/components/schemas/BatchDeleteRowsRequestData' maxItems: 200 type: array required: - data type: object - BatchRowsQueryDataType: - default: reference-tables-batch-rows-query - description: Resource type identifier for batch queries of reference table rows. - enum: - - reference-tables-batch-rows-query - example: reference-tables-batch-rows-query - type: string - x-enum-varnames: - - REFERENCE_TABLES_BATCH_ROWS_QUERY - BatchRowsQueryRequest: - properties: - data: - $ref: '#/components/schemas/BatchRowsQueryRequestData' - type: object - BatchRowsQueryRequestData: - properties: - attributes: - $ref: '#/components/schemas/BatchRowsQueryRequestDataAttributes' - type: - $ref: '#/components/schemas/BatchRowsQueryDataType' - required: - - type - type: object - BatchRowsQueryRequestDataAttributes: - properties: - row_ids: - example: - - row_id_1 - - row_id_2 - items: - type: string - type: array - table_id: - example: 00000000-0000-0000-0000-000000000000 - type: string - required: - - row_ids - - table_id - type: object - BatchRowsQueryResponse: - example: - data: - id: 00000000-0000-0000-0000-000000000000 - relationships: - rows: - data: - - id: row_id_1 - type: row - - id: row_id_2 - type: row - type: reference-tables-batch-rows-query - properties: - data: - $ref: '#/components/schemas/BatchRowsQueryResponseData' - type: object - BatchRowsQueryResponseData: + BatchDeleteRowsRequestData: + description: Row resource containing a single row identifier for deletion. properties: id: + example: primary_key_value type: string - relationships: - $ref: '#/components/schemas/BatchRowsQueryResponseDataRelationships' type: - $ref: '#/components/schemas/BatchRowsQueryDataType' + $ref: '#/components/schemas/TableRowResourceDataType' required: - type - type: object - BatchRowsQueryResponseDataRelationships: - properties: - rows: - $ref: '#/components/schemas/BatchRowsQueryResponseDataRelationshipsRows' - type: object - BatchRowsQueryResponseDataRelationshipsRows: - properties: - data: - items: - $ref: '#/components/schemas/TableRowResourceIdentifier' - type: array + - id type: object BatchUpsertRowsRequestArray: description: The request body for creating or updating multiple rows into a @@ -59634,6 +59568,7 @@ components: SecurityMonitoringStandardDataSource: default: logs description: Source of events, either logs, audit trail, or Datadog events. + `app_sec_spans` is deprecated in favor of `spans`. enum: - logs - audit @@ -67019,18 +66954,6 @@ components: type: string x-enum-varnames: - ROW - TableRowResourceIdentifier: - description: Row resource containing a single row identifier. - properties: - id: - example: primary_key_value - type: string - type: - $ref: '#/components/schemas/TableRowResourceDataType' - required: - - type - - id - type: object TagsEventAttribute: description: Array of tags associated with your event. example: @@ -96466,57 +96389,6 @@ paths: operator: OR permissions: - timeseries_query - /api/v2/reference-tables/queries/batch-rows: - post: - description: Batch query reference table rows by their primary key values. Returns - only found rows in the included array. - operationId: BatchRowsQuery - requestBody: - content: - application/json: - examples: - happy_path: - summary: Batch query reference table rows by their primary key values. - value: - data: - attributes: - row_ids: - - row_id_1 - - row_id_2 - table_id: 00000000-0000-0000-0000-000000000000 - type: reference-tables-batch-rows-query - schema: - $ref: '#/components/schemas/BatchRowsQueryRequest' - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/BatchRowsQueryResponse' - description: Successfully retrieved rows. Some or all requested rows were - found. Response includes found rows in the included section. - '400': - $ref: '#/components/responses/BadRequestResponse' - '403': - $ref: '#/components/responses/ForbiddenResponse' - '404': - $ref: '#/components/responses/NotFoundResponse' - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - '500': - content: - application/json: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Internal Server Error - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] - summary: Batch rows query - tags: - - Reference Tables /api/v2/reference-tables/tables: get: description: List all reference tables in this organization. diff --git a/examples/v2/reference-tables/BatchRowsQuery.rb b/examples/v2/reference-tables/BatchRowsQuery.rb deleted file mode 100644 index e1db529ef671..000000000000 --- a/examples/v2/reference-tables/BatchRowsQuery.rb +++ /dev/null @@ -1,19 +0,0 @@ -# Batch rows query returns "Successfully retrieved rows. Some or all requested rows were found. Response includes found -# rows in the included section." response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::ReferenceTablesAPI.new - -body = DatadogAPIClient::V2::BatchRowsQueryRequest.new({ - data: DatadogAPIClient::V2::BatchRowsQueryRequestData.new({ - attributes: DatadogAPIClient::V2::BatchRowsQueryRequestDataAttributes.new({ - row_ids: [ - "row_id_1", - "row_id_2", - ], - table_id: "00000000-0000-0000-0000-000000000000", - }), - type: DatadogAPIClient::V2::BatchRowsQueryDataType::REFERENCE_TABLES_BATCH_ROWS_QUERY, - }), -}) -p api_instance.batch_rows_query(body) diff --git a/examples/v2/reference-tables/DeleteRows.rb b/examples/v2/reference-tables/DeleteRows.rb index 6b9d8224b4f2..15d9ef0bca3d 100644 --- a/examples/v2/reference-tables/DeleteRows.rb +++ b/examples/v2/reference-tables/DeleteRows.rb @@ -5,7 +5,7 @@ body = DatadogAPIClient::V2::BatchDeleteRowsRequestArray.new({ data: [ - DatadogAPIClient::V2::TableRowResourceIdentifier.new({ + DatadogAPIClient::V2::BatchDeleteRowsRequestData.new({ id: "primary_key_value", type: DatadogAPIClient::V2::TableRowResourceDataType::ROW, }), diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 95f3727d7bec..32f3745ebfcb 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -3247,9 +3247,6 @@ "v2.ListConnections" => { "entity" => "String", }, - "v2.BatchRowsQuery" => { - "body" => "BatchRowsQueryRequest", - }, "v2.ListTables" => { "page_limit" => "Integer", "page_offset" => "Integer", diff --git a/features/v2/reference_tables.feature b/features/v2/reference_tables.feature index 0ba8738c6b9f..db0f84a6e55b 100644 --- a/features/v2/reference_tables.feature +++ b/features/v2/reference_tables.feature @@ -7,27 +7,6 @@ Feature: Reference Tables And a valid "appKeyAuth" key in the system And an instance of "ReferenceTables" API - @generated @skip @team:DataDog/redapl-experiences - Scenario: Batch rows query returns "Bad Request" response - Given new "BatchRowsQuery" request - And body with value {"data": {"attributes": {"row_ids": ["row_id_1", "row_id_2"], "table_id": "00000000-0000-0000-0000-000000000000"}, "type": "reference-tables-batch-rows-query"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/redapl-experiences - Scenario: Batch rows query returns "Not Found" response - Given new "BatchRowsQuery" request - And body with value {"data": {"attributes": {"row_ids": ["row_id_1", "row_id_2"], "table_id": "00000000-0000-0000-0000-000000000000"}, "type": "reference-tables-batch-rows-query"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/redapl-experiences - Scenario: Batch rows query returns "Successfully retrieved rows. Some or all requested rows were found. Response includes found rows in the included section." response - Given new "BatchRowsQuery" request - And body with value {"data": {"attributes": {"row_ids": ["row_id_1", "row_id_2"], "table_id": "00000000-0000-0000-0000-000000000000"}, "type": "reference-tables-batch-rows-query"}} - When the request is sent - Then the response status is 200 Successfully retrieved rows. Some or all requested rows were found. Response includes found rows in the included section. - @generated @skip @team:DataDog/redapl-experiences Scenario: Create reference table returns "Bad Request" response Given new "CreateReferenceTable" request diff --git a/features/v2/undo.json b/features/v2/undo.json index a04c9b283b90..e33094f9f8cd 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -3963,12 +3963,6 @@ "type": "idempotent" } }, - "BatchRowsQuery": { - "tag": "Reference Tables", - "undo": { - "type": "safe" - } - }, "ListTables": { "tag": "Reference Tables", "undo": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index ecfa13f94836..d50fa5f2e08f 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1394,14 +1394,7 @@ def overrides "v2.azure_uc_config_post_request_type" => "AzureUCConfigPostRequestType", "v2.azure_uc_configs_response" => "AzureUCConfigsResponse", "v2.batch_delete_rows_request_array" => "BatchDeleteRowsRequestArray", - "v2.batch_rows_query_data_type" => "BatchRowsQueryDataType", - "v2.batch_rows_query_request" => "BatchRowsQueryRequest", - "v2.batch_rows_query_request_data" => "BatchRowsQueryRequestData", - "v2.batch_rows_query_request_data_attributes" => "BatchRowsQueryRequestDataAttributes", - "v2.batch_rows_query_response" => "BatchRowsQueryResponse", - "v2.batch_rows_query_response_data" => "BatchRowsQueryResponseData", - "v2.batch_rows_query_response_data_relationships" => "BatchRowsQueryResponseDataRelationships", - "v2.batch_rows_query_response_data_relationships_rows" => "BatchRowsQueryResponseDataRelationshipsRows", + "v2.batch_delete_rows_request_data" => "BatchDeleteRowsRequestData", "v2.batch_upsert_rows_request_array" => "BatchUpsertRowsRequestArray", "v2.batch_upsert_rows_request_data" => "BatchUpsertRowsRequestData", "v2.batch_upsert_rows_request_data_attributes" => "BatchUpsertRowsRequestDataAttributes", @@ -5176,7 +5169,6 @@ def overrides "v2.table_row_resource_data" => "TableRowResourceData", "v2.table_row_resource_data_attributes" => "TableRowResourceDataAttributes", "v2.table_row_resource_data_type" => "TableRowResourceDataType", - "v2.table_row_resource_identifier" => "TableRowResourceIdentifier", "v2.team" => "Team", "v2.team_attributes" => "TeamAttributes", "v2.team_connection" => "TeamConnection", diff --git a/lib/datadog_api_client/v2/api/reference_tables_api.rb b/lib/datadog_api_client/v2/api/reference_tables_api.rb index 97df6f86556e..3d9c49d3da90 100644 --- a/lib/datadog_api_client/v2/api/reference_tables_api.rb +++ b/lib/datadog_api_client/v2/api/reference_tables_api.rb @@ -23,73 +23,6 @@ def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end - # Batch rows query. - # - # @see #batch_rows_query_with_http_info - def batch_rows_query(body, opts = {}) - data, _status_code, _headers = batch_rows_query_with_http_info(body, opts) - data - end - - # Batch rows query. - # - # Batch query reference table rows by their primary key values. Returns only found rows in the included array. - # - # @param body [BatchRowsQueryRequest] - # @param opts [Hash] the optional parameters - # @return [Array<(BatchRowsQueryResponse, Integer, Hash)>] BatchRowsQueryResponse data, response status code and response headers - def batch_rows_query_with_http_info(body, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ReferenceTablesAPI.batch_rows_query ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling ReferenceTablesAPI.batch_rows_query" - end - # resource path - local_var_path = '/api/v2/reference-tables/queries/batch-rows' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'BatchRowsQueryResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :batch_rows_query, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: ReferenceTablesAPI#batch_rows_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Create reference table. # # @see #create_reference_table_with_http_info diff --git a/lib/datadog_api_client/v2/models/batch_delete_rows_request_array.rb b/lib/datadog_api_client/v2/models/batch_delete_rows_request_array.rb index 6294e9bdaca4..e2603d2db05c 100644 --- a/lib/datadog_api_client/v2/models/batch_delete_rows_request_array.rb +++ b/lib/datadog_api_client/v2/models/batch_delete_rows_request_array.rb @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'Array' + :'data' => :'Array' } end diff --git a/lib/datadog_api_client/v2/models/table_row_resource_identifier.rb b/lib/datadog_api_client/v2/models/batch_delete_rows_request_data.rb similarity index 95% rename from lib/datadog_api_client/v2/models/table_row_resource_identifier.rb rename to lib/datadog_api_client/v2/models/batch_delete_rows_request_data.rb index 1c25d79a8ba9..887085c067c1 100644 --- a/lib/datadog_api_client/v2/models/table_row_resource_identifier.rb +++ b/lib/datadog_api_client/v2/models/batch_delete_rows_request_data.rb @@ -17,8 +17,8 @@ require 'time' module DatadogAPIClient::V2 - # Row resource containing a single row identifier. - class TableRowResourceIdentifier + # Row resource containing a single row identifier for deletion. + class BatchDeleteRowsRequestData include BaseGenericModel # @@ -52,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TableRowResourceIdentifier` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::BatchDeleteRowsRequestData` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/batch_rows_query_data_type.rb b/lib/datadog_api_client/v2/models/batch_rows_query_data_type.rb deleted file mode 100644 index 177ced813fd6..000000000000 --- a/lib/datadog_api_client/v2/models/batch_rows_query_data_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -=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 - # Resource type identifier for batch queries of reference table rows. - class BatchRowsQueryDataType - include BaseEnumModel - - REFERENCE_TABLES_BATCH_ROWS_QUERY = "reference-tables-batch-rows-query".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/batch_rows_query_request.rb b/lib/datadog_api_client/v2/models/batch_rows_query_request.rb deleted file mode 100644 index bbb433bdbfa6..000000000000 --- a/lib/datadog_api_client/v2/models/batch_rows_query_request.rb +++ /dev/null @@ -1,105 +0,0 @@ -=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 - # - class BatchRowsQueryRequest - include BaseGenericModel - - # - attr_accessor :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'BatchRowsQueryRequestData' - } - 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::V2::BatchRowsQueryRequest` initialize method" - end - - self.additional_properties = {} - # 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)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - 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 && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/batch_rows_query_request_data.rb b/lib/datadog_api_client/v2/models/batch_rows_query_request_data.rb deleted file mode 100644 index 6211dab61428..000000000000 --- a/lib/datadog_api_client/v2/models/batch_rows_query_request_data.rb +++ /dev/null @@ -1,133 +0,0 @@ -=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 - # - class BatchRowsQueryRequestData - include BaseGenericModel - - # - attr_accessor :attributes - - # Resource type identifier for batch queries of reference table rows. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'BatchRowsQueryRequestDataAttributes', - :'type' => :'BatchRowsQueryDataType' - } - 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::V2::BatchRowsQueryRequestData` initialize method" - end - - self.additional_properties = {} - # 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)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - 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? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - 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 && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/batch_rows_query_request_data_attributes.rb b/lib/datadog_api_client/v2/models/batch_rows_query_request_data_attributes.rb deleted file mode 100644 index 72ad6658943a..000000000000 --- a/lib/datadog_api_client/v2/models/batch_rows_query_request_data_attributes.rb +++ /dev/null @@ -1,146 +0,0 @@ -=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 - # - class BatchRowsQueryRequestDataAttributes - include BaseGenericModel - - # - attr_reader :row_ids - - # - attr_reader :table_id - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'row_ids' => :'row_ids', - :'table_id' => :'table_id' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'row_ids' => :'Array', - :'table_id' => :'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::V2::BatchRowsQueryRequestDataAttributes` initialize method" - end - - self.additional_properties = {} - # 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)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'row_ids') - if (value = attributes[:'row_ids']).is_a?(Array) - self.row_ids = value - end - end - - if attributes.key?(:'table_id') - self.table_id = attributes[:'table_id'] - 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? - return false if @row_ids.nil? - return false if @table_id.nil? - true - end - - # Custom attribute writer method with validation - # @param row_ids [Object] Object to be assigned - # @!visibility private - def row_ids=(row_ids) - if row_ids.nil? - fail ArgumentError, 'invalid value for "row_ids", row_ids cannot be nil.' - end - @row_ids = row_ids - end - - # Custom attribute writer method with validation - # @param table_id [Object] Object to be assigned - # @!visibility private - def table_id=(table_id) - if table_id.nil? - fail ArgumentError, 'invalid value for "table_id", table_id cannot be nil.' - end - @table_id = table_id - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - 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 && - row_ids == o.row_ids && - table_id == o.table_id && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [row_ids, table_id, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/batch_rows_query_response.rb b/lib/datadog_api_client/v2/models/batch_rows_query_response.rb deleted file mode 100644 index 2865198fa516..000000000000 --- a/lib/datadog_api_client/v2/models/batch_rows_query_response.rb +++ /dev/null @@ -1,105 +0,0 @@ -=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 - # - class BatchRowsQueryResponse - include BaseGenericModel - - # - attr_accessor :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'BatchRowsQueryResponseData' - } - 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::V2::BatchRowsQueryResponse` initialize method" - end - - self.additional_properties = {} - # 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)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - 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 && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/batch_rows_query_response_data.rb b/lib/datadog_api_client/v2/models/batch_rows_query_response_data.rb deleted file mode 100644 index b54fdffc3e2b..000000000000 --- a/lib/datadog_api_client/v2/models/batch_rows_query_response_data.rb +++ /dev/null @@ -1,143 +0,0 @@ -=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 - # - class BatchRowsQueryResponseData - include BaseGenericModel - - # - attr_accessor :id - - # - attr_accessor :relationships - - # Resource type identifier for batch queries of reference table rows. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'id' => :'id', - :'relationships' => :'relationships', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'id' => :'String', - :'relationships' => :'BatchRowsQueryResponseDataRelationships', - :'type' => :'BatchRowsQueryDataType' - } - 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::V2::BatchRowsQueryResponseData` initialize method" - end - - self.additional_properties = {} - # 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)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'relationships') - self.relationships = attributes[:'relationships'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - 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? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - 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 && - id == o.id && - relationships == o.relationships && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [id, relationships, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/batch_rows_query_response_data_relationships.rb b/lib/datadog_api_client/v2/models/batch_rows_query_response_data_relationships.rb deleted file mode 100644 index e348069d0e35..000000000000 --- a/lib/datadog_api_client/v2/models/batch_rows_query_response_data_relationships.rb +++ /dev/null @@ -1,105 +0,0 @@ -=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 - # - class BatchRowsQueryResponseDataRelationships - include BaseGenericModel - - # - attr_accessor :rows - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'rows' => :'rows' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'rows' => :'BatchRowsQueryResponseDataRelationshipsRows' - } - 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::V2::BatchRowsQueryResponseDataRelationships` initialize method" - end - - self.additional_properties = {} - # 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)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'rows') - self.rows = attributes[:'rows'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - 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 && - rows == o.rows && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [rows, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/batch_rows_query_response_data_relationships_rows.rb b/lib/datadog_api_client/v2/models/batch_rows_query_response_data_relationships_rows.rb deleted file mode 100644 index 717574c7b6f6..000000000000 --- a/lib/datadog_api_client/v2/models/batch_rows_query_response_data_relationships_rows.rb +++ /dev/null @@ -1,107 +0,0 @@ -=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 - # - class BatchRowsQueryResponseDataRelationshipsRows - include BaseGenericModel - - # - attr_accessor :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'Array' - } - 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::V2::BatchRowsQueryResponseDataRelationshipsRows` initialize method" - end - - self.additional_properties = {} - # 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)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - 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 && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_standard_data_source.rb b/lib/datadog_api_client/v2/models/security_monitoring_standard_data_source.rb index 0a7d420d841a..653475bb4fe3 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_standard_data_source.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_standard_data_source.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Source of events, either logs, audit trail, or Datadog events. + # Source of events, either logs, audit trail, or Datadog events. `app_sec_spans` is deprecated in favor of `spans`. class SecurityMonitoringStandardDataSource include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb b/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb index c9d738ec3fbc..b96c799da81e 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb @@ -27,7 +27,7 @@ class SecurityMonitoringStandardRuleQuery # Query extension to append to the logs query. attr_accessor :custom_query_extension - # Source of events, either logs, audit trail, or Datadog events. + # Source of events, either logs, audit trail, or Datadog events. `app_sec_spans` is deprecated in favor of `spans`. attr_accessor :data_source # Field for which the cardinality is measured. Sent as an array. diff --git a/lib/datadog_api_client/v2/models/threat_hunting_job_query.rb b/lib/datadog_api_client/v2/models/threat_hunting_job_query.rb index b95fc11323d4..f760c1a2b974 100644 --- a/lib/datadog_api_client/v2/models/threat_hunting_job_query.rb +++ b/lib/datadog_api_client/v2/models/threat_hunting_job_query.rb @@ -24,7 +24,7 @@ class ThreatHuntingJobQuery # The aggregation type. attr_accessor :aggregation - # Source of events, either logs, audit trail, or Datadog events. + # Source of events, either logs, audit trail, or Datadog events. `app_sec_spans` is deprecated in favor of `spans`. attr_accessor :data_source # Field for which the cardinality is measured. Sent as an array.